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

# [mc-iisa] v15.0 (Tue, 23 Apr 2024)

"""
RPC definitions for the following interfaces:
- IUnknown (v0.0): 00000000-0000-0000-C000-000000000046
- IAppHostMethod (v0.0): 7883ca1c-1112-4447-84c3-52fbeb38069d
- IAppHostMethodInstance (v0.0): b80f3c42-60e0-4ae0-9007-f52852d3dbed
- IAppHostElement (v0.0): 64ff8ccc-b287-4dae-b08a-a72cbf45f453
- IAppHostProperty (v0.0): ed35f7a1-5024-4e7b-a44d-07ddaf4b524d
- IAppHostConfigLocation (v0.0): 370af178-7758-4dad-8146-7391f6e18585
- IAppHostElementSchema (v0.0): ef13d885-642c-4709-99ec-b89561c6bc69
- IAppHostPropertySchema (v0.0): 450386db-7409-4667-935e-384dbbee2a9e
- IAppHostConstantValue (v0.0): 0716caf8-7d05-4a46-8099-77594be91394
- IAppHostConfigManager (v0.0): 8f6d760f-f0cb-4d69-b5f6-848b33e9bdc6
- IAppHostMappingExtension (v0.0): 31a83ea0-c0e4-4a2c-8a01-353cc2a4c60a
- IAppHostChildElementCollection (v0.0): 08a90f5f-0702-48d6-b45f-02a9885a9768
- IAppHostPropertyCollection (v0.0): 0191775e-bcff-445a-b4f4-3bdda54e2816
- IAppHostConfigLocationCollection (v0.0): 832a32f7-b3ea-4b8c-b260-9a2923001184
- IAppHostMethodCollection (v0.0): d6c7cd8f-bb8d-4f96-b591-d3a5f1320269
- IAppHostElementSchemaCollection (v0.0): 0344cdda-151e-4cbf-82da-66ae61e97754
- IAppHostPropertySchemaCollection (v0.0): 8bed2c68-a5fb-4b28-8581-a0dc5267419f
- IAppHostConstantValueCollection (v0.0): 5b5a68e6-8b9f-45e1-8199-a95ffccdffff
- IAppHostCollectionSchema (v0.0): de095db1-5368-4d11-81f6-efef619b7bcf
- IAppHostMethodSchema (v0.0): 2d9915fb-9d42-4328-b782-1b46819fab9e
- IAppHostConfigException (v0.0): 4dfa1df3-8900-4bc7-bbb5-d1a458c52410
- IAppHostPropertyException (v0.0): eafe4895-a929-41ea-b14d-613e23f62b71
- IAppHostElementCollection (v0.0): c8550bff-5281-4b1e-ac34-99b6fa38464d
- IAppHostSectionDefinition (v0.0): c5c04795-321c-4014-8fd6-d44658799393
- IAppHostSectionDefinitionCollection (v0.0): b7d381ee-8860-47a1-8af4-1f33b2b1f325
- IAppHostSectionGroup (v0.0): 0dd8a158-ebe6-4008-a1d9-b7ecc8f1104b
- IAppHostConfigFile (v0.0): ada4e6fb-e025-401e-a5d0-c3134a281f07
- IAppHostPathMapper (v0.0): e7927575-5cc3-403b-822e-328a6b904bee
- IAppHostChangeHandler (v0.0): 09829352-87c2-418d-8d79-4133969a489d
- IAppHostAdminManager (v0.0): 9be77978-73ed-4a9a-87fd-13f09fec1b13
- IAppHostWritableAdminManager (v0.0): fa7660f6-7b3f-4237-a8bf-ed0ad0dcbbd9
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,
    NDRFullEmbPointerField,
    NDRFullPointerField,
    NDRIEEEDoubleField,
    NDRIEEEFloatField,
    NDRIntField,
    NDRLongField,
    NDRPacketField,
    NDRRecursiveClass,
    NDRRefEmbPointerField,
    NDRShortField,
    NDRSignedByteField,
    NDRSignedIntField,
    NDRSignedLongField,
    NDRSignedShortField,
    NDRUnionField,
    register_com_interface,
)

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


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


class get_IAppHostMethod_Name_Request(NDRPacket):
    fields_desc = []


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


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


class get_IAppHostMethod_Schema_Request(NDRPacket):
    fields_desc = []


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


class CreateInstance_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTMETHOD_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(get_IAppHostMethod_Name_Request, get_IAppHostMethod_Name_Response),
    4: DceRpcOp(get_IAppHostMethod_Schema_Request, get_IAppHostMethod_Schema_Response),
    5: DceRpcOp(CreateInstance_Request, CreateInstance_Response),
}
register_com_interface(
    name="IAppHostMethod",
    uuid=uuid.UUID("7883ca1c-1112-4447-84c3-52fbeb38069d"),
    opnums=IAPPHOSTMETHOD_OPNUMS,
)


class get_IAppHostMethodInstance_Input_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostMethodInstance_Output_Request(NDRPacket):
    fields_desc = []


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


class Execute_Request(NDRPacket):
    fields_desc = []


class Execute_Response(NDRPacket):
    fields_desc = [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 SF_TYPE(IntEnum):
    SF_ERROR = VARENUM.VT_ERROR
    SF_I1 = VARENUM.VT_I1
    SF_I2 = VARENUM.VT_I2
    SF_I4 = VARENUM.VT_I4
    SF_I8 = VARENUM.VT_I8
    SF_BSTR = VARENUM.VT_BSTR
    SF_UNKNOWN = VARENUM.VT_UNKNOWN
    SF_DISPATCH = VARENUM.VT_DISPATCH
    SF_VARIANT = VARENUM.VT_VARIANT
    SF_RECORD = VARENUM.VT_RECORD
    SF_HAVEIID = VARENUM.VT_UNKNOWN | 32768


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


class GetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class SetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(NDRPacketField("value", wireVARIANTStr(), wireVARIANTStr)),
    ]


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


IAPPHOSTMETHODINSTANCE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostMethodInstance_Input_Request,
        get_IAppHostMethodInstance_Input_Response,
    ),
    4: DceRpcOp(
        get_IAppHostMethodInstance_Output_Request,
        get_IAppHostMethodInstance_Output_Response,
    ),
    5: DceRpcOp(Execute_Request, Execute_Response),
    6: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    7: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
}
register_com_interface(
    name="IAppHostMethodInstance",
    uuid=uuid.UUID("b80f3c42-60e0-4ae0-9007-f52852d3dbed"),
    opnums=IAPPHOSTMETHODINSTANCE_OPNUMS,
)


class get_IAppHostElement_Name_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostElement_Collection_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostElement_Properties_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostElement_ChildElements_Request(NDRPacket):
    fields_desc = []


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


class GetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class SetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(NDRPacketField("value", wireVARIANTStr(), wireVARIANTStr)),
    ]


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


class get_IAppHostElement_Schema_Request(NDRPacket):
    fields_desc = []


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


class GetElementByName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrSubName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class GetPropertyByName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrSubName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class Clear_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostElement_Methods_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTELEMENT_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(get_IAppHostElement_Name_Request, get_IAppHostElement_Name_Response),
    4: DceRpcOp(
        get_IAppHostElement_Collection_Request, get_IAppHostElement_Collection_Response
    ),
    5: DceRpcOp(
        get_IAppHostElement_Properties_Request, get_IAppHostElement_Properties_Response
    ),
    6: DceRpcOp(
        get_IAppHostElement_ChildElements_Request,
        get_IAppHostElement_ChildElements_Response,
    ),
    7: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    8: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
    9: DceRpcOp(
        get_IAppHostElement_Schema_Request, get_IAppHostElement_Schema_Response
    ),
    10: DceRpcOp(GetElementByName_Request, GetElementByName_Response),
    11: DceRpcOp(GetPropertyByName_Request, GetPropertyByName_Response),
    12: DceRpcOp(Clear_Request, Clear_Response),
    13: DceRpcOp(
        get_IAppHostElement_Methods_Request, get_IAppHostElement_Methods_Response
    ),
}
register_com_interface(
    name="IAppHostElement",
    uuid=uuid.UUID("64ff8ccc-b287-4dae-b08a-a72cbf45f453"),
    opnums=IAPPHOSTELEMENT_OPNUMS,
)


class get_IAppHostProperty_Name_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostProperty_Value_Request(NDRPacket):
    fields_desc = []


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


class put_IAppHostProperty_Value_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("value", wireVARIANTStr(), wireVARIANTStr))
    ]


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


class Clear_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostProperty_StringValue_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostProperty_Exception_Request(NDRPacket):
    fields_desc = []


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


class GetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class SetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(NDRPacketField("value", wireVARIANTStr(), wireVARIANTStr)),
    ]


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


class get_IAppHostProperty_Schema_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTPROPERTY_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(get_IAppHostProperty_Name_Request, get_IAppHostProperty_Name_Response),
    4: DceRpcOp(
        get_IAppHostProperty_Value_Request, get_IAppHostProperty_Value_Response
    ),
    5: DceRpcOp(
        put_IAppHostProperty_Value_Request, put_IAppHostProperty_Value_Response
    ),
    6: DceRpcOp(Clear_Request, Clear_Response),
    7: DceRpcOp(
        get_IAppHostProperty_StringValue_Request,
        get_IAppHostProperty_StringValue_Response,
    ),
    8: DceRpcOp(
        get_IAppHostProperty_Exception_Request, get_IAppHostProperty_Exception_Response
    ),
    9: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    10: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
    11: DceRpcOp(
        get_IAppHostProperty_Schema_Request, get_IAppHostProperty_Schema_Response
    ),
}
register_com_interface(
    name="IAppHostProperty",
    uuid=uuid.UUID("ed35f7a1-5024-4e7b-a44d-07ddaf4b524d"),
    opnums=IAPPHOSTPROPERTY_OPNUMS,
)


class get_IAppHostConfigLocation_Path_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigLocation_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigLocation_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


class AddConfigSection_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrSectionName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class DeleteConfigSection_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


IAPPHOSTCONFIGLOCATION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostConfigLocation_Path_Request,
        get_IAppHostConfigLocation_Path_Response,
    ),
    4: DceRpcOp(
        get_IAppHostConfigLocation_Count_Request,
        get_IAppHostConfigLocation_Count_Response,
    ),
    5: DceRpcOp(
        get_IAppHostConfigLocation_Item_Request,
        get_IAppHostConfigLocation_Item_Response,
    ),
    6: DceRpcOp(AddConfigSection_Request, AddConfigSection_Response),
    7: DceRpcOp(DeleteConfigSection_Request, DeleteConfigSection_Response),
}
register_com_interface(
    name="IAppHostConfigLocation",
    uuid=uuid.UUID("370af178-7758-4dad-8146-7391f6e18585"),
    opnums=IAPPHOSTCONFIGLOCATION_OPNUMS,
)


class get_IAppHostElementSchema_Name_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostElementSchema_DoesAllowUnschematizedProperties_Request(NDRPacket):
    fields_desc = []


class get_IAppHostElementSchema_DoesAllowUnschematizedProperties_Response(NDRPacket):
    fields_desc = [
        NDRSignedShortField("pfAllowUnschematized", 0),
        NDRIntField("status", 0),
    ]


class GetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IAppHostElementSchema_CollectionSchema_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostElementSchema_ChildElementSchemas_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostElementSchema_PropertySchemas_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostElementSchema_IsCollectionDefault_Request(NDRPacket):
    fields_desc = []


class get_IAppHostElementSchema_IsCollectionDefault_Response(NDRPacket):
    fields_desc = [
        NDRSignedShortField("pfIsCollectionDefault", 0),
        NDRIntField("status", 0),
    ]


IAPPHOSTELEMENTSCHEMA_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostElementSchema_Name_Request, get_IAppHostElementSchema_Name_Response
    ),
    4: DceRpcOp(
        get_IAppHostElementSchema_DoesAllowUnschematizedProperties_Request,
        get_IAppHostElementSchema_DoesAllowUnschematizedProperties_Response,
    ),
    5: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    6: DceRpcOp(
        get_IAppHostElementSchema_CollectionSchema_Request,
        get_IAppHostElementSchema_CollectionSchema_Response,
    ),
    7: DceRpcOp(
        get_IAppHostElementSchema_ChildElementSchemas_Request,
        get_IAppHostElementSchema_ChildElementSchemas_Response,
    ),
    8: DceRpcOp(
        get_IAppHostElementSchema_PropertySchemas_Request,
        get_IAppHostElementSchema_PropertySchemas_Response,
    ),
    9: DceRpcOp(
        get_IAppHostElementSchema_IsCollectionDefault_Request,
        get_IAppHostElementSchema_IsCollectionDefault_Response,
    ),
}
register_com_interface(
    name="IAppHostElementSchema",
    uuid=uuid.UUID("ef13d885-642c-4709-99ec-b89561c6bc69"),
    opnums=IAPPHOSTELEMENTSCHEMA_OPNUMS,
)


class get_IAppHostPropertySchema_Name_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostPropertySchema_Type_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostPropertySchema_DefaultValue_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostPropertySchema_IsRequired_Request(NDRPacket):
    fields_desc = []


class get_IAppHostPropertySchema_IsRequired_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("pfIsRequired", 0), NDRIntField("status", 0)]


class get_IAppHostPropertySchema_IsUniqueKey_Request(NDRPacket):
    fields_desc = []


class get_IAppHostPropertySchema_IsUniqueKey_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("pfIsUniqueKey", 0), NDRIntField("status", 0)]


class get_IAppHostPropertySchema_IsCombinedKey_Request(NDRPacket):
    fields_desc = []


class get_IAppHostPropertySchema_IsCombinedKey_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("pfIsCombinedKey", 0), NDRIntField("status", 0)]


class get_IAppHostPropertySchema_IsExpanded_Request(NDRPacket):
    fields_desc = []


class get_IAppHostPropertySchema_IsExpanded_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("pfIsExpanded", 0), NDRIntField("status", 0)]


class get_IAppHostPropertySchema_ValidationType_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostPropertySchema_ValidationParameter_Request(NDRPacket):
    fields_desc = []


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


class GetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IAppHostPropertySchema_IsCaseSensitive_Request(NDRPacket):
    fields_desc = []


class get_IAppHostPropertySchema_IsCaseSensitive_Response(NDRPacket):
    fields_desc = [
        NDRSignedShortField("pfIsCaseSensitive", 0),
        NDRIntField("status", 0),
    ]


class get_IAppHostPropertySchema_PossibleValues_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostPropertySchema_DoesAllowInfinite_Request(NDRPacket):
    fields_desc = []


class get_IAppHostPropertySchema_DoesAllowInfinite_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("pfAllowInfinite", 0), NDRIntField("status", 0)]


class get_IAppHostPropertySchema_IsEncrypted_Request(NDRPacket):
    fields_desc = []


class get_IAppHostPropertySchema_IsEncrypted_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("pfIsEncrypted", 0), NDRIntField("status", 0)]


class get_IAppHostPropertySchema_TimeSpanFormat_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTPROPERTYSCHEMA_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostPropertySchema_Name_Request,
        get_IAppHostPropertySchema_Name_Response,
    ),
    4: DceRpcOp(
        get_IAppHostPropertySchema_Type_Request,
        get_IAppHostPropertySchema_Type_Response,
    ),
    5: DceRpcOp(
        get_IAppHostPropertySchema_DefaultValue_Request,
        get_IAppHostPropertySchema_DefaultValue_Response,
    ),
    6: DceRpcOp(
        get_IAppHostPropertySchema_IsRequired_Request,
        get_IAppHostPropertySchema_IsRequired_Response,
    ),
    7: DceRpcOp(
        get_IAppHostPropertySchema_IsUniqueKey_Request,
        get_IAppHostPropertySchema_IsUniqueKey_Response,
    ),
    8: DceRpcOp(
        get_IAppHostPropertySchema_IsCombinedKey_Request,
        get_IAppHostPropertySchema_IsCombinedKey_Response,
    ),
    9: DceRpcOp(
        get_IAppHostPropertySchema_IsExpanded_Request,
        get_IAppHostPropertySchema_IsExpanded_Response,
    ),
    10: DceRpcOp(
        get_IAppHostPropertySchema_ValidationType_Request,
        get_IAppHostPropertySchema_ValidationType_Response,
    ),
    11: DceRpcOp(
        get_IAppHostPropertySchema_ValidationParameter_Request,
        get_IAppHostPropertySchema_ValidationParameter_Response,
    ),
    12: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    13: DceRpcOp(
        get_IAppHostPropertySchema_IsCaseSensitive_Request,
        get_IAppHostPropertySchema_IsCaseSensitive_Response,
    ),
    14: DceRpcOp(
        get_IAppHostPropertySchema_PossibleValues_Request,
        get_IAppHostPropertySchema_PossibleValues_Response,
    ),
    15: DceRpcOp(
        get_IAppHostPropertySchema_DoesAllowInfinite_Request,
        get_IAppHostPropertySchema_DoesAllowInfinite_Response,
    ),
    16: DceRpcOp(
        get_IAppHostPropertySchema_IsEncrypted_Request,
        get_IAppHostPropertySchema_IsEncrypted_Response,
    ),
    17: DceRpcOp(
        get_IAppHostPropertySchema_TimeSpanFormat_Request,
        get_IAppHostPropertySchema_TimeSpanFormat_Response,
    ),
}
register_com_interface(
    name="IAppHostPropertySchema",
    uuid=uuid.UUID("450386db-7409-4667-935e-384dbbee2a9e"),
    opnums=IAPPHOSTPROPERTYSCHEMA_OPNUMS,
)


class get_IAppHostConstantValue_Name_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConstantValue_Value_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTCONSTANTVALUE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostConstantValue_Name_Request, get_IAppHostConstantValue_Name_Response
    ),
    4: DceRpcOp(
        get_IAppHostConstantValue_Value_Request,
        get_IAppHostConstantValue_Value_Response,
    ),
}
register_com_interface(
    name="IAppHostConstantValue",
    uuid=uuid.UUID("0716caf8-7d05-4a46-8099-77594be91394"),
    opnums=IAPPHOSTCONSTANTVALUE_OPNUMS,
)


class GetConfigFile_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrConfigPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class GetUniqueConfigPath_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrConfigPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IAPPHOSTCONFIGMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetConfigFile_Request, GetConfigFile_Response),
    4: DceRpcOp(GetUniqueConfigPath_Request, GetUniqueConfigPath_Response),
}
register_com_interface(
    name="IAppHostConfigManager",
    uuid=uuid.UUID("8f6d760f-f0cb-4d69-b5f6-848b33e9bdc6"),
    opnums=IAPPHOSTCONFIGMANAGER_OPNUMS,
)


class GetSiteNameFromSiteId_Request(NDRPacket):
    fields_desc = [NDRIntField("dwSiteId", 0)]


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


class GetSiteIdFromSiteName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrSiteName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class GetSiteElementFromSiteId_Request(NDRPacket):
    fields_desc = [NDRIntField("dwSiteId", 0)]


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


class MapPath_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrSiteName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("bstrVirtualPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


class MapPath_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField(
                    "pbstrPhysicalPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
                )
            )
        ),
        NDRFullPointerField(
            NDRPacketField(
                "ppVirtualDirectoryElement", MInterfacePointer(), MInterfacePointer
            )
        ),
        NDRFullPointerField(
            NDRPacketField(
                "ppApplicationElement", MInterfacePointer(), MInterfacePointer
            )
        ),
        NDRIntField("status", 0),
    ]


IAPPHOSTMAPPINGEXTENSION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetSiteNameFromSiteId_Request, GetSiteNameFromSiteId_Response),
    4: DceRpcOp(GetSiteIdFromSiteName_Request, GetSiteIdFromSiteName_Response),
    5: DceRpcOp(GetSiteElementFromSiteId_Request, GetSiteElementFromSiteId_Response),
    6: DceRpcOp(MapPath_Request, MapPath_Response),
}
register_com_interface(
    name="IAppHostMappingExtension",
    uuid=uuid.UUID("31a83ea0-c0e4-4a2c-8a01-353cc2a4c60a"),
    opnums=IAPPHOSTMAPPINGEXTENSION_OPNUMS,
)


class get_IAppHostChildElementCollection_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostChildElementCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


IAPPHOSTCHILDELEMENTCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostChildElementCollection_Count_Request,
        get_IAppHostChildElementCollection_Count_Response,
    ),
    4: DceRpcOp(
        get_IAppHostChildElementCollection_Item_Request,
        get_IAppHostChildElementCollection_Item_Response,
    ),
}
register_com_interface(
    name="IAppHostChildElementCollection",
    uuid=uuid.UUID("08a90f5f-0702-48d6-b45f-02a9885a9768"),
    opnums=IAPPHOSTCHILDELEMENTCOLLECTION_OPNUMS,
)


class get_IAppHostPropertyCollection_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostPropertyCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


IAPPHOSTPROPERTYCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostPropertyCollection_Count_Request,
        get_IAppHostPropertyCollection_Count_Response,
    ),
    4: DceRpcOp(
        get_IAppHostPropertyCollection_Item_Request,
        get_IAppHostPropertyCollection_Item_Response,
    ),
}
register_com_interface(
    name="IAppHostPropertyCollection",
    uuid=uuid.UUID("0191775e-bcff-445a-b4f4-3bdda54e2816"),
    opnums=IAPPHOSTPROPERTYCOLLECTION_OPNUMS,
)


class get_IAppHostConfigLocationCollection_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigLocationCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("varIndex", wireVARIANTStr(), wireVARIANTStr)
        )
    ]


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


class AddLocation_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrLocationPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class DeleteLocation_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


IAPPHOSTCONFIGLOCATIONCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostConfigLocationCollection_Count_Request,
        get_IAppHostConfigLocationCollection_Count_Response,
    ),
    4: DceRpcOp(
        get_IAppHostConfigLocationCollection_Item_Request,
        get_IAppHostConfigLocationCollection_Item_Response,
    ),
    5: DceRpcOp(AddLocation_Request, AddLocation_Response),
    6: DceRpcOp(DeleteLocation_Request, DeleteLocation_Response),
}
register_com_interface(
    name="IAppHostConfigLocationCollection",
    uuid=uuid.UUID("832a32f7-b3ea-4b8c-b260-9a2923001184"),
    opnums=IAPPHOSTCONFIGLOCATIONCOLLECTION_OPNUMS,
)


class get_IAppHostMethodCollection_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostMethodCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


IAPPHOSTMETHODCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostMethodCollection_Count_Request,
        get_IAppHostMethodCollection_Count_Response,
    ),
    4: DceRpcOp(
        get_IAppHostMethodCollection_Item_Request,
        get_IAppHostMethodCollection_Item_Response,
    ),
}
register_com_interface(
    name="IAppHostMethodCollection",
    uuid=uuid.UUID("d6c7cd8f-bb8d-4f96-b591-d3a5f1320269"),
    opnums=IAPPHOSTMETHODCOLLECTION_OPNUMS,
)


class get_IAppHostElementSchemaCollection_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostElementSchemaCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


IAPPHOSTELEMENTSCHEMACOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostElementSchemaCollection_Count_Request,
        get_IAppHostElementSchemaCollection_Count_Response,
    ),
    4: DceRpcOp(
        get_IAppHostElementSchemaCollection_Item_Request,
        get_IAppHostElementSchemaCollection_Item_Response,
    ),
}
register_com_interface(
    name="IAppHostElementSchemaCollection",
    uuid=uuid.UUID("0344cdda-151e-4cbf-82da-66ae61e97754"),
    opnums=IAPPHOSTELEMENTSCHEMACOLLECTION_OPNUMS,
)


class get_IAppHostPropertySchemaCollection_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostPropertySchemaCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


IAPPHOSTPROPERTYSCHEMACOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostPropertySchemaCollection_Count_Request,
        get_IAppHostPropertySchemaCollection_Count_Response,
    ),
    4: DceRpcOp(
        get_IAppHostPropertySchemaCollection_Item_Request,
        get_IAppHostPropertySchemaCollection_Item_Response,
    ),
}
register_com_interface(
    name="IAppHostPropertySchemaCollection",
    uuid=uuid.UUID("8bed2c68-a5fb-4b28-8581-a0dc5267419f"),
    opnums=IAPPHOSTPROPERTYSCHEMACOLLECTION_OPNUMS,
)


class get_IAppHostConstantValueCollection_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConstantValueCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


IAPPHOSTCONSTANTVALUECOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostConstantValueCollection_Count_Request,
        get_IAppHostConstantValueCollection_Count_Response,
    ),
    4: DceRpcOp(
        get_IAppHostConstantValueCollection_Item_Request,
        get_IAppHostConstantValueCollection_Item_Response,
    ),
}
register_com_interface(
    name="IAppHostConstantValueCollection",
    uuid=uuid.UUID("5b5a68e6-8b9f-45e1-8199-a95ffccdffff"),
    opnums=IAPPHOSTCONSTANTVALUECOLLECTION_OPNUMS,
)


class get_IAppHostCollectionSchema_AddElementNames_Request(NDRPacket):
    fields_desc = []


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


class GetAddElementSchema_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrElementName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IAppHostCollectionSchema_RemoveElementSchema_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostCollectionSchema_ClearElementSchema_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostCollectionSchema_IsMergeAppend_Request(NDRPacket):
    fields_desc = []


class get_IAppHostCollectionSchema_IsMergeAppend_Response(NDRPacket):
    fields_desc = [NDRSignedShortField("pfIsMergeAppend", 0), NDRIntField("status", 0)]


class GetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IAppHostCollectionSchema_DoesAllowDuplicates_Request(NDRPacket):
    fields_desc = []


class get_IAppHostCollectionSchema_DoesAllowDuplicates_Response(NDRPacket):
    fields_desc = [
        NDRSignedShortField("pfAllowDuplicates", 0),
        NDRIntField("status", 0),
    ]


IAPPHOSTCOLLECTIONSCHEMA_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostCollectionSchema_AddElementNames_Request,
        get_IAppHostCollectionSchema_AddElementNames_Response,
    ),
    4: DceRpcOp(GetAddElementSchema_Request, GetAddElementSchema_Response),
    5: DceRpcOp(
        get_IAppHostCollectionSchema_RemoveElementSchema_Request,
        get_IAppHostCollectionSchema_RemoveElementSchema_Response,
    ),
    6: DceRpcOp(
        get_IAppHostCollectionSchema_ClearElementSchema_Request,
        get_IAppHostCollectionSchema_ClearElementSchema_Response,
    ),
    7: DceRpcOp(
        get_IAppHostCollectionSchema_IsMergeAppend_Request,
        get_IAppHostCollectionSchema_IsMergeAppend_Response,
    ),
    8: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    9: DceRpcOp(
        get_IAppHostCollectionSchema_DoesAllowDuplicates_Request,
        get_IAppHostCollectionSchema_DoesAllowDuplicates_Response,
    ),
}
register_com_interface(
    name="IAppHostCollectionSchema",
    uuid=uuid.UUID("de095db1-5368-4d11-81f6-efef619b7bcf"),
    opnums=IAPPHOSTCOLLECTIONSCHEMA_OPNUMS,
)


class get_IAppHostMethodSchema_Name_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostMethodSchema_InputSchema_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostMethodSchema_OutputSchema_Request(NDRPacket):
    fields_desc = []


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


class GetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IAPPHOSTMETHODSCHEMA_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostMethodSchema_Name_Request, get_IAppHostMethodSchema_Name_Response
    ),
    4: DceRpcOp(
        get_IAppHostMethodSchema_InputSchema_Request,
        get_IAppHostMethodSchema_InputSchema_Response,
    ),
    5: DceRpcOp(
        get_IAppHostMethodSchema_OutputSchema_Request,
        get_IAppHostMethodSchema_OutputSchema_Response,
    ),
    6: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
}
register_com_interface(
    name="IAppHostMethodSchema",
    uuid=uuid.UUID("2d9915fb-9d42-4328-b782-1b46819fab9e"),
    opnums=IAPPHOSTMETHODSCHEMA_OPNUMS,
)


class get_IAppHostConfigException_LineNumber_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigException_FileName_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigException_ConfigPath_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigException_ErrorLine_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigException_PreErrorLine_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigException_PostErrorLine_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigException_ErrorString_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTCONFIGEXCEPTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostConfigException_LineNumber_Request,
        get_IAppHostConfigException_LineNumber_Response,
    ),
    4: DceRpcOp(
        get_IAppHostConfigException_FileName_Request,
        get_IAppHostConfigException_FileName_Response,
    ),
    5: DceRpcOp(
        get_IAppHostConfigException_ConfigPath_Request,
        get_IAppHostConfigException_ConfigPath_Response,
    ),
    6: DceRpcOp(
        get_IAppHostConfigException_ErrorLine_Request,
        get_IAppHostConfigException_ErrorLine_Response,
    ),
    7: DceRpcOp(
        get_IAppHostConfigException_PreErrorLine_Request,
        get_IAppHostConfigException_PreErrorLine_Response,
    ),
    8: DceRpcOp(
        get_IAppHostConfigException_PostErrorLine_Request,
        get_IAppHostConfigException_PostErrorLine_Response,
    ),
    9: DceRpcOp(
        get_IAppHostConfigException_ErrorString_Request,
        get_IAppHostConfigException_ErrorString_Response,
    ),
}
register_com_interface(
    name="IAppHostConfigException",
    uuid=uuid.UUID("4dfa1df3-8900-4bc7-bbb5-d1a458c52410"),
    opnums=IAPPHOSTCONFIGEXCEPTION_OPNUMS,
)


class get_IAppHostPropertyException_InvalidValue_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostPropertyException_ValidationFailureReason_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostPropertyException_ValidationFailureParameters_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTPROPERTYEXCEPTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostConfigException_LineNumber_Request,
        get_IAppHostConfigException_LineNumber_Response,
    ),
    4: DceRpcOp(
        get_IAppHostConfigException_FileName_Request,
        get_IAppHostConfigException_FileName_Response,
    ),
    5: DceRpcOp(
        get_IAppHostConfigException_ConfigPath_Request,
        get_IAppHostConfigException_ConfigPath_Response,
    ),
    6: DceRpcOp(
        get_IAppHostConfigException_ErrorLine_Request,
        get_IAppHostConfigException_ErrorLine_Response,
    ),
    7: DceRpcOp(
        get_IAppHostConfigException_PreErrorLine_Request,
        get_IAppHostConfigException_PreErrorLine_Response,
    ),
    8: DceRpcOp(
        get_IAppHostConfigException_PostErrorLine_Request,
        get_IAppHostConfigException_PostErrorLine_Response,
    ),
    9: DceRpcOp(
        get_IAppHostConfigException_ErrorString_Request,
        get_IAppHostConfigException_ErrorString_Response,
    ),
    10: DceRpcOp(
        get_IAppHostPropertyException_InvalidValue_Request,
        get_IAppHostPropertyException_InvalidValue_Response,
    ),
    11: DceRpcOp(
        get_IAppHostPropertyException_ValidationFailureReason_Request,
        get_IAppHostPropertyException_ValidationFailureReason_Response,
    ),
    12: DceRpcOp(
        get_IAppHostPropertyException_ValidationFailureParameters_Request,
        get_IAppHostPropertyException_ValidationFailureParameters_Response,
    ),
}
register_com_interface(
    name="IAppHostPropertyException",
    uuid=uuid.UUID("eafe4895-a929-41ea-b14d-613e23f62b71"),
    opnums=IAPPHOSTPROPERTYEXCEPTION_OPNUMS,
)


class get_IAppHostElementCollection_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostElementCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


class AddElement_Request(NDRPacket):
    fields_desc = [
        NDRPacketField("pElement", MInterfacePointer(), MInterfacePointer),
        NDRSignedIntField("cPosition", 0),
    ]


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


class DeleteElement_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr))
    ]


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


class Clear_Request(NDRPacket):
    fields_desc = []


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


class CreateNewElement_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrElementName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IAppHostElementCollection_Schema_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTELEMENTCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostElementCollection_Count_Request,
        get_IAppHostElementCollection_Count_Response,
    ),
    4: DceRpcOp(
        get_IAppHostElementCollection_Item_Request,
        get_IAppHostElementCollection_Item_Response,
    ),
    5: DceRpcOp(AddElement_Request, AddElement_Response),
    6: DceRpcOp(DeleteElement_Request, DeleteElement_Response),
    7: DceRpcOp(Clear_Request, Clear_Response),
    8: DceRpcOp(CreateNewElement_Request, CreateNewElement_Response),
    9: DceRpcOp(
        get_IAppHostElementCollection_Schema_Request,
        get_IAppHostElementCollection_Schema_Response,
    ),
}
register_com_interface(
    name="IAppHostElementCollection",
    uuid=uuid.UUID("c8550bff-5281-4b1e-ac34-99b6fa38464d"),
    opnums=IAPPHOSTELEMENTCOLLECTION_OPNUMS,
)


class get_IAppHostSectionDefinition_Name_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostSectionDefinition_Type_Request(NDRPacket):
    fields_desc = []


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


class put_IAppHostSectionDefinition_Type_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class get_IAppHostSectionDefinition_OverrideModeDefault_Request(NDRPacket):
    fields_desc = []


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


class put_IAppHostSectionDefinition_OverrideModeDefault_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "bstrOverrideModeDefault", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        )
    ]


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


class get_IAppHostSectionDefinition_AllowDefinition_Request(NDRPacket):
    fields_desc = []


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


class put_IAppHostSectionDefinition_AllowDefinition_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "bstrAllowDefinition", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        )
    ]


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


class get_IAppHostSectionDefinition_AllowLocation_Request(NDRPacket):
    fields_desc = []


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


class put_IAppHostSectionDefinition_AllowLocation_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrAllowLocation", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IAPPHOSTSECTIONDEFINITION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostSectionDefinition_Name_Request,
        get_IAppHostSectionDefinition_Name_Response,
    ),
    4: DceRpcOp(
        get_IAppHostSectionDefinition_Type_Request,
        get_IAppHostSectionDefinition_Type_Response,
    ),
    5: DceRpcOp(
        put_IAppHostSectionDefinition_Type_Request,
        put_IAppHostSectionDefinition_Type_Response,
    ),
    6: DceRpcOp(
        get_IAppHostSectionDefinition_OverrideModeDefault_Request,
        get_IAppHostSectionDefinition_OverrideModeDefault_Response,
    ),
    7: DceRpcOp(
        put_IAppHostSectionDefinition_OverrideModeDefault_Request,
        put_IAppHostSectionDefinition_OverrideModeDefault_Response,
    ),
    8: DceRpcOp(
        get_IAppHostSectionDefinition_AllowDefinition_Request,
        get_IAppHostSectionDefinition_AllowDefinition_Response,
    ),
    9: DceRpcOp(
        put_IAppHostSectionDefinition_AllowDefinition_Request,
        put_IAppHostSectionDefinition_AllowDefinition_Response,
    ),
    10: DceRpcOp(
        get_IAppHostSectionDefinition_AllowLocation_Request,
        get_IAppHostSectionDefinition_AllowLocation_Response,
    ),
    11: DceRpcOp(
        put_IAppHostSectionDefinition_AllowLocation_Request,
        put_IAppHostSectionDefinition_AllowLocation_Response,
    ),
}
register_com_interface(
    name="IAppHostSectionDefinition",
    uuid=uuid.UUID("c5c04795-321c-4014-8fd6-d44658799393"),
    opnums=IAPPHOSTSECTIONDEFINITION_OPNUMS,
)


class get_IAppHostSectionDefinitionCollection_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostSectionDefinitionCollection_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("varIndex", wireVARIANTStr(), wireVARIANTStr)
        )
    ]


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


class AddSection_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrSectionName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class DeleteSection_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("varIndex", wireVARIANTStr(), wireVARIANTStr)
        )
    ]


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


IAPPHOSTSECTIONDEFINITIONCOLLECTION_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostSectionDefinitionCollection_Count_Request,
        get_IAppHostSectionDefinitionCollection_Count_Response,
    ),
    4: DceRpcOp(
        get_IAppHostSectionDefinitionCollection_Item_Request,
        get_IAppHostSectionDefinitionCollection_Item_Response,
    ),
    5: DceRpcOp(AddSection_Request, AddSection_Response),
    6: DceRpcOp(DeleteSection_Request, DeleteSection_Response),
}
register_com_interface(
    name="IAppHostSectionDefinitionCollection",
    uuid=uuid.UUID("b7d381ee-8860-47a1-8af4-1f33b2b1f325"),
    opnums=IAPPHOSTSECTIONDEFINITIONCOLLECTION_OPNUMS,
)


class get_IAppHostSectionGroup_Count_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostSectionGroup_Item_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("varIndex", wireVARIANTStr(), wireVARIANTStr)
        )
    ]


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


class get_IAppHostSectionGroup_Sections_Request(NDRPacket):
    fields_desc = []


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


class AddSectionGroup_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "bstrSectionGroupName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        )
    ]


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


class DeleteSectionGroup_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("varIndex", wireVARIANTStr(), wireVARIANTStr)
        )
    ]


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


class get_IAppHostSectionGroup_Name_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostSectionGroup_Type_Request(NDRPacket):
    fields_desc = []


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


class put_IAppHostSectionGroup_Type_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IAPPHOSTSECTIONGROUP_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostSectionGroup_Count_Request, get_IAppHostSectionGroup_Count_Response
    ),
    4: DceRpcOp(
        get_IAppHostSectionGroup_Item_Request, get_IAppHostSectionGroup_Item_Response
    ),
    5: DceRpcOp(
        get_IAppHostSectionGroup_Sections_Request,
        get_IAppHostSectionGroup_Sections_Response,
    ),
    6: DceRpcOp(AddSectionGroup_Request, AddSectionGroup_Response),
    7: DceRpcOp(DeleteSectionGroup_Request, DeleteSectionGroup_Response),
    8: DceRpcOp(
        get_IAppHostSectionGroup_Name_Request, get_IAppHostSectionGroup_Name_Response
    ),
    9: DceRpcOp(
        get_IAppHostSectionGroup_Type_Request, get_IAppHostSectionGroup_Type_Response
    ),
    10: DceRpcOp(
        put_IAppHostSectionGroup_Type_Request, put_IAppHostSectionGroup_Type_Response
    ),
}
register_com_interface(
    name="IAppHostSectionGroup",
    uuid=uuid.UUID("0dd8a158-ebe6-4008-a1d9-b7ecc8f1104b"),
    opnums=IAPPHOSTSECTIONGROUP_OPNUMS,
)


class get_IAppHostConfigFile_ConfigPath_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigFile_FilePath_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigFile_Locations_Request(NDRPacket):
    fields_desc = []


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


class GetAdminSection_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrSectionName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("bstrPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


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


class GetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class SetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(NDRPacketField("value", wireVARIANTStr(), wireVARIANTStr)),
    ]


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


class ClearInvalidSections_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostConfigFile_RootSectionGroup_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTCONFIGFILE_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(
        get_IAppHostConfigFile_ConfigPath_Request,
        get_IAppHostConfigFile_ConfigPath_Response,
    ),
    4: DceRpcOp(
        get_IAppHostConfigFile_FilePath_Request,
        get_IAppHostConfigFile_FilePath_Response,
    ),
    5: DceRpcOp(
        get_IAppHostConfigFile_Locations_Request,
        get_IAppHostConfigFile_Locations_Response,
    ),
    6: DceRpcOp(GetAdminSection_Request, GetAdminSection_Response),
    7: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    8: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
    9: DceRpcOp(ClearInvalidSections_Request, ClearInvalidSections_Response),
    10: DceRpcOp(
        get_IAppHostConfigFile_RootSectionGroup_Request,
        get_IAppHostConfigFile_RootSectionGroup_Response,
    ),
}
register_com_interface(
    name="IAppHostConfigFile",
    uuid=uuid.UUID("ada4e6fb-e025-401e-a5d0-c3134a281f07"),
    opnums=IAPPHOSTCONFIGFILE_OPNUMS,
)


class MapPath_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrConfigPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField(
                "bstrMappedPhysicalPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB
            )
        ),
    ]


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


IAPPHOSTPATHMAPPER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(MapPath_Request, MapPath_Response)
}
register_com_interface(
    name="IAppHostPathMapper",
    uuid=uuid.UUID("e7927575-5cc3-403b-822e-328a6b904bee"),
    opnums=IAPPHOSTPATHMAPPER_OPNUMS,
)


class OnSectionChanges_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrSectionName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("bstrConfigPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


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


IAPPHOSTCHANGEHANDLER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(OnSectionChanges_Request, OnSectionChanges_Response)
}
register_com_interface(
    name="IAppHostChangeHandler",
    uuid=uuid.UUID("09829352-87c2-418d-8d79-4133969a489d"),
    opnums=IAPPHOSTCHANGEHANDLER_OPNUMS,
)


class GetAdminSection_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrSectionName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(
            NDRPacketField("bstrPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
    ]


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


class GetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


class SetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRFullPointerField(NDRPacketField("value", wireVARIANTStr(), wireVARIANTStr)),
    ]


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


class get_IAppHostAdminManager_ConfigManager_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTADMINMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetAdminSection_Request, GetAdminSection_Response),
    4: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    5: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
    6: DceRpcOp(
        get_IAppHostAdminManager_ConfigManager_Request,
        get_IAppHostAdminManager_ConfigManager_Response,
    ),
}
register_com_interface(
    name="IAppHostAdminManager",
    uuid=uuid.UUID("9be77978-73ed-4a9a-87fd-13f09fec1b13"),
    opnums=IAPPHOSTADMINMANAGER_OPNUMS,
)


class CommitChanges_Request(NDRPacket):
    fields_desc = []


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


class get_IAppHostWritableAdminManager_CommitPath_Request(NDRPacket):
    fields_desc = []


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


class put_IAppHostWritableAdminManager_CommitPath_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("bstrCommitPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        )
    ]


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


IAPPHOSTWRITABLEADMINMANAGER_OPNUMS = {  # 0: Opnum0NotUsedOnWire,
    # 1: Opnum1NotUsedOnWire,
    # 2: Opnum2NotUsedOnWire,
    3: DceRpcOp(GetAdminSection_Request, GetAdminSection_Response),
    4: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    5: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
    6: DceRpcOp(
        get_IAppHostAdminManager_ConfigManager_Request,
        get_IAppHostAdminManager_ConfigManager_Response,
    ),
    7: DceRpcOp(CommitChanges_Request, CommitChanges_Response),
    8: DceRpcOp(
        get_IAppHostWritableAdminManager_CommitPath_Request,
        get_IAppHostWritableAdminManager_CommitPath_Response,
    ),
    9: DceRpcOp(
        put_IAppHostWritableAdminManager_CommitPath_Request,
        put_IAppHostWritableAdminManager_CommitPath_Response,
    ),
}
register_com_interface(
    name="IAppHostWritableAdminManager",
    uuid=uuid.UUID("fa7660f6-7b3f-4237-a8bf-ed0ad0dcbbd9"),
    opnums=IAPPHOSTWRITABLEADMINMANAGER_OPNUMS,
)
