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


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


class get_Name_Request(NDRPacket):
    fields_desc = []


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


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


class get_Schema_Request(NDRPacket):
    fields_desc = []


class get_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: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(get_Schema_Request, get_Schema_Response),
    2: DceRpcOp(CreateInstance_Request, CreateInstance_Response),
}
register_com_interface(
    name="IAppHostMethod",
    uuid=uuid.UUID("7883ca1c-1112-4447-84c3-52fbeb38069d"),
    opnums=IAPPHOSTMETHOD_OPNUMS,
)


class get_Input_Request(NDRPacket):
    fields_desc = []


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


class get_Output_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


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


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


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


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


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


IAPPHOSTMETHODINSTANCE_OPNUMS = {
    0: DceRpcOp(get_Input_Request, get_Input_Response),
    1: DceRpcOp(get_Output_Request, get_Output_Response),
    2: DceRpcOp(Execute_Request, Execute_Response),
    3: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    4: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
}
register_com_interface(
    name="IAppHostMethodInstance",
    uuid=uuid.UUID("b80f3c42-60e0-4ae0-9007-f52852d3dbed"),
    opnums=IAPPHOSTMETHODINSTANCE_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_Collection_Request(NDRPacket):
    fields_desc = []


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


class get_Properties_Request(NDRPacket):
    fields_desc = []


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


class get_ChildElements_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


class get_Schema_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTELEMENT_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(get_Collection_Request, get_Collection_Response),
    2: DceRpcOp(get_Properties_Request, get_Properties_Response),
    3: DceRpcOp(get_ChildElements_Request, get_ChildElements_Response),
    4: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    5: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
    6: DceRpcOp(get_Schema_Request, get_Schema_Response),
    7: DceRpcOp(GetElementByName_Request, GetElementByName_Response),
    8: DceRpcOp(GetPropertyByName_Request, GetPropertyByName_Response),
    9: DceRpcOp(Clear_Request, Clear_Response),
    10: DceRpcOp(get_Methods_Request, get_Methods_Response),
}
register_com_interface(
    name="IAppHostElement",
    uuid=uuid.UUID("64ff8ccc-b287-4dae-b08a-a72cbf45f453"),
    opnums=IAPPHOSTELEMENT_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_Value_Request(NDRPacket):
    fields_desc = []


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


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


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


class Clear_Request(NDRPacket):
    fields_desc = []


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


class get_StringValue_Request(NDRPacket):
    fields_desc = []


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


class get_Exception_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


class get_Schema_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTPROPERTY_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(get_Value_Request, get_Value_Response),
    2: DceRpcOp(put_Value_Request, put_Value_Response),
    3: DceRpcOp(Clear_Request, Clear_Response),
    4: DceRpcOp(get_StringValue_Request, get_StringValue_Response),
    5: DceRpcOp(get_Exception_Request, get_Exception_Response),
    6: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    7: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
    8: DceRpcOp(get_Schema_Request, get_Schema_Response),
}
register_com_interface(
    name="IAppHostProperty",
    uuid=uuid.UUID("ed35f7a1-5024-4e7b-a44d-07ddaf4b524d"),
    opnums=IAPPHOSTPROPERTY_OPNUMS,
)


class get_Path_Request(NDRPacket):
    fields_desc = []


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


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


class AddConfigSection_Request(NDRPacket):
    fields_desc = [
        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 = [NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr)]


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


IAPPHOSTCONFIGLOCATION_OPNUMS = {
    0: DceRpcOp(get_Path_Request, get_Path_Response),
    1: DceRpcOp(get_Count_Request, get_Count_Response),
    2: DceRpcOp(get_Item_Request, get_Item_Response),
    3: DceRpcOp(AddConfigSection_Request, AddConfigSection_Response),
    4: DceRpcOp(DeleteConfigSection_Request, DeleteConfigSection_Response),
}
register_com_interface(
    name="IAppHostConfigLocation",
    uuid=uuid.UUID("370af178-7758-4dad-8146-7391f6e18585"),
    opnums=IAPPHOSTCONFIGLOCATION_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_DoesAllowUnschematizedProperties_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_CollectionSchema_Request(NDRPacket):
    fields_desc = []


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


class get_ChildElementSchemas_Request(NDRPacket):
    fields_desc = []


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


class get_PropertySchemas_Request(NDRPacket):
    fields_desc = []


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


class get_IsCollectionDefault_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTELEMENTSCHEMA_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(
        get_DoesAllowUnschematizedProperties_Request,
        get_DoesAllowUnschematizedProperties_Response,
    ),
    2: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    3: DceRpcOp(get_CollectionSchema_Request, get_CollectionSchema_Response),
    4: DceRpcOp(get_ChildElementSchemas_Request, get_ChildElementSchemas_Response),
    5: DceRpcOp(get_PropertySchemas_Request, get_PropertySchemas_Response),
    6: DceRpcOp(get_IsCollectionDefault_Request, get_IsCollectionDefault_Response),
}
register_com_interface(
    name="IAppHostElementSchema",
    uuid=uuid.UUID("ef13d885-642c-4709-99ec-b89561c6bc69"),
    opnums=IAPPHOSTELEMENTSCHEMA_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_Type_Request(NDRPacket):
    fields_desc = []


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


class get_DefaultValue_Request(NDRPacket):
    fields_desc = []


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


class get_IsRequired_Request(NDRPacket):
    fields_desc = []


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


class get_IsUniqueKey_Request(NDRPacket):
    fields_desc = []


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


class get_IsCombinedKey_Request(NDRPacket):
    fields_desc = []


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


class get_IsExpanded_Request(NDRPacket):
    fields_desc = []


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


class get_ValidationType_Request(NDRPacket):
    fields_desc = []


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


class get_ValidationParameter_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_IsCaseSensitive_Request(NDRPacket):
    fields_desc = []


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


class get_PossibleValues_Request(NDRPacket):
    fields_desc = []


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


class get_DoesAllowInfinite_Request(NDRPacket):
    fields_desc = []


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


class get_IsEncrypted_Request(NDRPacket):
    fields_desc = []


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


class get_TimeSpanFormat_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTPROPERTYSCHEMA_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(get_Type_Request, get_Type_Response),
    2: DceRpcOp(get_DefaultValue_Request, get_DefaultValue_Response),
    3: DceRpcOp(get_IsRequired_Request, get_IsRequired_Response),
    4: DceRpcOp(get_IsUniqueKey_Request, get_IsUniqueKey_Response),
    5: DceRpcOp(get_IsCombinedKey_Request, get_IsCombinedKey_Response),
    6: DceRpcOp(get_IsExpanded_Request, get_IsExpanded_Response),
    7: DceRpcOp(get_ValidationType_Request, get_ValidationType_Response),
    8: DceRpcOp(get_ValidationParameter_Request, get_ValidationParameter_Response),
    9: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    10: DceRpcOp(get_IsCaseSensitive_Request, get_IsCaseSensitive_Response),
    11: DceRpcOp(get_PossibleValues_Request, get_PossibleValues_Response),
    12: DceRpcOp(get_DoesAllowInfinite_Request, get_DoesAllowInfinite_Response),
    13: DceRpcOp(get_IsEncrypted_Request, get_IsEncrypted_Response),
    14: DceRpcOp(get_TimeSpanFormat_Request, get_TimeSpanFormat_Response),
}
register_com_interface(
    name="IAppHostPropertySchema",
    uuid=uuid.UUID("450386db-7409-4667-935e-384dbbee2a9e"),
    opnums=IAPPHOSTPROPERTYSCHEMA_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_Value_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTCONSTANTVALUE_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(get_Value_Request, get_Value_Response),
}
register_com_interface(
    name="IAppHostConstantValue",
    uuid=uuid.UUID("0716caf8-7d05-4a46-8099-77594be91394"),
    opnums=IAPPHOSTCONSTANTVALUE_OPNUMS,
)


class GetConfigFile_Request(NDRPacket):
    fields_desc = [
        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 = [
        NDRPacketField("bstrConfigPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
    ]


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


IAPPHOSTCONFIGMANAGER_OPNUMS = {
    0: DceRpcOp(GetConfigFile_Request, GetConfigFile_Response),
    1: 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(
            NDRPacketField("pbstrSiteName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
        ),
        NDRIntField("status", 0),
    ]


class GetSiteIdFromSiteName_Request(NDRPacket):
    fields_desc = [
        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 = [
        NDRPacketField("bstrSiteName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        NDRPacketField("bstrVirtualPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
    ]


class MapPath_Response(NDRPacket):
    fields_desc = [
        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: DceRpcOp(GetSiteNameFromSiteId_Request, GetSiteNameFromSiteId_Response),
    1: DceRpcOp(GetSiteIdFromSiteName_Request, GetSiteIdFromSiteName_Response),
    2: DceRpcOp(GetSiteElementFromSiteId_Request, GetSiteElementFromSiteId_Response),
    3: DceRpcOp(MapPath_Request, MapPath_Response),
}
register_com_interface(
    name="IAppHostMappingExtension",
    uuid=uuid.UUID("31a83ea0-c0e4-4a2c-8a01-353cc2a4c60a"),
    opnums=IAPPHOSTMAPPINGEXTENSION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTCHILDELEMENTCOLLECTION_OPNUMS = {
    0: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
}
register_com_interface(
    name="IAppHostChildElementCollection",
    uuid=uuid.UUID("08a90f5f-0702-48d6-b45f-02a9885a9768"),
    opnums=IAPPHOSTCHILDELEMENTCOLLECTION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTPROPERTYCOLLECTION_OPNUMS = {
    0: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
}
register_com_interface(
    name="IAppHostPropertyCollection",
    uuid=uuid.UUID("0191775e-bcff-445a-b4f4-3bdda54e2816"),
    opnums=IAPPHOSTPROPERTYCOLLECTION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


class AddLocation_Request(NDRPacket):
    fields_desc = [
        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 = [NDRPacketField("cIndex", wireVARIANTStr(), wireVARIANTStr)]


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


IAPPHOSTCONFIGLOCATIONCOLLECTION_OPNUMS = {
    0: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(AddLocation_Request, AddLocation_Response),
    3: DceRpcOp(DeleteLocation_Request, DeleteLocation_Response),
}
register_com_interface(
    name="IAppHostConfigLocationCollection",
    uuid=uuid.UUID("832a32f7-b3ea-4b8c-b260-9a2923001184"),
    opnums=IAPPHOSTCONFIGLOCATIONCOLLECTION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTMETHODCOLLECTION_OPNUMS = {
    0: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
}
register_com_interface(
    name="IAppHostMethodCollection",
    uuid=uuid.UUID("d6c7cd8f-bb8d-4f96-b591-d3a5f1320269"),
    opnums=IAPPHOSTMETHODCOLLECTION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTELEMENTSCHEMACOLLECTION_OPNUMS = {
    0: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
}
register_com_interface(
    name="IAppHostElementSchemaCollection",
    uuid=uuid.UUID("0344cdda-151e-4cbf-82da-66ae61e97754"),
    opnums=IAPPHOSTELEMENTSCHEMACOLLECTION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTPROPERTYSCHEMACOLLECTION_OPNUMS = {
    0: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
}
register_com_interface(
    name="IAppHostPropertySchemaCollection",
    uuid=uuid.UUID("8bed2c68-a5fb-4b28-8581-a0dc5267419f"),
    opnums=IAPPHOSTPROPERTYSCHEMACOLLECTION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTCONSTANTVALUECOLLECTION_OPNUMS = {
    0: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
}
register_com_interface(
    name="IAppHostConstantValueCollection",
    uuid=uuid.UUID("5b5a68e6-8b9f-45e1-8199-a95ffccdffff"),
    opnums=IAPPHOSTCONSTANTVALUECOLLECTION_OPNUMS,
)


class get_AddElementNames_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_RemoveElementSchema_Request(NDRPacket):
    fields_desc = []


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


class get_ClearElementSchema_Request(NDRPacket):
    fields_desc = []


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


class get_IsMergeAppend_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_DoesAllowDuplicates_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTCOLLECTIONSCHEMA_OPNUMS = {
    0: DceRpcOp(get_AddElementNames_Request, get_AddElementNames_Response),
    1: DceRpcOp(GetAddElementSchema_Request, GetAddElementSchema_Response),
    2: DceRpcOp(get_RemoveElementSchema_Request, get_RemoveElementSchema_Response),
    3: DceRpcOp(get_ClearElementSchema_Request, get_ClearElementSchema_Response),
    4: DceRpcOp(get_IsMergeAppend_Request, get_IsMergeAppend_Response),
    5: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    6: DceRpcOp(get_DoesAllowDuplicates_Request, get_DoesAllowDuplicates_Response),
}
register_com_interface(
    name="IAppHostCollectionSchema",
    uuid=uuid.UUID("de095db1-5368-4d11-81f6-efef619b7bcf"),
    opnums=IAPPHOSTCOLLECTIONSCHEMA_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_InputSchema_Request(NDRPacket):
    fields_desc = []


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


class get_OutputSchema_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTMETHODSCHEMA_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(get_InputSchema_Request, get_InputSchema_Response),
    2: DceRpcOp(get_OutputSchema_Request, get_OutputSchema_Response),
    3: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
}
register_com_interface(
    name="IAppHostMethodSchema",
    uuid=uuid.UUID("2d9915fb-9d42-4328-b782-1b46819fab9e"),
    opnums=IAPPHOSTMETHODSCHEMA_OPNUMS,
)


class get_LineNumber_Request(NDRPacket):
    fields_desc = []


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


class get_FileName_Request(NDRPacket):
    fields_desc = []


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


class get_ConfigPath_Request(NDRPacket):
    fields_desc = []


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


class get_ErrorLine_Request(NDRPacket):
    fields_desc = []


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


class get_PreErrorLine_Request(NDRPacket):
    fields_desc = []


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


class get_PostErrorLine_Request(NDRPacket):
    fields_desc = []


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


class get_ErrorString_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTCONFIGEXCEPTION_OPNUMS = {
    0: DceRpcOp(get_LineNumber_Request, get_LineNumber_Response),
    1: DceRpcOp(get_FileName_Request, get_FileName_Response),
    2: DceRpcOp(get_ConfigPath_Request, get_ConfigPath_Response),
    3: DceRpcOp(get_ErrorLine_Request, get_ErrorLine_Response),
    4: DceRpcOp(get_PreErrorLine_Request, get_PreErrorLine_Response),
    5: DceRpcOp(get_PostErrorLine_Request, get_PostErrorLine_Response),
    6: DceRpcOp(get_ErrorString_Request, get_ErrorString_Response),
}
register_com_interface(
    name="IAppHostConfigException",
    uuid=uuid.UUID("4dfa1df3-8900-4bc7-bbb5-d1a458c52410"),
    opnums=IAPPHOSTCONFIGEXCEPTION_OPNUMS,
)


class get_InvalidValue_Request(NDRPacket):
    fields_desc = []


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


class get_ValidationFailureReason_Request(NDRPacket):
    fields_desc = []


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


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


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


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


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


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


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


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


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


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


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


class get_ValidationFailureParameters_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTPROPERTYEXCEPTION_OPNUMS = {
    0: DceRpcOp(get_InvalidValue_Request, get_InvalidValue_Response),
    1: DceRpcOp(
        get_ValidationFailureReason_Request, get_ValidationFailureReason_Response
    ),
    2: DceRpcOp(
        get_ValidationFailureParameters_Request,
        get_ValidationFailureParameters_Response,
    ),
}
register_com_interface(
    name="IAppHostPropertyException",
    uuid=uuid.UUID("eafe4895-a929-41ea-b14d-613e23f62b71"),
    opnums=IAPPHOSTPROPERTYEXCEPTION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


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


class get_Schema_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTELEMENTCOLLECTION_OPNUMS = {
    0: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(AddElement_Request, AddElement_Response),
    3: DceRpcOp(DeleteElement_Request, DeleteElement_Response),
    4: DceRpcOp(Clear_Request, Clear_Response),
    5: DceRpcOp(CreateNewElement_Request, CreateNewElement_Response),
    6: DceRpcOp(get_Schema_Request, get_Schema_Response),
}
register_com_interface(
    name="IAppHostElementCollection",
    uuid=uuid.UUID("c8550bff-5281-4b1e-ac34-99b6fa38464d"),
    opnums=IAPPHOSTELEMENTCOLLECTION_OPNUMS,
)


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_Type_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_OverrideModeDefault_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_AllowDefinition_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_AllowLocation_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTSECTIONDEFINITION_OPNUMS = {
    0: DceRpcOp(get_Name_Request, get_Name_Response),
    1: DceRpcOp(get_Type_Request, get_Type_Response),
    2: DceRpcOp(put_Type_Request, put_Type_Response),
    3: DceRpcOp(get_OverrideModeDefault_Request, get_OverrideModeDefault_Response),
    4: DceRpcOp(put_OverrideModeDefault_Request, put_OverrideModeDefault_Response),
    5: DceRpcOp(get_AllowDefinition_Request, get_AllowDefinition_Response),
    6: DceRpcOp(put_AllowDefinition_Request, put_AllowDefinition_Response),
    7: DceRpcOp(get_AllowLocation_Request, get_AllowLocation_Response),
    8: DceRpcOp(put_AllowLocation_Request, put_AllowLocation_Response),
}
register_com_interface(
    name="IAppHostSectionDefinition",
    uuid=uuid.UUID("c5c04795-321c-4014-8fd6-d44658799393"),
    opnums=IAPPHOSTSECTIONDEFINITION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


class AddSection_Request(NDRPacket):
    fields_desc = [
        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 = [NDRPacketField("varIndex", wireVARIANTStr(), wireVARIANTStr)]


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


IAPPHOSTSECTIONDEFINITIONCOLLECTION_OPNUMS = {
    0: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(AddSection_Request, AddSection_Response),
    3: DceRpcOp(DeleteSection_Request, DeleteSection_Response),
}
register_com_interface(
    name="IAppHostSectionDefinitionCollection",
    uuid=uuid.UUID("b7d381ee-8860-47a1-8af4-1f33b2b1f325"),
    opnums=IAPPHOSTSECTIONDEFINITIONCOLLECTION_OPNUMS,
)


class get_Count_Request(NDRPacket):
    fields_desc = []


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


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


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


class get_Sections_Request(NDRPacket):
    fields_desc = []


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


class AddSectionGroup_Request(NDRPacket):
    fields_desc = [
        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 = [NDRPacketField("varIndex", wireVARIANTStr(), wireVARIANTStr)]


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


class get_Name_Request(NDRPacket):
    fields_desc = []


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


class get_Type_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTSECTIONGROUP_OPNUMS = {
    0: DceRpcOp(get_Count_Request, get_Count_Response),
    1: DceRpcOp(get_Item_Request, get_Item_Response),
    2: DceRpcOp(get_Sections_Request, get_Sections_Response),
    3: DceRpcOp(AddSectionGroup_Request, AddSectionGroup_Response),
    4: DceRpcOp(DeleteSectionGroup_Request, DeleteSectionGroup_Response),
    5: DceRpcOp(get_Name_Request, get_Name_Response),
    6: DceRpcOp(get_Type_Request, get_Type_Response),
    7: DceRpcOp(put_Type_Request, put_Type_Response),
}
register_com_interface(
    name="IAppHostSectionGroup",
    uuid=uuid.UUID("0dd8a158-ebe6-4008-a1d9-b7ecc8f1104b"),
    opnums=IAPPHOSTSECTIONGROUP_OPNUMS,
)


class get_ConfigPath_Request(NDRPacket):
    fields_desc = []


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


class get_FilePath_Request(NDRPacket):
    fields_desc = []


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


class get_Locations_Request(NDRPacket):
    fields_desc = []


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


class GetAdminSection_Request(NDRPacket):
    fields_desc = [
        NDRPacketField("bstrSectionName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        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 = [
        NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
    ]


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


class SetMetadata_Request(NDRPacket):
    fields_desc = [
        NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        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_RootSectionGroup_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTCONFIGFILE_OPNUMS = {
    0: DceRpcOp(get_ConfigPath_Request, get_ConfigPath_Response),
    1: DceRpcOp(get_FilePath_Request, get_FilePath_Response),
    2: DceRpcOp(get_Locations_Request, get_Locations_Response),
    3: DceRpcOp(GetAdminSection_Request, GetAdminSection_Response),
    4: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    5: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
    6: DceRpcOp(ClearInvalidSections_Request, ClearInvalidSections_Response),
    7: DceRpcOp(get_RootSectionGroup_Request, get_RootSectionGroup_Response),
}
register_com_interface(
    name="IAppHostConfigFile",
    uuid=uuid.UUID("ada4e6fb-e025-401e-a5d0-c3134a281f07"),
    opnums=IAPPHOSTCONFIGFILE_OPNUMS,
)


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


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


IAPPHOSTPATHMAPPER_OPNUMS = {0: 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 = [
        NDRPacketField("bstrSectionName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        NDRPacketField("bstrConfigPath", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
    ]


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


IAPPHOSTCHANGEHANDLER_OPNUMS = {
    0: 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 = [
        NDRPacketField("bstrSectionName", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        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 = [
        NDRPacketField("bstrMetadataType", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB)
    ]


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


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


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


class get_ConfigManager_Request(NDRPacket):
    fields_desc = []


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


IAPPHOSTADMINMANAGER_OPNUMS = {
    0: DceRpcOp(GetAdminSection_Request, GetAdminSection_Response),
    1: DceRpcOp(GetMetadata_Request, GetMetadata_Response),
    2: DceRpcOp(SetMetadata_Request, SetMetadata_Response),
    3: DceRpcOp(get_ConfigManager_Request, get_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_CommitPath_Request(NDRPacket):
    fields_desc = []


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


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


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


IAPPHOSTWRITABLEADMINMANAGER_OPNUMS = {
    0: DceRpcOp(CommitChanges_Request, CommitChanges_Response),
    1: DceRpcOp(get_CommitPath_Request, get_CommitPath_Response),
    2: DceRpcOp(put_CommitPath_Request, put_CommitPath_Response),
}
register_com_interface(
    name="IAppHostWritableAdminManager",
    uuid=uuid.UUID("fa7660f6-7b3f-4237-a8bf-ed0ad0dcbbd9"),
    opnums=IAPPHOSTWRITABLEADMINMANAGER_OPNUMS,
)
