### ms-pla.idl
"""
RPC definitions for the following interfaces:
- 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,
    NDRConfPacketListField,
    NDRConfStrLenField,
    NDRConfStrLenFieldUtf16,
    NDRFullPointerField,
    NDRInt3264EnumField,
    NDRIntField,
    NDRLongField,
    NDRPacketField,
    NDRRecursiveField,
    NDRRefEmbPointerField,
    NDRShortField,
    NDRSignedIntField,
    NDRSignedLongField,
    NDRSignedShortField,
    register_com_interface,
)


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


class get_DataCollectors_Request(NDRPacket):
    fields_desc = []


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


class get_Duration_Request(NDRPacket):
    fields_desc = []


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


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


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


class FLAGGED_WORD_BLOB(NDRPacket):
    ALIGNMENT = (4, 8)
    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 get_Description_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_DescriptionUnresolved_Request(NDRPacket):
    fields_desc = []


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


class get_DisplayName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_DisplayNameUnresolved_Request(NDRPacket):
    fields_desc = []


class get_DisplayNameUnresolved_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("name", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        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 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
            ),
            deferred=True,
        ),
    ]


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
            ),
            deferred=True,
        ),
    ]


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
            ),
            deferred=True,
        ),
    ]


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


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),
        NDRRecursiveField("uArrayStructs"),
        NDRConfPacketListField(
            "rgsabound",
            [],
            SAFEARRAYBOUND,
            size_is=lambda pkt: pkt.cDims,
            conformant_in_struct=True,
        ),
    ]


class get_Keywords_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_LatestOutputLocation_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_OutputLocation_Request(NDRPacket):
    fields_desc = []


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


class get_RootPath_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Segment_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SegmentMaxDuration_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SegmentMaxSize_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SerialNumber_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Server_Request(NDRPacket):
    fields_desc = []


class get_Server_Response(NDRPacket):
    fields_desc = [
        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_Status_Request(NDRPacket):
    fields_desc = []


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


class get_Subdirectory_Request(NDRPacket):
    fields_desc = []


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


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


class put_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_SubdirectoryFormat_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SubdirectoryFormatPattern_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Task_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_TaskRunAsSelf_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_TaskArguments_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_TaskUserTextArguments_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Schedules_Request(NDRPacket):
    fields_desc = []


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


class get_SchedulesEnabled_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_UserAccount_Request(NDRPacket):
    fields_desc = []


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


class get_Xml_Request(NDRPacket):
    fields_desc = []


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


class get_Security_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_StopOnCompletion_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_DataManager_Request(NDRPacket):
    fields_desc = []


class get_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 = [
        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 = [
        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 = [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(
            NDRPacketField("value", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRIntField("status", 0),
    ]


IDATACOLLECTORSET_OPNUMS = {
    0: DceRpcOp(get_DataCollectors_Request, get_DataCollectors_Response),
    1: DceRpcOp(get_Duration_Request, get_Duration_Response),
    2: DceRpcOp(put_Duration_Request, put_Duration_Response),
    3: DceRpcOp(get_Description_Request, get_Description_Response),
    4: DceRpcOp(put_Description_Request, put_Description_Response),
    5: DceRpcOp(get_DescriptionUnresolved_Request, get_DescriptionUnresolved_Response),
    6: DceRpcOp(get_DisplayName_Request, get_DisplayName_Response),
    7: DceRpcOp(put_DisplayName_Request, put_DisplayName_Response),
    8: DceRpcOp(get_DisplayNameUnresolved_Request, get_DisplayNameUnresolved_Response),
    9: DceRpcOp(get_Keywords_Request, get_Keywords_Response),
    10: DceRpcOp(put_Keywords_Request, put_Keywords_Response),
    11: DceRpcOp(get_LatestOutputLocation_Request, get_LatestOutputLocation_Response),
    12: DceRpcOp(put_LatestOutputLocation_Request, put_LatestOutputLocation_Response),
    13: DceRpcOp(get_Name_Request, get_Name_Response),
    14: DceRpcOp(get_OutputLocation_Request, get_OutputLocation_Response),
    15: DceRpcOp(get_RootPath_Request, get_RootPath_Response),
    16: DceRpcOp(put_RootPath_Request, put_RootPath_Response),
    17: DceRpcOp(get_Segment_Request, get_Segment_Response),
    18: DceRpcOp(put_Segment_Request, put_Segment_Response),
    19: DceRpcOp(get_SegmentMaxDuration_Request, get_SegmentMaxDuration_Response),
    20: DceRpcOp(put_SegmentMaxDuration_Request, put_SegmentMaxDuration_Response),
    21: DceRpcOp(get_SegmentMaxSize_Request, get_SegmentMaxSize_Response),
    22: DceRpcOp(put_SegmentMaxSize_Request, put_SegmentMaxSize_Response),
    23: DceRpcOp(get_SerialNumber_Request, get_SerialNumber_Response),
    24: DceRpcOp(put_SerialNumber_Request, put_SerialNumber_Response),
    25: DceRpcOp(get_Server_Request, get_Server_Response),
    26: DceRpcOp(get_Status_Request, get_Status_Response),
    27: DceRpcOp(get_Subdirectory_Request, get_Subdirectory_Response),
    28: DceRpcOp(put_Subdirectory_Request, put_Subdirectory_Response),
    29: DceRpcOp(get_SubdirectoryFormat_Request, get_SubdirectoryFormat_Response),
    30: DceRpcOp(put_SubdirectoryFormat_Request, put_SubdirectoryFormat_Response),
    31: DceRpcOp(
        get_SubdirectoryFormatPattern_Request, get_SubdirectoryFormatPattern_Response
    ),
    32: DceRpcOp(
        put_SubdirectoryFormatPattern_Request, put_SubdirectoryFormatPattern_Response
    ),
    33: DceRpcOp(get_Task_Request, get_Task_Response),
    34: DceRpcOp(put_Task_Request, put_Task_Response),
    35: DceRpcOp(get_TaskRunAsSelf_Request, get_TaskRunAsSelf_Response),
    36: DceRpcOp(put_TaskRunAsSelf_Request, put_TaskRunAsSelf_Response),
    37: DceRpcOp(get_TaskArguments_Request, get_TaskArguments_Response),
    38: DceRpcOp(put_TaskArguments_Request, put_TaskArguments_Response),
    39: DceRpcOp(get_TaskUserTextArguments_Request, get_TaskUserTextArguments_Response),
    40: DceRpcOp(put_TaskUserTextArguments_Request, put_TaskUserTextArguments_Response),
    41: DceRpcOp(get_Schedules_Request, get_Schedules_Response),
    42: DceRpcOp(get_SchedulesEnabled_Request, get_SchedulesEnabled_Response),
    43: DceRpcOp(put_SchedulesEnabled_Request, put_SchedulesEnabled_Response),
    44: DceRpcOp(get_UserAccount_Request, get_UserAccount_Response),
    45: DceRpcOp(get_Xml_Request, get_Xml_Response),
    46: DceRpcOp(get_Security_Request, get_Security_Response),
    47: DceRpcOp(put_Security_Request, put_Security_Response),
    48: DceRpcOp(get_StopOnCompletion_Request, get_StopOnCompletion_Response),
    49: DceRpcOp(put_StopOnCompletion_Request, put_StopOnCompletion_Response),
    50: DceRpcOp(get_DataManager_Request, get_DataManager_Response),
    51: DceRpcOp(SetCredentials_Request, SetCredentials_Response),
    52: DceRpcOp(Query_Request, Query_Response),
    53: DceRpcOp(Commit_Request, Commit_Response),
    54: DceRpcOp(Delete_Request, Delete_Response),
    55: DceRpcOp(Start_Request, Start_Response),
    56: DceRpcOp(Stop_Request, Stop_Response),
    57: DceRpcOp(SetXml_Request, SetXml_Response),
    58: DceRpcOp(SetValue_Request, SetValue_Response),
    59: DceRpcOp(GetValue_Request, GetValue_Response),
}
register_com_interface(
    name="IDataCollectorSet",
    uuid=uuid.UUID("03837520-098b-11d8-9414-505054503030"),
    opnums=IDATACOLLECTORSET_OPNUMS,
)


class get_Enabled_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_CheckBeforeRunning_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MinFreeDisk_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MaxSize_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MaxFolderCount_Request(NDRPacket):
    fields_desc = []


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


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


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


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


class get_ResourcePolicy_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_FolderActions_Request(NDRPacket):
    fields_desc = []


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


class get_ReportSchema_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ReportFileName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_RuleTargetFileName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_EventsFileName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Rules_Request(NDRPacket):
    fields_desc = []


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


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


class put_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),
        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 = [
        NDRPacketField("CabFilename", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        NDRPacketField("DestinationPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
    ]


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


IDATAMANAGER_OPNUMS = {
    0: DceRpcOp(get_Enabled_Request, get_Enabled_Response),
    1: DceRpcOp(put_Enabled_Request, put_Enabled_Response),
    2: DceRpcOp(get_CheckBeforeRunning_Request, get_CheckBeforeRunning_Response),
    3: DceRpcOp(put_CheckBeforeRunning_Request, put_CheckBeforeRunning_Response),
    4: DceRpcOp(get_MinFreeDisk_Request, get_MinFreeDisk_Response),
    5: DceRpcOp(put_MinFreeDisk_Request, put_MinFreeDisk_Response),
    6: DceRpcOp(get_MaxSize_Request, get_MaxSize_Response),
    7: DceRpcOp(put_MaxSize_Request, put_MaxSize_Response),
    8: DceRpcOp(get_MaxFolderCount_Request, get_MaxFolderCount_Response),
    9: DceRpcOp(put_MaxFolderCount_Request, put_MaxFolderCount_Response),
    10: DceRpcOp(get_ResourcePolicy_Request, get_ResourcePolicy_Response),
    11: DceRpcOp(put_ResourcePolicy_Request, put_ResourcePolicy_Response),
    12: DceRpcOp(get_FolderActions_Request, get_FolderActions_Response),
    13: DceRpcOp(get_ReportSchema_Request, get_ReportSchema_Response),
    14: DceRpcOp(put_ReportSchema_Request, put_ReportSchema_Response),
    15: DceRpcOp(get_ReportFileName_Request, get_ReportFileName_Response),
    16: DceRpcOp(put_ReportFileName_Request, put_ReportFileName_Response),
    17: DceRpcOp(get_RuleTargetFileName_Request, get_RuleTargetFileName_Response),
    18: DceRpcOp(put_RuleTargetFileName_Request, put_RuleTargetFileName_Response),
    19: DceRpcOp(get_EventsFileName_Request, get_EventsFileName_Response),
    20: DceRpcOp(put_EventsFileName_Request, put_EventsFileName_Response),
    21: DceRpcOp(get_Rules_Request, get_Rules_Response),
    22: DceRpcOp(put_Rules_Request, put_Rules_Response),
    23: DceRpcOp(Run_Request, Run_Response),
    24: DceRpcOp(Extract_Request, Extract_Response),
}
register_com_interface(
    name="IDataManager",
    uuid=uuid.UUID("03837541-098b-11d8-9414-505054503030"),
    opnums=IDATAMANAGER_OPNUMS,
)


class get_Age_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Size_Request(NDRPacket):
    fields_desc = []


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


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


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


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


class get_Actions_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SendCabTo_Request(NDRPacket):
    fields_desc = []


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


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


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


IFOLDERACTION_OPNUMS = {
    0: DceRpcOp(get_Age_Request, get_Age_Response),
    1: DceRpcOp(put_Age_Request, put_Age_Response),
    2: DceRpcOp(get_Size_Request, get_Size_Response),
    3: DceRpcOp(put_Size_Request, put_Size_Response),
    4: DceRpcOp(get_Actions_Request, get_Actions_Response),
    5: DceRpcOp(put_Actions_Request, put_Actions_Response),
    6: DceRpcOp(get_SendCabTo_Request, get_SendCabTo_Response),
    7: DceRpcOp(put_SendCabTo_Request, put_SendCabTo_Response),
}
register_com_interface(
    name="IFolderAction",
    uuid=uuid.UUID("03837543-098b-11d8-9414-505054503030"),
    opnums=IFOLDERACTION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


class wireVARIANTStr(NDRPacket):
    ALIGNMENT = (4, 4)
    fields_desc = [
        NDRIntField("clSize", 0),
        NDRIntField("rpcReserved", 0),
        NDRShortField("vt", 0),
        NDRShortField("wReserved1", 0),
        NDRShortField("wReserved2", 0),
        NDRShortField("wReserved3", 0),
        NDRRecursiveField("_varUnion"),
    ]


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


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


class get__NewEnum_Request(NDRPacket):
    fields_desc = []


class get__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: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(get__NewEnum_Request, get__NewEnum_Response),
    3: DceRpcOp(Add_Request, Add_Response),
    4: DceRpcOp(Remove_Request, Remove_Response),
    5: DceRpcOp(Clear_Request, Clear_Response),
    6: DceRpcOp(AddRange_Request, AddRange_Response),
    7: DceRpcOp(CreateFolderAction_Request, CreateFolderAction_Response),
}
register_com_interface(
    name="IFolderActionCollection",
    uuid=uuid.UUID("03837544-098b-11d8-9414-505054503030"),
    opnums=IFOLDERACTIONCOLLECTION_OPNUMS,
)


class get_DataCollectorSet_Request(NDRPacket):
    fields_desc = []


class get_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_DataCollectorType_Request(NDRPacket):
    fields_desc = []


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


class get_FileName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_FileNameFormat_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_FileNameFormatPattern_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_LatestOutputLocation_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_LogAppend_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_LogCircular_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_LogOverwrite_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_OutputLocation_Request(NDRPacket):
    fields_desc = []


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


class get_Index_Request(NDRPacket):
    fields_desc = []


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


class get_Xml_Request(NDRPacket):
    fields_desc = []


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


class SetXml_Request(NDRPacket):
    fields_desc = [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: DceRpcOp(get_DataCollectorSet_Request, get_DataCollectorSet_Response),
    # 1: Opnum8NotUsedOnWire,
    2: DceRpcOp(get_DataCollectorType_Request, get_DataCollectorType_Response),
    3: DceRpcOp(get_FileName_Request, get_FileName_Response),
    4: DceRpcOp(put_FileName_Request, put_FileName_Response),
    5: DceRpcOp(get_FileNameFormat_Request, get_FileNameFormat_Response),
    6: DceRpcOp(put_FileNameFormat_Request, put_FileNameFormat_Response),
    7: DceRpcOp(get_FileNameFormatPattern_Request, get_FileNameFormatPattern_Response),
    8: DceRpcOp(put_FileNameFormatPattern_Request, put_FileNameFormatPattern_Response),
    9: DceRpcOp(get_LatestOutputLocation_Request, get_LatestOutputLocation_Response),
    10: DceRpcOp(put_LatestOutputLocation_Request, put_LatestOutputLocation_Response),
    11: DceRpcOp(get_LogAppend_Request, get_LogAppend_Response),
    12: DceRpcOp(put_LogAppend_Request, put_LogAppend_Response),
    13: DceRpcOp(get_LogCircular_Request, get_LogCircular_Response),
    14: DceRpcOp(put_LogCircular_Request, put_LogCircular_Response),
    15: DceRpcOp(get_LogOverwrite_Request, get_LogOverwrite_Response),
    16: DceRpcOp(put_LogOverwrite_Request, put_LogOverwrite_Response),
    17: DceRpcOp(get_Name_Request, get_Name_Response),
    18: DceRpcOp(put_Name_Request, put_Name_Response),
    19: DceRpcOp(get_OutputLocation_Request, get_OutputLocation_Response),
    20: DceRpcOp(get_Index_Request, get_Index_Response),
    # 21: Opnum28NotUsedOnWire,
    22: DceRpcOp(get_Xml_Request, get_Xml_Response),
    23: DceRpcOp(SetXml_Request, SetXml_Response),
    # 24: Opnum31NotUsedOnWire
}
register_com_interface(
    name="IDataCollector",
    uuid=uuid.UUID("038374ff-098b-11d8-9414-505054503030"),
    opnums=IDATACOLLECTOR_OPNUMS,
)


class get_DataSourceName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_PerformanceCounters_Request(NDRPacket):
    fields_desc = []


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


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


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


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


class get_LogFileFormat_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SampleInterval_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SegmentMaxRecords_Request(NDRPacket):
    fields_desc = []


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


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


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


IPERFORMANCECOUNTERDATACOLLECTOR_OPNUMS = {
    0: DceRpcOp(get_DataSourceName_Request, get_DataSourceName_Response),
    1: DceRpcOp(put_DataSourceName_Request, put_DataSourceName_Response),
    2: DceRpcOp(get_PerformanceCounters_Request, get_PerformanceCounters_Response),
    3: DceRpcOp(put_PerformanceCounters_Request, put_PerformanceCounters_Response),
    4: DceRpcOp(get_LogFileFormat_Request, get_LogFileFormat_Response),
    5: DceRpcOp(put_LogFileFormat_Request, put_LogFileFormat_Response),
    6: DceRpcOp(get_SampleInterval_Request, get_SampleInterval_Response),
    7: DceRpcOp(put_SampleInterval_Request, put_SampleInterval_Response),
    8: DceRpcOp(get_SegmentMaxRecords_Request, get_SegmentMaxRecords_Response),
    9: DceRpcOp(put_SegmentMaxRecords_Request, put_SegmentMaxRecords_Response),
}
register_com_interface(
    name="IPerformanceCounterDataCollector",
    uuid=uuid.UUID("03837506-098b-11d8-9414-505054503030"),
    opnums=IPERFORMANCECOUNTERDATACOLLECTOR_OPNUMS,
)


class get_BufferSize_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_BuffersLost_Request(NDRPacket):
    fields_desc = []


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


class get_BuffersWritten_Request(NDRPacket):
    fields_desc = []


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


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


class get_ClockType_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_EventsLost_Request(NDRPacket):
    fields_desc = []


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


class get_ExtendedModes_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_FlushTimer_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_FreeBuffers_Request(NDRPacket):
    fields_desc = []


class get_FreeBuffers_Response(NDRPacket):
    fields_desc = [NDRIntField("buffers", 0), 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 get_Guid_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IsKernelTrace_Request(NDRPacket):
    fields_desc = []


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


class get_MaximumBuffers_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MinimumBuffers_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_NumberOfBuffers_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_PreallocateFile_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ProcessMode_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_RealTimeBuffersLost_Request(NDRPacket):
    fields_desc = []


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


class get_SessionId_Request(NDRPacket):
    fields_desc = []


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


class get_SessionName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SessionThreadId_Request(NDRPacket):
    fields_desc = []


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


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


class get_StreamMode_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_TraceDataProviders_Request(NDRPacket):
    fields_desc = []


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


ITRACEDATACOLLECTOR_OPNUMS = {
    0: DceRpcOp(get_BufferSize_Request, get_BufferSize_Response),
    1: DceRpcOp(put_BufferSize_Request, put_BufferSize_Response),
    2: DceRpcOp(get_BuffersLost_Request, get_BuffersLost_Response),
    # 3: Opnum35NotUsedOnWire,
    4: DceRpcOp(get_BuffersWritten_Request, get_BuffersWritten_Response),
    # 5: Opnum37NotUsedOnWire,
    6: DceRpcOp(get_ClockType_Request, get_ClockType_Response),
    7: DceRpcOp(put_ClockType_Request, put_ClockType_Response),
    8: DceRpcOp(get_EventsLost_Request, get_EventsLost_Response),
    # 9: Opnum41NotUsedOnWire,
    10: DceRpcOp(get_ExtendedModes_Request, get_ExtendedModes_Response),
    11: DceRpcOp(put_ExtendedModes_Request, put_ExtendedModes_Response),
    12: DceRpcOp(get_FlushTimer_Request, get_FlushTimer_Response),
    13: DceRpcOp(put_FlushTimer_Request, put_FlushTimer_Response),
    14: DceRpcOp(get_FreeBuffers_Request, get_FreeBuffers_Response),
    # 15: Opnum47NotUsedOnWire,
    16: DceRpcOp(get_Guid_Request, get_Guid_Response),
    17: DceRpcOp(put_Guid_Request, put_Guid_Response),
    18: DceRpcOp(get_IsKernelTrace_Request, get_IsKernelTrace_Response),
    19: DceRpcOp(get_MaximumBuffers_Request, get_MaximumBuffers_Response),
    20: DceRpcOp(put_MaximumBuffers_Request, put_MaximumBuffers_Response),
    21: DceRpcOp(get_MinimumBuffers_Request, get_MinimumBuffers_Response),
    22: DceRpcOp(put_MinimumBuffers_Request, put_MinimumBuffers_Response),
    23: DceRpcOp(get_NumberOfBuffers_Request, get_NumberOfBuffers_Response),
    24: DceRpcOp(put_NumberOfBuffers_Request, put_NumberOfBuffers_Response),
    25: DceRpcOp(get_PreallocateFile_Request, get_PreallocateFile_Response),
    26: DceRpcOp(put_PreallocateFile_Request, put_PreallocateFile_Response),
    27: DceRpcOp(get_ProcessMode_Request, get_ProcessMode_Response),
    28: DceRpcOp(put_ProcessMode_Request, put_ProcessMode_Response),
    29: DceRpcOp(get_RealTimeBuffersLost_Request, get_RealTimeBuffersLost_Response),
    # 30: Opnum62NotUsedOnWire,
    31: DceRpcOp(get_SessionId_Request, get_SessionId_Response),
    # 32: Opnum64NotUsedOnWire,
    33: DceRpcOp(get_SessionName_Request, get_SessionName_Response),
    34: DceRpcOp(put_SessionName_Request, put_SessionName_Response),
    35: DceRpcOp(get_SessionThreadId_Request, get_SessionThreadId_Response),
    # 36: Opnum68NotUsedOnWire,
    37: DceRpcOp(get_StreamMode_Request, get_StreamMode_Response),
    38: DceRpcOp(put_StreamMode_Request, put_StreamMode_Response),
    39: DceRpcOp(get_TraceDataProviders_Request, get_TraceDataProviders_Response),
}
register_com_interface(
    name="ITraceDataCollector",
    uuid=uuid.UUID("0383750b-098b-11d8-9414-505054503030"),
    opnums=ITRACEDATACOLLECTOR_OPNUMS,
)


class get_FileMaxCount_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_FileMaxRecursiveDepth_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_FileMaxTotalSize_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Files_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ManagementQueries_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_QueryNetworkAdapters_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_RegistryKeys_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_RegistryMaxRecursiveDepth_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SystemStateFile_Request(NDRPacket):
    fields_desc = []


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


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


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


ICONFIGURATIONDATACOLLECTOR_OPNUMS = {
    0: DceRpcOp(get_FileMaxCount_Request, get_FileMaxCount_Response),
    1: DceRpcOp(put_FileMaxCount_Request, put_FileMaxCount_Response),
    2: DceRpcOp(get_FileMaxRecursiveDepth_Request, get_FileMaxRecursiveDepth_Response),
    3: DceRpcOp(put_FileMaxRecursiveDepth_Request, put_FileMaxRecursiveDepth_Response),
    4: DceRpcOp(get_FileMaxTotalSize_Request, get_FileMaxTotalSize_Response),
    5: DceRpcOp(put_FileMaxTotalSize_Request, put_FileMaxTotalSize_Response),
    6: DceRpcOp(get_Files_Request, get_Files_Response),
    7: DceRpcOp(put_Files_Request, put_Files_Response),
    8: DceRpcOp(get_ManagementQueries_Request, get_ManagementQueries_Response),
    9: DceRpcOp(put_ManagementQueries_Request, put_ManagementQueries_Response),
    10: DceRpcOp(get_QueryNetworkAdapters_Request, get_QueryNetworkAdapters_Response),
    11: DceRpcOp(put_QueryNetworkAdapters_Request, put_QueryNetworkAdapters_Response),
    12: DceRpcOp(get_RegistryKeys_Request, get_RegistryKeys_Response),
    13: DceRpcOp(put_RegistryKeys_Request, put_RegistryKeys_Response),
    14: DceRpcOp(
        get_RegistryMaxRecursiveDepth_Request, get_RegistryMaxRecursiveDepth_Response
    ),
    15: DceRpcOp(
        put_RegistryMaxRecursiveDepth_Request, put_RegistryMaxRecursiveDepth_Response
    ),
    16: DceRpcOp(get_SystemStateFile_Request, get_SystemStateFile_Response),
    17: DceRpcOp(put_SystemStateFile_Request, put_SystemStateFile_Response),
}
register_com_interface(
    name="IConfigurationDataCollector",
    uuid=uuid.UUID("03837514-098b-11d8-9414-505054503030"),
    opnums=ICONFIGURATIONDATACOLLECTOR_OPNUMS,
)


class get_AlertThresholds_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_EventLog_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SampleInterval_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Task_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_TaskRunAsSelf_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_TaskArguments_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_TaskUserTextArguments_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_TriggerDataCollectorSet_Request(NDRPacket):
    fields_desc = []


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


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


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


IALERTDATACOLLECTOR_OPNUMS = {
    0: DceRpcOp(get_AlertThresholds_Request, get_AlertThresholds_Response),
    1: DceRpcOp(put_AlertThresholds_Request, put_AlertThresholds_Response),
    2: DceRpcOp(get_EventLog_Request, get_EventLog_Response),
    3: DceRpcOp(put_EventLog_Request, put_EventLog_Response),
    4: DceRpcOp(get_SampleInterval_Request, get_SampleInterval_Response),
    5: DceRpcOp(put_SampleInterval_Request, put_SampleInterval_Response),
    6: DceRpcOp(get_Task_Request, get_Task_Response),
    7: DceRpcOp(put_Task_Request, put_Task_Response),
    8: DceRpcOp(get_TaskRunAsSelf_Request, get_TaskRunAsSelf_Response),
    9: DceRpcOp(put_TaskRunAsSelf_Request, put_TaskRunAsSelf_Response),
    10: DceRpcOp(get_TaskArguments_Request, get_TaskArguments_Response),
    11: DceRpcOp(put_TaskArguments_Request, put_TaskArguments_Response),
    12: DceRpcOp(get_TaskUserTextArguments_Request, get_TaskUserTextArguments_Response),
    13: DceRpcOp(put_TaskUserTextArguments_Request, put_TaskUserTextArguments_Response),
    14: DceRpcOp(
        get_TriggerDataCollectorSet_Request, get_TriggerDataCollectorSet_Response
    ),
    15: DceRpcOp(
        put_TriggerDataCollectorSet_Request, put_TriggerDataCollectorSet_Response
    ),
}
register_com_interface(
    name="IAlertDataCollector",
    uuid=uuid.UUID("03837516-098b-11d8-9414-505054503030"),
    opnums=IALERTDATACOLLECTOR_OPNUMS,
)


class get_LogApiNamesOnly_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_LogApisRecursively_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ExePath_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_LogFilePath_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IncludeModules_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IncludeApis_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ExcludeApis_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPITRACINGDATACOLLECTOR_OPNUMS = {
    0: DceRpcOp(get_LogApiNamesOnly_Request, get_LogApiNamesOnly_Response),
    1: DceRpcOp(put_LogApiNamesOnly_Request, put_LogApiNamesOnly_Response),
    2: DceRpcOp(get_LogApisRecursively_Request, get_LogApisRecursively_Response),
    3: DceRpcOp(put_LogApisRecursively_Request, put_LogApisRecursively_Response),
    4: DceRpcOp(get_ExePath_Request, get_ExePath_Response),
    5: DceRpcOp(put_ExePath_Request, put_ExePath_Response),
    6: DceRpcOp(get_LogFilePath_Request, get_LogFilePath_Response),
    7: DceRpcOp(put_LogFilePath_Request, put_LogFilePath_Response),
    8: DceRpcOp(get_IncludeModules_Request, get_IncludeModules_Response),
    9: DceRpcOp(put_IncludeModules_Request, put_IncludeModules_Response),
    10: DceRpcOp(get_IncludeApis_Request, get_IncludeApis_Response),
    11: DceRpcOp(put_IncludeApis_Request, put_IncludeApis_Response),
    12: DceRpcOp(get_ExcludeApis_Request, get_ExcludeApis_Response),
    13: DceRpcOp(put_ExcludeApis_Request, put_ExcludeApis_Response),
}
register_com_interface(
    name="IApiTracingDataCollector",
    uuid=uuid.UUID("0383751a-098b-11d8-9414-505054503030"),
    opnums=IAPITRACINGDATACOLLECTOR_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


class get__NewEnum_Request(NDRPacket):
    fields_desc = []


class get__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 = [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: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(get__NewEnum_Request, get__NewEnum_Response),
    3: DceRpcOp(Add_Request, Add_Response),
    4: DceRpcOp(Remove_Request, Remove_Response),
    5: DceRpcOp(Clear_Request, Clear_Response),
    6: DceRpcOp(AddRange_Request, AddRange_Response),
    7: DceRpcOp(
        CreateDataCollectorFromXml_Request, CreateDataCollectorFromXml_Response
    ),
    8: DceRpcOp(CreateDataCollector_Request, CreateDataCollector_Response),
}
register_com_interface(
    name="IDataCollectorCollection",
    uuid=uuid.UUID("03837502-098b-11d8-9414-505054503030"),
    opnums=IDATACOLLECTORCOLLECTION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


class get__NewEnum_Request(NDRPacket):
    fields_desc = []


class get__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: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(get__NewEnum_Request, get__NewEnum_Response),
    3: DceRpcOp(Add_Request, Add_Response),
    4: DceRpcOp(Remove_Request, Remove_Response),
    5: DceRpcOp(Clear_Request, Clear_Response),
    6: DceRpcOp(AddRange_Request, AddRange_Response),
    7: DceRpcOp(GetDataCollectorSets_Request, GetDataCollectorSets_Response),
}
register_com_interface(
    name="IDataCollectorSetCollection",
    uuid=uuid.UUID("03837524-098b-11d8-9414-505054503030"),
    opnums=IDATACOLLECTORSETCOLLECTION_OPNUMS,
)


class get_DisplayName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Guid_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Level_Request(NDRPacket):
    fields_desc = []


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


class get_KeywordsAny_Request(NDRPacket):
    fields_desc = []


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


class get_KeywordsAll_Request(NDRPacket):
    fields_desc = []


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


class get_Properties_Request(NDRPacket):
    fields_desc = []


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


class get_FilterEnabled_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_FilterType_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_FilterData_Request(NDRPacket):
    fields_desc = []


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


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


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


class Query_Request(NDRPacket):
    fields_desc = [
        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 = [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(
            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: DceRpcOp(get_DisplayName_Request, get_DisplayName_Response),
    1: DceRpcOp(put_DisplayName_Request, put_DisplayName_Response),
    2: DceRpcOp(get_Guid_Request, get_Guid_Response),
    3: DceRpcOp(put_Guid_Request, put_Guid_Response),
    4: DceRpcOp(get_Level_Request, get_Level_Response),
    5: DceRpcOp(get_KeywordsAny_Request, get_KeywordsAny_Response),
    6: DceRpcOp(get_KeywordsAll_Request, get_KeywordsAll_Response),
    7: DceRpcOp(get_Properties_Request, get_Properties_Response),
    8: DceRpcOp(get_FilterEnabled_Request, get_FilterEnabled_Response),
    9: DceRpcOp(put_FilterEnabled_Request, put_FilterEnabled_Response),
    10: DceRpcOp(get_FilterType_Request, get_FilterType_Response),
    11: DceRpcOp(put_FilterType_Request, put_FilterType_Response),
    12: DceRpcOp(get_FilterData_Request, get_FilterData_Response),
    13: DceRpcOp(put_FilterData_Request, put_FilterData_Response),
    14: DceRpcOp(Query_Request, Query_Response),
    15: DceRpcOp(Resolve_Request, Resolve_Response),
    16: DceRpcOp(SetSecurity_Request, SetSecurity_Response),
    17: DceRpcOp(GetSecurity_Request, GetSecurity_Response),
    18: DceRpcOp(GetRegisteredProcesses_Request, GetRegisteredProcesses_Response),
}
register_com_interface(
    name="ITraceDataProvider",
    uuid=uuid.UUID("03837512-098b-11d8-9414-505054503030"),
    opnums=ITRACEDATAPROVIDER_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


class get__NewEnum_Request(NDRPacket):
    fields_desc = []


class get__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: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(get__NewEnum_Request, get__NewEnum_Response),
    3: DceRpcOp(Add_Request, Add_Response),
    4: DceRpcOp(Remove_Request, Remove_Response),
    5: DceRpcOp(Clear_Request, Clear_Response),
    6: DceRpcOp(AddRange_Request, AddRange_Response),
    7: DceRpcOp(CreateTraceDataProvider_Request, CreateTraceDataProvider_Response),
    8: DceRpcOp(GetTraceDataProviders_Request, GetTraceDataProviders_Response),
    9: DceRpcOp(
        GetTraceDataProvidersByProcess_Request, GetTraceDataProvidersByProcess_Response
    ),
}
register_com_interface(
    name="ITraceDataProviderCollection",
    uuid=uuid.UUID("03837510-098b-11d8-9414-505054503030"),
    opnums=ITRACEDATAPROVIDERCOLLECTION_OPNUMS,
)


class get_StartDate_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_EndDate_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_StartTime_Request(NDRPacket):
    fields_desc = []


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


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


class put_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_Days_Request(NDRPacket):
    fields_desc = []


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


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


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


ISCHEDULE_OPNUMS = {
    0: DceRpcOp(get_StartDate_Request, get_StartDate_Response),
    1: DceRpcOp(put_StartDate_Request, put_StartDate_Response),
    2: DceRpcOp(get_EndDate_Request, get_EndDate_Response),
    3: DceRpcOp(put_EndDate_Request, put_EndDate_Response),
    4: DceRpcOp(get_StartTime_Request, get_StartTime_Response),
    5: DceRpcOp(put_StartTime_Request, put_StartTime_Response),
    6: DceRpcOp(get_Days_Request, get_Days_Response),
    7: DceRpcOp(put_Days_Request, put_Days_Response),
}
register_com_interface(
    name="ISchedule",
    uuid=uuid.UUID("0383753a-098b-11d8-9414-505054503030"),
    opnums=ISCHEDULE_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


class get__NewEnum_Request(NDRPacket):
    fields_desc = []


class get__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: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(get__NewEnum_Request, get__NewEnum_Response),
    3: DceRpcOp(Add_Request, Add_Response),
    4: DceRpcOp(Remove_Request, Remove_Response),
    5: DceRpcOp(Clear_Request, Clear_Response),
    6: DceRpcOp(AddRange_Request, AddRange_Response),
    7: DceRpcOp(CreateSchedule_Request, CreateSchedule_Response),
}
register_com_interface(
    name="IScheduleCollection",
    uuid=uuid.UUID("0383753d-098b-11d8-9414-505054503030"),
    opnums=ISCHEDULECOLLECTION_OPNUMS,
)


class get_Description_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Enabled_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Key_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Value_Request(NDRPacket):
    fields_desc = []


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


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


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


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


class get_ValueMapType_Request(NDRPacket):
    fields_desc = []


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


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


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


IVALUEMAPITEM_OPNUMS = {
    0: DceRpcOp(get_Description_Request, get_Description_Response),
    1: DceRpcOp(put_Description_Request, put_Description_Response),
    2: DceRpcOp(get_Enabled_Request, get_Enabled_Response),
    3: DceRpcOp(put_Enabled_Request, put_Enabled_Response),
    4: DceRpcOp(get_Key_Request, get_Key_Response),
    5: DceRpcOp(put_Key_Request, put_Key_Response),
    6: DceRpcOp(get_Value_Request, get_Value_Response),
    7: DceRpcOp(put_Value_Request, put_Value_Response),
    8: DceRpcOp(get_ValueMapType_Request, get_ValueMapType_Response),
    9: DceRpcOp(put_ValueMapType_Request, put_ValueMapType_Response),
}
register_com_interface(
    name="IValueMapItem",
    uuid=uuid.UUID("03837533-098b-11d8-9414-505054503030"),
    opnums=IVALUEMAPITEM_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


class get__NewEnum_Request(NDRPacket):
    fields_desc = []


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


class get_Description_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Value_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ValueMapType_Request(NDRPacket):
    fields_desc = []


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


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


class put_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: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(get__NewEnum_Request, get__NewEnum_Response),
    3: DceRpcOp(get_Description_Request, get_Description_Response),
    4: DceRpcOp(put_Description_Request, put_Description_Response),
    5: DceRpcOp(get_Value_Request, get_Value_Response),
    6: DceRpcOp(put_Value_Request, put_Value_Response),
    7: DceRpcOp(get_ValueMapType_Request, get_ValueMapType_Response),
    8: DceRpcOp(put_ValueMapType_Request, put_ValueMapType_Response),
    9: DceRpcOp(Add_Request, Add_Response),
    10: DceRpcOp(Remove_Request, Remove_Response),
    11: DceRpcOp(Clear_Request, Clear_Response),
    12: DceRpcOp(AddRange_Request, AddRange_Response),
    13: DceRpcOp(CreateValueMapItem_Request, CreateValueMapItem_Response),
}
register_com_interface(
    name="IValueMap",
    uuid=uuid.UUID("03837534-098b-11d8-9414-505054503030"),
    opnums=IVALUEMAP_OPNUMS,
)
