### ms-fsrm.idl
"""
RPC definitions for the following interfaces:
- 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,
    NDRFullPointerField,
    NDRIEEEDoubleField,
    NDRInt3264EnumField,
    NDRIntField,
    NDRPacketField,
    NDRRecursiveField,
    NDRRefEmbPointerField,
    NDRShortField,
    NDRSignedIntField,
    NDRSignedLongField,
    NDRSignedShortField,
    NDRUnionField,
    register_com_interface,
    register_dcerpc_interface,
)


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


class get_Id_Request(NDRPacket):
    fields_desc = []


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


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


class get_Description_Request(NDRPacket):
    fields_desc = []


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


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


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


class 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: DceRpcOp(get_Id_Request, get_Id_Response),
    1: DceRpcOp(get_Description_Request, get_Description_Response),
    2: DceRpcOp(put_Description_Request, put_Description_Response),
    3: DceRpcOp(Delete_Request, Delete_Response),
    4: DceRpcOp(Commit_Request, Commit_Response),
}
register_com_interface(
    name="IFsrmObject",
    uuid=uuid.UUID("22bcef93-4a3f-4183-89f9-2f8b8a628aee"),
    opnums=IFSRMOBJECT_OPNUMS,
)


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


class get__NewEnum_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


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


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


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


class get_Count_Request(NDRPacket):
    fields_desc = []


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


class get_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(NDRPacketField("entry", wireVARIANTStr(), wireVARIANTStr)),
        NDRIntField("status", 0),
    ]


IFSRMCOLLECTION_OPNUMS = {
    0: DceRpcOp(get__NewEnum_Request, get__NewEnum_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(get_Count_Request, get_Count_Response),
    3: DceRpcOp(get_State_Request, get_State_Response),
    4: DceRpcOp(Cancel_Request, Cancel_Response),
    5: DceRpcOp(WaitForCompletion_Request, WaitForCompletion_Response),
    6: 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 = [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: DceRpcOp(Add_Request, Add_Response),
    1: DceRpcOp(Remove_Request, Remove_Response),
    2: DceRpcOp(RemoveById_Request, RemoveById_Response),
    3: 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: DceRpcOp(Commit_Request, Commit_Response)}
register_com_interface(
    name="IFsrmCommittableCollection",
    uuid=uuid.UUID("96deb3b5-8b91-4a2a-9d93-80a35d8aa847"),
    opnums=IFSRMCOMMITTABLECOLLECTION_OPNUMS,
)


class get_Id_Request(NDRPacket):
    fields_desc = []


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


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


class get_RunLimitInterval_Request(NDRPacket):
    fields_desc = []


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


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


class put_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: DceRpcOp(get_Id_Request, get_Id_Response),
    1: DceRpcOp(get_ActionType_Request, get_ActionType_Response),
    2: DceRpcOp(get_RunLimitInterval_Request, get_RunLimitInterval_Response),
    3: DceRpcOp(put_RunLimitInterval_Request, put_RunLimitInterval_Response),
    4: DceRpcOp(Delete_Request, Delete_Response),
}
register_com_interface(
    name="IFsrmAction",
    uuid=uuid.UUID("6cd6408a-ae60-463b-9ef1-e117534d69dc"),
    opnums=IFSRMACTION_OPNUMS,
)


class get_MailFrom_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MailReplyTo_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MailTo_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MailCc_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MailBcc_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MailSubject_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MessageText_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMACTIONEMAIL_OPNUMS = {
    0: DceRpcOp(get_MailFrom_Request, get_MailFrom_Response),
    1: DceRpcOp(put_MailFrom_Request, put_MailFrom_Response),
    2: DceRpcOp(get_MailReplyTo_Request, get_MailReplyTo_Response),
    3: DceRpcOp(put_MailReplyTo_Request, put_MailReplyTo_Response),
    4: DceRpcOp(get_MailTo_Request, get_MailTo_Response),
    5: DceRpcOp(put_MailTo_Request, put_MailTo_Response),
    6: DceRpcOp(get_MailCc_Request, get_MailCc_Response),
    7: DceRpcOp(put_MailCc_Request, put_MailCc_Response),
    8: DceRpcOp(get_MailBcc_Request, get_MailBcc_Response),
    9: DceRpcOp(put_MailBcc_Request, put_MailBcc_Response),
    10: DceRpcOp(get_MailSubject_Request, get_MailSubject_Response),
    11: DceRpcOp(put_MailSubject_Request, put_MailSubject_Response),
    12: DceRpcOp(get_MessageText_Request, get_MessageText_Response),
    13: DceRpcOp(put_MessageText_Request, put_MessageText_Response),
}
register_com_interface(
    name="IFsrmActionEmail",
    uuid=uuid.UUID("d646567d-26ae-4caa-9f84-4e0aad207fca"),
    opnums=IFSRMACTIONEMAIL_OPNUMS,
)


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


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


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


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
            ),
            deferred=True,
        ),
        NDRPacketField("iid", GUID(), GUID),
    ]


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


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


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


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


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


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


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


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


class get_MailTo_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMACTIONREPORT_OPNUMS = {
    0: DceRpcOp(get_ReportTypes_Request, get_ReportTypes_Response),
    1: DceRpcOp(put_ReportTypes_Request, put_ReportTypes_Response),
    2: DceRpcOp(get_MailTo_Request, get_MailTo_Response),
    3: DceRpcOp(put_MailTo_Request, put_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_EventType_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MessageText_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMACTIONEVENTLOG_OPNUMS = {
    0: DceRpcOp(get_EventType_Request, get_EventType_Response),
    1: DceRpcOp(put_EventType_Request, put_EventType_Response),
    2: DceRpcOp(get_MessageText_Request, get_MessageText_Response),
    3: DceRpcOp(put_MessageText_Request, put_MessageText_Response),
}
register_com_interface(
    name="IFsrmActionEventLog",
    uuid=uuid.UUID("4c8f96c3-5d94-4f37-a4f4-f56ab463546f"),
    opnums=IFSRMACTIONEVENTLOG_OPNUMS,
)


class get_ExecutablePath_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Arguments_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


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


class get_WorkingDirectory_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MonitorCommand_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_KillTimeOut_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_LogResult_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMACTIONCOMMAND_OPNUMS = {
    0: DceRpcOp(get_ExecutablePath_Request, get_ExecutablePath_Response),
    1: DceRpcOp(put_ExecutablePath_Request, put_ExecutablePath_Response),
    2: DceRpcOp(get_Arguments_Request, get_Arguments_Response),
    3: DceRpcOp(put_Arguments_Request, put_Arguments_Response),
    4: DceRpcOp(get_Account_Request, get_Account_Response),
    5: DceRpcOp(put_Account_Request, put_Account_Response),
    6: DceRpcOp(get_WorkingDirectory_Request, get_WorkingDirectory_Response),
    7: DceRpcOp(put_WorkingDirectory_Request, put_WorkingDirectory_Response),
    8: DceRpcOp(get_MonitorCommand_Request, get_MonitorCommand_Response),
    9: DceRpcOp(put_MonitorCommand_Request, put_MonitorCommand_Response),
    10: DceRpcOp(get_KillTimeOut_Request, get_KillTimeOut_Response),
    11: DceRpcOp(put_KillTimeOut_Request, put_KillTimeOut_Response),
    12: DceRpcOp(get_LogResult_Request, get_LogResult_Response),
    13: DceRpcOp(put_LogResult_Request, put_LogResult_Response),
}
register_com_interface(
    name="IFsrmActionCommand",
    uuid=uuid.UUID("12937789-e247-4917-9c20-f3ee9c7ee783"),
    opnums=IFSRMACTIONCOMMAND_OPNUMS,
)


class get_SmtpServer_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MailFrom_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_AdminEmail_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_DisableCommandLine_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_EnableScreeningAudit_Request(NDRPacket):
    fields_desc = []


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


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


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


class EmailTest_Request(NDRPacket):
    fields_desc = [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: DceRpcOp(get_SmtpServer_Request, get_SmtpServer_Response),
    1: DceRpcOp(put_SmtpServer_Request, put_SmtpServer_Response),
    2: DceRpcOp(get_MailFrom_Request, get_MailFrom_Response),
    3: DceRpcOp(put_MailFrom_Request, put_MailFrom_Response),
    4: DceRpcOp(get_AdminEmail_Request, get_AdminEmail_Response),
    5: DceRpcOp(put_AdminEmail_Request, put_AdminEmail_Response),
    6: DceRpcOp(get_DisableCommandLine_Request, get_DisableCommandLine_Response),
    7: DceRpcOp(put_DisableCommandLine_Request, put_DisableCommandLine_Response),
    8: DceRpcOp(get_EnableScreeningAudit_Request, get_EnableScreeningAudit_Response),
    9: DceRpcOp(put_EnableScreeningAudit_Request, put_EnableScreeningAudit_Response),
    10: DceRpcOp(EmailTest_Request, EmailTest_Response),
    11: DceRpcOp(SetActionRunLimitInterval_Request, SetActionRunLimitInterval_Response),
    12: 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 = [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: DceRpcOp(GetSharePathsForLocalPath_Request, GetSharePathsForLocalPath_Response)
}
register_com_interface(
    name="IFsrmPathMapper",
    uuid=uuid.UUID("6f4dbfff-6920-4821-a6c3-b7e94c1fd60c"),
    opnums=IFSRMPATHMAPPER_OPNUMS,
)


class get_AttachmentFileListSize_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMACTIONEMAIL2_OPNUMS = {
    0: DceRpcOp(
        get_AttachmentFileListSize_Request, get_AttachmentFileListSize_Response
    ),
    1: DceRpcOp(
        put_AttachmentFileListSize_Request, put_AttachmentFileListSize_Response
    ),
}
register_com_interface(
    name="IFsrmActionEmail2",
    uuid=uuid.UUID("8276702f-2532-4839-89bf-4872609a2ea4"),
    opnums=IFSRMACTIONEMAIL2_OPNUMS,
)


class get_DerivedObjects_Request(NDRPacket):
    fields_desc = []


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


class get_Results_Request(NDRPacket):
    fields_desc = []


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


IFSRMDERIVEDOBJECTSRESULT_OPNUMS = {
    0: DceRpcOp(get_DerivedObjects_Request, get_DerivedObjects_Response),
    1: DceRpcOp(get_Results_Request, get_Results_Response),
}
register_com_interface(
    name="IFsrmDerivedObjectsResult",
    uuid=uuid.UUID("39322a2d-38ee-4d0d-8095-421a80849a82"),
    opnums=IFSRMDERIVEDOBJECTSRESULT_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


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


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


class get_PossibleValues_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ValueDescriptions_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Parameters_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMPROPERTYDEFINITION_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(put_Name_Request, put_Name_Response),
    2: DceRpcOp(get_Type_Request, get_Type_Response),
    3: DceRpcOp(put_Type_Request, put_Type_Response),
    4: DceRpcOp(get_PossibleValues_Request, get_PossibleValues_Response),
    5: DceRpcOp(put_PossibleValues_Request, put_PossibleValues_Response),
    6: DceRpcOp(get_ValueDescriptions_Request, get_ValueDescriptions_Response),
    7: DceRpcOp(put_ValueDescriptions_Request, put_ValueDescriptions_Response),
    8: DceRpcOp(get_Parameters_Request, get_Parameters_Response),
    9: DceRpcOp(put_Parameters_Request, put_Parameters_Response),
}
register_com_interface(
    name="IFsrmPropertyDefinition",
    uuid=uuid.UUID("ede0150f-e9a3-419c-877c-01fe5d24c5d3"),
    opnums=IFSRMPROPERTYDEFINITION_OPNUMS,
)


class get_PropertyDefinitionFlags_Request(NDRPacket):
    fields_desc = []


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


class get_DisplayName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_AppliesTo_Request(NDRPacket):
    fields_desc = []


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


class get_ValueDefinitions_Request(NDRPacket):
    fields_desc = []


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


IFSRMPROPERTYDEFINITION2_OPNUMS = {
    0: DceRpcOp(
        get_PropertyDefinitionFlags_Request, get_PropertyDefinitionFlags_Response
    ),
    1: DceRpcOp(get_DisplayName_Request, get_DisplayName_Response),
    2: DceRpcOp(put_DisplayName_Request, put_DisplayName_Response),
    3: DceRpcOp(get_AppliesTo_Request, get_AppliesTo_Response),
    4: DceRpcOp(get_ValueDefinitions_Request, get_ValueDefinitions_Response),
}
register_com_interface(
    name="IFsrmPropertyDefinition2",
    uuid=uuid.UUID("47782152-d16c-4229-b4e1-0ddfe308b9f6"),
    opnums=IFSRMPROPERTYDEFINITION2_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_DisplayName_Request(NDRPacket):
    fields_desc = []


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


class get_Description_Request(NDRPacket):
    fields_desc = []


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


class get_UniqueID_Request(NDRPacket):
    fields_desc = []


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


IFSRMPROPERTYDEFINITIONVALUE_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(get_DisplayName_Request, get_DisplayName_Response),
    2: DceRpcOp(get_Description_Request, get_Description_Response),
    3: DceRpcOp(get_UniqueID_Request, get_UniqueID_Response),
}
register_com_interface(
    name="IFsrmPropertyDefinitionValue",
    uuid=uuid.UUID("E946D148-BD67-4178-8E22-1C44925ED710"),
    opnums=IFSRMPROPERTYDEFINITIONVALUE_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_Value_Request(NDRPacket):
    fields_desc = []


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


class get_Sources_Request(NDRPacket):
    fields_desc = []


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


class get_PropertyFlags_Request(NDRPacket):
    fields_desc = []


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


IFSRMPROPERTY_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(get_Value_Request, get_Value_Response),
    2: DceRpcOp(get_Sources_Request, get_Sources_Response),
    3: DceRpcOp(get_PropertyFlags_Request, get_PropertyFlags_Response),
}
register_com_interface(
    name="IFsrmProperty",
    uuid=uuid.UUID("4a73fee4-4102-4fcc-9ffb-38614f9ee768"),
    opnums=IFSRMPROPERTY_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


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


class get_RuleType_Request(NDRPacket):
    fields_desc = []


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


class get_ModuleDefinitionName_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_NamespaceRoots_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_RuleFlags_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Parameters_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_LastModified_Request(NDRPacket):
    fields_desc = []


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


IFSRMRULE_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(put_Name_Request, put_Name_Response),
    2: DceRpcOp(get_RuleType_Request, get_RuleType_Response),
    3: DceRpcOp(get_ModuleDefinitionName_Request, get_ModuleDefinitionName_Response),
    4: DceRpcOp(put_ModuleDefinitionName_Request, put_ModuleDefinitionName_Response),
    5: DceRpcOp(get_NamespaceRoots_Request, get_NamespaceRoots_Response),
    6: DceRpcOp(put_NamespaceRoots_Request, put_NamespaceRoots_Response),
    7: DceRpcOp(get_RuleFlags_Request, get_RuleFlags_Response),
    8: DceRpcOp(put_RuleFlags_Request, put_RuleFlags_Response),
    9: DceRpcOp(get_Parameters_Request, get_Parameters_Response),
    10: DceRpcOp(put_Parameters_Request, put_Parameters_Response),
    11: DceRpcOp(get_LastModified_Request, get_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_ExecutionOption_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_PropertyAffected_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Value_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMCLASSIFICATIONRULE_OPNUMS = {
    0: DceRpcOp(get_ExecutionOption_Request, get_ExecutionOption_Response),
    1: DceRpcOp(put_ExecutionOption_Request, put_ExecutionOption_Response),
    2: DceRpcOp(get_PropertyAffected_Request, get_PropertyAffected_Response),
    3: DceRpcOp(put_PropertyAffected_Request, put_PropertyAffected_Response),
    4: DceRpcOp(get_Value_Request, get_Value_Response),
    5: DceRpcOp(put_Value_Request, put_Value_Response),
}
register_com_interface(
    name="IFsrmClassificationRule",
    uuid=uuid.UUID("afc052c2-5315-45ab-841b-c6db0e120148"),
    opnums=IFSRMCLASSIFICATIONRULE_OPNUMS,
)


class get_ModuleClsid_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Company_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Version_Request(NDRPacket):
    fields_desc = []


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


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


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


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


class get_ModuleType_Request(NDRPacket):
    fields_desc = []


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


class get_Enabled_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_NeedsFileContent_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Account_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_SupportedExtensions_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Parameters_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMPIPELINEMODULEDEFINITION_OPNUMS = {
    0: DceRpcOp(get_ModuleClsid_Request, get_ModuleClsid_Response),
    1: DceRpcOp(put_ModuleClsid_Request, put_ModuleClsid_Response),
    2: DceRpcOp(get_Name_Request, get_Name_Response),
    3: DceRpcOp(put_Name_Request, put_Name_Response),
    4: DceRpcOp(get_Company_Request, get_Company_Response),
    5: DceRpcOp(put_Company_Request, put_Company_Response),
    6: DceRpcOp(get_Version_Request, get_Version_Response),
    7: DceRpcOp(put_Version_Request, put_Version_Response),
    8: DceRpcOp(get_ModuleType_Request, get_ModuleType_Response),
    9: DceRpcOp(get_Enabled_Request, get_Enabled_Response),
    10: DceRpcOp(put_Enabled_Request, put_Enabled_Response),
    11: DceRpcOp(get_NeedsFileContent_Request, get_NeedsFileContent_Response),
    12: DceRpcOp(put_NeedsFileContent_Request, put_NeedsFileContent_Response),
    13: DceRpcOp(get_Account_Request, get_Account_Response),
    14: DceRpcOp(put_Account_Request, put_Account_Response),
    15: DceRpcOp(get_SupportedExtensions_Request, get_SupportedExtensions_Response),
    16: DceRpcOp(put_SupportedExtensions_Request, put_SupportedExtensions_Response),
    17: DceRpcOp(get_Parameters_Request, get_Parameters_Response),
    18: DceRpcOp(put_Parameters_Request, put_Parameters_Response),
}
register_com_interface(
    name="IFsrmPipelineModuleDefinition",
    uuid=uuid.UUID("515c1277-2c81-440e-8fcf-367921ed4f59"),
    opnums=IFSRMPIPELINEMODULEDEFINITION_OPNUMS,
)


class get_PropertiesAffected_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_PropertiesUsed_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_NeedsExplicitValue_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMCLASSIFIERMODULEDEFINITION_OPNUMS = {
    0: DceRpcOp(get_PropertiesAffected_Request, get_PropertiesAffected_Response),
    1: DceRpcOp(put_PropertiesAffected_Request, put_PropertiesAffected_Response),
    2: DceRpcOp(get_PropertiesUsed_Request, get_PropertiesUsed_Response),
    3: DceRpcOp(put_PropertiesUsed_Request, put_PropertiesUsed_Response),
    4: DceRpcOp(get_NeedsExplicitValue_Request, get_NeedsExplicitValue_Response),
    5: DceRpcOp(put_NeedsExplicitValue_Request, put_NeedsExplicitValue_Response),
}
register_com_interface(
    name="IFsrmClassifierModuleDefinition",
    uuid=uuid.UUID("bb36ea26-6318-4b8c-8592-f72dd602e7a5"),
    opnums=IFSRMCLASSIFIERMODULEDEFINITION_OPNUMS,
)


class get_ClassificationReportFormats_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Logging_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ClassificationReportMailTo_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ClassificationReportEnabled_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ClassificationLastReportPathWithoutExtension_Request(NDRPacket):
    fields_desc = []


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


class get_ClassificationLastError_Request(NDRPacket):
    fields_desc = []


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


class get_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 = [
        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 = [
        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 = [
        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),
        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 = [
        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 = [
        NDRPacketField("filePath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        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 = [
        NDRPacketField("filePath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        NDRPacketField("propertyName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        NDRPacketField("propertyValue", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
    ]


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


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


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


IFSRMCLASSIFICATIONMANAGER_OPNUMS = {
    0: DceRpcOp(
        get_ClassificationReportFormats_Request,
        get_ClassificationReportFormats_Response,
    ),
    1: DceRpcOp(
        put_ClassificationReportFormats_Request,
        put_ClassificationReportFormats_Response,
    ),
    2: DceRpcOp(get_Logging_Request, get_Logging_Response),
    3: DceRpcOp(put_Logging_Request, put_Logging_Response),
    4: DceRpcOp(
        get_ClassificationReportMailTo_Request, get_ClassificationReportMailTo_Response
    ),
    5: DceRpcOp(
        put_ClassificationReportMailTo_Request, put_ClassificationReportMailTo_Response
    ),
    6: DceRpcOp(
        get_ClassificationReportEnabled_Request,
        get_ClassificationReportEnabled_Response,
    ),
    7: DceRpcOp(
        put_ClassificationReportEnabled_Request,
        put_ClassificationReportEnabled_Response,
    ),
    8: DceRpcOp(
        get_ClassificationLastReportPathWithoutExtension_Request,
        get_ClassificationLastReportPathWithoutExtension_Response,
    ),
    9: DceRpcOp(
        get_ClassificationLastError_Request, get_ClassificationLastError_Response
    ),
    10: DceRpcOp(
        get_ClassificationRunningStatus_Request,
        get_ClassificationRunningStatus_Response,
    ),
    11: DceRpcOp(EnumPropertyDefinitions_Request, EnumPropertyDefinitions_Response),
    12: DceRpcOp(CreatePropertyDefinition_Request, CreatePropertyDefinition_Response),
    13: DceRpcOp(GetPropertyDefinition_Request, GetPropertyDefinition_Response),
    14: DceRpcOp(EnumRules_Request, EnumRules_Response),
    15: DceRpcOp(CreateRule_Request, CreateRule_Response),
    16: DceRpcOp(GetRule_Request, GetRule_Response),
    17: DceRpcOp(EnumModuleDefinitions_Request, EnumModuleDefinitions_Response),
    18: DceRpcOp(CreateModuleDefinition_Request, CreateModuleDefinition_Response),
    19: DceRpcOp(GetModuleDefinition_Request, GetModuleDefinition_Response),
    20: DceRpcOp(RunClassification_Request, RunClassification_Response),
    21: DceRpcOp(
        WaitForClassificationCompletion_Request,
        WaitForClassificationCompletion_Response,
    ),
    22: DceRpcOp(CancelClassification_Request, CancelClassification_Response),
    23: DceRpcOp(EnumFileProperties_Request, EnumFileProperties_Response),
    24: DceRpcOp(GetFileProperty_Request, GetFileProperty_Response),
    25: DceRpcOp(SetFileProperty_Request, SetFileProperty_Response),
    26: 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_Capabilities_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


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


class get_UpdatesFileContent_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMSTORAGEMODULEDEFINITION_OPNUMS = {
    0: DceRpcOp(get_Capabilities_Request, get_Capabilities_Response),
    1: DceRpcOp(put_Capabilities_Request, put_Capabilities_Response),
    2: DceRpcOp(get_StorageType_Request, get_StorageType_Response),
    3: DceRpcOp(put_StorageType_Request, put_StorageType_Response),
    4: DceRpcOp(get_UpdatesFileContent_Request, get_UpdatesFileContent_Response),
    5: DceRpcOp(put_UpdatesFileContent_Request, put_UpdatesFileContent_Response),
}
register_com_interface(
    name="IFsrmStorageModuleDefinition",
    uuid=uuid.UUID("15a81350-497d-4aba-80e9-d4dbcc5521fe"),
    opnums=IFSRMSTORAGEMODULEDEFINITION_OPNUMS,
)


class get_QuotaLimit_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_QuotaFlags_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Thresholds_Request(NDRPacket):
    fields_desc = []


class get_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: DceRpcOp(get_QuotaLimit_Request, get_QuotaLimit_Response),
    1: DceRpcOp(put_QuotaLimit_Request, put_QuotaLimit_Response),
    2: DceRpcOp(get_QuotaFlags_Request, get_QuotaFlags_Response),
    3: DceRpcOp(put_QuotaFlags_Request, put_QuotaFlags_Response),
    4: DceRpcOp(get_Thresholds_Request, get_Thresholds_Response),
    5: DceRpcOp(AddThreshold_Request, AddThreshold_Response),
    6: DceRpcOp(DeleteThreshold_Request, DeleteThreshold_Response),
    7: DceRpcOp(ModifyThreshold_Request, ModifyThreshold_Response),
    8: DceRpcOp(CreateThresholdAction_Request, CreateThresholdAction_Response),
    9: DceRpcOp(EnumThresholdActions_Request, EnumThresholdActions_Response),
}
register_com_interface(
    name="IFsrmQuotaBase",
    uuid=uuid.UUID("1568a795-3924-4118-b74b-68d8f0fa5daf"),
    opnums=IFSRMQUOTABASE_OPNUMS,
)


class get_Path_Request(NDRPacket):
    fields_desc = []


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


class get_UserSid_Request(NDRPacket):
    fields_desc = []


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


class get_UserAccount_Request(NDRPacket):
    fields_desc = []


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


class get_SourceTemplateName_Request(NDRPacket):
    fields_desc = []


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


class get_MatchesSourceTemplate_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMQUOTAOBJECT_OPNUMS = {
    0: DceRpcOp(get_Path_Request, get_Path_Response),
    1: DceRpcOp(get_UserSid_Request, get_UserSid_Response),
    2: DceRpcOp(get_UserAccount_Request, get_UserAccount_Response),
    3: DceRpcOp(get_SourceTemplateName_Request, get_SourceTemplateName_Response),
    4: DceRpcOp(get_MatchesSourceTemplate_Request, get_MatchesSourceTemplate_Response),
    5: DceRpcOp(ApplyTemplate_Request, ApplyTemplate_Response),
}
register_com_interface(
    name="IFsrmQuotaObject",
    uuid=uuid.UUID("42dc3511-61d5-48ae-b6dc-59fc00c0a8d6"),
    opnums=IFSRMQUOTAOBJECT_OPNUMS,
)


class get_QuotaUsed_Request(NDRPacket):
    fields_desc = []


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


class get_QuotaPeakUsage_Request(NDRPacket):
    fields_desc = []


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


class get_QuotaPeakUsageTime_Request(NDRPacket):
    fields_desc = []


class get_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: DceRpcOp(get_QuotaUsed_Request, get_QuotaUsed_Response),
    1: DceRpcOp(get_QuotaPeakUsage_Request, get_QuotaPeakUsage_Response),
    2: DceRpcOp(get_QuotaPeakUsageTime_Request, get_QuotaPeakUsageTime_Response),
    3: DceRpcOp(ResetPeakUsage_Request, ResetPeakUsage_Response),
    4: DceRpcOp(RefreshUsageProperties_Request, RefreshUsageProperties_Response),
}
register_com_interface(
    name="IFsrmQuota",
    uuid=uuid.UUID("377f739d-9647-4b8e-97d2-5ffce6d759cd"),
    opnums=IFSRMQUOTA_OPNUMS,
)


class get_ExcludeFolders_Request(NDRPacket):
    fields_desc = []


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


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


class put_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: DceRpcOp(get_ExcludeFolders_Request, get_ExcludeFolders_Response),
    1: DceRpcOp(put_ExcludeFolders_Request, put_ExcludeFolders_Response),
    2: DceRpcOp(CommitAndUpdateDerived_Request, CommitAndUpdateDerived_Response),
}
register_com_interface(
    name="IFsrmAutoApplyQuota",
    uuid=uuid.UUID("f82e5729-6aba-4740-bfc7-c7f58f75fb7b"),
    opnums=IFSRMAUTOAPPLYQUOTA_OPNUMS,
)


class get_ActionVariables_Request(NDRPacket):
    fields_desc = []


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


class get_ActionVariableDescriptions_Request(NDRPacket):
    fields_desc = []


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


class CreateQuota_Request(NDRPacket):
    fields_desc = [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 = [
        NDRPacketField("quotaTemplateName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        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 = [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 = [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 = [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 = [
        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 = [
        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 = [
        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 = [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: DceRpcOp(get_ActionVariables_Request, get_ActionVariables_Response),
    1: DceRpcOp(
        get_ActionVariableDescriptions_Request, get_ActionVariableDescriptions_Response
    ),
    2: DceRpcOp(CreateQuota_Request, CreateQuota_Response),
    3: DceRpcOp(CreateAutoApplyQuota_Request, CreateAutoApplyQuota_Response),
    4: DceRpcOp(GetQuota_Request, GetQuota_Response),
    5: DceRpcOp(GetAutoApplyQuota_Request, GetAutoApplyQuota_Response),
    6: DceRpcOp(GetRestrictiveQuota_Request, GetRestrictiveQuota_Response),
    7: DceRpcOp(EnumQuotas_Request, EnumQuotas_Response),
    8: DceRpcOp(EnumAutoApplyQuotas_Request, EnumAutoApplyQuotas_Response),
    9: DceRpcOp(EnumEffectiveQuotas_Request, EnumEffectiveQuotas_Response),
    10: DceRpcOp(Scan_Request, Scan_Response),
    11: DceRpcOp(CreateQuotaCollection_Request, CreateQuotaCollection_Response),
}
register_com_interface(
    name="IFsrmQuotaManager",
    uuid=uuid.UUID("8bb68c7d-19d8-4ffb-809e-be4fc1734014"),
    opnums=IFSRMQUOTAMANAGER_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class CopyTemplate_Request(NDRPacket):
    fields_desc = [
        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: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(put_Name_Request, put_Name_Response),
    2: DceRpcOp(CopyTemplate_Request, CopyTemplate_Response),
    3: DceRpcOp(CommitAndUpdateDerived_Request, CommitAndUpdateDerived_Response),
}
register_com_interface(
    name="IFsrmQuotaTemplate",
    uuid=uuid.UUID("a2efab31-295e-46bb-b976-e86d58b52e8b"),
    opnums=IFSRMQUOTATEMPLATE_OPNUMS,
)


class get_OverwriteOnCommit_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMQUOTATEMPLATEIMPORTED_OPNUMS = {
    0: DceRpcOp(get_OverwriteOnCommit_Request, get_OverwriteOnCommit_Response),
    1: DceRpcOp(put_OverwriteOnCommit_Request, put_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 = [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(
            NDRPacketField("quotaTemplateNamesArray", wireVARIANTStr(), wireVARIANTStr)
        )
    ]


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


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


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


IFSRMQUOTATEMPLATEMANAGER_OPNUMS = {
    0: DceRpcOp(CreateTemplate_Request, CreateTemplate_Response),
    1: DceRpcOp(GetTemplate_Request, GetTemplate_Response),
    2: DceRpcOp(EnumTemplates_Request, EnumTemplates_Response),
    3: DceRpcOp(ExportTemplates_Request, ExportTemplates_Response),
    4: 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 = [
        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: 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 = [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(
            NDRPacketField("path", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRIntField("status", 0),
    ]


class SetOutputDirectory_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("context", 0, FsrmReportGenerationContext),
        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(
            NDRPacketField("filterValue", wireVARIANTStr(), wireVARIANTStr)
        ),
        NDRIntField("status", 0),
    ]


class SetDefaultFilter_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("reportType", 0, FsrmReportType),
        NDRInt3264EnumField("filter", 0, FsrmReportFilter),
        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(
            NDRPacketField("limitValue", wireVARIANTStr(), wireVARIANTStr)
        ),
        NDRIntField("status", 0),
    ]


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


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


IFSRMREPORTMANAGER_OPNUMS = {
    0: DceRpcOp(EnumReportJobs_Request, EnumReportJobs_Response),
    1: DceRpcOp(CreateReportJob_Request, CreateReportJob_Response),
    2: DceRpcOp(GetReportJob_Request, GetReportJob_Response),
    3: DceRpcOp(GetOutputDirectory_Request, GetOutputDirectory_Response),
    4: DceRpcOp(SetOutputDirectory_Request, SetOutputDirectory_Response),
    5: DceRpcOp(
        IsFilterValidForReportType_Request, IsFilterValidForReportType_Response
    ),
    6: DceRpcOp(GetDefaultFilter_Request, GetDefaultFilter_Response),
    7: DceRpcOp(SetDefaultFilter_Request, SetDefaultFilter_Response),
    8: DceRpcOp(GetReportSizeLimit_Request, GetReportSizeLimit_Response),
    9: 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_Task_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_NamespaceRoots_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Formats_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MailTo_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_RunningStatus_Request(NDRPacket):
    fields_desc = []


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


class get_LastRun_Request(NDRPacket):
    fields_desc = []


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


class get_LastError_Request(NDRPacket):
    fields_desc = []


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


class get_LastGeneratedInDirectory_Request(NDRPacket):
    fields_desc = []


class get_LastGeneratedInDirectory_Response(NDRPacket):
    fields_desc = [
        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: DceRpcOp(get_Task_Request, get_Task_Response),
    1: DceRpcOp(put_Task_Request, put_Task_Response),
    2: DceRpcOp(get_NamespaceRoots_Request, get_NamespaceRoots_Response),
    3: DceRpcOp(put_NamespaceRoots_Request, put_NamespaceRoots_Response),
    4: DceRpcOp(get_Formats_Request, get_Formats_Response),
    5: DceRpcOp(put_Formats_Request, put_Formats_Response),
    6: DceRpcOp(get_MailTo_Request, get_MailTo_Response),
    7: DceRpcOp(put_MailTo_Request, put_MailTo_Response),
    8: DceRpcOp(get_RunningStatus_Request, get_RunningStatus_Response),
    9: DceRpcOp(get_LastRun_Request, get_LastRun_Response),
    10: DceRpcOp(get_LastError_Request, get_LastError_Response),
    11: DceRpcOp(
        get_LastGeneratedInDirectory_Request, get_LastGeneratedInDirectory_Response
    ),
    12: DceRpcOp(EnumReports_Request, EnumReports_Response),
    13: DceRpcOp(CreateReport_Request, CreateReport_Response),
    14: DceRpcOp(Run_Request, Run_Response),
    15: DceRpcOp(WaitForCompletion_Request, WaitForCompletion_Response),
    16: 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_Type_Request(NDRPacket):
    fields_desc = []


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


class get_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Description_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_LastGeneratedFileNamePrefix_Request(NDRPacket):
    fields_desc = []


class get_LastGeneratedFileNamePrefix_Response(NDRPacket):
    fields_desc = [
        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(
            NDRPacketField("filterValue", wireVARIANTStr(), wireVARIANTStr)
        ),
        NDRIntField("status", 0),
    ]


class SetFilter_Request(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("filter", 0, FsrmReportFilter),
        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: DceRpcOp(get_Type_Request, get_Type_Response),
    1: DceRpcOp(get_Name_Request, get_Name_Response),
    2: DceRpcOp(put_Name_Request, put_Name_Response),
    3: DceRpcOp(get_Description_Request, get_Description_Response),
    4: DceRpcOp(put_Description_Request, put_Description_Response),
    5: DceRpcOp(
        get_LastGeneratedFileNamePrefix_Request,
        get_LastGeneratedFileNamePrefix_Response,
    ),
    6: DceRpcOp(GetFilter_Request, GetFilter_Response),
    7: DceRpcOp(SetFilter_Request, SetFilter_Response),
    8: 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_ActionVariables_Request(NDRPacket):
    fields_desc = []


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


class get_ActionVariableDescriptions_Request(NDRPacket):
    fields_desc = []


class get_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 = [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: DceRpcOp(get_ActionVariables_Request, get_ActionVariables_Response),
    1: DceRpcOp(
        get_ActionVariableDescriptions_Request, get_ActionVariableDescriptions_Response
    ),
    2: DceRpcOp(EnumFileManagementJobs_Request, EnumFileManagementJobs_Response),
    3: DceRpcOp(CreateFileManagementJob_Request, CreateFileManagementJob_Response),
    4: 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_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_NamespaceRoots_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Enabled_Request(NDRPacket):
    fields_desc = []


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


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


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


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


class get_OperationType_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ExpirationDirectory_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_CustomAction_Request(NDRPacket):
    fields_desc = []


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


class get_Notifications_Request(NDRPacket):
    fields_desc = []


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


class get_Logging_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_ReportEnabled_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Formats_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_MailTo_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_DaysSinceFileCreated_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_DaysSinceFileLastAccessed_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_DaysSinceFileLastModified_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_PropertyConditions_Request(NDRPacket):
    fields_desc = []


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


class get_FromDate_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Task_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Parameters_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_RunningStatus_Request(NDRPacket):
    fields_desc = []


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


class get_LastError_Request(NDRPacket):
    fields_desc = []


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


class get_LastReportPathWithoutExtension_Request(NDRPacket):
    fields_desc = []


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


class get_LastRun_Request(NDRPacket):
    fields_desc = []


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


class get_FileNamePattern_Request(NDRPacket):
    fields_desc = []


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


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


class put_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 = [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: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(put_Name_Request, put_Name_Response),
    2: DceRpcOp(get_NamespaceRoots_Request, get_NamespaceRoots_Response),
    3: DceRpcOp(put_NamespaceRoots_Request, put_NamespaceRoots_Response),
    4: DceRpcOp(get_Enabled_Request, get_Enabled_Response),
    5: DceRpcOp(put_Enabled_Request, put_Enabled_Response),
    6: DceRpcOp(get_OperationType_Request, get_OperationType_Response),
    7: DceRpcOp(put_OperationType_Request, put_OperationType_Response),
    8: DceRpcOp(get_ExpirationDirectory_Request, get_ExpirationDirectory_Response),
    9: DceRpcOp(put_ExpirationDirectory_Request, put_ExpirationDirectory_Response),
    10: DceRpcOp(get_CustomAction_Request, get_CustomAction_Response),
    11: DceRpcOp(get_Notifications_Request, get_Notifications_Response),
    12: DceRpcOp(get_Logging_Request, get_Logging_Response),
    13: DceRpcOp(put_Logging_Request, put_Logging_Response),
    14: DceRpcOp(get_ReportEnabled_Request, get_ReportEnabled_Response),
    15: DceRpcOp(put_ReportEnabled_Request, put_ReportEnabled_Response),
    16: DceRpcOp(get_Formats_Request, get_Formats_Response),
    17: DceRpcOp(put_Formats_Request, put_Formats_Response),
    18: DceRpcOp(get_MailTo_Request, get_MailTo_Response),
    19: DceRpcOp(put_MailTo_Request, put_MailTo_Response),
    20: DceRpcOp(get_DaysSinceFileCreated_Request, get_DaysSinceFileCreated_Response),
    21: DceRpcOp(put_DaysSinceFileCreated_Request, put_DaysSinceFileCreated_Response),
    22: DceRpcOp(
        get_DaysSinceFileLastAccessed_Request, get_DaysSinceFileLastAccessed_Response
    ),
    23: DceRpcOp(
        put_DaysSinceFileLastAccessed_Request, put_DaysSinceFileLastAccessed_Response
    ),
    24: DceRpcOp(
        get_DaysSinceFileLastModified_Request, get_DaysSinceFileLastModified_Response
    ),
    25: DceRpcOp(
        put_DaysSinceFileLastModified_Request, put_DaysSinceFileLastModified_Response
    ),
    26: DceRpcOp(get_PropertyConditions_Request, get_PropertyConditions_Response),
    27: DceRpcOp(get_FromDate_Request, get_FromDate_Response),
    28: DceRpcOp(put_FromDate_Request, put_FromDate_Response),
    29: DceRpcOp(get_Task_Request, get_Task_Response),
    30: DceRpcOp(put_Task_Request, put_Task_Response),
    31: DceRpcOp(get_Parameters_Request, get_Parameters_Response),
    32: DceRpcOp(put_Parameters_Request, put_Parameters_Response),
    33: DceRpcOp(get_RunningStatus_Request, get_RunningStatus_Response),
    34: DceRpcOp(get_LastError_Request, get_LastError_Response),
    35: DceRpcOp(
        get_LastReportPathWithoutExtension_Request,
        get_LastReportPathWithoutExtension_Response,
    ),
    36: DceRpcOp(get_LastRun_Request, get_LastRun_Response),
    37: DceRpcOp(get_FileNamePattern_Request, get_FileNamePattern_Response),
    38: DceRpcOp(put_FileNamePattern_Request, put_FileNamePattern_Response),
    39: DceRpcOp(Run_Request, Run_Response),
    40: DceRpcOp(WaitForCompletion_Request, WaitForCompletion_Response),
    41: DceRpcOp(Cancel_Request, Cancel_Response),
    42: DceRpcOp(AddNotification_Request, AddNotification_Response),
    43: DceRpcOp(DeleteNotification_Request, DeleteNotification_Response),
    44: DceRpcOp(ModifyNotification_Request, ModifyNotification_Response),
    45: DceRpcOp(CreateNotificationAction_Request, CreateNotificationAction_Response),
    46: DceRpcOp(EnumNotificationActions_Request, EnumNotificationActions_Response),
    47: DceRpcOp(CreatePropertyCondition_Request, CreatePropertyCondition_Response),
    48: 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_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


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


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


class get_Value_Request(NDRPacket):
    fields_desc = []


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


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


class put_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: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(put_Name_Request, put_Name_Response),
    2: DceRpcOp(get_Type_Request, get_Type_Response),
    3: DceRpcOp(put_Type_Request, put_Type_Response),
    4: DceRpcOp(get_Value_Request, get_Value_Response),
    5: DceRpcOp(put_Value_Request, put_Value_Response),
    6: 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(
            NDRPacketField("namespacesSafeArray", wireVARIANTStr(), wireVARIANTStr)
        )
    ]


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


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


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


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


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


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


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


IFSRMREPORTSCHEDULER_OPNUMS = {
    0: DceRpcOp(VerifyNamespaces_Request, VerifyNamespaces_Response),
    1: DceRpcOp(CreateScheduleTask_Request, CreateScheduleTask_Response),
    2: DceRpcOp(ModifyScheduleTask_Request, ModifyScheduleTask_Response),
    3: 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_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Members_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_NonMembers_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMFILEGROUP_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(put_Name_Request, put_Name_Response),
    2: DceRpcOp(get_Members_Request, get_Members_Response),
    3: DceRpcOp(put_Members_Request, put_Members_Response),
    4: DceRpcOp(get_NonMembers_Request, get_NonMembers_Response),
    5: DceRpcOp(put_NonMembers_Request, put_NonMembers_Response),
}
register_com_interface(
    name="IFsrmFileGroup",
    uuid=uuid.UUID("8dd04909-0e34-4d55-afaa-89e1f1a1bbb9"),
    opnums=IFSRMFILEGROUP_OPNUMS,
)


class get_OverwriteOnCommit_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMFILEGROUPIMPORTED_OPNUMS = {
    0: DceRpcOp(get_OverwriteOnCommit_Request, get_OverwriteOnCommit_Response),
    1: DceRpcOp(put_OverwriteOnCommit_Request, put_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 = [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(
            NDRPacketField("fileGroupNamesArray", wireVARIANTStr(), wireVARIANTStr)
        )
    ]


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


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


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


IFSRMFILEGROUPMANAGER_OPNUMS = {
    0: DceRpcOp(CreateFileGroup_Request, CreateFileGroup_Response),
    1: DceRpcOp(GetFileGroup_Request, GetFileGroup_Response),
    2: DceRpcOp(EnumFileGroups_Request, EnumFileGroups_Response),
    3: DceRpcOp(ExportFileGroups_Request, ExportFileGroups_Response),
    4: DceRpcOp(ImportFileGroups_Request, ImportFileGroups_Response),
}
register_com_interface(
    name="IFsrmFileGroupManager",
    uuid=uuid.UUID("426677d5-018c-485c-8a51-20b86d00bdc4"),
    opnums=IFSRMFILEGROUPMANAGER_OPNUMS,
)


class get_BlockedFileGroups_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_FileScreenFlags_Request(NDRPacket):
    fields_desc = []


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


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


class put_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: DceRpcOp(get_BlockedFileGroups_Request, get_BlockedFileGroups_Response),
    1: DceRpcOp(put_BlockedFileGroups_Request, put_BlockedFileGroups_Response),
    2: DceRpcOp(get_FileScreenFlags_Request, get_FileScreenFlags_Response),
    3: DceRpcOp(put_FileScreenFlags_Request, put_FileScreenFlags_Response),
    4: DceRpcOp(CreateAction_Request, CreateAction_Response),
    5: DceRpcOp(EnumActions_Request, EnumActions_Response),
}
register_com_interface(
    name="IFsrmFileScreenBase",
    uuid=uuid.UUID("f3637e80-5b22-4a2b-a637-bbb642b41cfc"),
    opnums=IFSRMFILESCREENBASE_OPNUMS,
)


class get_Path_Request(NDRPacket):
    fields_desc = []


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


class get_SourceTemplateName_Request(NDRPacket):
    fields_desc = []


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


class get_MatchesSourceTemplate_Request(NDRPacket):
    fields_desc = []


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


class get_UserSid_Request(NDRPacket):
    fields_desc = []


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


class get_UserAccount_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMFILESCREEN_OPNUMS = {
    0: DceRpcOp(get_Path_Request, get_Path_Response),
    1: DceRpcOp(get_SourceTemplateName_Request, get_SourceTemplateName_Response),
    2: DceRpcOp(get_MatchesSourceTemplate_Request, get_MatchesSourceTemplate_Response),
    3: DceRpcOp(get_UserSid_Request, get_UserSid_Response),
    4: DceRpcOp(get_UserAccount_Request, get_UserAccount_Response),
    5: DceRpcOp(ApplyTemplate_Request, ApplyTemplate_Response),
}
register_com_interface(
    name="IFsrmFileScreen",
    uuid=uuid.UUID("5f6325d3-ce88-4733-84c1-2d6aefc5ea07"),
    opnums=IFSRMFILESCREEN_OPNUMS,
)


class get_Path_Request(NDRPacket):
    fields_desc = []


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


class get_AllowedFileGroups_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMFILESCREENEXCEPTION_OPNUMS = {
    0: DceRpcOp(get_Path_Request, get_Path_Response),
    1: DceRpcOp(get_AllowedFileGroups_Request, get_AllowedFileGroups_Response),
    2: DceRpcOp(put_AllowedFileGroups_Request, put_AllowedFileGroups_Response),
}
register_com_interface(
    name="IFsrmFileScreenException",
    uuid=uuid.UUID("bee7ce02-df77-4515-9389-78f01c5afc1a"),
    opnums=IFSRMFILESCREENEXCEPTION_OPNUMS,
)


class get_ActionVariables_Request(NDRPacket):
    fields_desc = []


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


class get_ActionVariableDescriptions_Request(NDRPacket):
    fields_desc = []


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


class CreateFileScreen_Request(NDRPacket):
    fields_desc = [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 = [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 = [
        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 = [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 = [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 = [
        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: DceRpcOp(get_ActionVariables_Request, get_ActionVariables_Response),
    1: DceRpcOp(
        get_ActionVariableDescriptions_Request, get_ActionVariableDescriptions_Response
    ),
    2: DceRpcOp(CreateFileScreen_Request, CreateFileScreen_Response),
    3: DceRpcOp(GetFileScreen_Request, GetFileScreen_Response),
    4: DceRpcOp(EnumFileScreens_Request, EnumFileScreens_Response),
    5: DceRpcOp(CreateFileScreenException_Request, CreateFileScreenException_Response),
    6: DceRpcOp(GetFileScreenException_Request, GetFileScreenException_Response),
    7: DceRpcOp(EnumFileScreenExceptions_Request, EnumFileScreenExceptions_Response),
    8: DceRpcOp(
        CreateFileScreenCollection_Request, CreateFileScreenCollection_Response
    ),
}
register_com_interface(
    name="IFsrmFileScreenManager",
    uuid=uuid.UUID("ff4fa04e-5a94-4bda-a3a0-d5b4d3c52eba"),
    opnums=IFSRMFILESCREENMANAGER_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


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


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


class CopyTemplate_Request(NDRPacket):
    fields_desc = [
        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: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(put_Name_Request, put_Name_Response),
    2: DceRpcOp(CopyTemplate_Request, CopyTemplate_Response),
    3: DceRpcOp(CommitAndUpdateDerived_Request, CommitAndUpdateDerived_Response),
}
register_com_interface(
    name="IFsrmFileScreenTemplate",
    uuid=uuid.UUID("205bebf8-dd93-452a-95a6-32b566b35828"),
    opnums=IFSRMFILESCREENTEMPLATE_OPNUMS,
)


class get_OverwriteOnCommit_Request(NDRPacket):
    fields_desc = []


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


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


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


IFSRMFILESCREENTEMPLATEIMPORTED_OPNUMS = {
    0: DceRpcOp(get_OverwriteOnCommit_Request, get_OverwriteOnCommit_Response),
    1: DceRpcOp(put_OverwriteOnCommit_Request, put_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 = [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(
            NDRPacketField(
                "fileScreenTemplateNamesArray", wireVARIANTStr(), wireVARIANTStr
            )
        )
    ]


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


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


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


IFSRMFILESCREENTEMPLATEMANAGER_OPNUMS = {
    0: DceRpcOp(CreateTemplate_Request, CreateTemplate_Response),
    1: DceRpcOp(GetTemplate_Request, GetTemplate_Response),
    2: DceRpcOp(EnumTemplates_Request, EnumTemplates_Response),
    3: DceRpcOp(ExportTemplates_Request, ExportTemplates_Response),
    4: DceRpcOp(ImportTemplates_Request, ImportTemplates_Response),
}
register_com_interface(
    name="IFsrmFileScreenTemplateManager",
    uuid=uuid.UUID("cfe36cba-1949-4e74-a14f-f1d580ceaf13"),
    opnums=IFSRMFILESCREENTEMPLATEMANAGER_OPNUMS,
)
