# SPDX-License-Identifier: GPL-2.0-only
# This file is part of Scapy RPC
# See https://scapy.net/ for more information
# Copyright (C) Gabriel Potter

# [ms-pla] v26.0 (Tue, 23 Apr 2024)

"""
RPC definitions for the following interfaces:
- IUnknown (v0.0): 00000000-0000-0000-C000-000000000046
- IDispatch (v0.0): 00020400-0000-0000-C000-000000000046
- IDataCollectorSet (v0.0): 03837520-098b-11d8-9414-505054503030
- IDataManager (v0.0): 03837541-098b-11d8-9414-505054503030
- IFolderAction (v0.0): 03837543-098b-11d8-9414-505054503030
- IFolderActionCollection (v0.0): 03837544-098b-11d8-9414-505054503030
- IDataCollector (v0.0): 038374ff-098b-11d8-9414-505054503030
- IPerformanceCounterDataCollector (v0.0): 03837506-098b-11d8-9414-505054503030
- ITraceDataCollector (v0.0): 0383750b-098b-11d8-9414-505054503030
- IConfigurationDataCollector (v0.0): 03837514-098b-11d8-9414-505054503030
- IAlertDataCollector (v0.0): 03837516-098b-11d8-9414-505054503030
- IApiTracingDataCollector (v0.0): 0383751a-098b-11d8-9414-505054503030
- IDataCollectorCollection (v0.0): 03837502-098b-11d8-9414-505054503030
- IDataCollectorSetCollection (v0.0): 03837524-098b-11d8-9414-505054503030
- ITraceDataProvider (v0.0): 03837512-098b-11d8-9414-505054503030
- ITraceDataProviderCollection (v0.0): 03837510-098b-11d8-9414-505054503030
- ISchedule (v0.0): 0383753a-098b-11d8-9414-505054503030
- IScheduleCollection (v0.0): 0383753d-098b-11d8-9414-505054503030
- IValueMapItem (v0.0): 03837533-098b-11d8-9414-505054503030
- IValueMap (v0.0): 03837534-098b-11d8-9414-505054503030
This file is auto-generated by midl-to-scapy, do not modify.
"""

from enum import IntEnum
import uuid

from scapy.fields import StrFixedLenField
from scapy.layers.dcerpc import (
    NDRPacket,
    DceRpcOp,
    NDRConfFieldListField,
    NDRConfPacketListField,
    NDRConfStrLenField,
    NDRConfStrLenFieldUtf16,
    NDRConfVarStrNullField,
    NDRConfVarStrNullFieldUtf16,
    NDRFullEmbPointerField,
    NDRFullPointerField,
    NDRIEEEDoubleField,
    NDRIEEEFloatField,
    NDRInt3264EnumField,
    NDRInt3264Field,
    NDRIntField,
    NDRLongField,
    NDRPacketField,
    NDRRecursiveClass,
    NDRRefEmbPointerField,
    NDRShortField,
    NDRSignedByteField,
    NDRSignedIntField,
    NDRSignedLongField,
    NDRSignedShortField,
    NDRUnionField,
    register_com_interface,
)

IUNKNOWN_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire
}
register_com_interface(
    name="IUnknown",
    uuid=uuid.UUID("00000000-0000-0000-C000-000000000046"),
    opnums=IUNKNOWN_OPNUMS,
)


class GetTypeInfoCount_Request(NDRPacket):
    fields_desc = []


class GetTypeInfoCount_Response(NDRPacket):
    fields_desc = [NDRIntField("pctinfo", 0), NDRIntField("status", 0)]


class MInterfacePointer(NDRPacket):
    ALIGNMENT = (4, 4)
    DEPORTED_CONFORMANTS = ["abData"]
    fields_desc = [
        NDRIntField("ulCntData", None, size_of="abData"),
        NDRConfStrLenField(
            "abData", "", size_is=lambda pkt: pkt.ulCntData, conformant_in_struct=True
        ),
    ]


class GetTypeInfo_Request(NDRPacket):
    fields_desc = [NDRIntField("iTInfo", 0), NDRIntField("lcid", 0)]


class GetTypeInfo_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("ppTInfo", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class GUID(NDRPacket):
    ALIGNMENT = (4, 4)
    fields_desc = [
        NDRIntField("Data1", 0),
        NDRShortField("Data2", 0),
        NDRShortField("Data3", 0),
        StrFixedLenField("Data4", "", length=8),
    ]


class GetIDsOfNames_Request(NDRPacket):
    fields_desc = [
        NDRPacketField("riid", GUID(), GUID),
        NDRConfFieldListField(
            "rgszNames",
            [],
            NDRFullPointerField(NDRConfVarStrNullFieldUtf16("", "")),
            size_is=lambda pkt: pkt.cNames,
        ),
        NDRIntField("cNames", None, size_of="rgszNames"),
        NDRIntField("lcid", 0),
    ]


class GetIDsOfNames_Response(NDRPacket):
    fields_desc = [
        NDRConfFieldListField(
            "rgDispId", [], NDRSignedIntField("", 0), size_is=lambda pkt: pkt.cNames
        ),
        NDRIntField("status", 0),
    ]


class VARENUM(IntEnum):
    VT_EMPTY = 0
    VT_NULL = 1
    VT_I2 = 2
    VT_I4 = 3
    VT_R4 = 4
    VT_R8 = 5
    VT_CY = 6
    VT_DATE = 7
    VT_BSTR = 8
    VT_DISPATCH = 9
    VT_ERROR = 10
    VT_BOOL = 11
    VT_VARIANT = 12
    VT_UNKNOWN = 13
    VT_DECIMAL = 14
    VT_I1 = 16
    VT_UI1 = 17
    VT_UI2 = 18
    VT_UI4 = 19
    VT_I8 = 20
    VT_UI8 = 21
    VT_INT = 22
    VT_UINT = 23
    VT_VOID = 24
    VT_HRESULT = 25
    VT_PTR = 26
    VT_SAFEARRAY = 27
    VT_CARRAY = 28
    VT_USERDEFINED = 29
    VT_LPSTR = 30
    VT_LPWSTR = 31
    VT_RECORD = 36
    VT_INT_PTR = 37
    VT_UINT_PTR = 38
    VT_ARRAY = 8192
    VT_BYREF = 16384


class CURRENCY(NDRPacket):
    ALIGNMENT = (8, 8)
    fields_desc = [NDRSignedLongField("int64", 0)]


class FLAGGED_WORD_BLOB(NDRPacket):
    ALIGNMENT = (4, 4)
    DEPORTED_CONFORMANTS = ["asData"]
    fields_desc = [
        NDRIntField("cBytes", 0),
        NDRIntField("clSize", None, size_of="asData"),
        NDRConfStrLenFieldUtf16(
            "asData", "", size_is=lambda pkt: pkt.clSize, conformant_in_struct=True
        ),
    ]


class SF_TYPE(IntEnum):
    SF_ERROR = VARENUM.VT_ERROR
    SF_I1 = VARENUM.VT_I1
    SF_I2 = VARENUM.VT_I2
    SF_I4 = VARENUM.VT_I4
    SF_I8 = VARENUM.VT_I8
    SF_BSTR = VARENUM.VT_BSTR
    SF_UNKNOWN = VARENUM.VT_UNKNOWN
    SF_DISPATCH = VARENUM.VT_DISPATCH
    SF_VARIANT = VARENUM.VT_VARIANT
    SF_RECORD = VARENUM.VT_RECORD
    SF_HAVEIID = VARENUM.VT_UNKNOWN | 32768


class SAFEARR_BSTR(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Size", None, size_of="aBstr"),
        NDRRefEmbPointerField(
            NDRConfPacketListField(
                "aBstr", [], FLAGGED_WORD_BLOB, size_is=lambda pkt: pkt.Size, ptr_lvl=1
            )
        ),
    ]


class SAFEARR_UNKNOWN(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Size", None, size_of="apUnknown"),
        NDRRefEmbPointerField(
            NDRConfPacketListField(
                "apUnknown",
                [],
                MInterfacePointer,
                size_is=lambda pkt: pkt.Size,
                ptr_lvl=1,
            )
        ),
    ]


class SAFEARR_DISPATCH(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Size", None, size_of="apDispatch"),
        NDRRefEmbPointerField(
            NDRConfPacketListField(
                "apDispatch",
                [],
                MInterfacePointer,
                size_is=lambda pkt: pkt.Size,
                ptr_lvl=1,
            )
        ),
    ]


class SAFEARR_VARIANT(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Size", None, size_of="aVariant"),
        NDRRefEmbPointerField(
            NDRConfPacketListField(
                "aVariant",
                [],
                NDRRecursiveClass("wireVARIANTStr"),
                size_is=lambda pkt: pkt.Size,
                ptr_lvl=1,
            )
        ),
    ]


class wireBRECORDStr(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("fFlags", 0),
        NDRIntField("clSize", None, size_of="pRecord"),
        NDRFullEmbPointerField(
            NDRPacketField("pRecInfo", MInterfacePointer(), MInterfacePointer)
        ),
        NDRFullEmbPointerField(
            NDRConfStrLenField("pRecord", "", size_is=lambda pkt: pkt.clSize)
        ),
    ]


class SAFEARR_BRECORD(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Size", None, size_of="aRecord"),
        NDRRefEmbPointerField(
            NDRConfPacketListField(
                "aRecord", [], wireBRECORDStr, size_is=lambda pkt: pkt.Size, ptr_lvl=1
            )
        ),
    ]


class SAFEARR_HAVEIID(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Size", None, size_of="apUnknown"),
        NDRRefEmbPointerField(
            NDRConfPacketListField(
                "apUnknown",
                [],
                MInterfacePointer,
                size_is=lambda pkt: pkt.Size,
                ptr_lvl=1,
            )
        ),
        NDRPacketField("iid", GUID(), GUID),
    ]


class BYTE_SIZEDARR(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("clSize", None, size_of="pData"),
        NDRFullEmbPointerField(
            NDRConfStrLenField("pData", "", size_is=lambda pkt: pkt.clSize)
        ),
    ]


class WORD_SIZEDARR(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("clSize", None, size_of="pData"),
        NDRFullEmbPointerField(
            NDRConfStrLenFieldUtf16("pData", "", size_is=lambda pkt: pkt.clSize)
        ),
    ]


class DWORD_SIZEDARR(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("clSize", None, size_of="pData"),
        NDRFullEmbPointerField(
            NDRConfFieldListField(
                "pData", [], NDRIntField("", 0), size_is=lambda pkt: pkt.clSize
            )
        ),
    ]


class HYPER_SIZEDARR(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("clSize", None, size_of="pData"),
        NDRFullEmbPointerField(
            NDRConfFieldListField(
                "pData", [], NDRSignedLongField("", 0), size_is=lambda pkt: pkt.clSize
            )
        ),
    ]


class SAFEARRAYBOUND(NDRPacket):
    ALIGNMENT = (4, 4)
    fields_desc = [NDRIntField("cElements", 0), NDRSignedIntField("lLbound", 0)]


class SAFEARRAY(NDRPacket):
    ALIGNMENT = (4, 8)
    DEPORTED_CONFORMANTS = ["rgsabound"]
    fields_desc = [
        NDRShortField("cDims", None, size_of="rgsabound"),
        NDRShortField("fFeatures", 0),
        NDRIntField("cbElements", 0),
        NDRIntField("cLocks", 0),
        NDRUnionField(
            [
                (
                    NDRPacketField("uArrayStructs", SAFEARR_BSTR(), SAFEARR_BSTR),
                    (
                        (lambda pkt: None == SF_TYPE.SF_BSTR),
                        (lambda _, val: val.tag == SF_TYPE.SF_BSTR),
                    ),
                ),
                (
                    NDRPacketField("uArrayStructs", SAFEARR_UNKNOWN(), SAFEARR_UNKNOWN),
                    (
                        (lambda pkt: None == SF_TYPE.SF_UNKNOWN),
                        (lambda _, val: val.tag == SF_TYPE.SF_UNKNOWN),
                    ),
                ),
                (
                    NDRPacketField(
                        "uArrayStructs", SAFEARR_DISPATCH(), SAFEARR_DISPATCH
                    ),
                    (
                        (lambda pkt: None == SF_TYPE.SF_DISPATCH),
                        (lambda _, val: val.tag == SF_TYPE.SF_DISPATCH),
                    ),
                ),
                (
                    NDRPacketField("uArrayStructs", SAFEARR_VARIANT(), SAFEARR_VARIANT),
                    (
                        (lambda pkt: None == SF_TYPE.SF_VARIANT),
                        (lambda _, val: val.tag == SF_TYPE.SF_VARIANT),
                    ),
                ),
                (
                    NDRPacketField("uArrayStructs", SAFEARR_BRECORD(), SAFEARR_BRECORD),
                    (
                        (lambda pkt: None == SF_TYPE.SF_RECORD),
                        (lambda _, val: val.tag == SF_TYPE.SF_RECORD),
                    ),
                ),
                (
                    NDRPacketField("uArrayStructs", SAFEARR_HAVEIID(), SAFEARR_HAVEIID),
                    (
                        (lambda pkt: None == SF_TYPE.SF_HAVEIID),
                        (lambda _, val: val.tag == SF_TYPE.SF_HAVEIID),
                    ),
                ),
                (
                    NDRPacketField("uArrayStructs", BYTE_SIZEDARR(), BYTE_SIZEDARR),
                    (
                        (lambda pkt: None == SF_TYPE.SF_I1),
                        (lambda _, val: val.tag == SF_TYPE.SF_I1),
                    ),
                ),
                (
                    NDRPacketField("uArrayStructs", WORD_SIZEDARR(), WORD_SIZEDARR),
                    (
                        (lambda pkt: None == SF_TYPE.SF_I2),
                        (lambda _, val: val.tag == SF_TYPE.SF_I2),
                    ),
                ),
                (
                    NDRPacketField("uArrayStructs", DWORD_SIZEDARR(), DWORD_SIZEDARR),
                    (
                        (lambda pkt: None == SF_TYPE.SF_I4),
                        (lambda _, val: val.tag == SF_TYPE.SF_I4),
                    ),
                ),
                (
                    NDRPacketField("uArrayStructs", HYPER_SIZEDARR(), HYPER_SIZEDARR),
                    (
                        (lambda pkt: None == SF_TYPE.SF_I8),
                        (lambda _, val: val.tag == SF_TYPE.SF_I8),
                    ),
                ),
            ],
            StrFixedLenField("uArrayStructs", "", length=0),
            align=(4, 8),
            switch_fmt=("I", "I"),
        ),
        NDRConfPacketListField(
            "rgsabound",
            [],
            SAFEARRAYBOUND,
            size_is=lambda pkt: pkt.cDims,
            conformant_in_struct=True,
        ),
    ]


class DECIMAL(NDRPacket):
    ALIGNMENT = (8, 8)
    fields_desc = [
        NDRShortField("wReserved", 0),
        NDRSignedByteField("scale", 0),
        NDRSignedByteField("sign", 0),
        NDRIntField("Hi32", 0),
        NDRLongField("Lo64", 0),
    ]


class wireVARIANTStr(NDRPacket):
    ALIGNMENT = (8, 8)
    fields_desc = [
        NDRIntField("clSize", 0),
        NDRIntField("rpcReserved", 0),
        NDRShortField("vt", 0),
        NDRShortField("wReserved1", 0),
        NDRShortField("wReserved2", 0),
        NDRShortField("wReserved3", 0),
        NDRUnionField(
            [
                (
                    NDRSignedLongField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_I8),
                        (lambda _, val: val.tag == VARENUM.VT_I8),
                    ),
                ),
                (
                    NDRSignedIntField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_I4),
                        (lambda _, val: val.tag == VARENUM.VT_I4),
                    ),
                ),
                (
                    NDRSignedByteField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_UI1),
                        (lambda _, val: val.tag == VARENUM.VT_UI1),
                    ),
                ),
                (
                    NDRSignedShortField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_I2),
                        (lambda _, val: val.tag == VARENUM.VT_I2),
                    ),
                ),
                (
                    NDRIEEEFloatField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_R4),
                        (lambda _, val: val.tag == VARENUM.VT_R4),
                    ),
                ),
                (
                    NDRIEEEDoubleField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_R8),
                        (lambda _, val: val.tag == VARENUM.VT_R8),
                    ),
                ),
                (
                    NDRSignedShortField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_BOOL),
                        (lambda _, val: val.tag == VARENUM.VT_BOOL),
                    ),
                ),
                (
                    NDRSignedIntField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_ERROR),
                        (lambda _, val: val.tag == VARENUM.VT_ERROR),
                    ),
                ),
                (
                    NDRPacketField("_varUnion", CURRENCY(), CURRENCY),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_CY),
                        (lambda _, val: val.tag == VARENUM.VT_CY),
                    ),
                ),
                (
                    NDRIEEEDoubleField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_DATE),
                        (lambda _, val: val.tag == VARENUM.VT_DATE),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRPacketField(
                            "_varUnion", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
                        )
                    ),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_BSTR),
                        (lambda _, val: val.tag == VARENUM.VT_BSTR),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRPacketField(
                            "_varUnion", MInterfacePointer(), MInterfacePointer
                        )
                    ),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_UNKNOWN),
                        (lambda _, val: val.tag == VARENUM.VT_UNKNOWN),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRPacketField(
                            "_varUnion", MInterfacePointer(), MInterfacePointer
                        )
                    ),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_DISPATCH),
                        (lambda _, val: val.tag == VARENUM.VT_DISPATCH),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRFullEmbPointerField(
                            NDRPacketField("_varUnion", SAFEARRAY(), SAFEARRAY)
                        )
                    ),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_ARRAY),
                        (lambda _, val: val.tag == VARENUM.VT_ARRAY),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRPacketField("_varUnion", wireBRECORDStr(), wireBRECORDStr)
                    ),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            in [
                                VARENUM.VT_RECORD,
                                (VARENUM.VT_RECORD | VARENUM.VT_BYREF),
                            ]
                        ),
                        (
                            lambda _, val: val.tag
                            in [
                                VARENUM.VT_RECORD,
                                (VARENUM.VT_RECORD | VARENUM.VT_BYREF),
                            ]
                        ),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRSignedByteField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_UI1 | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_UI1 | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRSignedShortField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_I2 | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_I2 | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRSignedIntField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_I4 | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_I4 | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRSignedLongField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_I8 | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_I8 | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRIEEEFloatField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_R4 | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_R4 | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRIEEEDoubleField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_R8 | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_R8 | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRSignedShortField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_BOOL | VARENUM.VT_BYREF)
                        ),
                        (
                            lambda _, val: val.tag
                            == (VARENUM.VT_BOOL | VARENUM.VT_BYREF)
                        ),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRSignedIntField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_ERROR | VARENUM.VT_BYREF)
                        ),
                        (
                            lambda _, val: val.tag
                            == (VARENUM.VT_ERROR | VARENUM.VT_BYREF)
                        ),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRPacketField("_varUnion", CURRENCY(), CURRENCY)
                    ),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_CY | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_CY | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRIEEEDoubleField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_DATE | VARENUM.VT_BYREF)
                        ),
                        (
                            lambda _, val: val.tag
                            == (VARENUM.VT_DATE | VARENUM.VT_BYREF)
                        ),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRFullEmbPointerField(
                            NDRPacketField(
                                "_varUnion", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
                            )
                        )
                    ),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_BSTR | VARENUM.VT_BYREF)
                        ),
                        (
                            lambda _, val: val.tag
                            == (VARENUM.VT_BSTR | VARENUM.VT_BYREF)
                        ),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRFullEmbPointerField(
                            NDRPacketField(
                                "_varUnion", MInterfacePointer(), MInterfacePointer
                            )
                        )
                    ),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_UNKNOWN | VARENUM.VT_BYREF)
                        ),
                        (
                            lambda _, val: val.tag
                            == (VARENUM.VT_UNKNOWN | VARENUM.VT_BYREF)
                        ),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRFullEmbPointerField(
                            NDRPacketField(
                                "_varUnion", MInterfacePointer(), MInterfacePointer
                            )
                        )
                    ),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_DISPATCH | VARENUM.VT_BYREF)
                        ),
                        (
                            lambda _, val: val.tag
                            == (VARENUM.VT_DISPATCH | VARENUM.VT_BYREF)
                        ),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRFullEmbPointerField(
                            NDRFullEmbPointerField(
                                NDRPacketField("_varUnion", SAFEARRAY(), SAFEARRAY)
                            )
                        )
                    ),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_ARRAY | VARENUM.VT_BYREF)
                        ),
                        (
                            lambda _, val: val.tag
                            == (VARENUM.VT_ARRAY | VARENUM.VT_BYREF)
                        ),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRFullEmbPointerField(
                            NDRPacketField(
                                "_varUnion", None, NDRRecursiveClass("wireVARIANTStr")
                            )
                        )
                    ),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_VARIANT | VARENUM.VT_BYREF)
                        ),
                        (
                            lambda _, val: val.tag
                            == (VARENUM.VT_VARIANT | VARENUM.VT_BYREF)
                        ),
                    ),
                ),
                (
                    NDRSignedByteField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_I1),
                        (lambda _, val: val.tag == VARENUM.VT_I1),
                    ),
                ),
                (
                    NDRShortField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_UI2),
                        (lambda _, val: val.tag == VARENUM.VT_UI2),
                    ),
                ),
                (
                    NDRIntField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_UI4),
                        (lambda _, val: val.tag == VARENUM.VT_UI4),
                    ),
                ),
                (
                    NDRLongField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_UI8),
                        (lambda _, val: val.tag == VARENUM.VT_UI8),
                    ),
                ),
                (
                    NDRSignedIntField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_INT),
                        (lambda _, val: val.tag == VARENUM.VT_INT),
                    ),
                ),
                (
                    NDRIntField("_varUnion", 0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_UINT),
                        (lambda _, val: val.tag == VARENUM.VT_UINT),
                    ),
                ),
                (
                    NDRPacketField("_varUnion", DECIMAL(), DECIMAL),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_DECIMAL),
                        (lambda _, val: val.tag == VARENUM.VT_DECIMAL),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRSignedByteField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_I1 | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_I1 | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRShortField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_UI2 | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_UI2 | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRIntField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_UI4 | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_UI4 | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRLongField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_UI8 | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_UI8 | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRSignedIntField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_INT | VARENUM.VT_BYREF)
                        ),
                        (lambda _, val: val.tag == (VARENUM.VT_INT | VARENUM.VT_BYREF)),
                    ),
                ),
                (
                    NDRFullEmbPointerField(NDRIntField("_varUnion", 0)),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_UINT | VARENUM.VT_BYREF)
                        ),
                        (
                            lambda _, val: val.tag
                            == (VARENUM.VT_UINT | VARENUM.VT_BYREF)
                        ),
                    ),
                ),
                (
                    NDRFullEmbPointerField(
                        NDRPacketField("_varUnion", DECIMAL(), DECIMAL)
                    ),
                    (
                        (
                            lambda pkt: getattr(pkt, "vt", None)
                            == (VARENUM.VT_DECIMAL | VARENUM.VT_BYREF)
                        ),
                        (
                            lambda _, val: val.tag
                            == (VARENUM.VT_DECIMAL | VARENUM.VT_BYREF)
                        ),
                    ),
                ),
                (
                    StrFixedLenField("_varUnion", "", length=0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_EMPTY),
                        (lambda _, val: val.tag == VARENUM.VT_EMPTY),
                    ),
                ),
                (
                    StrFixedLenField("_varUnion", "", length=0),
                    (
                        (lambda pkt: getattr(pkt, "vt", None) == VARENUM.VT_NULL),
                        (lambda _, val: val.tag == VARENUM.VT_NULL),
                    ),
                ),
            ],
            StrFixedLenField("_varUnion", "", length=0),
            align=(2, 8),
            switch_fmt=("H", "H"),
        ),
    ]


class DISPPARAMS(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRFullEmbPointerField(
            NDRConfPacketListField(
                "rgvarg", [], wireVARIANTStr, size_is=lambda pkt: pkt.cArgs, ptr_lvl=1
            )
        ),
        NDRFullEmbPointerField(
            NDRConfFieldListField(
                "rgdispidNamedArgs",
                [],
                NDRSignedIntField("", 0),
                size_is=lambda pkt: pkt.cNamedArgs,
            )
        ),
        NDRIntField("cArgs", None, size_of="rgvarg"),
        NDRIntField("cNamedArgs", None, size_of="rgdispidNamedArgs"),
    ]


class EXCEPINFO(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRShortField("wCode", 0),
        NDRShortField("wReserved", 0),
        NDRFullEmbPointerField(
            NDRPacketField("bstrSource", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullEmbPointerField(
            NDRPacketField("bstrDescription", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullEmbPointerField(
            NDRPacketField("bstrHelpFile", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRIntField("dwHelpContext", 0),
        NDRInt3264Field("pvReserved", 0),
        NDRInt3264Field("pfnDeferredFillIn", 0),
        NDRSignedIntField("scode", 0),
    ]


class Invoke_Request(NDRPacket):
    fields_desc = [
        NDRSignedIntField("dispIdMember", 0),
        NDRPacketField("riid", GUID(), GUID),
        NDRIntField("lcid", 0),
        NDRIntField("dwFlags", 0),
        NDRPacketField("pDispParams", DISPPARAMS(), DISPPARAMS),
        NDRIntField("cVarRef", None, size_of="rgVarRef"),
        NDRConfFieldListField(
            "rgVarRefIdx", [], NDRIntField("", 0), size_is=lambda pkt: pkt.cVarRef
        ),
        NDRConfPacketListField(
            "rgVarRef", [], wireVARIANTStr, size_is=lambda pkt: pkt.cVarRef, ptr_lvl=1
        ),
    ]


class Invoke_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("pVarResult", wireVARIANTStr(), wireVARIANTStr)
            )
        ),
        NDRPacketField("pExcepInfo", EXCEPINFO(), EXCEPINFO),
        NDRIntField("pArgErr", 0),
        NDRConfPacketListField(
            "rgVarRef", [], wireVARIANTStr, size_is=lambda pkt: pkt.cVarRef, ptr_lvl=1
        ),
        NDRIntField("status", 0),
    ]


IDISPATCH_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
}
register_com_interface(
    name="IDispatch",
    uuid=uuid.UUID("00020400-0000-0000-C000-000000000046"),
    opnums=IDISPATCH_OPNUMS,
)


class get_IDataCollectorSet_DataCollectors_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_DataCollectors_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("collectors", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollectorSet_Duration_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Duration_Response(NDRPacket):
    fields_desc = [NDRIntField("seconds", 0), NDRIntField("status", 0)]


class put_IDataCollectorSet_Duration_Request(NDRPacket):
    fields_desc = [NDRIntField("seconds", 0)]


class put_IDataCollectorSet_Duration_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_Description_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Description_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("description", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_Description_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("description", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollectorSet_Description_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_DescriptionUnresolved_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_DescriptionUnresolved_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("Descr", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollectorSet_DisplayName_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_DisplayName_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("DisplayName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_DisplayName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("DisplayName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollectorSet_DisplayName_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_DisplayNameUnresolved_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_DisplayNameUnresolved_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollectorSet_Keywords_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Keywords_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("keywords", SAFEARRAY(), SAFEARRAY)),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_Keywords_Request(NDRPacket):
    fields_desc = [NDRPacketField("keywords", SAFEARRAY(), SAFEARRAY)]


class put_IDataCollectorSet_Keywords_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_LatestOutputLocation_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_LatestOutputLocation_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_LatestOutputLocation_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollectorSet_LatestOutputLocation_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_Name_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Name_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollectorSet_OutputLocation_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_OutputLocation_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollectorSet_RootPath_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_RootPath_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("folder", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_RootPath_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("folder", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollectorSet_RootPath_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_Segment_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Segment_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("segment", 0), NDRIntField("status", 0)]


class put_IDataCollectorSet_Segment_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("segment", 0)]


class put_IDataCollectorSet_Segment_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_SegmentMaxDuration_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_SegmentMaxDuration_Response(NDRPacket):
    fields_desc = [NDRIntField("seconds", 0), NDRIntField("status", 0)]


class put_IDataCollectorSet_SegmentMaxDuration_Request(NDRPacket):
    fields_desc = [NDRIntField("seconds", 0)]


class put_IDataCollectorSet_SegmentMaxDuration_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_SegmentMaxSize_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_SegmentMaxSize_Response(NDRPacket):
    fields_desc = [NDRIntField("size", 0), NDRIntField("status", 0)]


class put_IDataCollectorSet_SegmentMaxSize_Request(NDRPacket):
    fields_desc = [NDRIntField("size", 0)]


class put_IDataCollectorSet_SegmentMaxSize_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_SerialNumber_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_SerialNumber_Response(NDRPacket):
    fields_desc = [NDRIntField("index", 0), NDRIntField("status", 0)]


class put_IDataCollectorSet_SerialNumber_Request(NDRPacket):
    fields_desc = [NDRIntField("index", 0)]


class put_IDataCollectorSet_SerialNumber_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_Server_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Server_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("server", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class DataCollectorSetStatus(IntEnum):
    plaStopped = 0
    plaRunning = 1
    plaCompiling = 2
    plaPending = 3
    plaUndefined = 4


class get_IDataCollectorSet_Status_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Status_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("status", 0, DataCollectorSetStatus),
        NDRIntField("comm_status", 0),
    ]


class get_IDataCollectorSet_Subdirectory_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Subdirectory_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("folder", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_Subdirectory_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("folder", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollectorSet_Subdirectory_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class AutoPathFormat(IntEnum):
    plaNone = 0
    plaPattern = 1
    plaComputer = 2
    plaMonthDayHour = 256
    plaSerialNumber = 512
    plaYearDayOfYear = 1024
    plaYearMonth = 2048
    plaYearMonthDay = 4096
    plaYearMonthDayHour = 8192
    plaMonthDayHourMinute = 16384


class get_IDataCollectorSet_SubdirectoryFormat_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_SubdirectoryFormat_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("format", 0, AutoPathFormat),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_SubdirectoryFormat_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("format", 0, AutoPathFormat)]


class put_IDataCollectorSet_SubdirectoryFormat_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_SubdirectoryFormatPattern_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_SubdirectoryFormatPattern_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("pattern", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_SubdirectoryFormatPattern_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("pattern", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollectorSet_SubdirectoryFormatPattern_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_Task_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Task_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("task", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_Task_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("task", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollectorSet_Task_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_TaskRunAsSelf_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_TaskRunAsSelf_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("RunAsSelf", 0), NDRIntField("status", 0)]


class put_IDataCollectorSet_TaskRunAsSelf_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("RunAsSelf", 0)]


class put_IDataCollectorSet_TaskRunAsSelf_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_TaskArguments_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_TaskArguments_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("task", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_TaskArguments_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("task", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollectorSet_TaskArguments_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_TaskUserTextArguments_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_TaskUserTextArguments_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("UserText", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_TaskUserTextArguments_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("UserText", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollectorSet_TaskUserTextArguments_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_Schedules_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Schedules_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("ppSchedules", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollectorSet_SchedulesEnabled_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_SchedulesEnabled_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("enabled", 0), NDRIntField("status", 0)]


class put_IDataCollectorSet_SchedulesEnabled_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("enabled", 0)]


class put_IDataCollectorSet_SchedulesEnabled_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_UserAccount_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_UserAccount_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("user", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollectorSet_Xml_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Xml_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("xml", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollectorSet_Security_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_Security_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("pbstrSecurity", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollectorSet_Security_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrSecurity", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollectorSet_Security_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_StopOnCompletion_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_StopOnCompletion_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("Stop", 0), NDRIntField("status", 0)]


class put_IDataCollectorSet_StopOnCompletion_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("Stop", 0)]


class put_IDataCollectorSet_StopOnCompletion_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollectorSet_DataManager_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSet_DataManager_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("DataManager", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class SetCredentials_Request(NDRPacket):
    fields_desc = []


class SetCredentials_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Query_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("server", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


class Query_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Commit_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("server", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


class Commit_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("validation", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class Delete_Request(NDRPacket):
    fields_desc = []


class Delete_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Start_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("Synchronous", 0)]


class Start_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Stop_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("Synchronous", 0)]


class Stop_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class SetXml_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("xml", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class SetXml_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("validation", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class SetValue_Request(NDRPacket):
    fields_desc = []


class SetValue_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class GetValue_Request(NDRPacket):
    fields_desc = []


class GetValue_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("value", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


IDATACOLLECTORSET_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IDataCollectorSet_DataCollectors_Request,
        get_IDataCollectorSet_DataCollectors_Response,
    ),
    8: DceRpcOp(
        get_IDataCollectorSet_Duration_Request, get_IDataCollectorSet_Duration_Response
    ),
    9: DceRpcOp(
        put_IDataCollectorSet_Duration_Request, put_IDataCollectorSet_Duration_Response
    ),
    10: DceRpcOp(
        get_IDataCollectorSet_Description_Request,
        get_IDataCollectorSet_Description_Response,
    ),
    11: DceRpcOp(
        put_IDataCollectorSet_Description_Request,
        put_IDataCollectorSet_Description_Response,
    ),
    12: DceRpcOp(
        get_IDataCollectorSet_DescriptionUnresolved_Request,
        get_IDataCollectorSet_DescriptionUnresolved_Response,
    ),
    13: DceRpcOp(
        get_IDataCollectorSet_DisplayName_Request,
        get_IDataCollectorSet_DisplayName_Response,
    ),
    14: DceRpcOp(
        put_IDataCollectorSet_DisplayName_Request,
        put_IDataCollectorSet_DisplayName_Response,
    ),
    15: DceRpcOp(
        get_IDataCollectorSet_DisplayNameUnresolved_Request,
        get_IDataCollectorSet_DisplayNameUnresolved_Response,
    ),
    16: DceRpcOp(
        get_IDataCollectorSet_Keywords_Request, get_IDataCollectorSet_Keywords_Response
    ),
    17: DceRpcOp(
        put_IDataCollectorSet_Keywords_Request, put_IDataCollectorSet_Keywords_Response
    ),
    18: DceRpcOp(
        get_IDataCollectorSet_LatestOutputLocation_Request,
        get_IDataCollectorSet_LatestOutputLocation_Response,
    ),
    19: DceRpcOp(
        put_IDataCollectorSet_LatestOutputLocation_Request,
        put_IDataCollectorSet_LatestOutputLocation_Response,
    ),
    20: DceRpcOp(
        get_IDataCollectorSet_Name_Request, get_IDataCollectorSet_Name_Response
    ),
    21: DceRpcOp(
        get_IDataCollectorSet_OutputLocation_Request,
        get_IDataCollectorSet_OutputLocation_Response,
    ),
    22: DceRpcOp(
        get_IDataCollectorSet_RootPath_Request, get_IDataCollectorSet_RootPath_Response
    ),
    23: DceRpcOp(
        put_IDataCollectorSet_RootPath_Request, put_IDataCollectorSet_RootPath_Response
    ),
    24: DceRpcOp(
        get_IDataCollectorSet_Segment_Request, get_IDataCollectorSet_Segment_Response
    ),
    25: DceRpcOp(
        put_IDataCollectorSet_Segment_Request, put_IDataCollectorSet_Segment_Response
    ),
    26: DceRpcOp(
        get_IDataCollectorSet_SegmentMaxDuration_Request,
        get_IDataCollectorSet_SegmentMaxDuration_Response,
    ),
    27: DceRpcOp(
        put_IDataCollectorSet_SegmentMaxDuration_Request,
        put_IDataCollectorSet_SegmentMaxDuration_Response,
    ),
    28: DceRpcOp(
        get_IDataCollectorSet_SegmentMaxSize_Request,
        get_IDataCollectorSet_SegmentMaxSize_Response,
    ),
    29: DceRpcOp(
        put_IDataCollectorSet_SegmentMaxSize_Request,
        put_IDataCollectorSet_SegmentMaxSize_Response,
    ),
    30: DceRpcOp(
        get_IDataCollectorSet_SerialNumber_Request,
        get_IDataCollectorSet_SerialNumber_Response,
    ),
    31: DceRpcOp(
        put_IDataCollectorSet_SerialNumber_Request,
        put_IDataCollectorSet_SerialNumber_Response,
    ),
    32: DceRpcOp(
        get_IDataCollectorSet_Server_Request, get_IDataCollectorSet_Server_Response
    ),
    33: DceRpcOp(
        get_IDataCollectorSet_Status_Request, get_IDataCollectorSet_Status_Response
    ),
    34: DceRpcOp(
        get_IDataCollectorSet_Subdirectory_Request,
        get_IDataCollectorSet_Subdirectory_Response,
    ),
    35: DceRpcOp(
        put_IDataCollectorSet_Subdirectory_Request,
        put_IDataCollectorSet_Subdirectory_Response,
    ),
    36: DceRpcOp(
        get_IDataCollectorSet_SubdirectoryFormat_Request,
        get_IDataCollectorSet_SubdirectoryFormat_Response,
    ),
    37: DceRpcOp(
        put_IDataCollectorSet_SubdirectoryFormat_Request,
        put_IDataCollectorSet_SubdirectoryFormat_Response,
    ),
    38: DceRpcOp(
        get_IDataCollectorSet_SubdirectoryFormatPattern_Request,
        get_IDataCollectorSet_SubdirectoryFormatPattern_Response,
    ),
    39: DceRpcOp(
        put_IDataCollectorSet_SubdirectoryFormatPattern_Request,
        put_IDataCollectorSet_SubdirectoryFormatPattern_Response,
    ),
    40: DceRpcOp(
        get_IDataCollectorSet_Task_Request, get_IDataCollectorSet_Task_Response
    ),
    41: DceRpcOp(
        put_IDataCollectorSet_Task_Request, put_IDataCollectorSet_Task_Response
    ),
    42: DceRpcOp(
        get_IDataCollectorSet_TaskRunAsSelf_Request,
        get_IDataCollectorSet_TaskRunAsSelf_Response,
    ),
    43: DceRpcOp(
        put_IDataCollectorSet_TaskRunAsSelf_Request,
        put_IDataCollectorSet_TaskRunAsSelf_Response,
    ),
    44: DceRpcOp(
        get_IDataCollectorSet_TaskArguments_Request,
        get_IDataCollectorSet_TaskArguments_Response,
    ),
    45: DceRpcOp(
        put_IDataCollectorSet_TaskArguments_Request,
        put_IDataCollectorSet_TaskArguments_Response,
    ),
    46: DceRpcOp(
        get_IDataCollectorSet_TaskUserTextArguments_Request,
        get_IDataCollectorSet_TaskUserTextArguments_Response,
    ),
    47: DceRpcOp(
        put_IDataCollectorSet_TaskUserTextArguments_Request,
        put_IDataCollectorSet_TaskUserTextArguments_Response,
    ),
    48: DceRpcOp(
        get_IDataCollectorSet_Schedules_Request,
        get_IDataCollectorSet_Schedules_Response,
    ),
    49: DceRpcOp(
        get_IDataCollectorSet_SchedulesEnabled_Request,
        get_IDataCollectorSet_SchedulesEnabled_Response,
    ),
    50: DceRpcOp(
        put_IDataCollectorSet_SchedulesEnabled_Request,
        put_IDataCollectorSet_SchedulesEnabled_Response,
    ),
    51: DceRpcOp(
        get_IDataCollectorSet_UserAccount_Request,
        get_IDataCollectorSet_UserAccount_Response,
    ),
    52: DceRpcOp(get_IDataCollectorSet_Xml_Request, get_IDataCollectorSet_Xml_Response),
    53: DceRpcOp(
        get_IDataCollectorSet_Security_Request, get_IDataCollectorSet_Security_Response
    ),
    54: DceRpcOp(
        put_IDataCollectorSet_Security_Request, put_IDataCollectorSet_Security_Response
    ),
    55: DceRpcOp(
        get_IDataCollectorSet_StopOnCompletion_Request,
        get_IDataCollectorSet_StopOnCompletion_Response,
    ),
    56: DceRpcOp(
        put_IDataCollectorSet_StopOnCompletion_Request,
        put_IDataCollectorSet_StopOnCompletion_Response,
    ),
    57: DceRpcOp(
        get_IDataCollectorSet_DataManager_Request,
        get_IDataCollectorSet_DataManager_Response,
    ),
    58: DceRpcOp(SetCredentials_Request, SetCredentials_Response),
    59: DceRpcOp(Query_Request, Query_Response),
    60: DceRpcOp(Commit_Request, Commit_Response),
    61: DceRpcOp(Delete_Request, Delete_Response),
    62: DceRpcOp(Start_Request, Start_Response),
    63: DceRpcOp(Stop_Request, Stop_Response),
    64: DceRpcOp(SetXml_Request, SetXml_Response),
    65: DceRpcOp(SetValue_Request, SetValue_Response),
    66: DceRpcOp(GetValue_Request, GetValue_Response),
}
register_com_interface(
    name="IDataCollectorSet",
    uuid=uuid.UUID("03837520-098b-11d8-9414-505054503030"),
    opnums=IDATACOLLECTORSET_OPNUMS,
)


class get_IDataManager_Enabled_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_Enabled_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("pfEnabled", 0), NDRIntField("status", 0)]


class put_IDataManager_Enabled_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("fEnabled", 0)]


class put_IDataManager_Enabled_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataManager_CheckBeforeRunning_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_CheckBeforeRunning_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("pfCheck", 0), NDRIntField("status", 0)]


class put_IDataManager_CheckBeforeRunning_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("fCheck", 0)]


class put_IDataManager_CheckBeforeRunning_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataManager_MinFreeDisk_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_MinFreeDisk_Response(NDRPacket):
    fields_desc = [NDRIntField("MinFreeDisk", 0), NDRIntField("status", 0)]


class put_IDataManager_MinFreeDisk_Request(NDRPacket):
    fields_desc = [NDRIntField("MinFreeDisk", 0)]


class put_IDataManager_MinFreeDisk_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataManager_MaxSize_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_MaxSize_Response(NDRPacket):
    fields_desc = [NDRIntField("pulMaxSize", 0), NDRIntField("status", 0)]


class put_IDataManager_MaxSize_Request(NDRPacket):
    fields_desc = [NDRIntField("ulMaxSize", 0)]


class put_IDataManager_MaxSize_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataManager_MaxFolderCount_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_MaxFolderCount_Response(NDRPacket):
    fields_desc = [NDRIntField("pulMaxFolderCount", 0), NDRIntField("status", 0)]


class put_IDataManager_MaxFolderCount_Request(NDRPacket):
    fields_desc = [NDRIntField("ulMaxFolderCount", 0)]


class put_IDataManager_MaxFolderCount_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class ResourcePolicy(IntEnum):
    plaDeleteLargest = 0
    plaDeleteOldest = 1


class get_IDataManager_ResourcePolicy_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_ResourcePolicy_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("pPolicy", 0, ResourcePolicy),
        NDRIntField("status", 0),
    ]


class put_IDataManager_ResourcePolicy_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("Policy", 0, ResourcePolicy)]


class put_IDataManager_ResourcePolicy_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataManager_FolderActions_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_FolderActions_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Actions", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_IDataManager_ReportSchema_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_ReportSchema_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("ReportSchema", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataManager_ReportSchema_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("ReportSchema", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataManager_ReportSchema_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataManager_ReportFileName_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_ReportFileName_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("pbstrFilename", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataManager_ReportFileName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("pbstrFilename", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataManager_ReportFileName_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataManager_RuleTargetFileName_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_RuleTargetFileName_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("Filename", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataManager_RuleTargetFileName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Filename", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataManager_RuleTargetFileName_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataManager_EventsFileName_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_EventsFileName_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("pbstrFilename", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataManager_EventsFileName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("pbstrFilename", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataManager_EventsFileName_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataManager_Rules_Request(NDRPacket):
    fields_desc = []


class get_IDataManager_Rules_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("pbstrXml", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataManager_Rules_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrXml", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataManager_Rules_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class DataManagerSteps(IntEnum):
    plaCreateReport = 1
    plaRunRules = 2
    plaCreateHtml = 4
    plaFolderActions = 8
    plaResourceFreeing = 16


class Run_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("Steps", 0, DataManagerSteps),
        NDRFullPointerField(
            NDRPacketField("bstrFolder", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


class Run_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Errors", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class Extract_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("CabFilename", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("DestinationPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


class Extract_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


IDATAMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IDataManager_Enabled_Request, get_IDataManager_Enabled_Response),
    8: DceRpcOp(put_IDataManager_Enabled_Request, put_IDataManager_Enabled_Response),
    9: DceRpcOp(
        get_IDataManager_CheckBeforeRunning_Request,
        get_IDataManager_CheckBeforeRunning_Response,
    ),
    10: DceRpcOp(
        put_IDataManager_CheckBeforeRunning_Request,
        put_IDataManager_CheckBeforeRunning_Response,
    ),
    11: DceRpcOp(
        get_IDataManager_MinFreeDisk_Request, get_IDataManager_MinFreeDisk_Response
    ),
    12: DceRpcOp(
        put_IDataManager_MinFreeDisk_Request, put_IDataManager_MinFreeDisk_Response
    ),
    13: DceRpcOp(get_IDataManager_MaxSize_Request, get_IDataManager_MaxSize_Response),
    14: DceRpcOp(put_IDataManager_MaxSize_Request, put_IDataManager_MaxSize_Response),
    15: DceRpcOp(
        get_IDataManager_MaxFolderCount_Request,
        get_IDataManager_MaxFolderCount_Response,
    ),
    16: DceRpcOp(
        put_IDataManager_MaxFolderCount_Request,
        put_IDataManager_MaxFolderCount_Response,
    ),
    17: DceRpcOp(
        get_IDataManager_ResourcePolicy_Request,
        get_IDataManager_ResourcePolicy_Response,
    ),
    18: DceRpcOp(
        put_IDataManager_ResourcePolicy_Request,
        put_IDataManager_ResourcePolicy_Response,
    ),
    19: DceRpcOp(
        get_IDataManager_FolderActions_Request, get_IDataManager_FolderActions_Response
    ),
    20: DceRpcOp(
        get_IDataManager_ReportSchema_Request, get_IDataManager_ReportSchema_Response
    ),
    21: DceRpcOp(
        put_IDataManager_ReportSchema_Request, put_IDataManager_ReportSchema_Response
    ),
    22: DceRpcOp(
        get_IDataManager_ReportFileName_Request,
        get_IDataManager_ReportFileName_Response,
    ),
    23: DceRpcOp(
        put_IDataManager_ReportFileName_Request,
        put_IDataManager_ReportFileName_Response,
    ),
    24: DceRpcOp(
        get_IDataManager_RuleTargetFileName_Request,
        get_IDataManager_RuleTargetFileName_Response,
    ),
    25: DceRpcOp(
        put_IDataManager_RuleTargetFileName_Request,
        put_IDataManager_RuleTargetFileName_Response,
    ),
    26: DceRpcOp(
        get_IDataManager_EventsFileName_Request,
        get_IDataManager_EventsFileName_Response,
    ),
    27: DceRpcOp(
        put_IDataManager_EventsFileName_Request,
        put_IDataManager_EventsFileName_Response,
    ),
    28: DceRpcOp(get_IDataManager_Rules_Request, get_IDataManager_Rules_Response),
    29: DceRpcOp(put_IDataManager_Rules_Request, put_IDataManager_Rules_Response),
    30: DceRpcOp(Run_Request, Run_Response),
    31: DceRpcOp(Extract_Request, Extract_Response),
}
register_com_interface(
    name="IDataManager",
    uuid=uuid.UUID("03837541-098b-11d8-9414-505054503030"),
    opnums=IDATAMANAGER_OPNUMS,
)


class get_IFolderAction_Age_Request(NDRPacket):
    fields_desc = []


class get_IFolderAction_Age_Response(NDRPacket):
    fields_desc = [NDRIntField("pulAge", 0), NDRIntField("status", 0)]


class put_IFolderAction_Age_Request(NDRPacket):
    fields_desc = [NDRIntField("ulAge", 0)]


class put_IFolderAction_Age_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IFolderAction_Size_Request(NDRPacket):
    fields_desc = []


class get_IFolderAction_Size_Response(NDRPacket):
    fields_desc = [NDRIntField("pulAge", 0), NDRIntField("status", 0)]


class put_IFolderAction_Size_Request(NDRPacket):
    fields_desc = [NDRIntField("ulAge", 0)]


class put_IFolderAction_Size_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class FolderActionSteps(IntEnum):
    plaCreateCab = 1
    plaDeleteData = 2
    plaSendCab = 4
    plaDeleteCab = 8
    plaDeleteReport = 16


class get_IFolderAction_Actions_Request(NDRPacket):
    fields_desc = []


class get_IFolderAction_Actions_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("Steps", 0, FolderActionSteps),
        NDRIntField("status", 0),
    ]


class put_IFolderAction_Actions_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("Steps", 0, FolderActionSteps)]


class put_IFolderAction_Actions_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IFolderAction_SendCabTo_Request(NDRPacket):
    fields_desc = []


class get_IFolderAction_SendCabTo_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField(
                    "pbstrDestination", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
                )
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IFolderAction_SendCabTo_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrDestination", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IFolderAction_SendCabTo_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


IFOLDERACTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFolderAction_Age_Request, get_IFolderAction_Age_Response),
    8: DceRpcOp(put_IFolderAction_Age_Request, put_IFolderAction_Age_Response),
    9: DceRpcOp(get_IFolderAction_Size_Request, get_IFolderAction_Size_Response),
    10: DceRpcOp(put_IFolderAction_Size_Request, put_IFolderAction_Size_Response),
    11: DceRpcOp(get_IFolderAction_Actions_Request, get_IFolderAction_Actions_Response),
    12: DceRpcOp(put_IFolderAction_Actions_Request, put_IFolderAction_Actions_Response),
    13: DceRpcOp(
        get_IFolderAction_SendCabTo_Request, get_IFolderAction_SendCabTo_Response
    ),
    14: DceRpcOp(
        put_IFolderAction_SendCabTo_Request, put_IFolderAction_SendCabTo_Response
    ),
}
register_com_interface(
    name="IFolderAction",
    uuid=uuid.UUID("03837543-098b-11d8-9414-505054503030"),
    opnums=IFOLDERACTION_OPNUMS,
)


class get_IFolderActionCollection_Count_Request(NDRPacket):
    fields_desc = []


class get_IFolderActionCollection_Count_Response(NDRPacket):
    fields_desc = [NDRIntField("Count", 0), NDRIntField("status", 0)]


class get_IFolderActionCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("Index", wireVARIANTStr(), wireVARIANTStr))
    ]


class get_IFolderActionCollection_Item_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Action", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_IFolderActionCollection__NewEnum_Request(NDRPacket):
    fields_desc = []


class get_IFolderActionCollection__NewEnum_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Enum", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class Add_Request(NDRPacket):
    fields_desc = []


class Add_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Remove_Request(NDRPacket):
    fields_desc = []


class Remove_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Clear_Request(NDRPacket):
    fields_desc = []


class Clear_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class AddRange_Request(NDRPacket):
    fields_desc = []


class AddRange_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class CreateFolderAction_Request(NDRPacket):
    fields_desc = []


class CreateFolderAction_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("FolderAction", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


IFOLDERACTIONCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFolderActionCollection_Count_Request,
        get_IFolderActionCollection_Count_Response,
    ),
    8: DceRpcOp(
        get_IFolderActionCollection_Item_Request,
        get_IFolderActionCollection_Item_Response,
    ),
    9: DceRpcOp(
        get_IFolderActionCollection__NewEnum_Request,
        get_IFolderActionCollection__NewEnum_Response,
    ),
    10: DceRpcOp(Add_Request, Add_Response),
    11: DceRpcOp(Remove_Request, Remove_Response),
    12: DceRpcOp(Clear_Request, Clear_Response),
    13: DceRpcOp(AddRange_Request, AddRange_Response),
    14: DceRpcOp(CreateFolderAction_Request, CreateFolderAction_Response),
}
register_com_interface(
    name="IFolderActionCollection",
    uuid=uuid.UUID("03837544-098b-11d8-9414-505054503030"),
    opnums=IFOLDERACTIONCOLLECTION_OPNUMS,
)


class get_IDataCollector_DataCollectorSet_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_DataCollectorSet_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("group", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class DataCollectorType(IntEnum):
    plaPerformanceCounter = 0
    plaTrace = 1
    plaConfiguration = 2
    plaAlert = 3
    plaApiTrace = 4


class get_IDataCollector_DataCollectorType_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_DataCollectorType_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("type", 0, DataCollectorType),
        NDRIntField("status", 0),
    ]


class get_IDataCollector_FileName_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_FileName_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollector_FileName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollector_FileName_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollector_FileNameFormat_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_FileNameFormat_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("format", 0, AutoPathFormat),
        NDRIntField("status", 0),
    ]


class put_IDataCollector_FileNameFormat_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("format", 0, AutoPathFormat)]


class put_IDataCollector_FileNameFormat_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollector_FileNameFormatPattern_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_FileNameFormatPattern_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("pattern", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollector_FileNameFormatPattern_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("pattern", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollector_FileNameFormatPattern_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollector_LatestOutputLocation_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_LatestOutputLocation_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollector_LatestOutputLocation_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollector_LatestOutputLocation_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollector_LogAppend_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_LogAppend_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("append", 0), NDRIntField("status", 0)]


class put_IDataCollector_LogAppend_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("append", 0)]


class put_IDataCollector_LogAppend_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollector_LogCircular_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_LogCircular_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("circular", 0), NDRIntField("status", 0)]


class put_IDataCollector_LogCircular_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("circular", 0)]


class put_IDataCollector_LogCircular_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollector_LogOverwrite_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_LogOverwrite_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("overwrite", 0), NDRIntField("status", 0)]


class put_IDataCollector_LogOverwrite_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("overwrite", 0)]


class put_IDataCollector_LogOverwrite_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollector_Name_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_Name_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IDataCollector_Name_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IDataCollector_Name_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IDataCollector_OutputLocation_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_OutputLocation_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollector_Index_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_Index_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("index", 0), NDRIntField("status", 0)]


class get_IDataCollector_Xml_Request(NDRPacket):
    fields_desc = []


class get_IDataCollector_Xml_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("Xml", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class SetXml_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Xml", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class SetXml_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Validation", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


IDATACOLLECTOR_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IDataCollector_DataCollectorSet_Request,
        get_IDataCollector_DataCollectorSet_Response,
    ),
    # 8: Opnum8NotUsedOnWire,
    9: DceRpcOp(
        get_IDataCollector_DataCollectorType_Request,
        get_IDataCollector_DataCollectorType_Response,
    ),
    10: DceRpcOp(
        get_IDataCollector_FileName_Request, get_IDataCollector_FileName_Response
    ),
    11: DceRpcOp(
        put_IDataCollector_FileName_Request, put_IDataCollector_FileName_Response
    ),
    12: DceRpcOp(
        get_IDataCollector_FileNameFormat_Request,
        get_IDataCollector_FileNameFormat_Response,
    ),
    13: DceRpcOp(
        put_IDataCollector_FileNameFormat_Request,
        put_IDataCollector_FileNameFormat_Response,
    ),
    14: DceRpcOp(
        get_IDataCollector_FileNameFormatPattern_Request,
        get_IDataCollector_FileNameFormatPattern_Response,
    ),
    15: DceRpcOp(
        put_IDataCollector_FileNameFormatPattern_Request,
        put_IDataCollector_FileNameFormatPattern_Response,
    ),
    16: DceRpcOp(
        get_IDataCollector_LatestOutputLocation_Request,
        get_IDataCollector_LatestOutputLocation_Response,
    ),
    17: DceRpcOp(
        put_IDataCollector_LatestOutputLocation_Request,
        put_IDataCollector_LatestOutputLocation_Response,
    ),
    18: DceRpcOp(
        get_IDataCollector_LogAppend_Request, get_IDataCollector_LogAppend_Response
    ),
    19: DceRpcOp(
        put_IDataCollector_LogAppend_Request, put_IDataCollector_LogAppend_Response
    ),
    20: DceRpcOp(
        get_IDataCollector_LogCircular_Request, get_IDataCollector_LogCircular_Response
    ),
    21: DceRpcOp(
        put_IDataCollector_LogCircular_Request, put_IDataCollector_LogCircular_Response
    ),
    22: DceRpcOp(
        get_IDataCollector_LogOverwrite_Request,
        get_IDataCollector_LogOverwrite_Response,
    ),
    23: DceRpcOp(
        put_IDataCollector_LogOverwrite_Request,
        put_IDataCollector_LogOverwrite_Response,
    ),
    24: DceRpcOp(get_IDataCollector_Name_Request, get_IDataCollector_Name_Response),
    25: DceRpcOp(put_IDataCollector_Name_Request, put_IDataCollector_Name_Response),
    26: DceRpcOp(
        get_IDataCollector_OutputLocation_Request,
        get_IDataCollector_OutputLocation_Response,
    ),
    27: DceRpcOp(get_IDataCollector_Index_Request, get_IDataCollector_Index_Response),
    # 28: Opnum28NotUsedOnWire,
    29: DceRpcOp(get_IDataCollector_Xml_Request, get_IDataCollector_Xml_Response),
    30: DceRpcOp(SetXml_Request, SetXml_Response),
    # 31: Opnum31NotUsedOnWire
}
register_com_interface(
    name="IDataCollector",
    uuid=uuid.UUID("038374ff-098b-11d8-9414-505054503030"),
    opnums=IDATACOLLECTOR_OPNUMS,
)


class get_IPerformanceCounterDataCollector_DataSourceName_Request(NDRPacket):
    fields_desc = []


class get_IPerformanceCounterDataCollector_DataSourceName_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("dsn", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IPerformanceCounterDataCollector_DataSourceName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("dsn", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IPerformanceCounterDataCollector_DataSourceName_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IPerformanceCounterDataCollector_PerformanceCounters_Request(NDRPacket):
    fields_desc = []


class get_IPerformanceCounterDataCollector_PerformanceCounters_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("counters", SAFEARRAY(), SAFEARRAY)),
        NDRIntField("status", 0),
    ]


class put_IPerformanceCounterDataCollector_PerformanceCounters_Request(NDRPacket):
    fields_desc = [NDRPacketField("counters", SAFEARRAY(), SAFEARRAY)]


class put_IPerformanceCounterDataCollector_PerformanceCounters_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class FileFormat(IntEnum):
    plaCommaSeparated = 0
    plaTabSeparated = 1
    plaSql = 2
    plaBinary = 3


class get_IPerformanceCounterDataCollector_LogFileFormat_Request(NDRPacket):
    fields_desc = []


class get_IPerformanceCounterDataCollector_LogFileFormat_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("format", 0, FileFormat),
        NDRIntField("status", 0),
    ]


class put_IPerformanceCounterDataCollector_LogFileFormat_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("format", 0, FileFormat)]


class put_IPerformanceCounterDataCollector_LogFileFormat_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IPerformanceCounterDataCollector_SampleInterval_Request(NDRPacket):
    fields_desc = []


class get_IPerformanceCounterDataCollector_SampleInterval_Response(NDRPacket):
    fields_desc = [NDRIntField("interval", 0), NDRIntField("status", 0)]


class put_IPerformanceCounterDataCollector_SampleInterval_Request(NDRPacket):
    fields_desc = [NDRIntField("interval", 0)]


class put_IPerformanceCounterDataCollector_SampleInterval_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IPerformanceCounterDataCollector_SegmentMaxRecords_Request(NDRPacket):
    fields_desc = []


class get_IPerformanceCounterDataCollector_SegmentMaxRecords_Response(NDRPacket):
    fields_desc = [NDRIntField("records", 0), NDRIntField("status", 0)]


class put_IPerformanceCounterDataCollector_SegmentMaxRecords_Request(NDRPacket):
    fields_desc = [NDRIntField("records", 0)]


class put_IPerformanceCounterDataCollector_SegmentMaxRecords_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


IPERFORMANCECOUNTERDATACOLLECTOR_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IDataCollector_DataCollectorSet_Request,
        get_IDataCollector_DataCollectorSet_Response,
    ),
    # 8: Opnum8NotUsedOnWire,
    9: DceRpcOp(
        get_IDataCollector_DataCollectorType_Request,
        get_IDataCollector_DataCollectorType_Response,
    ),
    10: DceRpcOp(
        get_IDataCollector_FileName_Request, get_IDataCollector_FileName_Response
    ),
    11: DceRpcOp(
        put_IDataCollector_FileName_Request, put_IDataCollector_FileName_Response
    ),
    12: DceRpcOp(
        get_IDataCollector_FileNameFormat_Request,
        get_IDataCollector_FileNameFormat_Response,
    ),
    13: DceRpcOp(
        put_IDataCollector_FileNameFormat_Request,
        put_IDataCollector_FileNameFormat_Response,
    ),
    14: DceRpcOp(
        get_IDataCollector_FileNameFormatPattern_Request,
        get_IDataCollector_FileNameFormatPattern_Response,
    ),
    15: DceRpcOp(
        put_IDataCollector_FileNameFormatPattern_Request,
        put_IDataCollector_FileNameFormatPattern_Response,
    ),
    16: DceRpcOp(
        get_IDataCollector_LatestOutputLocation_Request,
        get_IDataCollector_LatestOutputLocation_Response,
    ),
    17: DceRpcOp(
        put_IDataCollector_LatestOutputLocation_Request,
        put_IDataCollector_LatestOutputLocation_Response,
    ),
    18: DceRpcOp(
        get_IDataCollector_LogAppend_Request, get_IDataCollector_LogAppend_Response
    ),
    19: DceRpcOp(
        put_IDataCollector_LogAppend_Request, put_IDataCollector_LogAppend_Response
    ),
    20: DceRpcOp(
        get_IDataCollector_LogCircular_Request, get_IDataCollector_LogCircular_Response
    ),
    21: DceRpcOp(
        put_IDataCollector_LogCircular_Request, put_IDataCollector_LogCircular_Response
    ),
    22: DceRpcOp(
        get_IDataCollector_LogOverwrite_Request,
        get_IDataCollector_LogOverwrite_Response,
    ),
    23: DceRpcOp(
        put_IDataCollector_LogOverwrite_Request,
        put_IDataCollector_LogOverwrite_Response,
    ),
    24: DceRpcOp(get_IDataCollector_Name_Request, get_IDataCollector_Name_Response),
    25: DceRpcOp(put_IDataCollector_Name_Request, put_IDataCollector_Name_Response),
    26: DceRpcOp(
        get_IDataCollector_OutputLocation_Request,
        get_IDataCollector_OutputLocation_Response,
    ),
    27: DceRpcOp(get_IDataCollector_Index_Request, get_IDataCollector_Index_Response),
    # 28: Opnum28NotUsedOnWire,
    29: DceRpcOp(get_IDataCollector_Xml_Request, get_IDataCollector_Xml_Response),
    30: DceRpcOp(SetXml_Request, SetXml_Response),
    # 31: Opnum31NotUsedOnWire,
    32: DceRpcOp(
        get_IPerformanceCounterDataCollector_DataSourceName_Request,
        get_IPerformanceCounterDataCollector_DataSourceName_Response,
    ),
    33: DceRpcOp(
        put_IPerformanceCounterDataCollector_DataSourceName_Request,
        put_IPerformanceCounterDataCollector_DataSourceName_Response,
    ),
    34: DceRpcOp(
        get_IPerformanceCounterDataCollector_PerformanceCounters_Request,
        get_IPerformanceCounterDataCollector_PerformanceCounters_Response,
    ),
    35: DceRpcOp(
        put_IPerformanceCounterDataCollector_PerformanceCounters_Request,
        put_IPerformanceCounterDataCollector_PerformanceCounters_Response,
    ),
    36: DceRpcOp(
        get_IPerformanceCounterDataCollector_LogFileFormat_Request,
        get_IPerformanceCounterDataCollector_LogFileFormat_Response,
    ),
    37: DceRpcOp(
        put_IPerformanceCounterDataCollector_LogFileFormat_Request,
        put_IPerformanceCounterDataCollector_LogFileFormat_Response,
    ),
    38: DceRpcOp(
        get_IPerformanceCounterDataCollector_SampleInterval_Request,
        get_IPerformanceCounterDataCollector_SampleInterval_Response,
    ),
    39: DceRpcOp(
        put_IPerformanceCounterDataCollector_SampleInterval_Request,
        put_IPerformanceCounterDataCollector_SampleInterval_Response,
    ),
    40: DceRpcOp(
        get_IPerformanceCounterDataCollector_SegmentMaxRecords_Request,
        get_IPerformanceCounterDataCollector_SegmentMaxRecords_Response,
    ),
    41: DceRpcOp(
        put_IPerformanceCounterDataCollector_SegmentMaxRecords_Request,
        put_IPerformanceCounterDataCollector_SegmentMaxRecords_Response,
    ),
}
register_com_interface(
    name="IPerformanceCounterDataCollector",
    uuid=uuid.UUID("03837506-098b-11d8-9414-505054503030"),
    opnums=IPERFORMANCECOUNTERDATACOLLECTOR_OPNUMS,
)


class get_ITraceDataCollector_BufferSize_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_BufferSize_Response(NDRPacket):
    fields_desc = [NDRIntField("size", 0), NDRIntField("status", 0)]


class put_ITraceDataCollector_BufferSize_Request(NDRPacket):
    fields_desc = [NDRIntField("size", 0)]


class put_ITraceDataCollector_BufferSize_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_BuffersLost_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_BuffersLost_Response(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0), NDRIntField("status", 0)]


class get_ITraceDataCollector_BuffersWritten_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_BuffersWritten_Response(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0), NDRIntField("status", 0)]


class ClockType(IntEnum):
    plaTimeStamp = 0
    plaPerformance = 1
    plaSystem = 2
    plaCycle = 3


class get_ITraceDataCollector_ClockType_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_ClockType_Response(NDRPacket):
    fields_desc = [NDRInt3264EnumField("clock", 0, ClockType), NDRIntField("status", 0)]


class put_ITraceDataCollector_ClockType_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("clock", 0, ClockType)]


class put_ITraceDataCollector_ClockType_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_EventsLost_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_EventsLost_Response(NDRPacket):
    fields_desc = [NDRIntField("events", 0), NDRIntField("status", 0)]


class get_ITraceDataCollector_ExtendedModes_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_ExtendedModes_Response(NDRPacket):
    fields_desc = [NDRIntField("mode", 0), NDRIntField("status", 0)]


class put_ITraceDataCollector_ExtendedModes_Request(NDRPacket):
    fields_desc = [NDRIntField("mode", 0)]


class put_ITraceDataCollector_ExtendedModes_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_FlushTimer_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_FlushTimer_Response(NDRPacket):
    fields_desc = [NDRIntField("seconds", 0), NDRIntField("status", 0)]


class put_ITraceDataCollector_FlushTimer_Request(NDRPacket):
    fields_desc = [NDRIntField("seconds", 0)]


class put_ITraceDataCollector_FlushTimer_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_FreeBuffers_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_FreeBuffers_Response(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0), NDRIntField("status", 0)]


class get_ITraceDataCollector_Guid_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_Guid_Response(NDRPacket):
    fields_desc = [NDRPacketField("guid", GUID(), GUID), NDRIntField("status", 0)]


class put_ITraceDataCollector_Guid_Request(NDRPacket):
    fields_desc = [NDRPacketField("guid", GUID(), GUID)]


class put_ITraceDataCollector_Guid_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_IsKernelTrace_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_IsKernelTrace_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("kernel", 0), NDRIntField("status", 0)]


class get_ITraceDataCollector_MaximumBuffers_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_MaximumBuffers_Response(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0), NDRIntField("status", 0)]


class put_ITraceDataCollector_MaximumBuffers_Request(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0)]


class put_ITraceDataCollector_MaximumBuffers_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_MinimumBuffers_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_MinimumBuffers_Response(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0), NDRIntField("status", 0)]


class put_ITraceDataCollector_MinimumBuffers_Request(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0)]


class put_ITraceDataCollector_MinimumBuffers_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_NumberOfBuffers_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_NumberOfBuffers_Response(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0), NDRIntField("status", 0)]


class put_ITraceDataCollector_NumberOfBuffers_Request(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0)]


class put_ITraceDataCollector_NumberOfBuffers_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_PreallocateFile_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_PreallocateFile_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("allocate", 0), NDRIntField("status", 0)]


class put_ITraceDataCollector_PreallocateFile_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("allocate", 0)]


class put_ITraceDataCollector_PreallocateFile_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_ProcessMode_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_ProcessMode_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("process", 0), NDRIntField("status", 0)]


class put_ITraceDataCollector_ProcessMode_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("process", 0)]


class put_ITraceDataCollector_ProcessMode_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_RealTimeBuffersLost_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_RealTimeBuffersLost_Response(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0), NDRIntField("status", 0)]


class get_ITraceDataCollector_SessionId_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_SessionId_Response(NDRPacket):
    fields_desc = [NDRLongField("id", 0), NDRIntField("status", 0)]


class get_ITraceDataCollector_SessionName_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_SessionName_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_ITraceDataCollector_SessionName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_ITraceDataCollector_SessionName_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_SessionThreadId_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_SessionThreadId_Response(NDRPacket):
    fields_desc = [NDRIntField("tid", 0), NDRIntField("status", 0)]


class StreamMode(IntEnum):
    plaFile = 1
    plaRealTime = 2
    plaBoth = 3
    plaBuffering = 4


class get_ITraceDataCollector_StreamMode_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_StreamMode_Response(NDRPacket):
    fields_desc = [NDRInt3264EnumField("mode", 0, StreamMode), NDRIntField("status", 0)]


class put_ITraceDataCollector_StreamMode_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("mode", 0, StreamMode)]


class put_ITraceDataCollector_StreamMode_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataCollector_TraceDataProviders_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataCollector_TraceDataProviders_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("providers", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


ITRACEDATACOLLECTOR_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IDataCollector_DataCollectorSet_Request,
        get_IDataCollector_DataCollectorSet_Response,
    ),
    # 8: Opnum8NotUsedOnWire,
    9: DceRpcOp(
        get_IDataCollector_DataCollectorType_Request,
        get_IDataCollector_DataCollectorType_Response,
    ),
    10: DceRpcOp(
        get_IDataCollector_FileName_Request, get_IDataCollector_FileName_Response
    ),
    11: DceRpcOp(
        put_IDataCollector_FileName_Request, put_IDataCollector_FileName_Response
    ),
    12: DceRpcOp(
        get_IDataCollector_FileNameFormat_Request,
        get_IDataCollector_FileNameFormat_Response,
    ),
    13: DceRpcOp(
        put_IDataCollector_FileNameFormat_Request,
        put_IDataCollector_FileNameFormat_Response,
    ),
    14: DceRpcOp(
        get_IDataCollector_FileNameFormatPattern_Request,
        get_IDataCollector_FileNameFormatPattern_Response,
    ),
    15: DceRpcOp(
        put_IDataCollector_FileNameFormatPattern_Request,
        put_IDataCollector_FileNameFormatPattern_Response,
    ),
    16: DceRpcOp(
        get_IDataCollector_LatestOutputLocation_Request,
        get_IDataCollector_LatestOutputLocation_Response,
    ),
    17: DceRpcOp(
        put_IDataCollector_LatestOutputLocation_Request,
        put_IDataCollector_LatestOutputLocation_Response,
    ),
    18: DceRpcOp(
        get_IDataCollector_LogAppend_Request, get_IDataCollector_LogAppend_Response
    ),
    19: DceRpcOp(
        put_IDataCollector_LogAppend_Request, put_IDataCollector_LogAppend_Response
    ),
    20: DceRpcOp(
        get_IDataCollector_LogCircular_Request, get_IDataCollector_LogCircular_Response
    ),
    21: DceRpcOp(
        put_IDataCollector_LogCircular_Request, put_IDataCollector_LogCircular_Response
    ),
    22: DceRpcOp(
        get_IDataCollector_LogOverwrite_Request,
        get_IDataCollector_LogOverwrite_Response,
    ),
    23: DceRpcOp(
        put_IDataCollector_LogOverwrite_Request,
        put_IDataCollector_LogOverwrite_Response,
    ),
    24: DceRpcOp(get_IDataCollector_Name_Request, get_IDataCollector_Name_Response),
    25: DceRpcOp(put_IDataCollector_Name_Request, put_IDataCollector_Name_Response),
    26: DceRpcOp(
        get_IDataCollector_OutputLocation_Request,
        get_IDataCollector_OutputLocation_Response,
    ),
    27: DceRpcOp(get_IDataCollector_Index_Request, get_IDataCollector_Index_Response),
    # 28: Opnum28NotUsedOnWire,
    29: DceRpcOp(get_IDataCollector_Xml_Request, get_IDataCollector_Xml_Response),
    30: DceRpcOp(SetXml_Request, SetXml_Response),
    # 31: Opnum31NotUsedOnWire,
    32: DceRpcOp(
        get_ITraceDataCollector_BufferSize_Request,
        get_ITraceDataCollector_BufferSize_Response,
    ),
    33: DceRpcOp(
        put_ITraceDataCollector_BufferSize_Request,
        put_ITraceDataCollector_BufferSize_Response,
    ),
    34: DceRpcOp(
        get_ITraceDataCollector_BuffersLost_Request,
        get_ITraceDataCollector_BuffersLost_Response,
    ),
    # 35: Opnum35NotUsedOnWire,
    36: DceRpcOp(
        get_ITraceDataCollector_BuffersWritten_Request,
        get_ITraceDataCollector_BuffersWritten_Response,
    ),
    # 37: Opnum37NotUsedOnWire,
    38: DceRpcOp(
        get_ITraceDataCollector_ClockType_Request,
        get_ITraceDataCollector_ClockType_Response,
    ),
    39: DceRpcOp(
        put_ITraceDataCollector_ClockType_Request,
        put_ITraceDataCollector_ClockType_Response,
    ),
    40: DceRpcOp(
        get_ITraceDataCollector_EventsLost_Request,
        get_ITraceDataCollector_EventsLost_Response,
    ),
    # 41: Opnum41NotUsedOnWire,
    42: DceRpcOp(
        get_ITraceDataCollector_ExtendedModes_Request,
        get_ITraceDataCollector_ExtendedModes_Response,
    ),
    43: DceRpcOp(
        put_ITraceDataCollector_ExtendedModes_Request,
        put_ITraceDataCollector_ExtendedModes_Response,
    ),
    44: DceRpcOp(
        get_ITraceDataCollector_FlushTimer_Request,
        get_ITraceDataCollector_FlushTimer_Response,
    ),
    45: DceRpcOp(
        put_ITraceDataCollector_FlushTimer_Request,
        put_ITraceDataCollector_FlushTimer_Response,
    ),
    46: DceRpcOp(
        get_ITraceDataCollector_FreeBuffers_Request,
        get_ITraceDataCollector_FreeBuffers_Response,
    ),
    # 47: Opnum47NotUsedOnWire,
    48: DceRpcOp(
        get_ITraceDataCollector_Guid_Request, get_ITraceDataCollector_Guid_Response
    ),
    49: DceRpcOp(
        put_ITraceDataCollector_Guid_Request, put_ITraceDataCollector_Guid_Response
    ),
    50: DceRpcOp(
        get_ITraceDataCollector_IsKernelTrace_Request,
        get_ITraceDataCollector_IsKernelTrace_Response,
    ),
    51: DceRpcOp(
        get_ITraceDataCollector_MaximumBuffers_Request,
        get_ITraceDataCollector_MaximumBuffers_Response,
    ),
    52: DceRpcOp(
        put_ITraceDataCollector_MaximumBuffers_Request,
        put_ITraceDataCollector_MaximumBuffers_Response,
    ),
    53: DceRpcOp(
        get_ITraceDataCollector_MinimumBuffers_Request,
        get_ITraceDataCollector_MinimumBuffers_Response,
    ),
    54: DceRpcOp(
        put_ITraceDataCollector_MinimumBuffers_Request,
        put_ITraceDataCollector_MinimumBuffers_Response,
    ),
    55: DceRpcOp(
        get_ITraceDataCollector_NumberOfBuffers_Request,
        get_ITraceDataCollector_NumberOfBuffers_Response,
    ),
    56: DceRpcOp(
        put_ITraceDataCollector_NumberOfBuffers_Request,
        put_ITraceDataCollector_NumberOfBuffers_Response,
    ),
    57: DceRpcOp(
        get_ITraceDataCollector_PreallocateFile_Request,
        get_ITraceDataCollector_PreallocateFile_Response,
    ),
    58: DceRpcOp(
        put_ITraceDataCollector_PreallocateFile_Request,
        put_ITraceDataCollector_PreallocateFile_Response,
    ),
    59: DceRpcOp(
        get_ITraceDataCollector_ProcessMode_Request,
        get_ITraceDataCollector_ProcessMode_Response,
    ),
    60: DceRpcOp(
        put_ITraceDataCollector_ProcessMode_Request,
        put_ITraceDataCollector_ProcessMode_Response,
    ),
    61: DceRpcOp(
        get_ITraceDataCollector_RealTimeBuffersLost_Request,
        get_ITraceDataCollector_RealTimeBuffersLost_Response,
    ),
    # 62: Opnum62NotUsedOnWire,
    63: DceRpcOp(
        get_ITraceDataCollector_SessionId_Request,
        get_ITraceDataCollector_SessionId_Response,
    ),
    # 64: Opnum64NotUsedOnWire,
    65: DceRpcOp(
        get_ITraceDataCollector_SessionName_Request,
        get_ITraceDataCollector_SessionName_Response,
    ),
    66: DceRpcOp(
        put_ITraceDataCollector_SessionName_Request,
        put_ITraceDataCollector_SessionName_Response,
    ),
    67: DceRpcOp(
        get_ITraceDataCollector_SessionThreadId_Request,
        get_ITraceDataCollector_SessionThreadId_Response,
    ),
    # 68: Opnum68NotUsedOnWire,
    69: DceRpcOp(
        get_ITraceDataCollector_StreamMode_Request,
        get_ITraceDataCollector_StreamMode_Response,
    ),
    70: DceRpcOp(
        put_ITraceDataCollector_StreamMode_Request,
        put_ITraceDataCollector_StreamMode_Response,
    ),
    71: DceRpcOp(
        get_ITraceDataCollector_TraceDataProviders_Request,
        get_ITraceDataCollector_TraceDataProviders_Response,
    ),
}
register_com_interface(
    name="ITraceDataCollector",
    uuid=uuid.UUID("0383750b-098b-11d8-9414-505054503030"),
    opnums=ITRACEDATACOLLECTOR_OPNUMS,
)


class get_IConfigurationDataCollector_FileMaxCount_Request(NDRPacket):
    fields_desc = []


class get_IConfigurationDataCollector_FileMaxCount_Response(NDRPacket):
    fields_desc = [NDRIntField("count", 0), NDRIntField("status", 0)]


class put_IConfigurationDataCollector_FileMaxCount_Request(NDRPacket):
    fields_desc = [NDRIntField("count", 0)]


class put_IConfigurationDataCollector_FileMaxCount_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IConfigurationDataCollector_FileMaxRecursiveDepth_Request(NDRPacket):
    fields_desc = []


class get_IConfigurationDataCollector_FileMaxRecursiveDepth_Response(NDRPacket):
    fields_desc = [NDRIntField("depth", 0), NDRIntField("status", 0)]


class put_IConfigurationDataCollector_FileMaxRecursiveDepth_Request(NDRPacket):
    fields_desc = [NDRIntField("depth", 0)]


class put_IConfigurationDataCollector_FileMaxRecursiveDepth_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IConfigurationDataCollector_FileMaxTotalSize_Request(NDRPacket):
    fields_desc = []


class get_IConfigurationDataCollector_FileMaxTotalSize_Response(NDRPacket):
    fields_desc = [NDRIntField("size", 0), NDRIntField("status", 0)]


class put_IConfigurationDataCollector_FileMaxTotalSize_Request(NDRPacket):
    fields_desc = [NDRIntField("size", 0)]


class put_IConfigurationDataCollector_FileMaxTotalSize_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IConfigurationDataCollector_Files_Request(NDRPacket):
    fields_desc = []


class get_IConfigurationDataCollector_Files_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("Files", SAFEARRAY(), SAFEARRAY)),
        NDRIntField("status", 0),
    ]


class put_IConfigurationDataCollector_Files_Request(NDRPacket):
    fields_desc = [NDRPacketField("Files", SAFEARRAY(), SAFEARRAY)]


class put_IConfigurationDataCollector_Files_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IConfigurationDataCollector_ManagementQueries_Request(NDRPacket):
    fields_desc = []


class get_IConfigurationDataCollector_ManagementQueries_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("Queries", SAFEARRAY(), SAFEARRAY)),
        NDRIntField("status", 0),
    ]


class put_IConfigurationDataCollector_ManagementQueries_Request(NDRPacket):
    fields_desc = [NDRPacketField("Queries", SAFEARRAY(), SAFEARRAY)]


class put_IConfigurationDataCollector_ManagementQueries_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IConfigurationDataCollector_QueryNetworkAdapters_Request(NDRPacket):
    fields_desc = []


class get_IConfigurationDataCollector_QueryNetworkAdapters_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("network", 0), NDRIntField("status", 0)]


class put_IConfigurationDataCollector_QueryNetworkAdapters_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("network", 0)]


class put_IConfigurationDataCollector_QueryNetworkAdapters_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IConfigurationDataCollector_RegistryKeys_Request(NDRPacket):
    fields_desc = []


class get_IConfigurationDataCollector_RegistryKeys_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("query", SAFEARRAY(), SAFEARRAY)),
        NDRIntField("status", 0),
    ]


class put_IConfigurationDataCollector_RegistryKeys_Request(NDRPacket):
    fields_desc = [NDRPacketField("query", SAFEARRAY(), SAFEARRAY)]


class put_IConfigurationDataCollector_RegistryKeys_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IConfigurationDataCollector_RegistryMaxRecursiveDepth_Request(NDRPacket):
    fields_desc = []


class get_IConfigurationDataCollector_RegistryMaxRecursiveDepth_Response(NDRPacket):
    fields_desc = [NDRIntField("depth", 0), NDRIntField("status", 0)]


class put_IConfigurationDataCollector_RegistryMaxRecursiveDepth_Request(NDRPacket):
    fields_desc = [NDRIntField("depth", 0)]


class put_IConfigurationDataCollector_RegistryMaxRecursiveDepth_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IConfigurationDataCollector_SystemStateFile_Request(NDRPacket):
    fields_desc = []


class get_IConfigurationDataCollector_SystemStateFile_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("FileName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IConfigurationDataCollector_SystemStateFile_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("FileName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IConfigurationDataCollector_SystemStateFile_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


ICONFIGURATIONDATACOLLECTOR_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IDataCollector_DataCollectorSet_Request,
        get_IDataCollector_DataCollectorSet_Response,
    ),
    # 8: Opnum8NotUsedOnWire,
    9: DceRpcOp(
        get_IDataCollector_DataCollectorType_Request,
        get_IDataCollector_DataCollectorType_Response,
    ),
    10: DceRpcOp(
        get_IDataCollector_FileName_Request, get_IDataCollector_FileName_Response
    ),
    11: DceRpcOp(
        put_IDataCollector_FileName_Request, put_IDataCollector_FileName_Response
    ),
    12: DceRpcOp(
        get_IDataCollector_FileNameFormat_Request,
        get_IDataCollector_FileNameFormat_Response,
    ),
    13: DceRpcOp(
        put_IDataCollector_FileNameFormat_Request,
        put_IDataCollector_FileNameFormat_Response,
    ),
    14: DceRpcOp(
        get_IDataCollector_FileNameFormatPattern_Request,
        get_IDataCollector_FileNameFormatPattern_Response,
    ),
    15: DceRpcOp(
        put_IDataCollector_FileNameFormatPattern_Request,
        put_IDataCollector_FileNameFormatPattern_Response,
    ),
    16: DceRpcOp(
        get_IDataCollector_LatestOutputLocation_Request,
        get_IDataCollector_LatestOutputLocation_Response,
    ),
    17: DceRpcOp(
        put_IDataCollector_LatestOutputLocation_Request,
        put_IDataCollector_LatestOutputLocation_Response,
    ),
    18: DceRpcOp(
        get_IDataCollector_LogAppend_Request, get_IDataCollector_LogAppend_Response
    ),
    19: DceRpcOp(
        put_IDataCollector_LogAppend_Request, put_IDataCollector_LogAppend_Response
    ),
    20: DceRpcOp(
        get_IDataCollector_LogCircular_Request, get_IDataCollector_LogCircular_Response
    ),
    21: DceRpcOp(
        put_IDataCollector_LogCircular_Request, put_IDataCollector_LogCircular_Response
    ),
    22: DceRpcOp(
        get_IDataCollector_LogOverwrite_Request,
        get_IDataCollector_LogOverwrite_Response,
    ),
    23: DceRpcOp(
        put_IDataCollector_LogOverwrite_Request,
        put_IDataCollector_LogOverwrite_Response,
    ),
    24: DceRpcOp(get_IDataCollector_Name_Request, get_IDataCollector_Name_Response),
    25: DceRpcOp(put_IDataCollector_Name_Request, put_IDataCollector_Name_Response),
    26: DceRpcOp(
        get_IDataCollector_OutputLocation_Request,
        get_IDataCollector_OutputLocation_Response,
    ),
    27: DceRpcOp(get_IDataCollector_Index_Request, get_IDataCollector_Index_Response),
    # 28: Opnum28NotUsedOnWire,
    29: DceRpcOp(get_IDataCollector_Xml_Request, get_IDataCollector_Xml_Response),
    30: DceRpcOp(SetXml_Request, SetXml_Response),
    # 31: Opnum31NotUsedOnWire,
    32: DceRpcOp(
        get_IConfigurationDataCollector_FileMaxCount_Request,
        get_IConfigurationDataCollector_FileMaxCount_Response,
    ),
    33: DceRpcOp(
        put_IConfigurationDataCollector_FileMaxCount_Request,
        put_IConfigurationDataCollector_FileMaxCount_Response,
    ),
    34: DceRpcOp(
        get_IConfigurationDataCollector_FileMaxRecursiveDepth_Request,
        get_IConfigurationDataCollector_FileMaxRecursiveDepth_Response,
    ),
    35: DceRpcOp(
        put_IConfigurationDataCollector_FileMaxRecursiveDepth_Request,
        put_IConfigurationDataCollector_FileMaxRecursiveDepth_Response,
    ),
    36: DceRpcOp(
        get_IConfigurationDataCollector_FileMaxTotalSize_Request,
        get_IConfigurationDataCollector_FileMaxTotalSize_Response,
    ),
    37: DceRpcOp(
        put_IConfigurationDataCollector_FileMaxTotalSize_Request,
        put_IConfigurationDataCollector_FileMaxTotalSize_Response,
    ),
    38: DceRpcOp(
        get_IConfigurationDataCollector_Files_Request,
        get_IConfigurationDataCollector_Files_Response,
    ),
    39: DceRpcOp(
        put_IConfigurationDataCollector_Files_Request,
        put_IConfigurationDataCollector_Files_Response,
    ),
    40: DceRpcOp(
        get_IConfigurationDataCollector_ManagementQueries_Request,
        get_IConfigurationDataCollector_ManagementQueries_Response,
    ),
    41: DceRpcOp(
        put_IConfigurationDataCollector_ManagementQueries_Request,
        put_IConfigurationDataCollector_ManagementQueries_Response,
    ),
    42: DceRpcOp(
        get_IConfigurationDataCollector_QueryNetworkAdapters_Request,
        get_IConfigurationDataCollector_QueryNetworkAdapters_Response,
    ),
    43: DceRpcOp(
        put_IConfigurationDataCollector_QueryNetworkAdapters_Request,
        put_IConfigurationDataCollector_QueryNetworkAdapters_Response,
    ),
    44: DceRpcOp(
        get_IConfigurationDataCollector_RegistryKeys_Request,
        get_IConfigurationDataCollector_RegistryKeys_Response,
    ),
    45: DceRpcOp(
        put_IConfigurationDataCollector_RegistryKeys_Request,
        put_IConfigurationDataCollector_RegistryKeys_Response,
    ),
    46: DceRpcOp(
        get_IConfigurationDataCollector_RegistryMaxRecursiveDepth_Request,
        get_IConfigurationDataCollector_RegistryMaxRecursiveDepth_Response,
    ),
    47: DceRpcOp(
        put_IConfigurationDataCollector_RegistryMaxRecursiveDepth_Request,
        put_IConfigurationDataCollector_RegistryMaxRecursiveDepth_Response,
    ),
    48: DceRpcOp(
        get_IConfigurationDataCollector_SystemStateFile_Request,
        get_IConfigurationDataCollector_SystemStateFile_Response,
    ),
    49: DceRpcOp(
        put_IConfigurationDataCollector_SystemStateFile_Request,
        put_IConfigurationDataCollector_SystemStateFile_Response,
    ),
}
register_com_interface(
    name="IConfigurationDataCollector",
    uuid=uuid.UUID("03837514-098b-11d8-9414-505054503030"),
    opnums=ICONFIGURATIONDATACOLLECTOR_OPNUMS,
)


class get_IAlertDataCollector_AlertThresholds_Request(NDRPacket):
    fields_desc = []


class get_IAlertDataCollector_AlertThresholds_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("alerts", SAFEARRAY(), SAFEARRAY)),
        NDRIntField("status", 0),
    ]


class put_IAlertDataCollector_AlertThresholds_Request(NDRPacket):
    fields_desc = [NDRPacketField("alerts", SAFEARRAY(), SAFEARRAY)]


class put_IAlertDataCollector_AlertThresholds_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IAlertDataCollector_EventLog_Request(NDRPacket):
    fields_desc = []


class get_IAlertDataCollector_EventLog_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("log", 0), NDRIntField("status", 0)]


class put_IAlertDataCollector_EventLog_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("log", 0)]


class put_IAlertDataCollector_EventLog_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IAlertDataCollector_SampleInterval_Request(NDRPacket):
    fields_desc = []


class get_IAlertDataCollector_SampleInterval_Response(NDRPacket):
    fields_desc = [NDRIntField("interval", 0), NDRIntField("status", 0)]


class put_IAlertDataCollector_SampleInterval_Request(NDRPacket):
    fields_desc = [NDRIntField("interval", 0)]


class put_IAlertDataCollector_SampleInterval_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IAlertDataCollector_Task_Request(NDRPacket):
    fields_desc = []


class get_IAlertDataCollector_Task_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("task", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IAlertDataCollector_Task_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("task", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IAlertDataCollector_Task_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IAlertDataCollector_TaskRunAsSelf_Request(NDRPacket):
    fields_desc = []


class get_IAlertDataCollector_TaskRunAsSelf_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("RunAsSelf", 0), NDRIntField("status", 0)]


class put_IAlertDataCollector_TaskRunAsSelf_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("RunAsSelf", 0)]


class put_IAlertDataCollector_TaskRunAsSelf_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IAlertDataCollector_TaskArguments_Request(NDRPacket):
    fields_desc = []


class get_IAlertDataCollector_TaskArguments_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("task", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IAlertDataCollector_TaskArguments_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("task", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IAlertDataCollector_TaskArguments_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IAlertDataCollector_TaskUserTextArguments_Request(NDRPacket):
    fields_desc = []


class get_IAlertDataCollector_TaskUserTextArguments_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("task", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IAlertDataCollector_TaskUserTextArguments_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("task", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IAlertDataCollector_TaskUserTextArguments_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IAlertDataCollector_TriggerDataCollectorSet_Request(NDRPacket):
    fields_desc = []


class get_IAlertDataCollector_TriggerDataCollectorSet_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IAlertDataCollector_TriggerDataCollectorSet_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IAlertDataCollector_TriggerDataCollectorSet_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


IALERTDATACOLLECTOR_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IDataCollector_DataCollectorSet_Request,
        get_IDataCollector_DataCollectorSet_Response,
    ),
    # 8: Opnum8NotUsedOnWire,
    9: DceRpcOp(
        get_IDataCollector_DataCollectorType_Request,
        get_IDataCollector_DataCollectorType_Response,
    ),
    10: DceRpcOp(
        get_IDataCollector_FileName_Request, get_IDataCollector_FileName_Response
    ),
    11: DceRpcOp(
        put_IDataCollector_FileName_Request, put_IDataCollector_FileName_Response
    ),
    12: DceRpcOp(
        get_IDataCollector_FileNameFormat_Request,
        get_IDataCollector_FileNameFormat_Response,
    ),
    13: DceRpcOp(
        put_IDataCollector_FileNameFormat_Request,
        put_IDataCollector_FileNameFormat_Response,
    ),
    14: DceRpcOp(
        get_IDataCollector_FileNameFormatPattern_Request,
        get_IDataCollector_FileNameFormatPattern_Response,
    ),
    15: DceRpcOp(
        put_IDataCollector_FileNameFormatPattern_Request,
        put_IDataCollector_FileNameFormatPattern_Response,
    ),
    16: DceRpcOp(
        get_IDataCollector_LatestOutputLocation_Request,
        get_IDataCollector_LatestOutputLocation_Response,
    ),
    17: DceRpcOp(
        put_IDataCollector_LatestOutputLocation_Request,
        put_IDataCollector_LatestOutputLocation_Response,
    ),
    18: DceRpcOp(
        get_IDataCollector_LogAppend_Request, get_IDataCollector_LogAppend_Response
    ),
    19: DceRpcOp(
        put_IDataCollector_LogAppend_Request, put_IDataCollector_LogAppend_Response
    ),
    20: DceRpcOp(
        get_IDataCollector_LogCircular_Request, get_IDataCollector_LogCircular_Response
    ),
    21: DceRpcOp(
        put_IDataCollector_LogCircular_Request, put_IDataCollector_LogCircular_Response
    ),
    22: DceRpcOp(
        get_IDataCollector_LogOverwrite_Request,
        get_IDataCollector_LogOverwrite_Response,
    ),
    23: DceRpcOp(
        put_IDataCollector_LogOverwrite_Request,
        put_IDataCollector_LogOverwrite_Response,
    ),
    24: DceRpcOp(get_IDataCollector_Name_Request, get_IDataCollector_Name_Response),
    25: DceRpcOp(put_IDataCollector_Name_Request, put_IDataCollector_Name_Response),
    26: DceRpcOp(
        get_IDataCollector_OutputLocation_Request,
        get_IDataCollector_OutputLocation_Response,
    ),
    27: DceRpcOp(get_IDataCollector_Index_Request, get_IDataCollector_Index_Response),
    # 28: Opnum28NotUsedOnWire,
    29: DceRpcOp(get_IDataCollector_Xml_Request, get_IDataCollector_Xml_Response),
    30: DceRpcOp(SetXml_Request, SetXml_Response),
    # 31: Opnum31NotUsedOnWire,
    32: DceRpcOp(
        get_IAlertDataCollector_AlertThresholds_Request,
        get_IAlertDataCollector_AlertThresholds_Response,
    ),
    33: DceRpcOp(
        put_IAlertDataCollector_AlertThresholds_Request,
        put_IAlertDataCollector_AlertThresholds_Response,
    ),
    34: DceRpcOp(
        get_IAlertDataCollector_EventLog_Request,
        get_IAlertDataCollector_EventLog_Response,
    ),
    35: DceRpcOp(
        put_IAlertDataCollector_EventLog_Request,
        put_IAlertDataCollector_EventLog_Response,
    ),
    36: DceRpcOp(
        get_IAlertDataCollector_SampleInterval_Request,
        get_IAlertDataCollector_SampleInterval_Response,
    ),
    37: DceRpcOp(
        put_IAlertDataCollector_SampleInterval_Request,
        put_IAlertDataCollector_SampleInterval_Response,
    ),
    38: DceRpcOp(
        get_IAlertDataCollector_Task_Request, get_IAlertDataCollector_Task_Response
    ),
    39: DceRpcOp(
        put_IAlertDataCollector_Task_Request, put_IAlertDataCollector_Task_Response
    ),
    40: DceRpcOp(
        get_IAlertDataCollector_TaskRunAsSelf_Request,
        get_IAlertDataCollector_TaskRunAsSelf_Response,
    ),
    41: DceRpcOp(
        put_IAlertDataCollector_TaskRunAsSelf_Request,
        put_IAlertDataCollector_TaskRunAsSelf_Response,
    ),
    42: DceRpcOp(
        get_IAlertDataCollector_TaskArguments_Request,
        get_IAlertDataCollector_TaskArguments_Response,
    ),
    43: DceRpcOp(
        put_IAlertDataCollector_TaskArguments_Request,
        put_IAlertDataCollector_TaskArguments_Response,
    ),
    44: DceRpcOp(
        get_IAlertDataCollector_TaskUserTextArguments_Request,
        get_IAlertDataCollector_TaskUserTextArguments_Response,
    ),
    45: DceRpcOp(
        put_IAlertDataCollector_TaskUserTextArguments_Request,
        put_IAlertDataCollector_TaskUserTextArguments_Response,
    ),
    46: DceRpcOp(
        get_IAlertDataCollector_TriggerDataCollectorSet_Request,
        get_IAlertDataCollector_TriggerDataCollectorSet_Response,
    ),
    47: DceRpcOp(
        put_IAlertDataCollector_TriggerDataCollectorSet_Request,
        put_IAlertDataCollector_TriggerDataCollectorSet_Response,
    ),
}
register_com_interface(
    name="IAlertDataCollector",
    uuid=uuid.UUID("03837516-098b-11d8-9414-505054503030"),
    opnums=IALERTDATACOLLECTOR_OPNUMS,
)


class get_IApiTracingDataCollector_LogApiNamesOnly_Request(NDRPacket):
    fields_desc = []


class get_IApiTracingDataCollector_LogApiNamesOnly_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("logapinames", 0), NDRIntField("status", 0)]


class put_IApiTracingDataCollector_LogApiNamesOnly_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("logapinames", 0)]


class put_IApiTracingDataCollector_LogApiNamesOnly_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IApiTracingDataCollector_LogApisRecursively_Request(NDRPacket):
    fields_desc = []


class get_IApiTracingDataCollector_LogApisRecursively_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("logrecursively", 0), NDRIntField("status", 0)]


class put_IApiTracingDataCollector_LogApisRecursively_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("logrecursively", 0)]


class put_IApiTracingDataCollector_LogApisRecursively_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IApiTracingDataCollector_ExePath_Request(NDRPacket):
    fields_desc = []


class get_IApiTracingDataCollector_ExePath_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("exepath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IApiTracingDataCollector_ExePath_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("exepath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IApiTracingDataCollector_ExePath_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IApiTracingDataCollector_LogFilePath_Request(NDRPacket):
    fields_desc = []


class get_IApiTracingDataCollector_LogFilePath_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("logfilepath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IApiTracingDataCollector_LogFilePath_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("logfilepath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IApiTracingDataCollector_LogFilePath_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IApiTracingDataCollector_IncludeModules_Request(NDRPacket):
    fields_desc = []


class get_IApiTracingDataCollector_IncludeModules_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("includemodules", SAFEARRAY(), SAFEARRAY)),
        NDRIntField("status", 0),
    ]


class put_IApiTracingDataCollector_IncludeModules_Request(NDRPacket):
    fields_desc = [NDRPacketField("includemodules", SAFEARRAY(), SAFEARRAY)]


class put_IApiTracingDataCollector_IncludeModules_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IApiTracingDataCollector_IncludeApis_Request(NDRPacket):
    fields_desc = []


class get_IApiTracingDataCollector_IncludeApis_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("includeapis", SAFEARRAY(), SAFEARRAY)),
        NDRIntField("status", 0),
    ]


class put_IApiTracingDataCollector_IncludeApis_Request(NDRPacket):
    fields_desc = [NDRPacketField("includeapis", SAFEARRAY(), SAFEARRAY)]


class put_IApiTracingDataCollector_IncludeApis_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IApiTracingDataCollector_ExcludeApis_Request(NDRPacket):
    fields_desc = []


class get_IApiTracingDataCollector_ExcludeApis_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("excludeapis", SAFEARRAY(), SAFEARRAY)),
        NDRIntField("status", 0),
    ]


class put_IApiTracingDataCollector_ExcludeApis_Request(NDRPacket):
    fields_desc = [NDRPacketField("excludeapis", SAFEARRAY(), SAFEARRAY)]


class put_IApiTracingDataCollector_ExcludeApis_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


IAPITRACINGDATACOLLECTOR_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IDataCollector_DataCollectorSet_Request,
        get_IDataCollector_DataCollectorSet_Response,
    ),
    # 8: Opnum8NotUsedOnWire,
    9: DceRpcOp(
        get_IDataCollector_DataCollectorType_Request,
        get_IDataCollector_DataCollectorType_Response,
    ),
    10: DceRpcOp(
        get_IDataCollector_FileName_Request, get_IDataCollector_FileName_Response
    ),
    11: DceRpcOp(
        put_IDataCollector_FileName_Request, put_IDataCollector_FileName_Response
    ),
    12: DceRpcOp(
        get_IDataCollector_FileNameFormat_Request,
        get_IDataCollector_FileNameFormat_Response,
    ),
    13: DceRpcOp(
        put_IDataCollector_FileNameFormat_Request,
        put_IDataCollector_FileNameFormat_Response,
    ),
    14: DceRpcOp(
        get_IDataCollector_FileNameFormatPattern_Request,
        get_IDataCollector_FileNameFormatPattern_Response,
    ),
    15: DceRpcOp(
        put_IDataCollector_FileNameFormatPattern_Request,
        put_IDataCollector_FileNameFormatPattern_Response,
    ),
    16: DceRpcOp(
        get_IDataCollector_LatestOutputLocation_Request,
        get_IDataCollector_LatestOutputLocation_Response,
    ),
    17: DceRpcOp(
        put_IDataCollector_LatestOutputLocation_Request,
        put_IDataCollector_LatestOutputLocation_Response,
    ),
    18: DceRpcOp(
        get_IDataCollector_LogAppend_Request, get_IDataCollector_LogAppend_Response
    ),
    19: DceRpcOp(
        put_IDataCollector_LogAppend_Request, put_IDataCollector_LogAppend_Response
    ),
    20: DceRpcOp(
        get_IDataCollector_LogCircular_Request, get_IDataCollector_LogCircular_Response
    ),
    21: DceRpcOp(
        put_IDataCollector_LogCircular_Request, put_IDataCollector_LogCircular_Response
    ),
    22: DceRpcOp(
        get_IDataCollector_LogOverwrite_Request,
        get_IDataCollector_LogOverwrite_Response,
    ),
    23: DceRpcOp(
        put_IDataCollector_LogOverwrite_Request,
        put_IDataCollector_LogOverwrite_Response,
    ),
    24: DceRpcOp(get_IDataCollector_Name_Request, get_IDataCollector_Name_Response),
    25: DceRpcOp(put_IDataCollector_Name_Request, put_IDataCollector_Name_Response),
    26: DceRpcOp(
        get_IDataCollector_OutputLocation_Request,
        get_IDataCollector_OutputLocation_Response,
    ),
    27: DceRpcOp(get_IDataCollector_Index_Request, get_IDataCollector_Index_Response),
    # 28: Opnum28NotUsedOnWire,
    29: DceRpcOp(get_IDataCollector_Xml_Request, get_IDataCollector_Xml_Response),
    30: DceRpcOp(SetXml_Request, SetXml_Response),
    # 31: Opnum31NotUsedOnWire,
    32: DceRpcOp(
        get_IApiTracingDataCollector_LogApiNamesOnly_Request,
        get_IApiTracingDataCollector_LogApiNamesOnly_Response,
    ),
    33: DceRpcOp(
        put_IApiTracingDataCollector_LogApiNamesOnly_Request,
        put_IApiTracingDataCollector_LogApiNamesOnly_Response,
    ),
    34: DceRpcOp(
        get_IApiTracingDataCollector_LogApisRecursively_Request,
        get_IApiTracingDataCollector_LogApisRecursively_Response,
    ),
    35: DceRpcOp(
        put_IApiTracingDataCollector_LogApisRecursively_Request,
        put_IApiTracingDataCollector_LogApisRecursively_Response,
    ),
    36: DceRpcOp(
        get_IApiTracingDataCollector_ExePath_Request,
        get_IApiTracingDataCollector_ExePath_Response,
    ),
    37: DceRpcOp(
        put_IApiTracingDataCollector_ExePath_Request,
        put_IApiTracingDataCollector_ExePath_Response,
    ),
    38: DceRpcOp(
        get_IApiTracingDataCollector_LogFilePath_Request,
        get_IApiTracingDataCollector_LogFilePath_Response,
    ),
    39: DceRpcOp(
        put_IApiTracingDataCollector_LogFilePath_Request,
        put_IApiTracingDataCollector_LogFilePath_Response,
    ),
    40: DceRpcOp(
        get_IApiTracingDataCollector_IncludeModules_Request,
        get_IApiTracingDataCollector_IncludeModules_Response,
    ),
    41: DceRpcOp(
        put_IApiTracingDataCollector_IncludeModules_Request,
        put_IApiTracingDataCollector_IncludeModules_Response,
    ),
    42: DceRpcOp(
        get_IApiTracingDataCollector_IncludeApis_Request,
        get_IApiTracingDataCollector_IncludeApis_Response,
    ),
    43: DceRpcOp(
        put_IApiTracingDataCollector_IncludeApis_Request,
        put_IApiTracingDataCollector_IncludeApis_Response,
    ),
    44: DceRpcOp(
        get_IApiTracingDataCollector_ExcludeApis_Request,
        get_IApiTracingDataCollector_ExcludeApis_Response,
    ),
    45: DceRpcOp(
        put_IApiTracingDataCollector_ExcludeApis_Request,
        put_IApiTracingDataCollector_ExcludeApis_Response,
    ),
}
register_com_interface(
    name="IApiTracingDataCollector",
    uuid=uuid.UUID("0383751a-098b-11d8-9414-505054503030"),
    opnums=IAPITRACINGDATACOLLECTOR_OPNUMS,
)


class get_IDataCollectorCollection_Count_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorCollection_Count_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("retVal", 0), NDRIntField("status", 0)]


class get_IDataCollectorCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("index", wireVARIANTStr(), wireVARIANTStr))
    ]


class get_IDataCollectorCollection_Item_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("collector", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollectorCollection__NewEnum_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorCollection__NewEnum_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("retVal", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class Add_Request(NDRPacket):
    fields_desc = []


class Add_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Remove_Request(NDRPacket):
    fields_desc = []


class Remove_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Clear_Request(NDRPacket):
    fields_desc = []


class Clear_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class AddRange_Request(NDRPacket):
    fields_desc = []


class AddRange_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class CreateDataCollectorFromXml_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrXml", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class CreateDataCollectorFromXml_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("pValidation", MInterfacePointer(), MInterfacePointer)
        ),
        NDRFullPointerField(
            NDRPacketField("pCollector", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class CreateDataCollector_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("Type", 0, DataCollectorType)]


class CreateDataCollector_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Collector", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


IDATACOLLECTORCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IDataCollectorCollection_Count_Request,
        get_IDataCollectorCollection_Count_Response,
    ),
    8: DceRpcOp(
        get_IDataCollectorCollection_Item_Request,
        get_IDataCollectorCollection_Item_Response,
    ),
    9: DceRpcOp(
        get_IDataCollectorCollection__NewEnum_Request,
        get_IDataCollectorCollection__NewEnum_Response,
    ),
    10: DceRpcOp(Add_Request, Add_Response),
    11: DceRpcOp(Remove_Request, Remove_Response),
    12: DceRpcOp(Clear_Request, Clear_Response),
    13: DceRpcOp(AddRange_Request, AddRange_Response),
    14: DceRpcOp(
        CreateDataCollectorFromXml_Request, CreateDataCollectorFromXml_Response
    ),
    15: DceRpcOp(CreateDataCollector_Request, CreateDataCollector_Response),
}
register_com_interface(
    name="IDataCollectorCollection",
    uuid=uuid.UUID("03837502-098b-11d8-9414-505054503030"),
    opnums=IDATACOLLECTORCOLLECTION_OPNUMS,
)


class get_IDataCollectorSetCollection_Count_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSetCollection_Count_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("retVal", 0), NDRIntField("status", 0)]


class get_IDataCollectorSetCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("index", wireVARIANTStr(), wireVARIANTStr))
    ]


class get_IDataCollectorSetCollection_Item_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("set", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_IDataCollectorSetCollection__NewEnum_Request(NDRPacket):
    fields_desc = []


class get_IDataCollectorSetCollection__NewEnum_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("retVal", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class Add_Request(NDRPacket):
    fields_desc = []


class Add_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Remove_Request(NDRPacket):
    fields_desc = []


class Remove_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Clear_Request(NDRPacket):
    fields_desc = []


class Clear_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class AddRange_Request(NDRPacket):
    fields_desc = []


class AddRange_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class GetDataCollectorSets_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("server", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("filter", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


class GetDataCollectorSets_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


IDATACOLLECTORSETCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IDataCollectorSetCollection_Count_Request,
        get_IDataCollectorSetCollection_Count_Response,
    ),
    8: DceRpcOp(
        get_IDataCollectorSetCollection_Item_Request,
        get_IDataCollectorSetCollection_Item_Response,
    ),
    9: DceRpcOp(
        get_IDataCollectorSetCollection__NewEnum_Request,
        get_IDataCollectorSetCollection__NewEnum_Response,
    ),
    10: DceRpcOp(Add_Request, Add_Response),
    11: DceRpcOp(Remove_Request, Remove_Response),
    12: DceRpcOp(Clear_Request, Clear_Response),
    13: DceRpcOp(AddRange_Request, AddRange_Response),
    14: DceRpcOp(GetDataCollectorSets_Request, GetDataCollectorSets_Response),
}
register_com_interface(
    name="IDataCollectorSetCollection",
    uuid=uuid.UUID("03837524-098b-11d8-9414-505054503030"),
    opnums=IDATACOLLECTORSETCOLLECTION_OPNUMS,
)


class get_ITraceDataProvider_DisplayName_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProvider_DisplayName_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_ITraceDataProvider_DisplayName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_ITraceDataProvider_DisplayName_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataProvider_Guid_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProvider_Guid_Response(NDRPacket):
    fields_desc = [NDRPacketField("guid", GUID(), GUID), NDRIntField("status", 0)]


class put_ITraceDataProvider_Guid_Request(NDRPacket):
    fields_desc = [NDRPacketField("guid", GUID(), GUID)]


class put_ITraceDataProvider_Guid_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataProvider_Level_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProvider_Level_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("ppLevel", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_ITraceDataProvider_KeywordsAny_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProvider_KeywordsAny_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("ppKeywords", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_ITraceDataProvider_KeywordsAll_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProvider_KeywordsAll_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("ppKeywords", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_ITraceDataProvider_Properties_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProvider_Properties_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("ppProperties", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_ITraceDataProvider_FilterEnabled_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProvider_FilterEnabled_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("FilterEnabled", 0), NDRIntField("status", 0)]


class put_ITraceDataProvider_FilterEnabled_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("FilterEnabled", 0)]


class put_ITraceDataProvider_FilterEnabled_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataProvider_FilterType_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProvider_FilterType_Response(NDRPacket):
    fields_desc = [NDRIntField("pulType", 0), NDRIntField("status", 0)]


class put_ITraceDataProvider_FilterType_Request(NDRPacket):
    fields_desc = [NDRIntField("ulType", 0)]


class put_ITraceDataProvider_FilterType_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ITraceDataProvider_FilterData_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProvider_FilterData_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("ppData", SAFEARRAY(), SAFEARRAY)),
        NDRIntField("status", 0),
    ]


class put_ITraceDataProvider_FilterData_Request(NDRPacket):
    fields_desc = [NDRPacketField("pData", SAFEARRAY(), SAFEARRAY)]


class put_ITraceDataProvider_FilterData_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Query_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("bstrServer", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


class Query_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Resolve_Request(NDRPacket):
    fields_desc = [NDRPacketField("pFrom", MInterfacePointer(), MInterfacePointer)]


class Resolve_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class SetSecurity_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Sddl", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class SetSecurity_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class GetSecurity_Request(NDRPacket):
    fields_desc = [NDRIntField("SecurityInfo", 0)]


class GetSecurity_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("Sddl", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class GetRegisteredProcesses_Request(NDRPacket):
    fields_desc = []


class GetRegisteredProcesses_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Processes", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


ITRACEDATAPROVIDER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_ITraceDataProvider_DisplayName_Request,
        get_ITraceDataProvider_DisplayName_Response,
    ),
    8: DceRpcOp(
        put_ITraceDataProvider_DisplayName_Request,
        put_ITraceDataProvider_DisplayName_Response,
    ),
    9: DceRpcOp(
        get_ITraceDataProvider_Guid_Request, get_ITraceDataProvider_Guid_Response
    ),
    10: DceRpcOp(
        put_ITraceDataProvider_Guid_Request, put_ITraceDataProvider_Guid_Response
    ),
    11: DceRpcOp(
        get_ITraceDataProvider_Level_Request, get_ITraceDataProvider_Level_Response
    ),
    12: DceRpcOp(
        get_ITraceDataProvider_KeywordsAny_Request,
        get_ITraceDataProvider_KeywordsAny_Response,
    ),
    13: DceRpcOp(
        get_ITraceDataProvider_KeywordsAll_Request,
        get_ITraceDataProvider_KeywordsAll_Response,
    ),
    14: DceRpcOp(
        get_ITraceDataProvider_Properties_Request,
        get_ITraceDataProvider_Properties_Response,
    ),
    15: DceRpcOp(
        get_ITraceDataProvider_FilterEnabled_Request,
        get_ITraceDataProvider_FilterEnabled_Response,
    ),
    16: DceRpcOp(
        put_ITraceDataProvider_FilterEnabled_Request,
        put_ITraceDataProvider_FilterEnabled_Response,
    ),
    17: DceRpcOp(
        get_ITraceDataProvider_FilterType_Request,
        get_ITraceDataProvider_FilterType_Response,
    ),
    18: DceRpcOp(
        put_ITraceDataProvider_FilterType_Request,
        put_ITraceDataProvider_FilterType_Response,
    ),
    19: DceRpcOp(
        get_ITraceDataProvider_FilterData_Request,
        get_ITraceDataProvider_FilterData_Response,
    ),
    20: DceRpcOp(
        put_ITraceDataProvider_FilterData_Request,
        put_ITraceDataProvider_FilterData_Response,
    ),
    21: DceRpcOp(Query_Request, Query_Response),
    22: DceRpcOp(Resolve_Request, Resolve_Response),
    23: DceRpcOp(SetSecurity_Request, SetSecurity_Response),
    24: DceRpcOp(GetSecurity_Request, GetSecurity_Response),
    25: DceRpcOp(GetRegisteredProcesses_Request, GetRegisteredProcesses_Response),
}
register_com_interface(
    name="ITraceDataProvider",
    uuid=uuid.UUID("03837512-098b-11d8-9414-505054503030"),
    opnums=ITRACEDATAPROVIDER_OPNUMS,
)


class get_ITraceDataProviderCollection_Count_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProviderCollection_Count_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("retVal", 0), NDRIntField("status", 0)]


class get_ITraceDataProviderCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("index", wireVARIANTStr(), wireVARIANTStr))
    ]


class get_ITraceDataProviderCollection_Item_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("ppProvider", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_ITraceDataProviderCollection__NewEnum_Request(NDRPacket):
    fields_desc = []


class get_ITraceDataProviderCollection__NewEnum_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("retVal", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class Add_Request(NDRPacket):
    fields_desc = []


class Add_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Remove_Request(NDRPacket):
    fields_desc = []


class Remove_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Clear_Request(NDRPacket):
    fields_desc = []


class Clear_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class AddRange_Request(NDRPacket):
    fields_desc = []


class AddRange_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class CreateTraceDataProvider_Request(NDRPacket):
    fields_desc = []


class CreateTraceDataProvider_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Provider", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class GetTraceDataProviders_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("server", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class GetTraceDataProviders_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class GetTraceDataProvidersByProcess_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Server", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRIntField("Pid", 0),
    ]


class GetTraceDataProvidersByProcess_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


ITRACEDATAPROVIDERCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_ITraceDataProviderCollection_Count_Request,
        get_ITraceDataProviderCollection_Count_Response,
    ),
    8: DceRpcOp(
        get_ITraceDataProviderCollection_Item_Request,
        get_ITraceDataProviderCollection_Item_Response,
    ),
    9: DceRpcOp(
        get_ITraceDataProviderCollection__NewEnum_Request,
        get_ITraceDataProviderCollection__NewEnum_Response,
    ),
    10: DceRpcOp(Add_Request, Add_Response),
    11: DceRpcOp(Remove_Request, Remove_Response),
    12: DceRpcOp(Clear_Request, Clear_Response),
    13: DceRpcOp(AddRange_Request, AddRange_Response),
    14: DceRpcOp(CreateTraceDataProvider_Request, CreateTraceDataProvider_Response),
    15: DceRpcOp(GetTraceDataProviders_Request, GetTraceDataProviders_Response),
    16: DceRpcOp(
        GetTraceDataProvidersByProcess_Request, GetTraceDataProvidersByProcess_Response
    ),
}
register_com_interface(
    name="ITraceDataProviderCollection",
    uuid=uuid.UUID("03837510-098b-11d8-9414-505054503030"),
    opnums=ITRACEDATAPROVIDERCOLLECTION_OPNUMS,
)


class get_ISchedule_StartDate_Request(NDRPacket):
    fields_desc = []


class get_ISchedule_StartDate_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("start", wireVARIANTStr(), wireVARIANTStr)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_ISchedule_StartDate_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("start", wireVARIANTStr(), wireVARIANTStr))
    ]


class put_ISchedule_StartDate_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ISchedule_EndDate_Request(NDRPacket):
    fields_desc = []


class get_ISchedule_EndDate_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(NDRPacketField("end", wireVARIANTStr(), wireVARIANTStr))
        ),
        NDRIntField("status", 0),
    ]


class put_ISchedule_EndDate_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("end", wireVARIANTStr(), wireVARIANTStr))
    ]


class put_ISchedule_EndDate_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_ISchedule_StartTime_Request(NDRPacket):
    fields_desc = []


class get_ISchedule_StartTime_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("start", wireVARIANTStr(), wireVARIANTStr)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_ISchedule_StartTime_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("start", wireVARIANTStr(), wireVARIANTStr))
    ]


class put_ISchedule_StartTime_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class WeekDays(IntEnum):
    plaRunOnce = 0
    plaSunday = 1
    plaMonday = 2
    plaTuesday = 4
    plaWednesday = 8
    plaThursday = 16
    plaFriday = 32
    plaSaturday = 64
    plaEveryday = 127


class get_ISchedule_Days_Request(NDRPacket):
    fields_desc = []


class get_ISchedule_Days_Response(NDRPacket):
    fields_desc = [NDRInt3264EnumField("days", 0, WeekDays), NDRIntField("status", 0)]


class put_ISchedule_Days_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("days", 0, WeekDays)]


class put_ISchedule_Days_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


ISCHEDULE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_ISchedule_StartDate_Request, get_ISchedule_StartDate_Response),
    8: DceRpcOp(put_ISchedule_StartDate_Request, put_ISchedule_StartDate_Response),
    9: DceRpcOp(get_ISchedule_EndDate_Request, get_ISchedule_EndDate_Response),
    10: DceRpcOp(put_ISchedule_EndDate_Request, put_ISchedule_EndDate_Response),
    11: DceRpcOp(get_ISchedule_StartTime_Request, get_ISchedule_StartTime_Response),
    12: DceRpcOp(put_ISchedule_StartTime_Request, put_ISchedule_StartTime_Response),
    13: DceRpcOp(get_ISchedule_Days_Request, get_ISchedule_Days_Response),
    14: DceRpcOp(put_ISchedule_Days_Request, put_ISchedule_Days_Response),
}
register_com_interface(
    name="ISchedule",
    uuid=uuid.UUID("0383753a-098b-11d8-9414-505054503030"),
    opnums=ISCHEDULE_OPNUMS,
)


class get_IScheduleCollection_Count_Request(NDRPacket):
    fields_desc = []


class get_IScheduleCollection_Count_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("retVal", 0), NDRIntField("status", 0)]


class get_IScheduleCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("index", wireVARIANTStr(), wireVARIANTStr))
    ]


class get_IScheduleCollection_Item_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("ppSchedule", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_IScheduleCollection__NewEnum_Request(NDRPacket):
    fields_desc = []


class get_IScheduleCollection__NewEnum_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("retVal", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class Add_Request(NDRPacket):
    fields_desc = []


class Add_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Remove_Request(NDRPacket):
    fields_desc = []


class Remove_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Clear_Request(NDRPacket):
    fields_desc = []


class Clear_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class AddRange_Request(NDRPacket):
    fields_desc = []


class AddRange_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class CreateSchedule_Request(NDRPacket):
    fields_desc = []


class CreateSchedule_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Schedule", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


ISCHEDULECOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IScheduleCollection_Count_Request, get_IScheduleCollection_Count_Response
    ),
    8: DceRpcOp(
        get_IScheduleCollection_Item_Request, get_IScheduleCollection_Item_Response
    ),
    9: DceRpcOp(
        get_IScheduleCollection__NewEnum_Request,
        get_IScheduleCollection__NewEnum_Response,
    ),
    10: DceRpcOp(Add_Request, Add_Response),
    11: DceRpcOp(Remove_Request, Remove_Response),
    12: DceRpcOp(Clear_Request, Clear_Response),
    13: DceRpcOp(AddRange_Request, AddRange_Response),
    14: DceRpcOp(CreateSchedule_Request, CreateSchedule_Response),
}
register_com_interface(
    name="IScheduleCollection",
    uuid=uuid.UUID("0383753d-098b-11d8-9414-505054503030"),
    opnums=ISCHEDULECOLLECTION_OPNUMS,
)


class get_IValueMapItem_Description_Request(NDRPacket):
    fields_desc = []


class get_IValueMapItem_Description_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("description", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IValueMapItem_Description_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("description", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IValueMapItem_Description_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IValueMapItem_Enabled_Request(NDRPacket):
    fields_desc = []


class get_IValueMapItem_Enabled_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("enabled", 0), NDRIntField("status", 0)]


class put_IValueMapItem_Enabled_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("enabled", 0)]


class put_IValueMapItem_Enabled_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IValueMapItem_Key_Request(NDRPacket):
    fields_desc = []


class get_IValueMapItem_Key_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("key", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IValueMapItem_Key_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("key", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IValueMapItem_Key_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IValueMapItem_Value_Request(NDRPacket):
    fields_desc = []


class get_IValueMapItem_Value_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("Value", wireVARIANTStr(), wireVARIANTStr)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IValueMapItem_Value_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("Value", wireVARIANTStr(), wireVARIANTStr))
    ]


class put_IValueMapItem_Value_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class ValueMapType(IntEnum):
    plaIndex = 1
    plaFlag = 2
    plaFlagArray = 3
    plaValidation = 4


class get_IValueMapItem_ValueMapType_Request(NDRPacket):
    fields_desc = []


class get_IValueMapItem_ValueMapType_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("type", 0, ValueMapType),
        NDRIntField("status", 0),
    ]


class put_IValueMapItem_ValueMapType_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("type", 0, ValueMapType)]


class put_IValueMapItem_ValueMapType_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


IVALUEMAPITEM_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IValueMapItem_Description_Request, get_IValueMapItem_Description_Response
    ),
    8: DceRpcOp(
        put_IValueMapItem_Description_Request, put_IValueMapItem_Description_Response
    ),
    9: DceRpcOp(get_IValueMapItem_Enabled_Request, get_IValueMapItem_Enabled_Response),
    10: DceRpcOp(put_IValueMapItem_Enabled_Request, put_IValueMapItem_Enabled_Response),
    11: DceRpcOp(get_IValueMapItem_Key_Request, get_IValueMapItem_Key_Response),
    12: DceRpcOp(put_IValueMapItem_Key_Request, put_IValueMapItem_Key_Response),
    13: DceRpcOp(get_IValueMapItem_Value_Request, get_IValueMapItem_Value_Response),
    14: DceRpcOp(put_IValueMapItem_Value_Request, put_IValueMapItem_Value_Response),
    15: DceRpcOp(
        get_IValueMapItem_ValueMapType_Request, get_IValueMapItem_ValueMapType_Response
    ),
    16: DceRpcOp(
        put_IValueMapItem_ValueMapType_Request, put_IValueMapItem_ValueMapType_Response
    ),
}
register_com_interface(
    name="IValueMapItem",
    uuid=uuid.UUID("03837533-098b-11d8-9414-505054503030"),
    opnums=IVALUEMAPITEM_OPNUMS,
)


class get_IValueMap_Count_Request(NDRPacket):
    fields_desc = []


class get_IValueMap_Count_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("retVal", 0), NDRIntField("status", 0)]


class get_IValueMap_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("index", wireVARIANTStr(), wireVARIANTStr))
    ]


class get_IValueMap_Item_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("value", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_IValueMap__NewEnum_Request(NDRPacket):
    fields_desc = []


class get_IValueMap__NewEnum_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("retVal", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


class get_IValueMap_Description_Request(NDRPacket):
    fields_desc = []


class get_IValueMap_Description_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("description", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IValueMap_Description_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("description", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


class put_IValueMap_Description_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IValueMap_Value_Request(NDRPacket):
    fields_desc = []


class get_IValueMap_Value_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("Value", wireVARIANTStr(), wireVARIANTStr)
            )
        ),
        NDRIntField("status", 0),
    ]


class put_IValueMap_Value_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("Value", wireVARIANTStr(), wireVARIANTStr))
    ]


class put_IValueMap_Value_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class get_IValueMap_ValueMapType_Request(NDRPacket):
    fields_desc = []


class get_IValueMap_ValueMapType_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("type", 0, ValueMapType),
        NDRIntField("status", 0),
    ]


class put_IValueMap_ValueMapType_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("type", 0, ValueMapType)]


class put_IValueMap_ValueMapType_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Add_Request(NDRPacket):
    fields_desc = []


class Add_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Remove_Request(NDRPacket):
    fields_desc = []


class Remove_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class Clear_Request(NDRPacket):
    fields_desc = []


class Clear_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class AddRange_Request(NDRPacket):
    fields_desc = []


class AddRange_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class CreateValueMapItem_Request(NDRPacket):
    fields_desc = []


class CreateValueMapItem_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("Item", MInterfacePointer(), MInterfacePointer)
        ),
        NDRIntField("status", 0),
    ]


IVALUEMAP_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IValueMap_Count_Request, get_IValueMap_Count_Response),
    8: DceRpcOp(get_IValueMap_Item_Request, get_IValueMap_Item_Response),
    9: DceRpcOp(get_IValueMap__NewEnum_Request, get_IValueMap__NewEnum_Response),
    10: DceRpcOp(get_IValueMap_Description_Request, get_IValueMap_Description_Response),
    11: DceRpcOp(put_IValueMap_Description_Request, put_IValueMap_Description_Response),
    12: DceRpcOp(get_IValueMap_Value_Request, get_IValueMap_Value_Response),
    13: DceRpcOp(put_IValueMap_Value_Request, put_IValueMap_Value_Response),
    14: DceRpcOp(
        get_IValueMap_ValueMapType_Request, get_IValueMap_ValueMapType_Response
    ),
    15: DceRpcOp(
        put_IValueMap_ValueMapType_Request, put_IValueMap_ValueMapType_Response
    ),
    16: DceRpcOp(Add_Request, Add_Response),
    17: DceRpcOp(Remove_Request, Remove_Response),
    18: DceRpcOp(Clear_Request, Clear_Response),
    19: DceRpcOp(AddRange_Request, AddRange_Response),
    20: DceRpcOp(CreateValueMapItem_Request, CreateValueMapItem_Response),
}
register_com_interface(
    name="IValueMap",
    uuid=uuid.UUID("03837534-098b-11d8-9414-505054503030"),
    opnums=IVALUEMAP_OPNUMS,
)
