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

# [ms-fsrm] v36.0 (Tue, 23 Apr 2024)

"""
RPC definitions for the following interfaces:
- IUnknown (v0.0): 00000000-0000-0000-C000-000000000046
- IDispatch (v0.0): 00020400-0000-0000-C000-000000000046
- IFsrmObject (v0.0): 22bcef93-4a3f-4183-89f9-2f8b8a628aee
- IFsrmCollection (v0.0): f76fbf3b-8ddd-4b42-b05a-cb1c3ff1fee8
- IFsrmMutableCollection (v0.0): 1bb617b8-3886-49dc-af82-a6c90fa35dda
- IFsrmCommittableCollection (v0.0): 96deb3b5-8b91-4a2a-9d93-80a35d8aa847
- IFsrmAction (v0.0): 6cd6408a-ae60-463b-9ef1-e117534d69dc
- IFsrmActionEmail (v0.0): d646567d-26ae-4caa-9f84-4e0aad207fca
- IFsrmActionReport (v0.0): 2dbe63c4-b340-48a0-a5b0-158e07fc567e
- IFsrmActionEventLog (v0.0): 4c8f96c3-5d94-4f37-a4f4-f56ab463546f
- IFsrmActionCommand (v0.0): 12937789-e247-4917-9c20-f3ee9c7ee783
- IFsrmSetting (v0.0): f411d4fd-14be-4260-8c40-03b7c95e608a
- IFsrmPathMapper (v0.0): 6f4dbfff-6920-4821-a6c3-b7e94c1fd60c
- IFsrmActionEmail2 (v0.0): 8276702f-2532-4839-89bf-4872609a2ea4
- IFsrmDerivedObjectsResult (v0.0): 39322a2d-38ee-4d0d-8095-421a80849a82
- IFsrmPropertyDefinition (v0.0): ede0150f-e9a3-419c-877c-01fe5d24c5d3
- IFsrmPropertyDefinition2 (v0.0): 47782152-d16c-4229-b4e1-0ddfe308b9f6
- IFsrmPropertyDefinitionValue (v0.0): E946D148-BD67-4178-8E22-1C44925ED710
- IFsrmProperty (v0.0): 4a73fee4-4102-4fcc-9ffb-38614f9ee768
- IFsrmRule (v0.0): cb0df960-16f5-4495-9079-3f9360d831df
- IFsrmClassificationRule (v0.0): afc052c2-5315-45ab-841b-c6db0e120148
- IFsrmPipelineModuleDefinition (v0.0): 515c1277-2c81-440e-8fcf-367921ed4f59
- IFsrmClassifierModuleDefinition (v0.0): bb36ea26-6318-4b8c-8592-f72dd602e7a5
- IFsrmClassificationManager (v0.0): d2dc89da-ee91-48a0-85d8-cc72a56f7d04
- IFsrmStorageModuleDefinition (v0.0): 15a81350-497d-4aba-80e9-d4dbcc5521fe
- IFsrmQuotaBase (v0.0): 1568a795-3924-4118-b74b-68d8f0fa5daf
- IFsrmQuotaObject (v0.0): 42dc3511-61d5-48ae-b6dc-59fc00c0a8d6
- IFsrmQuota (v0.0): 377f739d-9647-4b8e-97d2-5ffce6d759cd
- IFsrmAutoApplyQuota (v0.0): f82e5729-6aba-4740-bfc7-c7f58f75fb7b
- IFsrmQuotaManager (v0.0): 8bb68c7d-19d8-4ffb-809e-be4fc1734014
- IFsrmQuotaTemplate (v0.0): a2efab31-295e-46bb-b976-e86d58b52e8b
- IFsrmQuotaTemplateImported (v0.0): 9a2bf113-a329-44cc-809a-5c00fce8da40
- IFsrmQuotaTemplateManager (v0.0): 4173ac41-172d-4d52-963c-fdc7e415f717
- IFsrmQuotaManagerEx (v0.0): 4846cb01-d430-494f-abb4-b1054999fb09
- IFsrmReportManager (v1.0): 27b899fe-6ffa-4481-a184-d3daade8a02b
- IFsrmReportJob (v1.0): 38e87280-715c-4c7d-a280-ea1651a19fef
- IFsrmReport (v1.0): d8cc81d9-46b8-4fa4-bfa5-4aa9dec9b638
- IFsrmFileManagementJobManager (v1.0): ee321ecb-d95e-48e9-907c-c7685a013235
- IFsrmFileManagementJob (v1.0): 0770687e-9f36-4d6f-8778-599d188461c9
- IFsrmPropertyCondition (v1.0): 326af66f-2ac0-4f68-bf8c-4759f054fa29
- IFsrmReportScheduler (v1.0): 6879caf9-6617-4484-8719-71c3d8645f94
- IFsrmFileGroup (v0.0): 8dd04909-0e34-4d55-afaa-89e1f1a1bbb9
- IFsrmFileGroupImported (v0.0): ad55f10b-5f11-4be7-94ef-d9ee2e470ded
- IFsrmFileGroupManager (v0.0): 426677d5-018c-485c-8a51-20b86d00bdc4
- IFsrmFileScreenBase (v0.0): f3637e80-5b22-4a2b-a637-bbb642b41cfc
- IFsrmFileScreen (v0.0): 5f6325d3-ce88-4733-84c1-2d6aefc5ea07
- IFsrmFileScreenException (v0.0): bee7ce02-df77-4515-9389-78f01c5afc1a
- IFsrmFileScreenManager (v0.0): ff4fa04e-5a94-4bda-a3a0-d5b4d3c52eba
- IFsrmFileScreenTemplate (v0.0): 205bebf8-dd93-452a-95a6-32b566b35828
- IFsrmFileScreenTemplateImported (v0.0): e1010359-3e5d-4ecd-9fe4-ef48622fdf30
- IFsrmFileScreenTemplateManager (v0.0): cfe36cba-1949-4e74-a14f-f1d580ceaf13
This file is auto-generated by midl-to-scapy, do not modify.
"""

from enum import IntEnum
import uuid

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

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


class GetTypeInfoCount_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


class get_IFsrmObject_Id_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmObject_Description_Request(NDRPacket):
    fields_desc = []


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


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


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


class Delete_Request(NDRPacket):
    fields_desc = []


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


class Commit_Request(NDRPacket):
    fields_desc = []


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


IFSRMOBJECT_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
}
register_com_interface(
    name="IFsrmObject",
    uuid=uuid.UUID("22bcef93-4a3f-4183-89f9-2f8b8a628aee"),
    opnums=IFSRMOBJECT_OPNUMS,
)


class get_IFsrmCollection__NewEnum_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmCollection_Item_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("index", 0)]


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


class get_IFsrmCollection_Count_Request(NDRPacket):
    fields_desc = []


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


class FsrmCollectionState(IntEnum):
    FsrmCollectionState_Fetching = 1
    FsrmCollectionState_Committing = 2
    FsrmCollectionState_Complete = 3
    FsrmCollectionState_Cancelled = 4


class get_IFsrmCollection_State_Request(NDRPacket):
    fields_desc = []


class get_IFsrmCollection_State_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("state", 0, FsrmCollectionState),
        NDRIntField("status", 0),
    ]


class Cancel_Request(NDRPacket):
    fields_desc = []


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


class WaitForCompletion_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("waitSeconds", 0)]


class WaitForCompletion_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("completed", 0), NDRIntField("status", 0)]


class GetById_Request(NDRPacket):
    fields_desc = [NDRPacketField("id", GUID(), GUID)]


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


IFSRMCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmCollection__NewEnum_Request, get_IFsrmCollection__NewEnum_Response
    ),
    8: DceRpcOp(get_IFsrmCollection_Item_Request, get_IFsrmCollection_Item_Response),
    9: DceRpcOp(get_IFsrmCollection_Count_Request, get_IFsrmCollection_Count_Response),
    10: DceRpcOp(get_IFsrmCollection_State_Request, get_IFsrmCollection_State_Response),
    11: DceRpcOp(Cancel_Request, Cancel_Response),
    12: DceRpcOp(WaitForCompletion_Request, WaitForCompletion_Response),
    13: DceRpcOp(GetById_Request, GetById_Response),
}
register_com_interface(
    name="IFsrmCollection",
    uuid=uuid.UUID("f76fbf3b-8ddd-4b42-b05a-cb1c3ff1fee8"),
    opnums=IFSRMCOLLECTION_OPNUMS,
)


class Add_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("item", wireVARIANTStr(), wireVARIANTStr))
    ]


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


class Remove_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("index", 0)]


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


class RemoveById_Request(NDRPacket):
    fields_desc = [NDRPacketField("id", GUID(), GUID)]


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


class Clone_Request(NDRPacket):
    fields_desc = []


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


IFSRMMUTABLECOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmCollection__NewEnum_Request, get_IFsrmCollection__NewEnum_Response
    ),
    8: DceRpcOp(get_IFsrmCollection_Item_Request, get_IFsrmCollection_Item_Response),
    9: DceRpcOp(get_IFsrmCollection_Count_Request, get_IFsrmCollection_Count_Response),
    10: DceRpcOp(get_IFsrmCollection_State_Request, get_IFsrmCollection_State_Response),
    11: DceRpcOp(Cancel_Request, Cancel_Response),
    12: DceRpcOp(WaitForCompletion_Request, WaitForCompletion_Response),
    13: DceRpcOp(GetById_Request, GetById_Response),
    14: DceRpcOp(Add_Request, Add_Response),
    15: DceRpcOp(Remove_Request, Remove_Response),
    16: DceRpcOp(RemoveById_Request, RemoveById_Response),
    17: DceRpcOp(Clone_Request, Clone_Response),
}
register_com_interface(
    name="IFsrmMutableCollection",
    uuid=uuid.UUID("1bb617b8-3886-49dc-af82-a6c90fa35dda"),
    opnums=IFSRMMUTABLECOLLECTION_OPNUMS,
)


class FsrmCommitOptions(IntEnum):
    FsrmCommitOptions_None = 0
    FsrmCommitOptions_Asynchronous = 1


class Commit_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("options", 0, FsrmCommitOptions)]


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


IFSRMCOMMITTABLECOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmCollection__NewEnum_Request, get_IFsrmCollection__NewEnum_Response
    ),
    8: DceRpcOp(get_IFsrmCollection_Item_Request, get_IFsrmCollection_Item_Response),
    9: DceRpcOp(get_IFsrmCollection_Count_Request, get_IFsrmCollection_Count_Response),
    10: DceRpcOp(get_IFsrmCollection_State_Request, get_IFsrmCollection_State_Response),
    11: DceRpcOp(Cancel_Request, Cancel_Response),
    12: DceRpcOp(WaitForCompletion_Request, WaitForCompletion_Response),
    13: DceRpcOp(GetById_Request, GetById_Response),
    14: DceRpcOp(Add_Request, Add_Response),
    15: DceRpcOp(Remove_Request, Remove_Response),
    16: DceRpcOp(RemoveById_Request, RemoveById_Response),
    17: DceRpcOp(Clone_Request, Clone_Response),
    18: DceRpcOp(Commit_Request, Commit_Response),
}
register_com_interface(
    name="IFsrmCommittableCollection",
    uuid=uuid.UUID("96deb3b5-8b91-4a2a-9d93-80a35d8aa847"),
    opnums=IFSRMCOMMITTABLECOLLECTION_OPNUMS,
)


class get_IFsrmAction_Id_Request(NDRPacket):
    fields_desc = []


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


class FsrmActionType(IntEnum):
    FsrmActionType_Unknown = 0
    FsrmActionType_EventLog = 1
    FsrmActionType_Email = 2
    FsrmActionType_Command = 3
    FsrmActionType_Report = 4


class get_IFsrmAction_ActionType_Request(NDRPacket):
    fields_desc = []


class get_IFsrmAction_ActionType_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("actionType", 0, FsrmActionType),
        NDRIntField("status", 0),
    ]


class get_IFsrmAction_RunLimitInterval_Request(NDRPacket):
    fields_desc = []


class get_IFsrmAction_RunLimitInterval_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("minutes", 0), NDRIntField("status", 0)]


class put_IFsrmAction_RunLimitInterval_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("minutes", 0)]


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


class Delete_Request(NDRPacket):
    fields_desc = []


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


IFSRMACTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmAction_Id_Request, get_IFsrmAction_Id_Response),
    8: DceRpcOp(
        get_IFsrmAction_ActionType_Request, get_IFsrmAction_ActionType_Response
    ),
    9: DceRpcOp(
        get_IFsrmAction_RunLimitInterval_Request,
        get_IFsrmAction_RunLimitInterval_Response,
    ),
    10: DceRpcOp(
        put_IFsrmAction_RunLimitInterval_Request,
        put_IFsrmAction_RunLimitInterval_Response,
    ),
    11: DceRpcOp(Delete_Request, Delete_Response),
}
register_com_interface(
    name="IFsrmAction",
    uuid=uuid.UUID("6cd6408a-ae60-463b-9ef1-e117534d69dc"),
    opnums=IFSRMACTION_OPNUMS,
)


class get_IFsrmActionEmail_MailFrom_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionEmail_MailFrom_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailFrom", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmActionEmail_MailReplyTo_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionEmail_MailReplyTo_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailReplyTo", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmActionEmail_MailTo_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionEmail_MailTo_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailTo", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmActionEmail_MailCc_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionEmail_MailCc_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailCc", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmActionEmail_MailBcc_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionEmail_MailBcc_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailBcc", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmActionEmail_MailSubject_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionEmail_MailSubject_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailSubject", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmActionEmail_MessageText_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionEmail_MessageText_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("messageText", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IFSRMACTIONEMAIL_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmAction_Id_Request, get_IFsrmAction_Id_Response),
    8: DceRpcOp(
        get_IFsrmAction_ActionType_Request, get_IFsrmAction_ActionType_Response
    ),
    9: DceRpcOp(
        get_IFsrmAction_RunLimitInterval_Request,
        get_IFsrmAction_RunLimitInterval_Response,
    ),
    10: DceRpcOp(
        put_IFsrmAction_RunLimitInterval_Request,
        put_IFsrmAction_RunLimitInterval_Response,
    ),
    11: DceRpcOp(Delete_Request, Delete_Response),
    12: DceRpcOp(
        get_IFsrmActionEmail_MailFrom_Request, get_IFsrmActionEmail_MailFrom_Response
    ),
    13: DceRpcOp(
        put_IFsrmActionEmail_MailFrom_Request, put_IFsrmActionEmail_MailFrom_Response
    ),
    14: DceRpcOp(
        get_IFsrmActionEmail_MailReplyTo_Request,
        get_IFsrmActionEmail_MailReplyTo_Response,
    ),
    15: DceRpcOp(
        put_IFsrmActionEmail_MailReplyTo_Request,
        put_IFsrmActionEmail_MailReplyTo_Response,
    ),
    16: DceRpcOp(
        get_IFsrmActionEmail_MailTo_Request, get_IFsrmActionEmail_MailTo_Response
    ),
    17: DceRpcOp(
        put_IFsrmActionEmail_MailTo_Request, put_IFsrmActionEmail_MailTo_Response
    ),
    18: DceRpcOp(
        get_IFsrmActionEmail_MailCc_Request, get_IFsrmActionEmail_MailCc_Response
    ),
    19: DceRpcOp(
        put_IFsrmActionEmail_MailCc_Request, put_IFsrmActionEmail_MailCc_Response
    ),
    20: DceRpcOp(
        get_IFsrmActionEmail_MailBcc_Request, get_IFsrmActionEmail_MailBcc_Response
    ),
    21: DceRpcOp(
        put_IFsrmActionEmail_MailBcc_Request, put_IFsrmActionEmail_MailBcc_Response
    ),
    22: DceRpcOp(
        get_IFsrmActionEmail_MailSubject_Request,
        get_IFsrmActionEmail_MailSubject_Response,
    ),
    23: DceRpcOp(
        put_IFsrmActionEmail_MailSubject_Request,
        put_IFsrmActionEmail_MailSubject_Response,
    ),
    24: DceRpcOp(
        get_IFsrmActionEmail_MessageText_Request,
        get_IFsrmActionEmail_MessageText_Response,
    ),
    25: DceRpcOp(
        put_IFsrmActionEmail_MessageText_Request,
        put_IFsrmActionEmail_MessageText_Response,
    ),
}
register_com_interface(
    name="IFsrmActionEmail",
    uuid=uuid.UUID("d646567d-26ae-4caa-9f84-4e0aad207fca"),
    opnums=IFSRMACTIONEMAIL_OPNUMS,
)


class get_IFsrmActionReport_ReportTypes_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionReport_ReportTypes_Request(NDRPacket):
    fields_desc = [NDRPacketField("reportTypes", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmActionReport_MailTo_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionReport_MailTo_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailTo", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IFSRMACTIONREPORT_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmAction_Id_Request, get_IFsrmAction_Id_Response),
    8: DceRpcOp(
        get_IFsrmAction_ActionType_Request, get_IFsrmAction_ActionType_Response
    ),
    9: DceRpcOp(
        get_IFsrmAction_RunLimitInterval_Request,
        get_IFsrmAction_RunLimitInterval_Response,
    ),
    10: DceRpcOp(
        put_IFsrmAction_RunLimitInterval_Request,
        put_IFsrmAction_RunLimitInterval_Response,
    ),
    11: DceRpcOp(Delete_Request, Delete_Response),
    12: DceRpcOp(
        get_IFsrmActionReport_ReportTypes_Request,
        get_IFsrmActionReport_ReportTypes_Response,
    ),
    13: DceRpcOp(
        put_IFsrmActionReport_ReportTypes_Request,
        put_IFsrmActionReport_ReportTypes_Response,
    ),
    14: DceRpcOp(
        get_IFsrmActionReport_MailTo_Request, get_IFsrmActionReport_MailTo_Response
    ),
    15: DceRpcOp(
        put_IFsrmActionReport_MailTo_Request, put_IFsrmActionReport_MailTo_Response
    ),
}
register_com_interface(
    name="IFsrmActionReport",
    uuid=uuid.UUID("2dbe63c4-b340-48a0-a5b0-158e07fc567e"),
    opnums=IFSRMACTIONREPORT_OPNUMS,
)


class FsrmEventType(IntEnum):
    FsrmEventType_Unknown = 0
    FsrmEventType_Information = 1
    FsrmEventType_Warning = 2
    FsrmEventType_Error = 3


class get_IFsrmActionEventLog_EventType_Request(NDRPacket):
    fields_desc = []


class get_IFsrmActionEventLog_EventType_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("eventType", 0, FsrmEventType),
        NDRIntField("status", 0),
    ]


class put_IFsrmActionEventLog_EventType_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("eventType", 0, FsrmEventType)]


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


class get_IFsrmActionEventLog_MessageText_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionEventLog_MessageText_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("messageText", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IFSRMACTIONEVENTLOG_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmAction_Id_Request, get_IFsrmAction_Id_Response),
    8: DceRpcOp(
        get_IFsrmAction_ActionType_Request, get_IFsrmAction_ActionType_Response
    ),
    9: DceRpcOp(
        get_IFsrmAction_RunLimitInterval_Request,
        get_IFsrmAction_RunLimitInterval_Response,
    ),
    10: DceRpcOp(
        put_IFsrmAction_RunLimitInterval_Request,
        put_IFsrmAction_RunLimitInterval_Response,
    ),
    11: DceRpcOp(Delete_Request, Delete_Response),
    12: DceRpcOp(
        get_IFsrmActionEventLog_EventType_Request,
        get_IFsrmActionEventLog_EventType_Response,
    ),
    13: DceRpcOp(
        put_IFsrmActionEventLog_EventType_Request,
        put_IFsrmActionEventLog_EventType_Response,
    ),
    14: DceRpcOp(
        get_IFsrmActionEventLog_MessageText_Request,
        get_IFsrmActionEventLog_MessageText_Response,
    ),
    15: DceRpcOp(
        put_IFsrmActionEventLog_MessageText_Request,
        put_IFsrmActionEventLog_MessageText_Response,
    ),
}
register_com_interface(
    name="IFsrmActionEventLog",
    uuid=uuid.UUID("4c8f96c3-5d94-4f37-a4f4-f56ab463546f"),
    opnums=IFSRMACTIONEVENTLOG_OPNUMS,
)


class get_IFsrmActionCommand_ExecutablePath_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionCommand_ExecutablePath_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("executablePath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmActionCommand_Arguments_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionCommand_Arguments_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("arguments", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class FsrmAccountType(IntEnum):
    FsrmAccountType_Unknown = 0
    FsrmAccountType_NetworkService = 1
    FsrmAccountType_LocalService = 2
    FsrmAccountType_LocalSystem = 3
    FsrmAccountType_InProc = 4
    FsrmAccountType_External = 5
    FsrmAccountType_Automatic = 500


class get_IFsrmActionCommand_Account_Request(NDRPacket):
    fields_desc = []


class get_IFsrmActionCommand_Account_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("account", 0, FsrmAccountType),
        NDRIntField("status", 0),
    ]


class put_IFsrmActionCommand_Account_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("account", 0, FsrmAccountType)]


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


class get_IFsrmActionCommand_WorkingDirectory_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmActionCommand_WorkingDirectory_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("workingDirectory", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmActionCommand_MonitorCommand_Request(NDRPacket):
    fields_desc = []


class get_IFsrmActionCommand_MonitorCommand_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("monitorCommand", 0), NDRIntField("status", 0)]


class put_IFsrmActionCommand_MonitorCommand_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("monitorCommand", 0)]


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


class get_IFsrmActionCommand_KillTimeOut_Request(NDRPacket):
    fields_desc = []


class get_IFsrmActionCommand_KillTimeOut_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("minutes", 0), NDRIntField("status", 0)]


class put_IFsrmActionCommand_KillTimeOut_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("minutes", 0)]


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


class get_IFsrmActionCommand_LogResult_Request(NDRPacket):
    fields_desc = []


class get_IFsrmActionCommand_LogResult_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("logResults", 0), NDRIntField("status", 0)]


class put_IFsrmActionCommand_LogResult_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("logResults", 0)]


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


IFSRMACTIONCOMMAND_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmAction_Id_Request, get_IFsrmAction_Id_Response),
    8: DceRpcOp(
        get_IFsrmAction_ActionType_Request, get_IFsrmAction_ActionType_Response
    ),
    9: DceRpcOp(
        get_IFsrmAction_RunLimitInterval_Request,
        get_IFsrmAction_RunLimitInterval_Response,
    ),
    10: DceRpcOp(
        put_IFsrmAction_RunLimitInterval_Request,
        put_IFsrmAction_RunLimitInterval_Response,
    ),
    11: DceRpcOp(Delete_Request, Delete_Response),
    12: DceRpcOp(
        get_IFsrmActionCommand_ExecutablePath_Request,
        get_IFsrmActionCommand_ExecutablePath_Response,
    ),
    13: DceRpcOp(
        put_IFsrmActionCommand_ExecutablePath_Request,
        put_IFsrmActionCommand_ExecutablePath_Response,
    ),
    14: DceRpcOp(
        get_IFsrmActionCommand_Arguments_Request,
        get_IFsrmActionCommand_Arguments_Response,
    ),
    15: DceRpcOp(
        put_IFsrmActionCommand_Arguments_Request,
        put_IFsrmActionCommand_Arguments_Response,
    ),
    16: DceRpcOp(
        get_IFsrmActionCommand_Account_Request, get_IFsrmActionCommand_Account_Response
    ),
    17: DceRpcOp(
        put_IFsrmActionCommand_Account_Request, put_IFsrmActionCommand_Account_Response
    ),
    18: DceRpcOp(
        get_IFsrmActionCommand_WorkingDirectory_Request,
        get_IFsrmActionCommand_WorkingDirectory_Response,
    ),
    19: DceRpcOp(
        put_IFsrmActionCommand_WorkingDirectory_Request,
        put_IFsrmActionCommand_WorkingDirectory_Response,
    ),
    20: DceRpcOp(
        get_IFsrmActionCommand_MonitorCommand_Request,
        get_IFsrmActionCommand_MonitorCommand_Response,
    ),
    21: DceRpcOp(
        put_IFsrmActionCommand_MonitorCommand_Request,
        put_IFsrmActionCommand_MonitorCommand_Response,
    ),
    22: DceRpcOp(
        get_IFsrmActionCommand_KillTimeOut_Request,
        get_IFsrmActionCommand_KillTimeOut_Response,
    ),
    23: DceRpcOp(
        put_IFsrmActionCommand_KillTimeOut_Request,
        put_IFsrmActionCommand_KillTimeOut_Response,
    ),
    24: DceRpcOp(
        get_IFsrmActionCommand_LogResult_Request,
        get_IFsrmActionCommand_LogResult_Response,
    ),
    25: DceRpcOp(
        put_IFsrmActionCommand_LogResult_Request,
        put_IFsrmActionCommand_LogResult_Response,
    ),
}
register_com_interface(
    name="IFsrmActionCommand",
    uuid=uuid.UUID("12937789-e247-4917-9c20-f3ee9c7ee783"),
    opnums=IFSRMACTIONCOMMAND_OPNUMS,
)


class get_IFsrmSetting_SmtpServer_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmSetting_SmtpServer_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("smtpServer", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmSetting_MailFrom_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmSetting_MailFrom_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailFrom", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmSetting_AdminEmail_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmSetting_AdminEmail_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("adminEmail", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmSetting_DisableCommandLine_Request(NDRPacket):
    fields_desc = []


class get_IFsrmSetting_DisableCommandLine_Response(NDRPacket):
    fields_desc = [
        NDRSignedShortField("disableCommandLine", 0),
        NDRIntField("status", 0),
    ]


class put_IFsrmSetting_DisableCommandLine_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("disableCommandLine", 0)]


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


class get_IFsrmSetting_EnableScreeningAudit_Request(NDRPacket):
    fields_desc = []


class get_IFsrmSetting_EnableScreeningAudit_Response(NDRPacket):
    fields_desc = [
        NDRSignedShortField("enableScreeningAudit", 0),
        NDRIntField("status", 0),
    ]


class put_IFsrmSetting_EnableScreeningAudit_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("enableScreeningAudit", 0)]


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


class EmailTest_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailTo", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class SetActionRunLimitInterval_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("actionType", 0, FsrmActionType),
        NDRSignedIntField("delayTimeMinutes", 0),
    ]


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


class GetActionRunLimitInterval_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("actionType", 0, FsrmActionType)]


class GetActionRunLimitInterval_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("delayTimeMinutes", 0), NDRIntField("status", 0)]


IFSRMSETTING_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmSetting_SmtpServer_Request, get_IFsrmSetting_SmtpServer_Response
    ),
    8: DceRpcOp(
        put_IFsrmSetting_SmtpServer_Request, put_IFsrmSetting_SmtpServer_Response
    ),
    9: DceRpcOp(get_IFsrmSetting_MailFrom_Request, get_IFsrmSetting_MailFrom_Response),
    10: DceRpcOp(put_IFsrmSetting_MailFrom_Request, put_IFsrmSetting_MailFrom_Response),
    11: DceRpcOp(
        get_IFsrmSetting_AdminEmail_Request, get_IFsrmSetting_AdminEmail_Response
    ),
    12: DceRpcOp(
        put_IFsrmSetting_AdminEmail_Request, put_IFsrmSetting_AdminEmail_Response
    ),
    13: DceRpcOp(
        get_IFsrmSetting_DisableCommandLine_Request,
        get_IFsrmSetting_DisableCommandLine_Response,
    ),
    14: DceRpcOp(
        put_IFsrmSetting_DisableCommandLine_Request,
        put_IFsrmSetting_DisableCommandLine_Response,
    ),
    15: DceRpcOp(
        get_IFsrmSetting_EnableScreeningAudit_Request,
        get_IFsrmSetting_EnableScreeningAudit_Response,
    ),
    16: DceRpcOp(
        put_IFsrmSetting_EnableScreeningAudit_Request,
        put_IFsrmSetting_EnableScreeningAudit_Response,
    ),
    17: DceRpcOp(EmailTest_Request, EmailTest_Response),
    18: DceRpcOp(SetActionRunLimitInterval_Request, SetActionRunLimitInterval_Response),
    19: DceRpcOp(GetActionRunLimitInterval_Request, GetActionRunLimitInterval_Response),
}
register_com_interface(
    name="IFsrmSetting",
    uuid=uuid.UUID("f411d4fd-14be-4260-8c40-03b7c95e608a"),
    opnums=IFSRMSETTING_OPNUMS,
)


class GetSharePathsForLocalPath_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("localPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IFSRMPATHMAPPER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(GetSharePathsForLocalPath_Request, GetSharePathsForLocalPath_Response),
}
register_com_interface(
    name="IFsrmPathMapper",
    uuid=uuid.UUID("6f4dbfff-6920-4821-a6c3-b7e94c1fd60c"),
    opnums=IFSRMPATHMAPPER_OPNUMS,
)


class get_IFsrmActionEmail2_AttachmentFileListSize_Request(NDRPacket):
    fields_desc = []


class get_IFsrmActionEmail2_AttachmentFileListSize_Response(NDRPacket):
    fields_desc = [
        NDRSignedIntField("attachmentFileListSize", 0),
        NDRIntField("status", 0),
    ]


class put_IFsrmActionEmail2_AttachmentFileListSize_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("attachmentFileListSize", 0)]


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


IFSRMACTIONEMAIL2_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmAction_Id_Request, get_IFsrmAction_Id_Response),
    8: DceRpcOp(
        get_IFsrmAction_ActionType_Request, get_IFsrmAction_ActionType_Response
    ),
    9: DceRpcOp(
        get_IFsrmAction_RunLimitInterval_Request,
        get_IFsrmAction_RunLimitInterval_Response,
    ),
    10: DceRpcOp(
        put_IFsrmAction_RunLimitInterval_Request,
        put_IFsrmAction_RunLimitInterval_Response,
    ),
    11: DceRpcOp(Delete_Request, Delete_Response),
    12: DceRpcOp(
        get_IFsrmActionEmail_MailFrom_Request, get_IFsrmActionEmail_MailFrom_Response
    ),
    13: DceRpcOp(
        put_IFsrmActionEmail_MailFrom_Request, put_IFsrmActionEmail_MailFrom_Response
    ),
    14: DceRpcOp(
        get_IFsrmActionEmail_MailReplyTo_Request,
        get_IFsrmActionEmail_MailReplyTo_Response,
    ),
    15: DceRpcOp(
        put_IFsrmActionEmail_MailReplyTo_Request,
        put_IFsrmActionEmail_MailReplyTo_Response,
    ),
    16: DceRpcOp(
        get_IFsrmActionEmail_MailTo_Request, get_IFsrmActionEmail_MailTo_Response
    ),
    17: DceRpcOp(
        put_IFsrmActionEmail_MailTo_Request, put_IFsrmActionEmail_MailTo_Response
    ),
    18: DceRpcOp(
        get_IFsrmActionEmail_MailCc_Request, get_IFsrmActionEmail_MailCc_Response
    ),
    19: DceRpcOp(
        put_IFsrmActionEmail_MailCc_Request, put_IFsrmActionEmail_MailCc_Response
    ),
    20: DceRpcOp(
        get_IFsrmActionEmail_MailBcc_Request, get_IFsrmActionEmail_MailBcc_Response
    ),
    21: DceRpcOp(
        put_IFsrmActionEmail_MailBcc_Request, put_IFsrmActionEmail_MailBcc_Response
    ),
    22: DceRpcOp(
        get_IFsrmActionEmail_MailSubject_Request,
        get_IFsrmActionEmail_MailSubject_Response,
    ),
    23: DceRpcOp(
        put_IFsrmActionEmail_MailSubject_Request,
        put_IFsrmActionEmail_MailSubject_Response,
    ),
    24: DceRpcOp(
        get_IFsrmActionEmail_MessageText_Request,
        get_IFsrmActionEmail_MessageText_Response,
    ),
    25: DceRpcOp(
        put_IFsrmActionEmail_MessageText_Request,
        put_IFsrmActionEmail_MessageText_Response,
    ),
    26: DceRpcOp(
        get_IFsrmActionEmail2_AttachmentFileListSize_Request,
        get_IFsrmActionEmail2_AttachmentFileListSize_Response,
    ),
    27: DceRpcOp(
        put_IFsrmActionEmail2_AttachmentFileListSize_Request,
        put_IFsrmActionEmail2_AttachmentFileListSize_Response,
    ),
}
register_com_interface(
    name="IFsrmActionEmail2",
    uuid=uuid.UUID("8276702f-2532-4839-89bf-4872609a2ea4"),
    opnums=IFSRMACTIONEMAIL2_OPNUMS,
)


class get_IFsrmDerivedObjectsResult_DerivedObjects_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmDerivedObjectsResult_Results_Request(NDRPacket):
    fields_desc = []


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


IFSRMDERIVEDOBJECTSRESULT_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmDerivedObjectsResult_DerivedObjects_Request,
        get_IFsrmDerivedObjectsResult_DerivedObjects_Response,
    ),
    8: DceRpcOp(
        get_IFsrmDerivedObjectsResult_Results_Request,
        get_IFsrmDerivedObjectsResult_Results_Response,
    ),
}
register_com_interface(
    name="IFsrmDerivedObjectsResult",
    uuid=uuid.UUID("39322a2d-38ee-4d0d-8095-421a80849a82"),
    opnums=IFSRMDERIVEDOBJECTSRESULT_OPNUMS,
)


class get_IFsrmPropertyDefinition_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class FsrmPropertyDefinitionType(IntEnum):
    FsrmPropertyDefinitionType_Unknown = 0
    FsrmPropertyDefinitionType_OrderedList = 1
    FsrmPropertyDefinitionType_MultiChoiceList = 2
    FsrmPropertyDefinitionType_SingleChoiceList = 3
    FsrmPropertyDefinitionType_String = 4
    FsrmPropertyDefinitionType_MultiString = 5
    FsrmPropertyDefinitionType_Int = 6
    FsrmPropertyDefinitionType_Bool = 7
    FsrmPropertyDefinitionType_Date = 8


class get_IFsrmPropertyDefinition_Type_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPropertyDefinition_Type_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("type", 0, FsrmPropertyDefinitionType)]


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


class get_IFsrmPropertyDefinition_PossibleValues_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPropertyDefinition_PossibleValues_Request(NDRPacket):
    fields_desc = [NDRPacketField("possibleValues", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmPropertyDefinition_ValueDescriptions_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPropertyDefinition_ValueDescriptions_Request(NDRPacket):
    fields_desc = [NDRPacketField("valueDescriptions", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmPropertyDefinition_Parameters_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPropertyDefinition_Parameters_Request(NDRPacket):
    fields_desc = [NDRPacketField("parameters", SAFEARRAY(), SAFEARRAY)]


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


IFSRMPROPERTYDEFINITION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmPropertyDefinition_Name_Request,
        get_IFsrmPropertyDefinition_Name_Response,
    ),
    13: DceRpcOp(
        put_IFsrmPropertyDefinition_Name_Request,
        put_IFsrmPropertyDefinition_Name_Response,
    ),
    14: DceRpcOp(
        get_IFsrmPropertyDefinition_Type_Request,
        get_IFsrmPropertyDefinition_Type_Response,
    ),
    15: DceRpcOp(
        put_IFsrmPropertyDefinition_Type_Request,
        put_IFsrmPropertyDefinition_Type_Response,
    ),
    16: DceRpcOp(
        get_IFsrmPropertyDefinition_PossibleValues_Request,
        get_IFsrmPropertyDefinition_PossibleValues_Response,
    ),
    17: DceRpcOp(
        put_IFsrmPropertyDefinition_PossibleValues_Request,
        put_IFsrmPropertyDefinition_PossibleValues_Response,
    ),
    18: DceRpcOp(
        get_IFsrmPropertyDefinition_ValueDescriptions_Request,
        get_IFsrmPropertyDefinition_ValueDescriptions_Response,
    ),
    19: DceRpcOp(
        put_IFsrmPropertyDefinition_ValueDescriptions_Request,
        put_IFsrmPropertyDefinition_ValueDescriptions_Response,
    ),
    20: DceRpcOp(
        get_IFsrmPropertyDefinition_Parameters_Request,
        get_IFsrmPropertyDefinition_Parameters_Response,
    ),
    21: DceRpcOp(
        put_IFsrmPropertyDefinition_Parameters_Request,
        put_IFsrmPropertyDefinition_Parameters_Response,
    ),
}
register_com_interface(
    name="IFsrmPropertyDefinition",
    uuid=uuid.UUID("ede0150f-e9a3-419c-877c-01fe5d24c5d3"),
    opnums=IFSRMPROPERTYDEFINITION_OPNUMS,
)


class get_IFsrmPropertyDefinition2_PropertyDefinitionFlags_Request(NDRPacket):
    fields_desc = []


class get_IFsrmPropertyDefinition2_PropertyDefinitionFlags_Response(NDRPacket):
    fields_desc = [
        NDRSignedIntField("propertyDefinitionFlags", 0),
        NDRIntField("status", 0),
    ]


class get_IFsrmPropertyDefinition2_DisplayName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IFsrmPropertyDefinition2_AppliesTo_Request(NDRPacket):
    fields_desc = []


class get_IFsrmPropertyDefinition2_AppliesTo_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("appliesTo", 0), NDRIntField("status", 0)]


class get_IFsrmPropertyDefinition2_ValueDefinitions_Request(NDRPacket):
    fields_desc = []


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


IFSRMPROPERTYDEFINITION2_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmPropertyDefinition_Name_Request,
        get_IFsrmPropertyDefinition_Name_Response,
    ),
    13: DceRpcOp(
        put_IFsrmPropertyDefinition_Name_Request,
        put_IFsrmPropertyDefinition_Name_Response,
    ),
    14: DceRpcOp(
        get_IFsrmPropertyDefinition_Type_Request,
        get_IFsrmPropertyDefinition_Type_Response,
    ),
    15: DceRpcOp(
        put_IFsrmPropertyDefinition_Type_Request,
        put_IFsrmPropertyDefinition_Type_Response,
    ),
    16: DceRpcOp(
        get_IFsrmPropertyDefinition_PossibleValues_Request,
        get_IFsrmPropertyDefinition_PossibleValues_Response,
    ),
    17: DceRpcOp(
        put_IFsrmPropertyDefinition_PossibleValues_Request,
        put_IFsrmPropertyDefinition_PossibleValues_Response,
    ),
    18: DceRpcOp(
        get_IFsrmPropertyDefinition_ValueDescriptions_Request,
        get_IFsrmPropertyDefinition_ValueDescriptions_Response,
    ),
    19: DceRpcOp(
        put_IFsrmPropertyDefinition_ValueDescriptions_Request,
        put_IFsrmPropertyDefinition_ValueDescriptions_Response,
    ),
    20: DceRpcOp(
        get_IFsrmPropertyDefinition_Parameters_Request,
        get_IFsrmPropertyDefinition_Parameters_Response,
    ),
    21: DceRpcOp(
        put_IFsrmPropertyDefinition_Parameters_Request,
        put_IFsrmPropertyDefinition_Parameters_Response,
    ),
    22: DceRpcOp(
        get_IFsrmPropertyDefinition2_PropertyDefinitionFlags_Request,
        get_IFsrmPropertyDefinition2_PropertyDefinitionFlags_Response,
    ),
    23: DceRpcOp(
        get_IFsrmPropertyDefinition2_DisplayName_Request,
        get_IFsrmPropertyDefinition2_DisplayName_Response,
    ),
    24: DceRpcOp(
        put_IFsrmPropertyDefinition2_DisplayName_Request,
        put_IFsrmPropertyDefinition2_DisplayName_Response,
    ),
    25: DceRpcOp(
        get_IFsrmPropertyDefinition2_AppliesTo_Request,
        get_IFsrmPropertyDefinition2_AppliesTo_Response,
    ),
    26: DceRpcOp(
        get_IFsrmPropertyDefinition2_ValueDefinitions_Request,
        get_IFsrmPropertyDefinition2_ValueDefinitions_Response,
    ),
}
register_com_interface(
    name="IFsrmPropertyDefinition2",
    uuid=uuid.UUID("47782152-d16c-4229-b4e1-0ddfe308b9f6"),
    opnums=IFSRMPROPERTYDEFINITION2_OPNUMS,
)


class get_IFsrmPropertyDefinitionValue_Name_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmPropertyDefinitionValue_DisplayName_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmPropertyDefinitionValue_Description_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmPropertyDefinitionValue_UniqueID_Request(NDRPacket):
    fields_desc = []


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


IFSRMPROPERTYDEFINITIONVALUE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmPropertyDefinitionValue_Name_Request,
        get_IFsrmPropertyDefinitionValue_Name_Response,
    ),
    8: DceRpcOp(
        get_IFsrmPropertyDefinitionValue_DisplayName_Request,
        get_IFsrmPropertyDefinitionValue_DisplayName_Response,
    ),
    9: DceRpcOp(
        get_IFsrmPropertyDefinitionValue_Description_Request,
        get_IFsrmPropertyDefinitionValue_Description_Response,
    ),
    10: DceRpcOp(
        get_IFsrmPropertyDefinitionValue_UniqueID_Request,
        get_IFsrmPropertyDefinitionValue_UniqueID_Response,
    ),
}
register_com_interface(
    name="IFsrmPropertyDefinitionValue",
    uuid=uuid.UUID("E946D148-BD67-4178-8E22-1C44925ED710"),
    opnums=IFSRMPROPERTYDEFINITIONVALUE_OPNUMS,
)


class get_IFsrmProperty_Name_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmProperty_Value_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmProperty_Sources_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmProperty_PropertyFlags_Request(NDRPacket):
    fields_desc = []


class get_IFsrmProperty_PropertyFlags_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("flags", 0), NDRIntField("status", 0)]


IFSRMPROPERTY_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmProperty_Name_Request, get_IFsrmProperty_Name_Response),
    8: DceRpcOp(get_IFsrmProperty_Value_Request, get_IFsrmProperty_Value_Response),
    9: DceRpcOp(get_IFsrmProperty_Sources_Request, get_IFsrmProperty_Sources_Response),
    10: DceRpcOp(
        get_IFsrmProperty_PropertyFlags_Request,
        get_IFsrmProperty_PropertyFlags_Response,
    ),
}
register_com_interface(
    name="IFsrmProperty",
    uuid=uuid.UUID("4a73fee4-4102-4fcc-9ffb-38614f9ee768"),
    opnums=IFSRMPROPERTY_OPNUMS,
)


class get_IFsrmRule_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class FsrmRuleType(IntEnum):
    FsrmRuleType_Unknown = 0
    FsrmRuleType_Classification = 1
    FsrmRuleType_Generic = 2


class get_IFsrmRule_RuleType_Request(NDRPacket):
    fields_desc = []


class get_IFsrmRule_RuleType_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("ruleType", 0, FsrmRuleType),
        NDRIntField("status", 0),
    ]


class get_IFsrmRule_ModuleDefinitionName_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmRule_ModuleDefinitionName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "moduleDefinitionName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        )
    ]


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


class get_IFsrmRule_NamespaceRoots_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmRule_NamespaceRoots_Request(NDRPacket):
    fields_desc = [NDRPacketField("namespaceRoots", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmRule_RuleFlags_Request(NDRPacket):
    fields_desc = []


class get_IFsrmRule_RuleFlags_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("ruleFlags", 0), NDRIntField("status", 0)]


class put_IFsrmRule_RuleFlags_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("ruleFlags", 0)]


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


class get_IFsrmRule_Parameters_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmRule_Parameters_Request(NDRPacket):
    fields_desc = [NDRPacketField("parameters", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmRule_LastModified_Request(NDRPacket):
    fields_desc = []


class get_IFsrmRule_LastModified_Response(NDRPacket):
    fields_desc = [NDRIEEEDoubleField("lastModified", 0), NDRIntField("status", 0)]


IFSRMRULE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(get_IFsrmRule_Name_Request, get_IFsrmRule_Name_Response),
    13: DceRpcOp(put_IFsrmRule_Name_Request, put_IFsrmRule_Name_Response),
    14: DceRpcOp(get_IFsrmRule_RuleType_Request, get_IFsrmRule_RuleType_Response),
    15: DceRpcOp(
        get_IFsrmRule_ModuleDefinitionName_Request,
        get_IFsrmRule_ModuleDefinitionName_Response,
    ),
    16: DceRpcOp(
        put_IFsrmRule_ModuleDefinitionName_Request,
        put_IFsrmRule_ModuleDefinitionName_Response,
    ),
    17: DceRpcOp(
        get_IFsrmRule_NamespaceRoots_Request, get_IFsrmRule_NamespaceRoots_Response
    ),
    18: DceRpcOp(
        put_IFsrmRule_NamespaceRoots_Request, put_IFsrmRule_NamespaceRoots_Response
    ),
    19: DceRpcOp(get_IFsrmRule_RuleFlags_Request, get_IFsrmRule_RuleFlags_Response),
    20: DceRpcOp(put_IFsrmRule_RuleFlags_Request, put_IFsrmRule_RuleFlags_Response),
    21: DceRpcOp(get_IFsrmRule_Parameters_Request, get_IFsrmRule_Parameters_Response),
    22: DceRpcOp(put_IFsrmRule_Parameters_Request, put_IFsrmRule_Parameters_Response),
    23: DceRpcOp(
        get_IFsrmRule_LastModified_Request, get_IFsrmRule_LastModified_Response
    ),
}
register_com_interface(
    name="IFsrmRule",
    uuid=uuid.UUID("cb0df960-16f5-4495-9079-3f9360d831df"),
    opnums=IFSRMRULE_OPNUMS,
)


class FsrmExecutionOption(IntEnum):
    FsrmExecutionOption_Unknown = 0
    FsrmExecutionOption_EvaluateUnset = 1
    FsrmExecutionOption_ReEvaluate_ConsiderExistingValue = 2
    FsrmExecutionOption_ReEvaluate_IgnoreExistingValue = 3


class get_IFsrmClassificationRule_ExecutionOption_Request(NDRPacket):
    fields_desc = []


class get_IFsrmClassificationRule_ExecutionOption_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("executionOption", 0, FsrmExecutionOption),
        NDRIntField("status", 0),
    ]


class put_IFsrmClassificationRule_ExecutionOption_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("executionOption", 0, FsrmExecutionOption)]


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


class get_IFsrmClassificationRule_PropertyAffected_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmClassificationRule_PropertyAffected_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("property", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmClassificationRule_Value_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmClassificationRule_Value_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("value", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IFSRMCLASSIFICATIONRULE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(get_IFsrmRule_Name_Request, get_IFsrmRule_Name_Response),
    13: DceRpcOp(put_IFsrmRule_Name_Request, put_IFsrmRule_Name_Response),
    14: DceRpcOp(get_IFsrmRule_RuleType_Request, get_IFsrmRule_RuleType_Response),
    15: DceRpcOp(
        get_IFsrmRule_ModuleDefinitionName_Request,
        get_IFsrmRule_ModuleDefinitionName_Response,
    ),
    16: DceRpcOp(
        put_IFsrmRule_ModuleDefinitionName_Request,
        put_IFsrmRule_ModuleDefinitionName_Response,
    ),
    17: DceRpcOp(
        get_IFsrmRule_NamespaceRoots_Request, get_IFsrmRule_NamespaceRoots_Response
    ),
    18: DceRpcOp(
        put_IFsrmRule_NamespaceRoots_Request, put_IFsrmRule_NamespaceRoots_Response
    ),
    19: DceRpcOp(get_IFsrmRule_RuleFlags_Request, get_IFsrmRule_RuleFlags_Response),
    20: DceRpcOp(put_IFsrmRule_RuleFlags_Request, put_IFsrmRule_RuleFlags_Response),
    21: DceRpcOp(get_IFsrmRule_Parameters_Request, get_IFsrmRule_Parameters_Response),
    22: DceRpcOp(put_IFsrmRule_Parameters_Request, put_IFsrmRule_Parameters_Response),
    23: DceRpcOp(
        get_IFsrmRule_LastModified_Request, get_IFsrmRule_LastModified_Response
    ),
    24: DceRpcOp(
        get_IFsrmClassificationRule_ExecutionOption_Request,
        get_IFsrmClassificationRule_ExecutionOption_Response,
    ),
    25: DceRpcOp(
        put_IFsrmClassificationRule_ExecutionOption_Request,
        put_IFsrmClassificationRule_ExecutionOption_Response,
    ),
    26: DceRpcOp(
        get_IFsrmClassificationRule_PropertyAffected_Request,
        get_IFsrmClassificationRule_PropertyAffected_Response,
    ),
    27: DceRpcOp(
        put_IFsrmClassificationRule_PropertyAffected_Request,
        put_IFsrmClassificationRule_PropertyAffected_Response,
    ),
    28: DceRpcOp(
        get_IFsrmClassificationRule_Value_Request,
        get_IFsrmClassificationRule_Value_Response,
    ),
    29: DceRpcOp(
        put_IFsrmClassificationRule_Value_Request,
        put_IFsrmClassificationRule_Value_Response,
    ),
}
register_com_interface(
    name="IFsrmClassificationRule",
    uuid=uuid.UUID("afc052c2-5315-45ab-841b-c6db0e120148"),
    opnums=IFSRMCLASSIFICATIONRULE_OPNUMS,
)


class get_IFsrmPipelineModuleDefinition_ModuleClsid_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPipelineModuleDefinition_ModuleClsid_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("moduleClsid", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmPipelineModuleDefinition_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IFsrmPipelineModuleDefinition_Company_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPipelineModuleDefinition_Company_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("company", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmPipelineModuleDefinition_Version_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPipelineModuleDefinition_Version_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("version", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class FsrmPipelineModuleType(IntEnum):
    FsrmPipelineModuleType_Unknown = 0
    FsrmPipelineModuleType_Storage = 1
    FsrmPipelineModuleType_Classifier = 2


class get_IFsrmPipelineModuleDefinition_ModuleType_Request(NDRPacket):
    fields_desc = []


class get_IFsrmPipelineModuleDefinition_ModuleType_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("moduleType", 0, FsrmPipelineModuleType),
        NDRIntField("status", 0),
    ]


class get_IFsrmPipelineModuleDefinition_Enabled_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IFsrmPipelineModuleDefinition_NeedsFileContent_Request(NDRPacket):
    fields_desc = []


class get_IFsrmPipelineModuleDefinition_NeedsFileContent_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("needsFileContent", 0), NDRIntField("status", 0)]


class put_IFsrmPipelineModuleDefinition_NeedsFileContent_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("needsFileContent", 0)]


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


class get_IFsrmPipelineModuleDefinition_Account_Request(NDRPacket):
    fields_desc = []


class get_IFsrmPipelineModuleDefinition_Account_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("retrievalAccount", 0, FsrmAccountType),
        NDRIntField("status", 0),
    ]


class put_IFsrmPipelineModuleDefinition_Account_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("retrievalAccount", 0, FsrmAccountType)]


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


class get_IFsrmPipelineModuleDefinition_SupportedExtensions_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPipelineModuleDefinition_SupportedExtensions_Request(NDRPacket):
    fields_desc = [NDRPacketField("supportedExtensions", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmPipelineModuleDefinition_Parameters_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPipelineModuleDefinition_Parameters_Request(NDRPacket):
    fields_desc = [NDRPacketField("parameters", SAFEARRAY(), SAFEARRAY)]


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


IFSRMPIPELINEMODULEDEFINITION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_ModuleClsid_Request,
        get_IFsrmPipelineModuleDefinition_ModuleClsid_Response,
    ),
    13: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_ModuleClsid_Request,
        put_IFsrmPipelineModuleDefinition_ModuleClsid_Response,
    ),
    14: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Name_Request,
        get_IFsrmPipelineModuleDefinition_Name_Response,
    ),
    15: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Name_Request,
        put_IFsrmPipelineModuleDefinition_Name_Response,
    ),
    16: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Company_Request,
        get_IFsrmPipelineModuleDefinition_Company_Response,
    ),
    17: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Company_Request,
        put_IFsrmPipelineModuleDefinition_Company_Response,
    ),
    18: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Version_Request,
        get_IFsrmPipelineModuleDefinition_Version_Response,
    ),
    19: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Version_Request,
        put_IFsrmPipelineModuleDefinition_Version_Response,
    ),
    20: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_ModuleType_Request,
        get_IFsrmPipelineModuleDefinition_ModuleType_Response,
    ),
    21: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Enabled_Request,
        get_IFsrmPipelineModuleDefinition_Enabled_Response,
    ),
    22: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Enabled_Request,
        put_IFsrmPipelineModuleDefinition_Enabled_Response,
    ),
    23: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_NeedsFileContent_Request,
        get_IFsrmPipelineModuleDefinition_NeedsFileContent_Response,
    ),
    24: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_NeedsFileContent_Request,
        put_IFsrmPipelineModuleDefinition_NeedsFileContent_Response,
    ),
    25: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Account_Request,
        get_IFsrmPipelineModuleDefinition_Account_Response,
    ),
    26: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Account_Request,
        put_IFsrmPipelineModuleDefinition_Account_Response,
    ),
    27: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_SupportedExtensions_Request,
        get_IFsrmPipelineModuleDefinition_SupportedExtensions_Response,
    ),
    28: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_SupportedExtensions_Request,
        put_IFsrmPipelineModuleDefinition_SupportedExtensions_Response,
    ),
    29: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Parameters_Request,
        get_IFsrmPipelineModuleDefinition_Parameters_Response,
    ),
    30: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Parameters_Request,
        put_IFsrmPipelineModuleDefinition_Parameters_Response,
    ),
}
register_com_interface(
    name="IFsrmPipelineModuleDefinition",
    uuid=uuid.UUID("515c1277-2c81-440e-8fcf-367921ed4f59"),
    opnums=IFSRMPIPELINEMODULEDEFINITION_OPNUMS,
)


class get_IFsrmClassifierModuleDefinition_PropertiesAffected_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmClassifierModuleDefinition_PropertiesAffected_Request(NDRPacket):
    fields_desc = [NDRPacketField("propertiesAffected", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmClassifierModuleDefinition_PropertiesUsed_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmClassifierModuleDefinition_PropertiesUsed_Request(NDRPacket):
    fields_desc = [NDRPacketField("propertiesUsed", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmClassifierModuleDefinition_NeedsExplicitValue_Request(NDRPacket):
    fields_desc = []


class get_IFsrmClassifierModuleDefinition_NeedsExplicitValue_Response(NDRPacket):
    fields_desc = [
        NDRSignedShortField("needsExplicitValue", 0),
        NDRIntField("status", 0),
    ]


class put_IFsrmClassifierModuleDefinition_NeedsExplicitValue_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("needsExplicitValue", 0)]


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


IFSRMCLASSIFIERMODULEDEFINITION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_ModuleClsid_Request,
        get_IFsrmPipelineModuleDefinition_ModuleClsid_Response,
    ),
    13: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_ModuleClsid_Request,
        put_IFsrmPipelineModuleDefinition_ModuleClsid_Response,
    ),
    14: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Name_Request,
        get_IFsrmPipelineModuleDefinition_Name_Response,
    ),
    15: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Name_Request,
        put_IFsrmPipelineModuleDefinition_Name_Response,
    ),
    16: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Company_Request,
        get_IFsrmPipelineModuleDefinition_Company_Response,
    ),
    17: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Company_Request,
        put_IFsrmPipelineModuleDefinition_Company_Response,
    ),
    18: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Version_Request,
        get_IFsrmPipelineModuleDefinition_Version_Response,
    ),
    19: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Version_Request,
        put_IFsrmPipelineModuleDefinition_Version_Response,
    ),
    20: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_ModuleType_Request,
        get_IFsrmPipelineModuleDefinition_ModuleType_Response,
    ),
    21: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Enabled_Request,
        get_IFsrmPipelineModuleDefinition_Enabled_Response,
    ),
    22: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Enabled_Request,
        put_IFsrmPipelineModuleDefinition_Enabled_Response,
    ),
    23: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_NeedsFileContent_Request,
        get_IFsrmPipelineModuleDefinition_NeedsFileContent_Response,
    ),
    24: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_NeedsFileContent_Request,
        put_IFsrmPipelineModuleDefinition_NeedsFileContent_Response,
    ),
    25: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Account_Request,
        get_IFsrmPipelineModuleDefinition_Account_Response,
    ),
    26: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Account_Request,
        put_IFsrmPipelineModuleDefinition_Account_Response,
    ),
    27: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_SupportedExtensions_Request,
        get_IFsrmPipelineModuleDefinition_SupportedExtensions_Response,
    ),
    28: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_SupportedExtensions_Request,
        put_IFsrmPipelineModuleDefinition_SupportedExtensions_Response,
    ),
    29: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Parameters_Request,
        get_IFsrmPipelineModuleDefinition_Parameters_Response,
    ),
    30: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Parameters_Request,
        put_IFsrmPipelineModuleDefinition_Parameters_Response,
    ),
    31: DceRpcOp(
        get_IFsrmClassifierModuleDefinition_PropertiesAffected_Request,
        get_IFsrmClassifierModuleDefinition_PropertiesAffected_Response,
    ),
    32: DceRpcOp(
        put_IFsrmClassifierModuleDefinition_PropertiesAffected_Request,
        put_IFsrmClassifierModuleDefinition_PropertiesAffected_Response,
    ),
    33: DceRpcOp(
        get_IFsrmClassifierModuleDefinition_PropertiesUsed_Request,
        get_IFsrmClassifierModuleDefinition_PropertiesUsed_Response,
    ),
    34: DceRpcOp(
        put_IFsrmClassifierModuleDefinition_PropertiesUsed_Request,
        put_IFsrmClassifierModuleDefinition_PropertiesUsed_Response,
    ),
    35: DceRpcOp(
        get_IFsrmClassifierModuleDefinition_NeedsExplicitValue_Request,
        get_IFsrmClassifierModuleDefinition_NeedsExplicitValue_Response,
    ),
    36: DceRpcOp(
        put_IFsrmClassifierModuleDefinition_NeedsExplicitValue_Request,
        put_IFsrmClassifierModuleDefinition_NeedsExplicitValue_Response,
    ),
}
register_com_interface(
    name="IFsrmClassifierModuleDefinition",
    uuid=uuid.UUID("bb36ea26-6318-4b8c-8592-f72dd602e7a5"),
    opnums=IFSRMCLASSIFIERMODULEDEFINITION_OPNUMS,
)


class get_IFsrmClassificationManager_ClassificationReportFormats_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmClassificationManager_ClassificationReportFormats_Request(NDRPacket):
    fields_desc = [NDRPacketField("formats", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmClassificationManager_Logging_Request(NDRPacket):
    fields_desc = []


class get_IFsrmClassificationManager_Logging_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("logging", 0), NDRIntField("status", 0)]


class put_IFsrmClassificationManager_Logging_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("logging", 0)]


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


class get_IFsrmClassificationManager_ClassificationReportMailTo_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmClassificationManager_ClassificationReportMailTo_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailTo", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmClassificationManager_ClassificationReportEnabled_Request(NDRPacket):
    fields_desc = []


class get_IFsrmClassificationManager_ClassificationReportEnabled_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("reportEnabled", 0), NDRIntField("status", 0)]


class put_IFsrmClassificationManager_ClassificationReportEnabled_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("reportEnabled", 0)]


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


class get_IFsrmClassificationManager_ClassificationLastReportPathWithoutExtension_Request(
    NDRPacket
):
    fields_desc = []


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


class get_IFsrmClassificationManager_ClassificationLastError_Request(NDRPacket):
    fields_desc = []


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


class FsrmReportRunningStatus(IntEnum):
    FsrmReportRunningStatus_Unknown = 0
    FsrmReportRunningStatus_NotRunning = 1
    FsrmReportRunningStatus_Queued = 2
    FsrmReportRunningStatus_Running = 3


class get_IFsrmClassificationManager_ClassificationRunningStatus_Request(NDRPacket):
    fields_desc = []


class get_IFsrmClassificationManager_ClassificationRunningStatus_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("runningStatus", 0, FsrmReportRunningStatus),
        NDRIntField("status", 0),
    ]


class FsrmEnumOptions(IntEnum):
    FsrmEnumOptions_None = 0
    FsrmEnumOptions_Asynchronous = 1
    FsrmEnumOptions_CheckRecycleBin = 2
    FsrmEnumOptions_IncludeClusterNodes = 4
    FsrmEnumOptions_IncludeDeprecatedObjects = 8


class EnumPropertyDefinitions_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("options", 0, FsrmEnumOptions)]


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


class CreatePropertyDefinition_Request(NDRPacket):
    fields_desc = []


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


class GetPropertyDefinition_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("propertyName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class EnumRules_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("ruleType", 0, FsrmRuleType),
        NDRInt3264EnumField("options", 0, FsrmEnumOptions),
    ]


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


class CreateRule_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("ruleType", 0, FsrmRuleType)]


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


class GetRule_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("ruleName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRInt3264EnumField("ruleType", 0, FsrmRuleType),
    ]


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


class EnumModuleDefinitions_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("moduleType", 0, FsrmPipelineModuleType),
        NDRInt3264EnumField("options", 0, FsrmEnumOptions),
    ]


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


class CreateModuleDefinition_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("moduleType", 0, FsrmPipelineModuleType)]


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


class GetModuleDefinition_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("moduleName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRInt3264EnumField("moduleType", 0, FsrmPipelineModuleType),
    ]


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


class FsrmReportGenerationContext(IntEnum):
    FsrmReportGenerationContext_Undefined = 1
    FsrmReportGenerationContext_ScheduledReport = 2
    FsrmReportGenerationContext_InteractiveReport = 3
    FsrmReportGenerationContext_IncidentReport = 4


class RunClassification_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("context", 0, FsrmReportGenerationContext),
        NDRFullPointerField(
            NDRPacketField("reserved", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


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


class WaitForClassificationCompletion_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("waitSeconds", 0)]


class WaitForClassificationCompletion_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("completed", 0), NDRIntField("status", 0)]


class CancelClassification_Request(NDRPacket):
    fields_desc = []


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


class FsrmGetFilePropertyOptions(IntEnum):
    FsrmGetFilePropertyOptions_None = 0
    FsrmGetFilePropertyOptions_NoRuleEvaluation = 1
    FsrmGetFilePropertyOptions_Persistent = 2
    FsrmGetFilePropertyOptions_FailOnPersistErrors = 4
    FsrmGetFilePropertyOptions_SkipOrphaned = 8


class EnumFileProperties_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("filePath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRInt3264EnumField("options", 0, FsrmGetFilePropertyOptions),
    ]


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


class GetFileProperty_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("filePath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("propertyName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRInt3264EnumField("options", 0, FsrmGetFilePropertyOptions),
    ]


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


class SetFileProperty_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("filePath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("propertyName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("propertyValue", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


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


class ClearFileProperty_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("filePath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("property", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


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


IFSRMCLASSIFICATIONMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmClassificationManager_ClassificationReportFormats_Request,
        get_IFsrmClassificationManager_ClassificationReportFormats_Response,
    ),
    8: DceRpcOp(
        put_IFsrmClassificationManager_ClassificationReportFormats_Request,
        put_IFsrmClassificationManager_ClassificationReportFormats_Response,
    ),
    9: DceRpcOp(
        get_IFsrmClassificationManager_Logging_Request,
        get_IFsrmClassificationManager_Logging_Response,
    ),
    10: DceRpcOp(
        put_IFsrmClassificationManager_Logging_Request,
        put_IFsrmClassificationManager_Logging_Response,
    ),
    11: DceRpcOp(
        get_IFsrmClassificationManager_ClassificationReportMailTo_Request,
        get_IFsrmClassificationManager_ClassificationReportMailTo_Response,
    ),
    12: DceRpcOp(
        put_IFsrmClassificationManager_ClassificationReportMailTo_Request,
        put_IFsrmClassificationManager_ClassificationReportMailTo_Response,
    ),
    13: DceRpcOp(
        get_IFsrmClassificationManager_ClassificationReportEnabled_Request,
        get_IFsrmClassificationManager_ClassificationReportEnabled_Response,
    ),
    14: DceRpcOp(
        put_IFsrmClassificationManager_ClassificationReportEnabled_Request,
        put_IFsrmClassificationManager_ClassificationReportEnabled_Response,
    ),
    15: DceRpcOp(
        get_IFsrmClassificationManager_ClassificationLastReportPathWithoutExtension_Request,
        get_IFsrmClassificationManager_ClassificationLastReportPathWithoutExtension_Response,
    ),
    16: DceRpcOp(
        get_IFsrmClassificationManager_ClassificationLastError_Request,
        get_IFsrmClassificationManager_ClassificationLastError_Response,
    ),
    17: DceRpcOp(
        get_IFsrmClassificationManager_ClassificationRunningStatus_Request,
        get_IFsrmClassificationManager_ClassificationRunningStatus_Response,
    ),
    18: DceRpcOp(EnumPropertyDefinitions_Request, EnumPropertyDefinitions_Response),
    19: DceRpcOp(CreatePropertyDefinition_Request, CreatePropertyDefinition_Response),
    20: DceRpcOp(GetPropertyDefinition_Request, GetPropertyDefinition_Response),
    21: DceRpcOp(EnumRules_Request, EnumRules_Response),
    22: DceRpcOp(CreateRule_Request, CreateRule_Response),
    23: DceRpcOp(GetRule_Request, GetRule_Response),
    24: DceRpcOp(EnumModuleDefinitions_Request, EnumModuleDefinitions_Response),
    25: DceRpcOp(CreateModuleDefinition_Request, CreateModuleDefinition_Response),
    26: DceRpcOp(GetModuleDefinition_Request, GetModuleDefinition_Response),
    27: DceRpcOp(RunClassification_Request, RunClassification_Response),
    28: DceRpcOp(
        WaitForClassificationCompletion_Request,
        WaitForClassificationCompletion_Response,
    ),
    29: DceRpcOp(CancelClassification_Request, CancelClassification_Response),
    30: DceRpcOp(EnumFileProperties_Request, EnumFileProperties_Response),
    31: DceRpcOp(GetFileProperty_Request, GetFileProperty_Response),
    32: DceRpcOp(SetFileProperty_Request, SetFileProperty_Response),
    33: DceRpcOp(ClearFileProperty_Request, ClearFileProperty_Response),
}
register_com_interface(
    name="IFsrmClassificationManager",
    uuid=uuid.UUID("d2dc89da-ee91-48a0-85d8-cc72a56f7d04"),
    opnums=IFSRMCLASSIFICATIONMANAGER_OPNUMS,
)


class FsrmStorageModuleCaps(IntEnum):
    FsrmStorageModuleCaps_Unknown = 0
    FsrmStorageModuleCaps_CanGet = 1
    FsrmStorageModuleCaps_CanSet = 2
    FsrmStorageModuleCaps_CanHandleDirectories = 4
    FsrmStorageModuleCaps_CanHandleFiles = 8


class get_IFsrmStorageModuleDefinition_Capabilities_Request(NDRPacket):
    fields_desc = []


class get_IFsrmStorageModuleDefinition_Capabilities_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("capabilities", 0, FsrmStorageModuleCaps),
        NDRIntField("status", 0),
    ]


class put_IFsrmStorageModuleDefinition_Capabilities_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("capabilities", 0, FsrmStorageModuleCaps)]


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


class FsrmStorageModuleType(IntEnum):
    FsrmStorageModuleType_Unknown = 0
    FsrmStorageModuleType_Cache = 1
    FsrmStorageModuleType_InFile = 2
    FsrmStorageModuleType_Database = 3
    FsrmStorageModuleType_System = 100


class get_IFsrmStorageModuleDefinition_StorageType_Request(NDRPacket):
    fields_desc = []


class get_IFsrmStorageModuleDefinition_StorageType_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("storageType", 0, FsrmStorageModuleType),
        NDRIntField("status", 0),
    ]


class put_IFsrmStorageModuleDefinition_StorageType_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("storageType", 0, FsrmStorageModuleType)]


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


class get_IFsrmStorageModuleDefinition_UpdatesFileContent_Request(NDRPacket):
    fields_desc = []


class get_IFsrmStorageModuleDefinition_UpdatesFileContent_Response(NDRPacket):
    fields_desc = [
        NDRSignedShortField("updatesFileContent", 0),
        NDRIntField("status", 0),
    ]


class put_IFsrmStorageModuleDefinition_UpdatesFileContent_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("updatesFileContent", 0)]


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


IFSRMSTORAGEMODULEDEFINITION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_ModuleClsid_Request,
        get_IFsrmPipelineModuleDefinition_ModuleClsid_Response,
    ),
    13: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_ModuleClsid_Request,
        put_IFsrmPipelineModuleDefinition_ModuleClsid_Response,
    ),
    14: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Name_Request,
        get_IFsrmPipelineModuleDefinition_Name_Response,
    ),
    15: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Name_Request,
        put_IFsrmPipelineModuleDefinition_Name_Response,
    ),
    16: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Company_Request,
        get_IFsrmPipelineModuleDefinition_Company_Response,
    ),
    17: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Company_Request,
        put_IFsrmPipelineModuleDefinition_Company_Response,
    ),
    18: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Version_Request,
        get_IFsrmPipelineModuleDefinition_Version_Response,
    ),
    19: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Version_Request,
        put_IFsrmPipelineModuleDefinition_Version_Response,
    ),
    20: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_ModuleType_Request,
        get_IFsrmPipelineModuleDefinition_ModuleType_Response,
    ),
    21: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Enabled_Request,
        get_IFsrmPipelineModuleDefinition_Enabled_Response,
    ),
    22: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Enabled_Request,
        put_IFsrmPipelineModuleDefinition_Enabled_Response,
    ),
    23: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_NeedsFileContent_Request,
        get_IFsrmPipelineModuleDefinition_NeedsFileContent_Response,
    ),
    24: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_NeedsFileContent_Request,
        put_IFsrmPipelineModuleDefinition_NeedsFileContent_Response,
    ),
    25: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Account_Request,
        get_IFsrmPipelineModuleDefinition_Account_Response,
    ),
    26: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Account_Request,
        put_IFsrmPipelineModuleDefinition_Account_Response,
    ),
    27: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_SupportedExtensions_Request,
        get_IFsrmPipelineModuleDefinition_SupportedExtensions_Response,
    ),
    28: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_SupportedExtensions_Request,
        put_IFsrmPipelineModuleDefinition_SupportedExtensions_Response,
    ),
    29: DceRpcOp(
        get_IFsrmPipelineModuleDefinition_Parameters_Request,
        get_IFsrmPipelineModuleDefinition_Parameters_Response,
    ),
    30: DceRpcOp(
        put_IFsrmPipelineModuleDefinition_Parameters_Request,
        put_IFsrmPipelineModuleDefinition_Parameters_Response,
    ),
    31: DceRpcOp(
        get_IFsrmStorageModuleDefinition_Capabilities_Request,
        get_IFsrmStorageModuleDefinition_Capabilities_Response,
    ),
    32: DceRpcOp(
        put_IFsrmStorageModuleDefinition_Capabilities_Request,
        put_IFsrmStorageModuleDefinition_Capabilities_Response,
    ),
    33: DceRpcOp(
        get_IFsrmStorageModuleDefinition_StorageType_Request,
        get_IFsrmStorageModuleDefinition_StorageType_Response,
    ),
    34: DceRpcOp(
        put_IFsrmStorageModuleDefinition_StorageType_Request,
        put_IFsrmStorageModuleDefinition_StorageType_Response,
    ),
    35: DceRpcOp(
        get_IFsrmStorageModuleDefinition_UpdatesFileContent_Request,
        get_IFsrmStorageModuleDefinition_UpdatesFileContent_Response,
    ),
    36: DceRpcOp(
        put_IFsrmStorageModuleDefinition_UpdatesFileContent_Request,
        put_IFsrmStorageModuleDefinition_UpdatesFileContent_Response,
    ),
}
register_com_interface(
    name="IFsrmStorageModuleDefinition",
    uuid=uuid.UUID("15a81350-497d-4aba-80e9-d4dbcc5521fe"),
    opnums=IFSRMSTORAGEMODULEDEFINITION_OPNUMS,
)


class get_IFsrmQuotaBase_QuotaLimit_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmQuotaBase_QuotaLimit_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("quotaLimit", wireVARIANTStr(), wireVARIANTStr)
        )
    ]


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


class get_IFsrmQuotaBase_QuotaFlags_Request(NDRPacket):
    fields_desc = []


class get_IFsrmQuotaBase_QuotaFlags_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("quotaFlags", 0), NDRIntField("status", 0)]


class put_IFsrmQuotaBase_QuotaFlags_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("quotaFlags", 0)]


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


class get_IFsrmQuotaBase_Thresholds_Request(NDRPacket):
    fields_desc = []


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


class AddThreshold_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("threshold", 0)]


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


class DeleteThreshold_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("threshold", 0)]


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


class ModifyThreshold_Request(NDRPacket):
    fields_desc = [
        NDRSignedIntField("threshold", 0),
        NDRSignedIntField("newThreshold", 0),
    ]


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


class CreateThresholdAction_Request(NDRPacket):
    fields_desc = [
        NDRSignedIntField("threshold", 0),
        NDRInt3264EnumField("actionType", 0, FsrmActionType),
    ]


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


class EnumThresholdActions_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("threshold", 0)]


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


IFSRMQUOTABASE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmQuotaBase_QuotaLimit_Request, get_IFsrmQuotaBase_QuotaLimit_Response
    ),
    13: DceRpcOp(
        put_IFsrmQuotaBase_QuotaLimit_Request, put_IFsrmQuotaBase_QuotaLimit_Response
    ),
    14: DceRpcOp(
        get_IFsrmQuotaBase_QuotaFlags_Request, get_IFsrmQuotaBase_QuotaFlags_Response
    ),
    15: DceRpcOp(
        put_IFsrmQuotaBase_QuotaFlags_Request, put_IFsrmQuotaBase_QuotaFlags_Response
    ),
    16: DceRpcOp(
        get_IFsrmQuotaBase_Thresholds_Request, get_IFsrmQuotaBase_Thresholds_Response
    ),
    17: DceRpcOp(AddThreshold_Request, AddThreshold_Response),
    18: DceRpcOp(DeleteThreshold_Request, DeleteThreshold_Response),
    19: DceRpcOp(ModifyThreshold_Request, ModifyThreshold_Response),
    20: DceRpcOp(CreateThresholdAction_Request, CreateThresholdAction_Response),
    21: DceRpcOp(EnumThresholdActions_Request, EnumThresholdActions_Response),
}
register_com_interface(
    name="IFsrmQuotaBase",
    uuid=uuid.UUID("1568a795-3924-4118-b74b-68d8f0fa5daf"),
    opnums=IFSRMQUOTABASE_OPNUMS,
)


class get_IFsrmQuotaObject_Path_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmQuotaObject_UserSid_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmQuotaObject_UserAccount_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmQuotaObject_SourceTemplateName_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmQuotaObject_MatchesSourceTemplate_Request(NDRPacket):
    fields_desc = []


class get_IFsrmQuotaObject_MatchesSourceTemplate_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("matches", 0), NDRIntField("status", 0)]


class ApplyTemplate_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("quotaTemplateName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IFSRMQUOTAOBJECT_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmQuotaBase_QuotaLimit_Request, get_IFsrmQuotaBase_QuotaLimit_Response
    ),
    13: DceRpcOp(
        put_IFsrmQuotaBase_QuotaLimit_Request, put_IFsrmQuotaBase_QuotaLimit_Response
    ),
    14: DceRpcOp(
        get_IFsrmQuotaBase_QuotaFlags_Request, get_IFsrmQuotaBase_QuotaFlags_Response
    ),
    15: DceRpcOp(
        put_IFsrmQuotaBase_QuotaFlags_Request, put_IFsrmQuotaBase_QuotaFlags_Response
    ),
    16: DceRpcOp(
        get_IFsrmQuotaBase_Thresholds_Request, get_IFsrmQuotaBase_Thresholds_Response
    ),
    17: DceRpcOp(AddThreshold_Request, AddThreshold_Response),
    18: DceRpcOp(DeleteThreshold_Request, DeleteThreshold_Response),
    19: DceRpcOp(ModifyThreshold_Request, ModifyThreshold_Response),
    20: DceRpcOp(CreateThresholdAction_Request, CreateThresholdAction_Response),
    21: DceRpcOp(EnumThresholdActions_Request, EnumThresholdActions_Response),
    22: DceRpcOp(get_IFsrmQuotaObject_Path_Request, get_IFsrmQuotaObject_Path_Response),
    23: DceRpcOp(
        get_IFsrmQuotaObject_UserSid_Request, get_IFsrmQuotaObject_UserSid_Response
    ),
    24: DceRpcOp(
        get_IFsrmQuotaObject_UserAccount_Request,
        get_IFsrmQuotaObject_UserAccount_Response,
    ),
    25: DceRpcOp(
        get_IFsrmQuotaObject_SourceTemplateName_Request,
        get_IFsrmQuotaObject_SourceTemplateName_Response,
    ),
    26: DceRpcOp(
        get_IFsrmQuotaObject_MatchesSourceTemplate_Request,
        get_IFsrmQuotaObject_MatchesSourceTemplate_Response,
    ),
    27: DceRpcOp(ApplyTemplate_Request, ApplyTemplate_Response),
}
register_com_interface(
    name="IFsrmQuotaObject",
    uuid=uuid.UUID("42dc3511-61d5-48ae-b6dc-59fc00c0a8d6"),
    opnums=IFSRMQUOTAOBJECT_OPNUMS,
)


class get_IFsrmQuota_QuotaUsed_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmQuota_QuotaPeakUsage_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmQuota_QuotaPeakUsageTime_Request(NDRPacket):
    fields_desc = []


class get_IFsrmQuota_QuotaPeakUsageTime_Response(NDRPacket):
    fields_desc = [NDRIEEEDoubleField("peakUsageDateTime", 0), NDRIntField("status", 0)]


class ResetPeakUsage_Request(NDRPacket):
    fields_desc = []


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


class RefreshUsageProperties_Request(NDRPacket):
    fields_desc = []


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


IFSRMQUOTA_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmQuotaBase_QuotaLimit_Request, get_IFsrmQuotaBase_QuotaLimit_Response
    ),
    13: DceRpcOp(
        put_IFsrmQuotaBase_QuotaLimit_Request, put_IFsrmQuotaBase_QuotaLimit_Response
    ),
    14: DceRpcOp(
        get_IFsrmQuotaBase_QuotaFlags_Request, get_IFsrmQuotaBase_QuotaFlags_Response
    ),
    15: DceRpcOp(
        put_IFsrmQuotaBase_QuotaFlags_Request, put_IFsrmQuotaBase_QuotaFlags_Response
    ),
    16: DceRpcOp(
        get_IFsrmQuotaBase_Thresholds_Request, get_IFsrmQuotaBase_Thresholds_Response
    ),
    17: DceRpcOp(AddThreshold_Request, AddThreshold_Response),
    18: DceRpcOp(DeleteThreshold_Request, DeleteThreshold_Response),
    19: DceRpcOp(ModifyThreshold_Request, ModifyThreshold_Response),
    20: DceRpcOp(CreateThresholdAction_Request, CreateThresholdAction_Response),
    21: DceRpcOp(EnumThresholdActions_Request, EnumThresholdActions_Response),
    22: DceRpcOp(get_IFsrmQuotaObject_Path_Request, get_IFsrmQuotaObject_Path_Response),
    23: DceRpcOp(
        get_IFsrmQuotaObject_UserSid_Request, get_IFsrmQuotaObject_UserSid_Response
    ),
    24: DceRpcOp(
        get_IFsrmQuotaObject_UserAccount_Request,
        get_IFsrmQuotaObject_UserAccount_Response,
    ),
    25: DceRpcOp(
        get_IFsrmQuotaObject_SourceTemplateName_Request,
        get_IFsrmQuotaObject_SourceTemplateName_Response,
    ),
    26: DceRpcOp(
        get_IFsrmQuotaObject_MatchesSourceTemplate_Request,
        get_IFsrmQuotaObject_MatchesSourceTemplate_Response,
    ),
    27: DceRpcOp(ApplyTemplate_Request, ApplyTemplate_Response),
    28: DceRpcOp(get_IFsrmQuota_QuotaUsed_Request, get_IFsrmQuota_QuotaUsed_Response),
    29: DceRpcOp(
        get_IFsrmQuota_QuotaPeakUsage_Request, get_IFsrmQuota_QuotaPeakUsage_Response
    ),
    30: DceRpcOp(
        get_IFsrmQuota_QuotaPeakUsageTime_Request,
        get_IFsrmQuota_QuotaPeakUsageTime_Response,
    ),
    31: DceRpcOp(ResetPeakUsage_Request, ResetPeakUsage_Response),
    32: DceRpcOp(RefreshUsageProperties_Request, RefreshUsageProperties_Response),
}
register_com_interface(
    name="IFsrmQuota",
    uuid=uuid.UUID("377f739d-9647-4b8e-97d2-5ffce6d759cd"),
    opnums=IFSRMQUOTA_OPNUMS,
)


class get_IFsrmAutoApplyQuota_ExcludeFolders_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmAutoApplyQuota_ExcludeFolders_Request(NDRPacket):
    fields_desc = [NDRPacketField("folders", SAFEARRAY(), SAFEARRAY)]


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


class FsrmTemplateApplyOptions(IntEnum):
    FsrmTemplateApplyOptions_ApplyToDerivedMatching = 1
    FsrmTemplateApplyOptions_ApplyToDerivedAll = 2


class CommitAndUpdateDerived_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("commitOptions", 0, FsrmCommitOptions),
        NDRInt3264EnumField("applyOptions", 0, FsrmTemplateApplyOptions),
    ]


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


IFSRMAUTOAPPLYQUOTA_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmQuotaBase_QuotaLimit_Request, get_IFsrmQuotaBase_QuotaLimit_Response
    ),
    13: DceRpcOp(
        put_IFsrmQuotaBase_QuotaLimit_Request, put_IFsrmQuotaBase_QuotaLimit_Response
    ),
    14: DceRpcOp(
        get_IFsrmQuotaBase_QuotaFlags_Request, get_IFsrmQuotaBase_QuotaFlags_Response
    ),
    15: DceRpcOp(
        put_IFsrmQuotaBase_QuotaFlags_Request, put_IFsrmQuotaBase_QuotaFlags_Response
    ),
    16: DceRpcOp(
        get_IFsrmQuotaBase_Thresholds_Request, get_IFsrmQuotaBase_Thresholds_Response
    ),
    17: DceRpcOp(AddThreshold_Request, AddThreshold_Response),
    18: DceRpcOp(DeleteThreshold_Request, DeleteThreshold_Response),
    19: DceRpcOp(ModifyThreshold_Request, ModifyThreshold_Response),
    20: DceRpcOp(CreateThresholdAction_Request, CreateThresholdAction_Response),
    21: DceRpcOp(EnumThresholdActions_Request, EnumThresholdActions_Response),
    22: DceRpcOp(get_IFsrmQuotaObject_Path_Request, get_IFsrmQuotaObject_Path_Response),
    23: DceRpcOp(
        get_IFsrmQuotaObject_UserSid_Request, get_IFsrmQuotaObject_UserSid_Response
    ),
    24: DceRpcOp(
        get_IFsrmQuotaObject_UserAccount_Request,
        get_IFsrmQuotaObject_UserAccount_Response,
    ),
    25: DceRpcOp(
        get_IFsrmQuotaObject_SourceTemplateName_Request,
        get_IFsrmQuotaObject_SourceTemplateName_Response,
    ),
    26: DceRpcOp(
        get_IFsrmQuotaObject_MatchesSourceTemplate_Request,
        get_IFsrmQuotaObject_MatchesSourceTemplate_Response,
    ),
    27: DceRpcOp(ApplyTemplate_Request, ApplyTemplate_Response),
    28: DceRpcOp(
        get_IFsrmAutoApplyQuota_ExcludeFolders_Request,
        get_IFsrmAutoApplyQuota_ExcludeFolders_Response,
    ),
    29: DceRpcOp(
        put_IFsrmAutoApplyQuota_ExcludeFolders_Request,
        put_IFsrmAutoApplyQuota_ExcludeFolders_Response,
    ),
    30: DceRpcOp(CommitAndUpdateDerived_Request, CommitAndUpdateDerived_Response),
}
register_com_interface(
    name="IFsrmAutoApplyQuota",
    uuid=uuid.UUID("f82e5729-6aba-4740-bfc7-c7f58f75fb7b"),
    opnums=IFSRMAUTOAPPLYQUOTA_OPNUMS,
)


class get_IFsrmQuotaManager_ActionVariables_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmQuotaManager_ActionVariableDescriptions_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


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


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


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


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


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


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


class EnumQuotas_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRInt3264EnumField("options", 0, FsrmEnumOptions),
    ]


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


class EnumAutoApplyQuotas_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRInt3264EnumField("options", 0, FsrmEnumOptions),
    ]


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


class EnumEffectiveQuotas_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRInt3264EnumField("options", 0, FsrmEnumOptions),
    ]


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


class Scan_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("strPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class CreateQuotaCollection_Request(NDRPacket):
    fields_desc = []


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


IFSRMQUOTAMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmQuotaManager_ActionVariables_Request,
        get_IFsrmQuotaManager_ActionVariables_Response,
    ),
    8: DceRpcOp(
        get_IFsrmQuotaManager_ActionVariableDescriptions_Request,
        get_IFsrmQuotaManager_ActionVariableDescriptions_Response,
    ),
    9: DceRpcOp(CreateQuota_Request, CreateQuota_Response),
    10: DceRpcOp(CreateAutoApplyQuota_Request, CreateAutoApplyQuota_Response),
    11: DceRpcOp(GetQuota_Request, GetQuota_Response),
    12: DceRpcOp(GetAutoApplyQuota_Request, GetAutoApplyQuota_Response),
    13: DceRpcOp(GetRestrictiveQuota_Request, GetRestrictiveQuota_Response),
    14: DceRpcOp(EnumQuotas_Request, EnumQuotas_Response),
    15: DceRpcOp(EnumAutoApplyQuotas_Request, EnumAutoApplyQuotas_Response),
    16: DceRpcOp(EnumEffectiveQuotas_Request, EnumEffectiveQuotas_Response),
    17: DceRpcOp(Scan_Request, Scan_Response),
    18: DceRpcOp(CreateQuotaCollection_Request, CreateQuotaCollection_Response),
}
register_com_interface(
    name="IFsrmQuotaManager",
    uuid=uuid.UUID("8bb68c7d-19d8-4ffb-809e-be4fc1734014"),
    opnums=IFSRMQUOTAMANAGER_OPNUMS,
)


class get_IFsrmQuotaTemplate_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class CopyTemplate_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("quotaTemplateName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class CommitAndUpdateDerived_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("commitOptions", 0, FsrmCommitOptions),
        NDRInt3264EnumField("applyOptions", 0, FsrmTemplateApplyOptions),
    ]


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


IFSRMQUOTATEMPLATE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmQuotaBase_QuotaLimit_Request, get_IFsrmQuotaBase_QuotaLimit_Response
    ),
    13: DceRpcOp(
        put_IFsrmQuotaBase_QuotaLimit_Request, put_IFsrmQuotaBase_QuotaLimit_Response
    ),
    14: DceRpcOp(
        get_IFsrmQuotaBase_QuotaFlags_Request, get_IFsrmQuotaBase_QuotaFlags_Response
    ),
    15: DceRpcOp(
        put_IFsrmQuotaBase_QuotaFlags_Request, put_IFsrmQuotaBase_QuotaFlags_Response
    ),
    16: DceRpcOp(
        get_IFsrmQuotaBase_Thresholds_Request, get_IFsrmQuotaBase_Thresholds_Response
    ),
    17: DceRpcOp(AddThreshold_Request, AddThreshold_Response),
    18: DceRpcOp(DeleteThreshold_Request, DeleteThreshold_Response),
    19: DceRpcOp(ModifyThreshold_Request, ModifyThreshold_Response),
    20: DceRpcOp(CreateThresholdAction_Request, CreateThresholdAction_Response),
    21: DceRpcOp(EnumThresholdActions_Request, EnumThresholdActions_Response),
    22: DceRpcOp(
        get_IFsrmQuotaTemplate_Name_Request, get_IFsrmQuotaTemplate_Name_Response
    ),
    23: DceRpcOp(
        put_IFsrmQuotaTemplate_Name_Request, put_IFsrmQuotaTemplate_Name_Response
    ),
    24: DceRpcOp(CopyTemplate_Request, CopyTemplate_Response),
    25: DceRpcOp(CommitAndUpdateDerived_Request, CommitAndUpdateDerived_Response),
}
register_com_interface(
    name="IFsrmQuotaTemplate",
    uuid=uuid.UUID("a2efab31-295e-46bb-b976-e86d58b52e8b"),
    opnums=IFSRMQUOTATEMPLATE_OPNUMS,
)


class get_IFsrmQuotaTemplateImported_OverwriteOnCommit_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMQUOTATEMPLATEIMPORTED_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmQuotaBase_QuotaLimit_Request, get_IFsrmQuotaBase_QuotaLimit_Response
    ),
    13: DceRpcOp(
        put_IFsrmQuotaBase_QuotaLimit_Request, put_IFsrmQuotaBase_QuotaLimit_Response
    ),
    14: DceRpcOp(
        get_IFsrmQuotaBase_QuotaFlags_Request, get_IFsrmQuotaBase_QuotaFlags_Response
    ),
    15: DceRpcOp(
        put_IFsrmQuotaBase_QuotaFlags_Request, put_IFsrmQuotaBase_QuotaFlags_Response
    ),
    16: DceRpcOp(
        get_IFsrmQuotaBase_Thresholds_Request, get_IFsrmQuotaBase_Thresholds_Response
    ),
    17: DceRpcOp(AddThreshold_Request, AddThreshold_Response),
    18: DceRpcOp(DeleteThreshold_Request, DeleteThreshold_Response),
    19: DceRpcOp(ModifyThreshold_Request, ModifyThreshold_Response),
    20: DceRpcOp(CreateThresholdAction_Request, CreateThresholdAction_Response),
    21: DceRpcOp(EnumThresholdActions_Request, EnumThresholdActions_Response),
    22: DceRpcOp(
        get_IFsrmQuotaTemplate_Name_Request, get_IFsrmQuotaTemplate_Name_Response
    ),
    23: DceRpcOp(
        put_IFsrmQuotaTemplate_Name_Request, put_IFsrmQuotaTemplate_Name_Response
    ),
    24: DceRpcOp(CopyTemplate_Request, CopyTemplate_Response),
    25: DceRpcOp(CommitAndUpdateDerived_Request, CommitAndUpdateDerived_Response),
    26: DceRpcOp(
        get_IFsrmQuotaTemplateImported_OverwriteOnCommit_Request,
        get_IFsrmQuotaTemplateImported_OverwriteOnCommit_Response,
    ),
    27: DceRpcOp(
        put_IFsrmQuotaTemplateImported_OverwriteOnCommit_Request,
        put_IFsrmQuotaTemplateImported_OverwriteOnCommit_Response,
    ),
}
register_com_interface(
    name="IFsrmQuotaTemplateImported",
    uuid=uuid.UUID("9a2bf113-a329-44cc-809a-5c00fce8da40"),
    opnums=IFSRMQUOTATEMPLATEIMPORTED_OPNUMS,
)


class CreateTemplate_Request(NDRPacket):
    fields_desc = []


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


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


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


class EnumTemplates_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("options", 0, FsrmEnumOptions)]


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


class ExportTemplates_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField(
                    "quotaTemplateNamesArray", wireVARIANTStr(), wireVARIANTStr
                )
            )
        )
    ]


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


class ImportTemplates_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "serializedQuotaTemplates", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        ),
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField(
                    "quotaTemplateNamesArray", wireVARIANTStr(), wireVARIANTStr
                )
            )
        ),
    ]


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


IFSRMQUOTATEMPLATEMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(CreateTemplate_Request, CreateTemplate_Response),
    8: DceRpcOp(GetTemplate_Request, GetTemplate_Response),
    9: DceRpcOp(EnumTemplates_Request, EnumTemplates_Response),
    10: DceRpcOp(ExportTemplates_Request, ExportTemplates_Response),
    11: DceRpcOp(ImportTemplates_Request, ImportTemplates_Response),
}
register_com_interface(
    name="IFsrmQuotaTemplateManager",
    uuid=uuid.UUID("4173ac41-172d-4d52-963c-fdc7e415f717"),
    opnums=IFSRMQUOTATEMPLATEMANAGER_OPNUMS,
)


class IsAffectedByQuota_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRInt3264EnumField("options", 0, FsrmEnumOptions),
    ]


class IsAffectedByQuota_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("affected", 0), NDRIntField("status", 0)]


IFSRMQUOTAMANAGEREX_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmQuotaManager_ActionVariables_Request,
        get_IFsrmQuotaManager_ActionVariables_Response,
    ),
    8: DceRpcOp(
        get_IFsrmQuotaManager_ActionVariableDescriptions_Request,
        get_IFsrmQuotaManager_ActionVariableDescriptions_Response,
    ),
    9: DceRpcOp(CreateQuota_Request, CreateQuota_Response),
    10: DceRpcOp(CreateAutoApplyQuota_Request, CreateAutoApplyQuota_Response),
    11: DceRpcOp(GetQuota_Request, GetQuota_Response),
    12: DceRpcOp(GetAutoApplyQuota_Request, GetAutoApplyQuota_Response),
    13: DceRpcOp(GetRestrictiveQuota_Request, GetRestrictiveQuota_Response),
    14: DceRpcOp(EnumQuotas_Request, EnumQuotas_Response),
    15: DceRpcOp(EnumAutoApplyQuotas_Request, EnumAutoApplyQuotas_Response),
    16: DceRpcOp(EnumEffectiveQuotas_Request, EnumEffectiveQuotas_Response),
    17: DceRpcOp(Scan_Request, Scan_Response),
    18: DceRpcOp(CreateQuotaCollection_Request, CreateQuotaCollection_Response),
    19: DceRpcOp(IsAffectedByQuota_Request, IsAffectedByQuota_Response),
}
register_com_interface(
    name="IFsrmQuotaManagerEx",
    uuid=uuid.UUID("4846cb01-d430-494f-abb4-b1054999fb09"),
    opnums=IFSRMQUOTAMANAGEREX_OPNUMS,
)


class EnumReportJobs_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("options", 0, FsrmEnumOptions)]


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


class CreateReportJob_Request(NDRPacket):
    fields_desc = []


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


class GetReportJob_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("taskName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class GetOutputDirectory_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("context", 0, FsrmReportGenerationContext)]


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


class SetOutputDirectory_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("context", 0, FsrmReportGenerationContext),
        NDRFullPointerField(
            NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


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


class FsrmReportType(IntEnum):
    FsrmReportType_Unknown = 0
    FsrmReportType_LargeFiles = 1
    FsrmReportType_FilesByType = 2
    FsrmReportType_LeastRecentlyAccessed = 3
    FsrmReportType_MostRecentlyAccessed = 4
    FsrmReportType_QuotaUsage = 5
    FsrmReportType_FilesByOwner = 6
    FsrmReportType_ExportReport = 7
    FsrmReportType_DuplicateFiles = 8
    FsrmReportType_FileScreenAudit = 9
    FsrmReportType_FilesByProperty = 10
    FsrmReportType_AutomaticClassification = 11
    FsrmReportType_Expiration = 12
    FsrmReportType_FoldersByProperty = 13


class FsrmReportFilter(IntEnum):
    FsrmReportFilter_MinSize = 1
    FsrmReportFilter_MinAgeDays = 2
    FsrmReportFilter_MaxAgeDays = 3
    FsrmReportFilter_MinQuotaUsage = 4
    FsrmReportFilter_FileGroups = 5
    FsrmReportFilter_Owners = 6
    FsrmReportFilter_NamePattern = 7
    FsrmReportFilter_Property = 8


class IsFilterValidForReportType_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("reportType", 0, FsrmReportType),
        NDRInt3264EnumField("filter", 0, FsrmReportFilter),
    ]


class IsFilterValidForReportType_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("valid", 0), NDRIntField("status", 0)]


class GetDefaultFilter_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("reportType", 0, FsrmReportType),
        NDRInt3264EnumField("filter", 0, FsrmReportFilter),
    ]


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


class SetDefaultFilter_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("reportType", 0, FsrmReportType),
        NDRInt3264EnumField("filter", 0, FsrmReportFilter),
        NDRFullPointerField(
            NDRPacketField("filterValue", wireVARIANTStr(), wireVARIANTStr)
        ),
    ]


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


class FsrmReportLimit(IntEnum):
    FsrmReportLimit_MaxFiles = 1
    FsrmReportLimit_MaxFileGroups = 2
    FsrmReportLimit_MaxOwners = 3
    FsrmReportLimit_MaxFilesPerFileGroup = 4
    FsrmReportLimit_MaxFilesPerOwner = 5
    FsrmReportLimit_MaxFilesPerDuplGroup = 6
    FsrmReportLimit_MaxDuplicateGroups = 7
    FsrmReportLimit_MaxQuotas = 8
    FsrmReportLimit_MaxFileScreenEvents = 9
    FsrmReportLimit_MaxPropertyValues = 10
    FsrmReportLimit_MaxFilesPerPropertyValue = 11
    FsrmReportLimit_MaxFolders = 12


class GetReportSizeLimit_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("limit", 0, FsrmReportLimit)]


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


class SetReportSizeLimit_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("limit", 0, FsrmReportLimit),
        NDRFullPointerField(
            NDRPacketField("limitValue", wireVARIANTStr(), wireVARIANTStr)
        ),
    ]


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


IFSRMREPORTMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(EnumReportJobs_Request, EnumReportJobs_Response),
    8: DceRpcOp(CreateReportJob_Request, CreateReportJob_Response),
    9: DceRpcOp(GetReportJob_Request, GetReportJob_Response),
    10: DceRpcOp(GetOutputDirectory_Request, GetOutputDirectory_Response),
    11: DceRpcOp(SetOutputDirectory_Request, SetOutputDirectory_Response),
    12: DceRpcOp(
        IsFilterValidForReportType_Request, IsFilterValidForReportType_Response
    ),
    13: DceRpcOp(GetDefaultFilter_Request, GetDefaultFilter_Response),
    14: DceRpcOp(SetDefaultFilter_Request, SetDefaultFilter_Response),
    15: DceRpcOp(GetReportSizeLimit_Request, GetReportSizeLimit_Response),
    16: DceRpcOp(SetReportSizeLimit_Request, SetReportSizeLimit_Response),
}
register_dcerpc_interface(
    name="IFsrmReportManager",
    uuid=uuid.UUID("27b899fe-6ffa-4481-a184-d3daade8a02b"),
    version="1.0",
    opnums=IFSRMREPORTMANAGER_OPNUMS,
)


class get_IFsrmReportJob_Task_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmReportJob_Task_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("taskName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmReportJob_NamespaceRoots_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmReportJob_NamespaceRoots_Request(NDRPacket):
    fields_desc = [NDRPacketField("namespaceRoots", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmReportJob_Formats_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmReportJob_Formats_Request(NDRPacket):
    fields_desc = [NDRPacketField("formats", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmReportJob_MailTo_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmReportJob_MailTo_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailTo", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmReportJob_RunningStatus_Request(NDRPacket):
    fields_desc = []


class get_IFsrmReportJob_RunningStatus_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("runningStatus", 0, FsrmReportRunningStatus),
        NDRIntField("status", 0),
    ]


class get_IFsrmReportJob_LastRun_Request(NDRPacket):
    fields_desc = []


class get_IFsrmReportJob_LastRun_Response(NDRPacket):
    fields_desc = [NDRIEEEDoubleField("lastRun", 0), NDRIntField("status", 0)]


class get_IFsrmReportJob_LastError_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmReportJob_LastGeneratedInDirectory_Request(NDRPacket):
    fields_desc = []


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


class EnumReports_Request(NDRPacket):
    fields_desc = []


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


class CreateReport_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("reportType", 0, FsrmReportType)]


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


class Run_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("context", 0, FsrmReportGenerationContext)]


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


class WaitForCompletion_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("waitSeconds", 0)]


class WaitForCompletion_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("completed", 0), NDRIntField("status", 0)]


class Cancel_Request(NDRPacket):
    fields_desc = []


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


IFSRMREPORTJOB_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(get_IFsrmReportJob_Task_Request, get_IFsrmReportJob_Task_Response),
    13: DceRpcOp(put_IFsrmReportJob_Task_Request, put_IFsrmReportJob_Task_Response),
    14: DceRpcOp(
        get_IFsrmReportJob_NamespaceRoots_Request,
        get_IFsrmReportJob_NamespaceRoots_Response,
    ),
    15: DceRpcOp(
        put_IFsrmReportJob_NamespaceRoots_Request,
        put_IFsrmReportJob_NamespaceRoots_Response,
    ),
    16: DceRpcOp(
        get_IFsrmReportJob_Formats_Request, get_IFsrmReportJob_Formats_Response
    ),
    17: DceRpcOp(
        put_IFsrmReportJob_Formats_Request, put_IFsrmReportJob_Formats_Response
    ),
    18: DceRpcOp(get_IFsrmReportJob_MailTo_Request, get_IFsrmReportJob_MailTo_Response),
    19: DceRpcOp(put_IFsrmReportJob_MailTo_Request, put_IFsrmReportJob_MailTo_Response),
    20: DceRpcOp(
        get_IFsrmReportJob_RunningStatus_Request,
        get_IFsrmReportJob_RunningStatus_Response,
    ),
    21: DceRpcOp(
        get_IFsrmReportJob_LastRun_Request, get_IFsrmReportJob_LastRun_Response
    ),
    22: DceRpcOp(
        get_IFsrmReportJob_LastError_Request, get_IFsrmReportJob_LastError_Response
    ),
    23: DceRpcOp(
        get_IFsrmReportJob_LastGeneratedInDirectory_Request,
        get_IFsrmReportJob_LastGeneratedInDirectory_Response,
    ),
    24: DceRpcOp(EnumReports_Request, EnumReports_Response),
    25: DceRpcOp(CreateReport_Request, CreateReport_Response),
    26: DceRpcOp(Run_Request, Run_Response),
    27: DceRpcOp(WaitForCompletion_Request, WaitForCompletion_Response),
    28: DceRpcOp(Cancel_Request, Cancel_Response),
}
register_dcerpc_interface(
    name="IFsrmReportJob",
    uuid=uuid.UUID("38e87280-715c-4c7d-a280-ea1651a19fef"),
    version="1.0",
    opnums=IFSRMREPORTJOB_OPNUMS,
)


class get_IFsrmReport_Type_Request(NDRPacket):
    fields_desc = []


class get_IFsrmReport_Type_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("reportType", 0, FsrmReportType),
        NDRIntField("status", 0),
    ]


class get_IFsrmReport_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IFsrmReport_Description_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IFsrmReport_LastGeneratedFileNamePrefix_Request(NDRPacket):
    fields_desc = []


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


class GetFilter_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("filter", 0, FsrmReportFilter)]


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


class SetFilter_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("filter", 0, FsrmReportFilter),
        NDRFullPointerField(
            NDRPacketField("filterValue", wireVARIANTStr(), wireVARIANTStr)
        ),
    ]


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


class Delete_Request(NDRPacket):
    fields_desc = []


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


IFSRMREPORT_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmReport_Type_Request, get_IFsrmReport_Type_Response),
    8: DceRpcOp(get_IFsrmReport_Name_Request, get_IFsrmReport_Name_Response),
    9: DceRpcOp(put_IFsrmReport_Name_Request, put_IFsrmReport_Name_Response),
    10: DceRpcOp(
        get_IFsrmReport_Description_Request, get_IFsrmReport_Description_Response
    ),
    11: DceRpcOp(
        put_IFsrmReport_Description_Request, put_IFsrmReport_Description_Response
    ),
    12: DceRpcOp(
        get_IFsrmReport_LastGeneratedFileNamePrefix_Request,
        get_IFsrmReport_LastGeneratedFileNamePrefix_Response,
    ),
    13: DceRpcOp(GetFilter_Request, GetFilter_Response),
    14: DceRpcOp(SetFilter_Request, SetFilter_Response),
    15: DceRpcOp(Delete_Request, Delete_Response),
}
register_dcerpc_interface(
    name="IFsrmReport",
    uuid=uuid.UUID("d8cc81d9-46b8-4fa4-bfa5-4aa9dec9b638"),
    version="1.0",
    opnums=IFSRMREPORT_OPNUMS,
)


class get_IFsrmFileManagementJobManager_ActionVariables_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileManagementJobManager_ActionVariableDescriptions_Request(NDRPacket):
    fields_desc = []


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


class EnumFileManagementJobs_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("options", 0, FsrmEnumOptions)]


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


class CreateFileManagementJob_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMFILEMANAGEMENTJOBMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmFileManagementJobManager_ActionVariables_Request,
        get_IFsrmFileManagementJobManager_ActionVariables_Response,
    ),
    8: DceRpcOp(
        get_IFsrmFileManagementJobManager_ActionVariableDescriptions_Request,
        get_IFsrmFileManagementJobManager_ActionVariableDescriptions_Response,
    ),
    9: DceRpcOp(EnumFileManagementJobs_Request, EnumFileManagementJobs_Response),
    10: DceRpcOp(CreateFileManagementJob_Request, CreateFileManagementJob_Response),
    11: DceRpcOp(GetFileManagementJob_Request, GetFileManagementJob_Response),
}
register_dcerpc_interface(
    name="IFsrmFileManagementJobManager",
    uuid=uuid.UUID("ee321ecb-d95e-48e9-907c-c7685a013235"),
    version="1.0",
    opnums=IFSRMFILEMANAGEMENTJOBMANAGER_OPNUMS,
)


class get_IFsrmFileManagementJob_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IFsrmFileManagementJob_NamespaceRoots_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileManagementJob_NamespaceRoots_Request(NDRPacket):
    fields_desc = [NDRPacketField("namespaceRoots", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmFileManagementJob_Enabled_Request(NDRPacket):
    fields_desc = []


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


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


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


class FsrmFileManagementType(IntEnum):
    FsrmFileManagementType_Unknown = 0
    FsrmFileManagementType_Expiration = 1
    FsrmFileManagementType_Custom = 2
    FsrmFileManagementType_Rms = 3


class get_IFsrmFileManagementJob_OperationType_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileManagementJob_OperationType_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("operationType", 0, FsrmFileManagementType),
        NDRIntField("status", 0),
    ]


class put_IFsrmFileManagementJob_OperationType_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("operationType", 0, FsrmFileManagementType)]


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


class get_IFsrmFileManagementJob_ExpirationDirectory_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileManagementJob_ExpirationDirectory_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "expirationDirectory", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        )
    ]


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


class get_IFsrmFileManagementJob_CustomAction_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileManagementJob_Notifications_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileManagementJob_Logging_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileManagementJob_Logging_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("loggingFlags", 0), NDRIntField("status", 0)]


class put_IFsrmFileManagementJob_Logging_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("loggingFlags", 0)]


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


class get_IFsrmFileManagementJob_ReportEnabled_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileManagementJob_ReportEnabled_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("reportEnabled", 0), NDRIntField("status", 0)]


class put_IFsrmFileManagementJob_ReportEnabled_Request(NDRPacket):
    fields_desc = [NDRSignedShortField("reportEnabled", 0)]


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


class get_IFsrmFileManagementJob_Formats_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileManagementJob_Formats_Request(NDRPacket):
    fields_desc = [NDRPacketField("formats", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmFileManagementJob_MailTo_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileManagementJob_MailTo_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("mailTo", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmFileManagementJob_DaysSinceFileCreated_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileManagementJob_DaysSinceFileCreated_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("daysSinceCreation", 0), NDRIntField("status", 0)]


class put_IFsrmFileManagementJob_DaysSinceFileCreated_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("daysSinceCreation", 0)]


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


class get_IFsrmFileManagementJob_DaysSinceFileLastAccessed_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileManagementJob_DaysSinceFileLastAccessed_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("daysSinceAccess", 0), NDRIntField("status", 0)]


class put_IFsrmFileManagementJob_DaysSinceFileLastAccessed_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("daysSinceAccess", 0)]


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


class get_IFsrmFileManagementJob_DaysSinceFileLastModified_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileManagementJob_DaysSinceFileLastModified_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("daysSinceModify", 0), NDRIntField("status", 0)]


class put_IFsrmFileManagementJob_DaysSinceFileLastModified_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("daysSinceModify", 0)]


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


class get_IFsrmFileManagementJob_PropertyConditions_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileManagementJob_FromDate_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileManagementJob_FromDate_Response(NDRPacket):
    fields_desc = [NDRIEEEDoubleField("fromDate", 0), NDRIntField("status", 0)]


class put_IFsrmFileManagementJob_FromDate_Request(NDRPacket):
    fields_desc = [NDRIEEEDoubleField("fromDate", 0)]


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


class get_IFsrmFileManagementJob_Task_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileManagementJob_Task_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("taskName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IFsrmFileManagementJob_Parameters_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileManagementJob_Parameters_Request(NDRPacket):
    fields_desc = [NDRPacketField("parameters", SAFEARRAY(), SAFEARRAY)]


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


class get_IFsrmFileManagementJob_RunningStatus_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileManagementJob_RunningStatus_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("runningStatus", 0, FsrmReportRunningStatus),
        NDRIntField("status", 0),
    ]


class get_IFsrmFileManagementJob_LastError_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileManagementJob_LastReportPathWithoutExtension_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileManagementJob_LastRun_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileManagementJob_LastRun_Response(NDRPacket):
    fields_desc = [NDRIEEEDoubleField("lastRun", 0), NDRIntField("status", 0)]


class get_IFsrmFileManagementJob_FileNamePattern_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileManagementJob_FileNamePattern_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField(
                    "fileNamePattern", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
                )
            )
        )
    ]


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


class Run_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("context", 0, FsrmReportGenerationContext)]


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


class WaitForCompletion_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("waitSeconds", 0)]


class WaitForCompletion_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("completed", 0), NDRIntField("status", 0)]


class Cancel_Request(NDRPacket):
    fields_desc = []


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


class AddNotification_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("days", 0)]


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


class DeleteNotification_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("days", 0)]


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


class ModifyNotification_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("days", 0), NDRSignedIntField("newDays", 0)]


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


class CreateNotificationAction_Request(NDRPacket):
    fields_desc = [
        NDRSignedIntField("days", 0),
        NDRInt3264EnumField("actionType", 0, FsrmActionType),
    ]


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


class EnumNotificationActions_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("days", 0)]


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


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


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


class CreateCustomAction_Request(NDRPacket):
    fields_desc = []


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


IFSRMFILEMANAGEMENTJOB_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmFileManagementJob_Name_Request,
        get_IFsrmFileManagementJob_Name_Response,
    ),
    13: DceRpcOp(
        put_IFsrmFileManagementJob_Name_Request,
        put_IFsrmFileManagementJob_Name_Response,
    ),
    14: DceRpcOp(
        get_IFsrmFileManagementJob_NamespaceRoots_Request,
        get_IFsrmFileManagementJob_NamespaceRoots_Response,
    ),
    15: DceRpcOp(
        put_IFsrmFileManagementJob_NamespaceRoots_Request,
        put_IFsrmFileManagementJob_NamespaceRoots_Response,
    ),
    16: DceRpcOp(
        get_IFsrmFileManagementJob_Enabled_Request,
        get_IFsrmFileManagementJob_Enabled_Response,
    ),
    17: DceRpcOp(
        put_IFsrmFileManagementJob_Enabled_Request,
        put_IFsrmFileManagementJob_Enabled_Response,
    ),
    18: DceRpcOp(
        get_IFsrmFileManagementJob_OperationType_Request,
        get_IFsrmFileManagementJob_OperationType_Response,
    ),
    19: DceRpcOp(
        put_IFsrmFileManagementJob_OperationType_Request,
        put_IFsrmFileManagementJob_OperationType_Response,
    ),
    20: DceRpcOp(
        get_IFsrmFileManagementJob_ExpirationDirectory_Request,
        get_IFsrmFileManagementJob_ExpirationDirectory_Response,
    ),
    21: DceRpcOp(
        put_IFsrmFileManagementJob_ExpirationDirectory_Request,
        put_IFsrmFileManagementJob_ExpirationDirectory_Response,
    ),
    22: DceRpcOp(
        get_IFsrmFileManagementJob_CustomAction_Request,
        get_IFsrmFileManagementJob_CustomAction_Response,
    ),
    23: DceRpcOp(
        get_IFsrmFileManagementJob_Notifications_Request,
        get_IFsrmFileManagementJob_Notifications_Response,
    ),
    24: DceRpcOp(
        get_IFsrmFileManagementJob_Logging_Request,
        get_IFsrmFileManagementJob_Logging_Response,
    ),
    25: DceRpcOp(
        put_IFsrmFileManagementJob_Logging_Request,
        put_IFsrmFileManagementJob_Logging_Response,
    ),
    26: DceRpcOp(
        get_IFsrmFileManagementJob_ReportEnabled_Request,
        get_IFsrmFileManagementJob_ReportEnabled_Response,
    ),
    27: DceRpcOp(
        put_IFsrmFileManagementJob_ReportEnabled_Request,
        put_IFsrmFileManagementJob_ReportEnabled_Response,
    ),
    28: DceRpcOp(
        get_IFsrmFileManagementJob_Formats_Request,
        get_IFsrmFileManagementJob_Formats_Response,
    ),
    29: DceRpcOp(
        put_IFsrmFileManagementJob_Formats_Request,
        put_IFsrmFileManagementJob_Formats_Response,
    ),
    30: DceRpcOp(
        get_IFsrmFileManagementJob_MailTo_Request,
        get_IFsrmFileManagementJob_MailTo_Response,
    ),
    31: DceRpcOp(
        put_IFsrmFileManagementJob_MailTo_Request,
        put_IFsrmFileManagementJob_MailTo_Response,
    ),
    32: DceRpcOp(
        get_IFsrmFileManagementJob_DaysSinceFileCreated_Request,
        get_IFsrmFileManagementJob_DaysSinceFileCreated_Response,
    ),
    33: DceRpcOp(
        put_IFsrmFileManagementJob_DaysSinceFileCreated_Request,
        put_IFsrmFileManagementJob_DaysSinceFileCreated_Response,
    ),
    34: DceRpcOp(
        get_IFsrmFileManagementJob_DaysSinceFileLastAccessed_Request,
        get_IFsrmFileManagementJob_DaysSinceFileLastAccessed_Response,
    ),
    35: DceRpcOp(
        put_IFsrmFileManagementJob_DaysSinceFileLastAccessed_Request,
        put_IFsrmFileManagementJob_DaysSinceFileLastAccessed_Response,
    ),
    36: DceRpcOp(
        get_IFsrmFileManagementJob_DaysSinceFileLastModified_Request,
        get_IFsrmFileManagementJob_DaysSinceFileLastModified_Response,
    ),
    37: DceRpcOp(
        put_IFsrmFileManagementJob_DaysSinceFileLastModified_Request,
        put_IFsrmFileManagementJob_DaysSinceFileLastModified_Response,
    ),
    38: DceRpcOp(
        get_IFsrmFileManagementJob_PropertyConditions_Request,
        get_IFsrmFileManagementJob_PropertyConditions_Response,
    ),
    39: DceRpcOp(
        get_IFsrmFileManagementJob_FromDate_Request,
        get_IFsrmFileManagementJob_FromDate_Response,
    ),
    40: DceRpcOp(
        put_IFsrmFileManagementJob_FromDate_Request,
        put_IFsrmFileManagementJob_FromDate_Response,
    ),
    41: DceRpcOp(
        get_IFsrmFileManagementJob_Task_Request,
        get_IFsrmFileManagementJob_Task_Response,
    ),
    42: DceRpcOp(
        put_IFsrmFileManagementJob_Task_Request,
        put_IFsrmFileManagementJob_Task_Response,
    ),
    43: DceRpcOp(
        get_IFsrmFileManagementJob_Parameters_Request,
        get_IFsrmFileManagementJob_Parameters_Response,
    ),
    44: DceRpcOp(
        put_IFsrmFileManagementJob_Parameters_Request,
        put_IFsrmFileManagementJob_Parameters_Response,
    ),
    45: DceRpcOp(
        get_IFsrmFileManagementJob_RunningStatus_Request,
        get_IFsrmFileManagementJob_RunningStatus_Response,
    ),
    46: DceRpcOp(
        get_IFsrmFileManagementJob_LastError_Request,
        get_IFsrmFileManagementJob_LastError_Response,
    ),
    47: DceRpcOp(
        get_IFsrmFileManagementJob_LastReportPathWithoutExtension_Request,
        get_IFsrmFileManagementJob_LastReportPathWithoutExtension_Response,
    ),
    48: DceRpcOp(
        get_IFsrmFileManagementJob_LastRun_Request,
        get_IFsrmFileManagementJob_LastRun_Response,
    ),
    49: DceRpcOp(
        get_IFsrmFileManagementJob_FileNamePattern_Request,
        get_IFsrmFileManagementJob_FileNamePattern_Response,
    ),
    50: DceRpcOp(
        put_IFsrmFileManagementJob_FileNamePattern_Request,
        put_IFsrmFileManagementJob_FileNamePattern_Response,
    ),
    51: DceRpcOp(Run_Request, Run_Response),
    52: DceRpcOp(WaitForCompletion_Request, WaitForCompletion_Response),
    53: DceRpcOp(Cancel_Request, Cancel_Response),
    54: DceRpcOp(AddNotification_Request, AddNotification_Response),
    55: DceRpcOp(DeleteNotification_Request, DeleteNotification_Response),
    56: DceRpcOp(ModifyNotification_Request, ModifyNotification_Response),
    57: DceRpcOp(CreateNotificationAction_Request, CreateNotificationAction_Response),
    58: DceRpcOp(EnumNotificationActions_Request, EnumNotificationActions_Response),
    59: DceRpcOp(CreatePropertyCondition_Request, CreatePropertyCondition_Response),
    60: DceRpcOp(CreateCustomAction_Request, CreateCustomAction_Response),
}
register_dcerpc_interface(
    name="IFsrmFileManagementJob",
    uuid=uuid.UUID("0770687e-9f36-4d6f-8778-599d188461c9"),
    version="1.0",
    opnums=IFSRMFILEMANAGEMENTJOB_OPNUMS,
)


class get_IFsrmPropertyCondition_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class FsrmPropertyConditionType(IntEnum):
    FsrmPropertyConditionType_Unknown = 0
    FsrmPropertyConditionType_Equal = 1
    FsrmPropertyConditionType_NotEqual = 2
    FsrmPropertyConditionType_GreaterThan = 3
    FsrmPropertyConditionType_LessThan = 4
    FsrmPropertyConditionType_Contain = 5
    FsrmPropertyConditionType_Exist = 6
    FsrmPropertyConditionType_NotExist = 7
    FsrmPropertyConditionType_StartWith = 8
    FsrmPropertyConditionType_EndWith = 9
    FsrmPropertyConditionType_ContainedIn = 10
    FsrmPropertyConditionType_PrefixOf = 11
    FsrmPropertyConditionType_SuffixOf = 12


class get_IFsrmPropertyCondition_Type_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPropertyCondition_Type_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("type", 0, FsrmPropertyConditionType)]


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


class get_IFsrmPropertyCondition_Value_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmPropertyCondition_Value_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("value", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class Delete_Request(NDRPacket):
    fields_desc = []


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


IFSRMPROPERTYCONDITION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmPropertyCondition_Name_Request,
        get_IFsrmPropertyCondition_Name_Response,
    ),
    8: DceRpcOp(
        put_IFsrmPropertyCondition_Name_Request,
        put_IFsrmPropertyCondition_Name_Response,
    ),
    9: DceRpcOp(
        get_IFsrmPropertyCondition_Type_Request,
        get_IFsrmPropertyCondition_Type_Response,
    ),
    10: DceRpcOp(
        put_IFsrmPropertyCondition_Type_Request,
        put_IFsrmPropertyCondition_Type_Response,
    ),
    11: DceRpcOp(
        get_IFsrmPropertyCondition_Value_Request,
        get_IFsrmPropertyCondition_Value_Response,
    ),
    12: DceRpcOp(
        put_IFsrmPropertyCondition_Value_Request,
        put_IFsrmPropertyCondition_Value_Response,
    ),
    13: DceRpcOp(Delete_Request, Delete_Response),
}
register_dcerpc_interface(
    name="IFsrmPropertyCondition",
    uuid=uuid.UUID("326af66f-2ac0-4f68-bf8c-4759f054fa29"),
    version="1.0",
    opnums=IFSRMPROPERTYCONDITION_OPNUMS,
)


class VerifyNamespaces_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("namespacesSafeArray", wireVARIANTStr(), wireVARIANTStr)
            )
        )
    ]


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


class CreateScheduleTask_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("taskName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("namespacesSafeArray", wireVARIANTStr(), wireVARIANTStr)
            )
        ),
        NDRFullPointerField(
            NDRPacketField("serializedTask", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


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


class ModifyScheduleTask_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("taskName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("namespacesSafeArray", wireVARIANTStr(), wireVARIANTStr)
            )
        ),
        NDRFullPointerField(
            NDRPacketField("serializedTask", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


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


class DeleteScheduleTask_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("taskName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IFSRMREPORTSCHEDULER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(VerifyNamespaces_Request, VerifyNamespaces_Response),
    8: DceRpcOp(CreateScheduleTask_Request, CreateScheduleTask_Response),
    9: DceRpcOp(ModifyScheduleTask_Request, ModifyScheduleTask_Response),
    10: DceRpcOp(DeleteScheduleTask_Request, DeleteScheduleTask_Response),
}
register_dcerpc_interface(
    name="IFsrmReportScheduler",
    uuid=uuid.UUID("6879caf9-6617-4484-8719-71c3d8645f94"),
    version="1.0",
    opnums=IFSRMREPORTSCHEDULER_OPNUMS,
)


class get_IFsrmFileGroup_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IFsrmFileGroup_Members_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileGroup_Members_Request(NDRPacket):
    fields_desc = [NDRPacketField("members", MInterfacePointer(), MInterfacePointer)]


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


class get_IFsrmFileGroup_NonMembers_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileGroup_NonMembers_Request(NDRPacket):
    fields_desc = [NDRPacketField("nonMembers", MInterfacePointer(), MInterfacePointer)]


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


IFSRMFILEGROUP_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(get_IFsrmFileGroup_Name_Request, get_IFsrmFileGroup_Name_Response),
    13: DceRpcOp(put_IFsrmFileGroup_Name_Request, put_IFsrmFileGroup_Name_Response),
    14: DceRpcOp(
        get_IFsrmFileGroup_Members_Request, get_IFsrmFileGroup_Members_Response
    ),
    15: DceRpcOp(
        put_IFsrmFileGroup_Members_Request, put_IFsrmFileGroup_Members_Response
    ),
    16: DceRpcOp(
        get_IFsrmFileGroup_NonMembers_Request, get_IFsrmFileGroup_NonMembers_Response
    ),
    17: DceRpcOp(
        put_IFsrmFileGroup_NonMembers_Request, put_IFsrmFileGroup_NonMembers_Response
    ),
}
register_com_interface(
    name="IFsrmFileGroup",
    uuid=uuid.UUID("8dd04909-0e34-4d55-afaa-89e1f1a1bbb9"),
    opnums=IFSRMFILEGROUP_OPNUMS,
)


class get_IFsrmFileGroupImported_OverwriteOnCommit_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMFILEGROUPIMPORTED_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(get_IFsrmFileGroup_Name_Request, get_IFsrmFileGroup_Name_Response),
    13: DceRpcOp(put_IFsrmFileGroup_Name_Request, put_IFsrmFileGroup_Name_Response),
    14: DceRpcOp(
        get_IFsrmFileGroup_Members_Request, get_IFsrmFileGroup_Members_Response
    ),
    15: DceRpcOp(
        put_IFsrmFileGroup_Members_Request, put_IFsrmFileGroup_Members_Response
    ),
    16: DceRpcOp(
        get_IFsrmFileGroup_NonMembers_Request, get_IFsrmFileGroup_NonMembers_Response
    ),
    17: DceRpcOp(
        put_IFsrmFileGroup_NonMembers_Request, put_IFsrmFileGroup_NonMembers_Response
    ),
    18: DceRpcOp(
        get_IFsrmFileGroupImported_OverwriteOnCommit_Request,
        get_IFsrmFileGroupImported_OverwriteOnCommit_Response,
    ),
    19: DceRpcOp(
        put_IFsrmFileGroupImported_OverwriteOnCommit_Request,
        put_IFsrmFileGroupImported_OverwriteOnCommit_Response,
    ),
}
register_com_interface(
    name="IFsrmFileGroupImported",
    uuid=uuid.UUID("ad55f10b-5f11-4be7-94ef-d9ee2e470ded"),
    opnums=IFSRMFILEGROUPIMPORTED_OPNUMS,
)


class CreateFileGroup_Request(NDRPacket):
    fields_desc = []


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


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


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


class EnumFileGroups_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("options", 0, FsrmEnumOptions)]


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


class ExportFileGroups_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("fileGroupNamesArray", wireVARIANTStr(), wireVARIANTStr)
            )
        )
    ]


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


class ImportFileGroups_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "serializedFileGroups", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        ),
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("fileGroupNamesArray", wireVARIANTStr(), wireVARIANTStr)
            )
        ),
    ]


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


IFSRMFILEGROUPMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(CreateFileGroup_Request, CreateFileGroup_Response),
    8: DceRpcOp(GetFileGroup_Request, GetFileGroup_Response),
    9: DceRpcOp(EnumFileGroups_Request, EnumFileGroups_Response),
    10: DceRpcOp(ExportFileGroups_Request, ExportFileGroups_Response),
    11: DceRpcOp(ImportFileGroups_Request, ImportFileGroups_Response),
}
register_com_interface(
    name="IFsrmFileGroupManager",
    uuid=uuid.UUID("426677d5-018c-485c-8a51-20b86d00bdc4"),
    opnums=IFSRMFILEGROUPMANAGER_OPNUMS,
)


class get_IFsrmFileScreenBase_BlockedFileGroups_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileScreenBase_BlockedFileGroups_Request(NDRPacket):
    fields_desc = [NDRPacketField("blockList", MInterfacePointer(), MInterfacePointer)]


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


class get_IFsrmFileScreenBase_FileScreenFlags_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileScreenBase_FileScreenFlags_Response(NDRPacket):
    fields_desc = [NDRSignedIntField("fileScreenFlags", 0), NDRIntField("status", 0)]


class put_IFsrmFileScreenBase_FileScreenFlags_Request(NDRPacket):
    fields_desc = [NDRSignedIntField("fileScreenFlags", 0)]


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


class CreateAction_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("actionType", 0, FsrmActionType)]


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


class EnumActions_Request(NDRPacket):
    fields_desc = []


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


IFSRMFILESCREENBASE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmFileScreenBase_BlockedFileGroups_Request,
        get_IFsrmFileScreenBase_BlockedFileGroups_Response,
    ),
    13: DceRpcOp(
        put_IFsrmFileScreenBase_BlockedFileGroups_Request,
        put_IFsrmFileScreenBase_BlockedFileGroups_Response,
    ),
    14: DceRpcOp(
        get_IFsrmFileScreenBase_FileScreenFlags_Request,
        get_IFsrmFileScreenBase_FileScreenFlags_Response,
    ),
    15: DceRpcOp(
        put_IFsrmFileScreenBase_FileScreenFlags_Request,
        put_IFsrmFileScreenBase_FileScreenFlags_Response,
    ),
    16: DceRpcOp(CreateAction_Request, CreateAction_Response),
    17: DceRpcOp(EnumActions_Request, EnumActions_Response),
}
register_com_interface(
    name="IFsrmFileScreenBase",
    uuid=uuid.UUID("f3637e80-5b22-4a2b-a637-bbb642b41cfc"),
    opnums=IFSRMFILESCREENBASE_OPNUMS,
)


class get_IFsrmFileScreen_Path_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileScreen_SourceTemplateName_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileScreen_MatchesSourceTemplate_Request(NDRPacket):
    fields_desc = []


class get_IFsrmFileScreen_MatchesSourceTemplate_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("matches", 0), NDRIntField("status", 0)]


class get_IFsrmFileScreen_UserSid_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileScreen_UserAccount_Request(NDRPacket):
    fields_desc = []


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


class ApplyTemplate_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "fileScreenTemplateName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        )
    ]


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


IFSRMFILESCREEN_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmFileScreenBase_BlockedFileGroups_Request,
        get_IFsrmFileScreenBase_BlockedFileGroups_Response,
    ),
    13: DceRpcOp(
        put_IFsrmFileScreenBase_BlockedFileGroups_Request,
        put_IFsrmFileScreenBase_BlockedFileGroups_Response,
    ),
    14: DceRpcOp(
        get_IFsrmFileScreenBase_FileScreenFlags_Request,
        get_IFsrmFileScreenBase_FileScreenFlags_Response,
    ),
    15: DceRpcOp(
        put_IFsrmFileScreenBase_FileScreenFlags_Request,
        put_IFsrmFileScreenBase_FileScreenFlags_Response,
    ),
    16: DceRpcOp(CreateAction_Request, CreateAction_Response),
    17: DceRpcOp(EnumActions_Request, EnumActions_Response),
    18: DceRpcOp(get_IFsrmFileScreen_Path_Request, get_IFsrmFileScreen_Path_Response),
    19: DceRpcOp(
        get_IFsrmFileScreen_SourceTemplateName_Request,
        get_IFsrmFileScreen_SourceTemplateName_Response,
    ),
    20: DceRpcOp(
        get_IFsrmFileScreen_MatchesSourceTemplate_Request,
        get_IFsrmFileScreen_MatchesSourceTemplate_Response,
    ),
    21: DceRpcOp(
        get_IFsrmFileScreen_UserSid_Request, get_IFsrmFileScreen_UserSid_Response
    ),
    22: DceRpcOp(
        get_IFsrmFileScreen_UserAccount_Request,
        get_IFsrmFileScreen_UserAccount_Response,
    ),
    23: DceRpcOp(ApplyTemplate_Request, ApplyTemplate_Response),
}
register_com_interface(
    name="IFsrmFileScreen",
    uuid=uuid.UUID("5f6325d3-ce88-4733-84c1-2d6aefc5ea07"),
    opnums=IFSRMFILESCREEN_OPNUMS,
)


class get_IFsrmFileScreenException_Path_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileScreenException_AllowedFileGroups_Request(NDRPacket):
    fields_desc = []


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


class put_IFsrmFileScreenException_AllowedFileGroups_Request(NDRPacket):
    fields_desc = [NDRPacketField("allowList", MInterfacePointer(), MInterfacePointer)]


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


IFSRMFILESCREENEXCEPTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmFileScreenException_Path_Request,
        get_IFsrmFileScreenException_Path_Response,
    ),
    13: DceRpcOp(
        get_IFsrmFileScreenException_AllowedFileGroups_Request,
        get_IFsrmFileScreenException_AllowedFileGroups_Response,
    ),
    14: DceRpcOp(
        put_IFsrmFileScreenException_AllowedFileGroups_Request,
        put_IFsrmFileScreenException_AllowedFileGroups_Response,
    ),
}
register_com_interface(
    name="IFsrmFileScreenException",
    uuid=uuid.UUID("bee7ce02-df77-4515-9389-78f01c5afc1a"),
    opnums=IFSRMFILESCREENEXCEPTION_OPNUMS,
)


class get_IFsrmFileScreenManager_ActionVariables_Request(NDRPacket):
    fields_desc = []


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


class get_IFsrmFileScreenManager_ActionVariableDescriptions_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


class EnumFileScreens_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRInt3264EnumField("options", 0, FsrmEnumOptions),
    ]


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


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


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


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


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


class EnumFileScreenExceptions_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRInt3264EnumField("options", 0, FsrmEnumOptions),
    ]


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


class CreateFileScreenCollection_Request(NDRPacket):
    fields_desc = []


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


IFSRMFILESCREENMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(
        get_IFsrmFileScreenManager_ActionVariables_Request,
        get_IFsrmFileScreenManager_ActionVariables_Response,
    ),
    8: DceRpcOp(
        get_IFsrmFileScreenManager_ActionVariableDescriptions_Request,
        get_IFsrmFileScreenManager_ActionVariableDescriptions_Response,
    ),
    9: DceRpcOp(CreateFileScreen_Request, CreateFileScreen_Response),
    10: DceRpcOp(GetFileScreen_Request, GetFileScreen_Response),
    11: DceRpcOp(EnumFileScreens_Request, EnumFileScreens_Response),
    12: DceRpcOp(CreateFileScreenException_Request, CreateFileScreenException_Response),
    13: DceRpcOp(GetFileScreenException_Request, GetFileScreenException_Response),
    14: DceRpcOp(EnumFileScreenExceptions_Request, EnumFileScreenExceptions_Response),
    15: DceRpcOp(
        CreateFileScreenCollection_Request, CreateFileScreenCollection_Response
    ),
}
register_com_interface(
    name="IFsrmFileScreenManager",
    uuid=uuid.UUID("ff4fa04e-5a94-4bda-a3a0-d5b4d3c52eba"),
    opnums=IFSRMFILESCREENMANAGER_OPNUMS,
)


class get_IFsrmFileScreenTemplate_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class CopyTemplate_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "fileScreenTemplateName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        )
    ]


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


class CommitAndUpdateDerived_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("commitOptions", 0, FsrmCommitOptions),
        NDRInt3264EnumField("applyOptions", 0, FsrmTemplateApplyOptions),
    ]


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


IFSRMFILESCREENTEMPLATE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmFileScreenBase_BlockedFileGroups_Request,
        get_IFsrmFileScreenBase_BlockedFileGroups_Response,
    ),
    13: DceRpcOp(
        put_IFsrmFileScreenBase_BlockedFileGroups_Request,
        put_IFsrmFileScreenBase_BlockedFileGroups_Response,
    ),
    14: DceRpcOp(
        get_IFsrmFileScreenBase_FileScreenFlags_Request,
        get_IFsrmFileScreenBase_FileScreenFlags_Response,
    ),
    15: DceRpcOp(
        put_IFsrmFileScreenBase_FileScreenFlags_Request,
        put_IFsrmFileScreenBase_FileScreenFlags_Response,
    ),
    16: DceRpcOp(CreateAction_Request, CreateAction_Response),
    17: DceRpcOp(EnumActions_Request, EnumActions_Response),
    18: DceRpcOp(
        get_IFsrmFileScreenTemplate_Name_Request,
        get_IFsrmFileScreenTemplate_Name_Response,
    ),
    19: DceRpcOp(
        put_IFsrmFileScreenTemplate_Name_Request,
        put_IFsrmFileScreenTemplate_Name_Response,
    ),
    20: DceRpcOp(CopyTemplate_Request, CopyTemplate_Response),
    21: DceRpcOp(CommitAndUpdateDerived_Request, CommitAndUpdateDerived_Response),
}
register_com_interface(
    name="IFsrmFileScreenTemplate",
    uuid=uuid.UUID("205bebf8-dd93-452a-95a6-32b566b35828"),
    opnums=IFSRMFILESCREENTEMPLATE_OPNUMS,
)


class get_IFsrmFileScreenTemplateImported_OverwriteOnCommit_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMFILESCREENTEMPLATEIMPORTED_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(get_IFsrmObject_Id_Request, get_IFsrmObject_Id_Response),
    8: DceRpcOp(
        get_IFsrmObject_Description_Request, get_IFsrmObject_Description_Response
    ),
    9: DceRpcOp(
        put_IFsrmObject_Description_Request, put_IFsrmObject_Description_Response
    ),
    10: DceRpcOp(Delete_Request, Delete_Response),
    11: DceRpcOp(Commit_Request, Commit_Response),
    12: DceRpcOp(
        get_IFsrmFileScreenBase_BlockedFileGroups_Request,
        get_IFsrmFileScreenBase_BlockedFileGroups_Response,
    ),
    13: DceRpcOp(
        put_IFsrmFileScreenBase_BlockedFileGroups_Request,
        put_IFsrmFileScreenBase_BlockedFileGroups_Response,
    ),
    14: DceRpcOp(
        get_IFsrmFileScreenBase_FileScreenFlags_Request,
        get_IFsrmFileScreenBase_FileScreenFlags_Response,
    ),
    15: DceRpcOp(
        put_IFsrmFileScreenBase_FileScreenFlags_Request,
        put_IFsrmFileScreenBase_FileScreenFlags_Response,
    ),
    16: DceRpcOp(CreateAction_Request, CreateAction_Response),
    17: DceRpcOp(EnumActions_Request, EnumActions_Response),
    18: DceRpcOp(
        get_IFsrmFileScreenTemplate_Name_Request,
        get_IFsrmFileScreenTemplate_Name_Response,
    ),
    19: DceRpcOp(
        put_IFsrmFileScreenTemplate_Name_Request,
        put_IFsrmFileScreenTemplate_Name_Response,
    ),
    20: DceRpcOp(CopyTemplate_Request, CopyTemplate_Response),
    21: DceRpcOp(CommitAndUpdateDerived_Request, CommitAndUpdateDerived_Response),
    22: DceRpcOp(
        get_IFsrmFileScreenTemplateImported_OverwriteOnCommit_Request,
        get_IFsrmFileScreenTemplateImported_OverwriteOnCommit_Response,
    ),
    23: DceRpcOp(
        put_IFsrmFileScreenTemplateImported_OverwriteOnCommit_Request,
        put_IFsrmFileScreenTemplateImported_OverwriteOnCommit_Response,
    ),
}
register_com_interface(
    name="IFsrmFileScreenTemplateImported",
    uuid=uuid.UUID("e1010359-3e5d-4ecd-9fe4-ef48622fdf30"),
    opnums=IFSRMFILESCREENTEMPLATEIMPORTED_OPNUMS,
)


class CreateTemplate_Request(NDRPacket):
    fields_desc = []


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


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


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


class EnumTemplates_Request(NDRPacket):
    fields_desc = [NDRInt3264EnumField("options", 0, FsrmEnumOptions)]


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


class ExportTemplates_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField(
                    "fileScreenTemplateNamesArray", wireVARIANTStr(), wireVARIANTStr
                )
            )
        )
    ]


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


class ImportTemplates_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "serializedFileScreenTemplates", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        ),
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField(
                    "fileScreenTemplateNamesArray", wireVARIANTStr(), wireVARIANTStr
                )
            )
        ),
    ]


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


IFSRMFILESCREENTEMPLATEMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetTypeInfoCount_Request, GetTypeInfoCount_Response),
    4: DceRpcOp(GetTypeInfo_Request, GetTypeInfo_Response),
    5: DceRpcOp(GetIDsOfNames_Request, GetIDsOfNames_Response),
    6: DceRpcOp(Invoke_Request, Invoke_Response),
    7: DceRpcOp(CreateTemplate_Request, CreateTemplate_Response),
    8: DceRpcOp(GetTemplate_Request, GetTemplate_Response),
    9: DceRpcOp(EnumTemplates_Request, EnumTemplates_Response),
    10: DceRpcOp(ExportTemplates_Request, ExportTemplates_Response),
    11: DceRpcOp(ImportTemplates_Request, ImportTemplates_Response),
}
register_com_interface(
    name="IFsrmFileScreenTemplateManager",
    uuid=uuid.UUID("cfe36cba-1949-4e74-a14f-f1d580ceaf13"),
    opnums=IFSRMFILESCREENTEMPLATEMANAGER_OPNUMS,
)
