/* Generated by esx_vi_generator.py */



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: AutoStartWaitHeartbeatSetting
 */

static const esxVI_Enumeration _esxVI_AutoStartWaitHeartbeatSetting_Enumeration = {
    esxVI_Type_AutoStartWaitHeartbeatSetting, {
        { "yes", esxVI_AutoStartWaitHeartbeatSetting_Yes },
        { "no", esxVI_AutoStartWaitHeartbeatSetting_No },
        { "systemDefault", esxVI_AutoStartWaitHeartbeatSetting_SystemDefault },
        { NULL, -1 },
    },
};

/* esxVI_AutoStartWaitHeartbeatSetting_Serialize */
ESX_VI__TEMPLATE__ENUMERATION__SERIALIZE(AutoStartWaitHeartbeatSetting)

/* esxVI_AutoStartWaitHeartbeatSetting_Deserialize */
ESX_VI__TEMPLATE__ENUMERATION__DESERIALIZE(AutoStartWaitHeartbeatSetting)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: FibreChannelPortType
 */

static const esxVI_Enumeration _esxVI_FibreChannelPortType_Enumeration = {
    esxVI_Type_FibreChannelPortType, {
        { "fabric", esxVI_FibreChannelPortType_Fabric },
        { "loop", esxVI_FibreChannelPortType_Loop },
        { "pointToPoint", esxVI_FibreChannelPortType_PointToPoint },
        { "unknown", esxVI_FibreChannelPortType_Unknown },
        { NULL, -1 },
    },
};

/* esxVI_FibreChannelPortType_Deserialize */
ESX_VI__TEMPLATE__ENUMERATION__DESERIALIZE(FibreChannelPortType)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: ManagedEntityStatus
 */

static const esxVI_Enumeration _esxVI_ManagedEntityStatus_Enumeration = {
    esxVI_Type_ManagedEntityStatus, {
        { "gray", esxVI_ManagedEntityStatus_Gray },
        { "green", esxVI_ManagedEntityStatus_Green },
        { "yellow", esxVI_ManagedEntityStatus_Yellow },
        { "red", esxVI_ManagedEntityStatus_Red },
        { NULL, -1 },
    },
};

/* esxVI_ManagedEntityStatus_CastFromAnyType */
ESX_VI__TEMPLATE__ENUMERATION__CAST_FROM_ANY_TYPE(ManagedEntityStatus)

/* esxVI_ManagedEntityStatus_Deserialize */
ESX_VI__TEMPLATE__ENUMERATION__DESERIALIZE(ManagedEntityStatus)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: ObjectUpdateKind
 */

static const esxVI_Enumeration _esxVI_ObjectUpdateKind_Enumeration = {
    esxVI_Type_ObjectUpdateKind, {
        { "modify", esxVI_ObjectUpdateKind_Modify },
        { "enter", esxVI_ObjectUpdateKind_Enter },
        { "leave", esxVI_ObjectUpdateKind_Leave },
        { NULL, -1 },
    },
};

/* esxVI_ObjectUpdateKind_Deserialize */
ESX_VI__TEMPLATE__ENUMERATION__DESERIALIZE(ObjectUpdateKind)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: PerfStatsType
 */

static const esxVI_Enumeration _esxVI_PerfStatsType_Enumeration = {
    esxVI_Type_PerfStatsType, {
        { "absolute", esxVI_PerfStatsType_Absolute },
        { "delta", esxVI_PerfStatsType_Delta },
        { "rate", esxVI_PerfStatsType_Rate },
        { NULL, -1 },
    },
};

/* esxVI_PerfStatsType_Deserialize */
ESX_VI__TEMPLATE__ENUMERATION__DESERIALIZE(PerfStatsType)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: PerfSummaryType
 */

static const esxVI_Enumeration _esxVI_PerfSummaryType_Enumeration = {
    esxVI_Type_PerfSummaryType, {
        { "average", esxVI_PerfSummaryType_Average },
        { "maximum", esxVI_PerfSummaryType_Maximum },
        { "minimum", esxVI_PerfSummaryType_Minimum },
        { "latest", esxVI_PerfSummaryType_Latest },
        { "summation", esxVI_PerfSummaryType_Summation },
        { "none", esxVI_PerfSummaryType_None },
        { NULL, -1 },
    },
};

/* esxVI_PerfSummaryType_Deserialize */
ESX_VI__TEMPLATE__ENUMERATION__DESERIALIZE(PerfSummaryType)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: PropertyChangeOp
 */

static const esxVI_Enumeration _esxVI_PropertyChangeOp_Enumeration = {
    esxVI_Type_PropertyChangeOp, {
        { "add", esxVI_PropertyChangeOp_Add },
        { "remove", esxVI_PropertyChangeOp_Remove },
        { "assign", esxVI_PropertyChangeOp_Assign },
        { "indirectRemove", esxVI_PropertyChangeOp_IndirectRemove },
        { NULL, -1 },
    },
};

/* esxVI_PropertyChangeOp_Deserialize */
ESX_VI__TEMPLATE__ENUMERATION__DESERIALIZE(PropertyChangeOp)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: SharesLevel
 */

static const esxVI_Enumeration _esxVI_SharesLevel_Enumeration = {
    esxVI_Type_SharesLevel, {
        { "low", esxVI_SharesLevel_Low },
        { "normal", esxVI_SharesLevel_Normal },
        { "high", esxVI_SharesLevel_High },
        { "custom", esxVI_SharesLevel_Custom },
        { NULL, -1 },
    },
};

/* esxVI_SharesLevel_Serialize */
ESX_VI__TEMPLATE__ENUMERATION__SERIALIZE(SharesLevel)

/* esxVI_SharesLevel_Deserialize */
ESX_VI__TEMPLATE__ENUMERATION__DESERIALIZE(SharesLevel)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: TaskInfoState
 */

static const esxVI_Enumeration _esxVI_TaskInfoState_Enumeration = {
    esxVI_Type_TaskInfoState, {
        { "queued", esxVI_TaskInfoState_Queued },
        { "running", esxVI_TaskInfoState_Running },
        { "success", esxVI_TaskInfoState_Success },
        { "error", esxVI_TaskInfoState_Error },
        { NULL, -1 },
    },
};

/* esxVI_TaskInfoState_CastFromAnyType */
ESX_VI__TEMPLATE__ENUMERATION__CAST_FROM_ANY_TYPE(TaskInfoState)

/* esxVI_TaskInfoState_Deserialize */
ESX_VI__TEMPLATE__ENUMERATION__DESERIALIZE(TaskInfoState)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: VirtualMachineMovePriority
 */

static const esxVI_Enumeration _esxVI_VirtualMachineMovePriority_Enumeration = {
    esxVI_Type_VirtualMachineMovePriority, {
        { "lowPriority", esxVI_VirtualMachineMovePriority_LowPriority },
        { "highPriority", esxVI_VirtualMachineMovePriority_HighPriority },
        { "defaultPriority", esxVI_VirtualMachineMovePriority_DefaultPriority },
        { NULL, -1 },
    },
};

/* esxVI_VirtualMachineMovePriority_Serialize */
ESX_VI__TEMPLATE__ENUMERATION__SERIALIZE(VirtualMachineMovePriority)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Enum: VirtualMachinePowerState
 */

static const esxVI_Enumeration _esxVI_VirtualMachinePowerState_Enumeration = {
    esxVI_Type_VirtualMachinePowerState, {
        { "poweredOff", esxVI_VirtualMachinePowerState_PoweredOff },
        { "poweredOn", esxVI_VirtualMachinePowerState_PoweredOn },
        { "suspended", esxVI_VirtualMachinePowerState_Suspended },
        { NULL, -1 },
    },
};

/* esxVI_VirtualMachinePowerState_CastFromAnyType */
ESX_VI__TEMPLATE__ENUMERATION__CAST_FROM_ANY_TYPE(VirtualMachinePowerState)

/* esxVI_VirtualMachinePowerState_Serialize */
ESX_VI__TEMPLATE__ENUMERATION__SERIALIZE(VirtualMachinePowerState)

/* esxVI_VirtualMachinePowerState_Deserialize */
ESX_VI__TEMPLATE__ENUMERATION__DESERIALIZE(VirtualMachinePowerState)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: AboutInfo
 */

/* esxVI_AboutInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(AboutInfo)

/* esxVI_AboutInfo_Free */
ESX_VI__TEMPLATE__FREE(AboutInfo,
{
    VIR_FREE(item->name);
    VIR_FREE(item->fullName);
    VIR_FREE(item->vendor);
    VIR_FREE(item->version);
    VIR_FREE(item->build);
    VIR_FREE(item->localeVersion);
    VIR_FREE(item->localeBuild);
    VIR_FREE(item->osType);
    VIR_FREE(item->productLineId);
    VIR_FREE(item->apiType);
    VIR_FREE(item->apiVersion);
    VIR_FREE(item->instanceUuid);
    VIR_FREE(item->licenseProductName);
    VIR_FREE(item->licenseProductVersion);
})

/* esxVI_AboutInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(AboutInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(fullName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(vendor)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(version)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(build)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(osType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(productLineId)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(apiType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(apiVersion)
})

/* esxVI_AboutInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(AboutInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, fullName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, vendor)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, version)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, build)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, localeVersion)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, localeBuild)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, osType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, productLineId)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, apiType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, apiVersion)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, instanceUuid)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, licenseProductName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, licenseProductVersion)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: AutoStartDefaults
 */

/* esxVI_AutoStartDefaults_Alloc */
ESX_VI__TEMPLATE__ALLOC(AutoStartDefaults)

/* esxVI_AutoStartDefaults_Free */
ESX_VI__TEMPLATE__FREE(AutoStartDefaults,
{
    esxVI_Int_Free(&item->startDelay);
    esxVI_Int_Free(&item->stopDelay);
    VIR_FREE(item->stopAction);
})

/* esxVI_AutoStartDefaults_Validate */
ESX_VI__TEMPLATE__VALIDATE(AutoStartDefaults,
{
    /* no required properties */
})

/* esxVI_AutoStartDefaults_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(AutoStartDefaults)

/* esxVI_AutoStartDefaults_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(AutoStartDefaults,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, enabled)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, startDelay)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, stopDelay)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, waitForHeartbeat)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, stopAction)
})

/* esxVI_AutoStartDefaults_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(AutoStartDefaults,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, enabled)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, startDelay)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, stopDelay)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, waitForHeartbeat)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, stopAction)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: AutoStartPowerInfo
 */

/* esxVI_AutoStartPowerInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(AutoStartPowerInfo)

/* esxVI_AutoStartPowerInfo_Free */
ESX_VI__TEMPLATE__FREE(AutoStartPowerInfo,
{
    esxVI_AutoStartPowerInfo_Free(&item->_next);

    esxVI_ManagedObjectReference_Free(&item->key);
    esxVI_Int_Free(&item->startOrder);
    esxVI_Int_Free(&item->startDelay);
    VIR_FREE(item->startAction);
    esxVI_Int_Free(&item->stopDelay);
    VIR_FREE(item->stopAction);
})

/* esxVI_AutoStartPowerInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(AutoStartPowerInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(startOrder)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(startDelay)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(waitForHeartbeat)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(startAction)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(stopDelay)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(stopAction)
})

/* esxVI_AutoStartPowerInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(AutoStartPowerInfo)

/* esxVI_AutoStartPowerInfo_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(AutoStartPowerInfo)

/* esxVI_AutoStartPowerInfo_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(AutoStartPowerInfo)

/* esxVI_AutoStartPowerInfo_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(AutoStartPowerInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(ManagedObjectReference, key)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, startOrder)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, startDelay)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(AutoStartWaitHeartbeatSetting, waitForHeartbeat)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, startAction)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, stopDelay)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, stopAction)
})

/* esxVI_AutoStartPowerInfo_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(AutoStartPowerInfo)

/* esxVI_AutoStartPowerInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(AutoStartPowerInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, startOrder)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, startDelay)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(AutoStartWaitHeartbeatSetting, waitForHeartbeat)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, startAction)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, stopDelay)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, stopAction)
})

/* esxVI_AutoStartPowerInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(AutoStartPowerInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ChoiceOption
 *            extends OptionType
 */

/* esxVI_ChoiceOption_Alloc */
ESX_VI__TEMPLATE__ALLOC(ChoiceOption)

/* esxVI_ChoiceOption_Free */
ESX_VI__TEMPLATE__FREE(ChoiceOption,
{
    /* OptionType */
    /* no properties to be freed */

    /* ChoiceOption */
    esxVI_ElementDescription_Free(&item->choiceInfo);
    esxVI_Int_Free(&item->defaultIndex);
})

/* esxVI_ChoiceOption_Validate */
ESX_VI__TEMPLATE__VALIDATE(ChoiceOption,
{
    /* OptionType */
    /* no required properties */

    /* ChoiceOption */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(choiceInfo)
})

/* esxVI_ChoiceOption_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(ChoiceOption,
{
    /* OptionType */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, valueIsReadonly)

    /* ChoiceOption */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(ElementDescription, choiceInfo)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, defaultIndex)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: DatastoreHostMount
 */

/* esxVI_DatastoreHostMount_Alloc */
ESX_VI__TEMPLATE__ALLOC(DatastoreHostMount)

/* esxVI_DatastoreHostMount_Free */
ESX_VI__TEMPLATE__FREE(DatastoreHostMount,
{
    esxVI_DatastoreHostMount_Free(&item->_next);

    esxVI_ManagedObjectReference_Free(&item->key);
    esxVI_HostMountInfo_Free(&item->mountInfo);
})

/* esxVI_DatastoreHostMount_Validate */
ESX_VI__TEMPLATE__VALIDATE(DatastoreHostMount,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(mountInfo)
})

/* esxVI_DatastoreHostMount_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(DatastoreHostMount)

/* esxVI_DatastoreHostMount_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(DatastoreHostMount,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(ManagedObjectReference, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostMountInfo, mountInfo)
})

/* esxVI_DatastoreHostMount_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(DatastoreHostMount)

/* esxVI_DatastoreHostMount_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(DatastoreHostMount)

/* esxVI_DatastoreHostMount_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(DatastoreHostMount)

/* esxVI_DatastoreHostMount_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(DatastoreHostMount,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostMountInfo, mountInfo)
})

/* esxVI_DatastoreHostMount_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(DatastoreHostMount)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: DatastoreInfo
 *            extended by LocalDatastoreInfo
 *                        NasDatastoreInfo
 *                        VmfsDatastoreInfo
 */

/* esxVI_DatastoreInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(DatastoreInfo)

/* esxVI_DatastoreInfo_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(DatastoreInfo,
{
    /* DatastoreInfo */
    ESX_VI__TEMPLATE__DISPATCH__FREE(LocalDatastoreInfo)
    ESX_VI__TEMPLATE__DISPATCH__FREE(NasDatastoreInfo)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmfsDatastoreInfo)
},
{
    VIR_FREE(item->name);
    VIR_FREE(item->url);
    esxVI_Long_Free(&item->freeSpace);
    esxVI_Long_Free(&item->maxFileSize);
    esxVI_DateTime_Free(&item->timestamp);
})

/* esxVI_DatastoreInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(DatastoreInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(url)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(freeSpace)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(maxFileSize)
})

/* esxVI_DatastoreInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(DatastoreInfo,
{
    /* DatastoreInfo */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(LocalDatastoreInfo)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(NasDatastoreInfo)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmfsDatastoreInfo)
})

/* esxVI_DatastoreInfo_CastFromAnyType */
ESX_VI__TEMPLATE__DYNAMIC_CAST_FROM_ANY_TYPE(DatastoreInfo,
{
    /* DatastoreInfo */
    ESX_VI__TEMPLATE__DISPATCH__CAST_FROM_ANY_TYPE(LocalDatastoreInfo)
    ESX_VI__TEMPLATE__DISPATCH__CAST_FROM_ANY_TYPE(NasDatastoreInfo)
    ESX_VI__TEMPLATE__DISPATCH__CAST_FROM_ANY_TYPE(VmfsDatastoreInfo)
})

/* esxVI_DatastoreInfo_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(DatastoreInfo,
{
    /* DatastoreInfo */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(LocalDatastoreInfo)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(NasDatastoreInfo)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(VmfsDatastoreInfo)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, url)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, freeSpace)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, maxFileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, timestamp)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: Description
 *            extended by ElementDescription
 */

/* esxVI_Description_Alloc */
ESX_VI__TEMPLATE__ALLOC(Description)

/* esxVI_Description_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(Description,
{
    /* Description */
    ESX_VI__TEMPLATE__DISPATCH__FREE(ElementDescription)

    /* ElementDescription */
    ESX_VI__TEMPLATE__DISPATCH__FREE(ExtendedElementDescription)
},
{
    esxVI_Description_Free(&item->_next);

    VIR_FREE(item->label);
    VIR_FREE(item->summary);
})

/* esxVI_Description_Validate */
ESX_VI__TEMPLATE__VALIDATE(Description,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(label)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(summary)
})

/* esxVI_Description_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(Description,
{
    /* Description */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(ElementDescription)

    /* ElementDescription */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(ExtendedElementDescription)
})

/* esxVI_Description_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(Description)

/* esxVI_Description_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(Description,
{
    /* Description */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(ElementDescription)

    /* ElementDescription */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(ExtendedElementDescription)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, label)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, summary)
})

/* esxVI_Description_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(Description)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: DeviceBackedVirtualDiskSpec
 *            extends VirtualDiskSpec
 */

/* esxVI_DeviceBackedVirtualDiskSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(DeviceBackedVirtualDiskSpec)

/* esxVI_DeviceBackedVirtualDiskSpec_Free */
ESX_VI__TEMPLATE__FREE(DeviceBackedVirtualDiskSpec,
{
    /* VirtualDiskSpec */
    VIR_FREE(item->diskType);
    VIR_FREE(item->adapterType);

    /* DeviceBackedVirtualDiskSpec */
    VIR_FREE(item->device);
})

/* esxVI_DeviceBackedVirtualDiskSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(DeviceBackedVirtualDiskSpec,
{
    /* VirtualDiskSpec */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(diskType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(adapterType)

    /* DeviceBackedVirtualDiskSpec */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(device)
})

/* esxVI_DeviceBackedVirtualDiskSpec_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(DeviceBackedVirtualDiskSpec,
{
})

/* esxVI_DeviceBackedVirtualDiskSpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(DeviceBackedVirtualDiskSpec,
{
    /* VirtualDiskSpec */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, diskType)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, adapterType)

    /* DeviceBackedVirtualDiskSpec */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, device)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: DynamicProperty
 */

/* esxVI_DynamicProperty_Alloc */
ESX_VI__TEMPLATE__ALLOC(DynamicProperty)

/* esxVI_DynamicProperty_Free */
ESX_VI__TEMPLATE__FREE(DynamicProperty,
{
    esxVI_DynamicProperty_Free(&item->_next);

    VIR_FREE(item->name);
    esxVI_AnyType_Free(&item->val);
})

/* esxVI_DynamicProperty_Validate */
ESX_VI__TEMPLATE__VALIDATE(DynamicProperty,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(val)
})

/* esxVI_DynamicProperty_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(DynamicProperty)

/* esxVI_DynamicProperty_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(DynamicProperty,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(AnyType, val)
})

/* esxVI_DynamicProperty_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(DynamicProperty)

/* esxVI_DynamicProperty_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(DynamicProperty,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(AnyType, val)
})

/* esxVI_DynamicProperty_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(DynamicProperty)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ElementDescription
 *            extends Description
 *            extended by ExtendedElementDescription
 */

/* esxVI_ElementDescription_Alloc */
ESX_VI__TEMPLATE__ALLOC(ElementDescription)

/* esxVI_ElementDescription_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(ElementDescription,
{
    /* ElementDescription */
    ESX_VI__TEMPLATE__DISPATCH__FREE(ExtendedElementDescription)
},
{
    esxVI_Description *next = (esxVI_Description *)item->_next;

    esxVI_Description_Free(&next);
    item->_next = (esxVI_ElementDescription *)next;

    /* Description */
    VIR_FREE(item->label);
    VIR_FREE(item->summary);

    /* ElementDescription */
    VIR_FREE(item->key);
})

/* esxVI_ElementDescription_Validate */
ESX_VI__TEMPLATE__VALIDATE(ElementDescription,
{
    /* Description */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(label)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(summary)

    /* ElementDescription */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
})

/* esxVI_ElementDescription_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(ElementDescription,
{
    /* ElementDescription */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(ExtendedElementDescription)
})

/* esxVI_ElementDescription_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(ElementDescription)

/* esxVI_ElementDescription_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(ElementDescription,
{
    /* ElementDescription */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(ExtendedElementDescription)
},
{
    /* Description */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, label)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, summary)

    /* ElementDescription */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
})

/* esxVI_ElementDescription_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(ElementDescription)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: EntityEventArgument
 *            extends EventArgument
 *            extended by VmEventArgument
 */

/* esxVI_EntityEventArgument_Alloc */
ESX_VI__TEMPLATE__ALLOC(EntityEventArgument)

/* esxVI_EntityEventArgument_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(EntityEventArgument,
{
    /* EntityEventArgument */
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmEventArgument)
},
{
    /* EventArgument */
    /* no properties */

    /* EntityEventArgument */
    VIR_FREE(item->name);
})

/* esxVI_EntityEventArgument_Validate */
ESX_VI__TEMPLATE__VALIDATE(EntityEventArgument,
{
    /* EventArgument */
    /* no properties */

    /* EntityEventArgument */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
})

/* esxVI_EntityEventArgument_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(EntityEventArgument,
{
    /* EntityEventArgument */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(VmEventArgument)
},
{
    /* EventArgument */
    /* no properties */

    /* EntityEventArgument */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: EventArgument
 *            extended by EntityEventArgument
 */

/* esxVI_EventArgument_Alloc */
ESX_VI__TEMPLATE__ALLOC(EventArgument)

/* esxVI_EventArgument_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(EventArgument,
{
    /* EventArgument */
    ESX_VI__TEMPLATE__DISPATCH__FREE(EntityEventArgument)

    /* EntityEventArgument */
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmEventArgument)
},
{
    /* no properties */
})

/* esxVI_EventArgument_Validate */
ESX_VI__TEMPLATE__VALIDATE(EventArgument,
{
    /* no properties */
})

/* esxVI_EventArgument_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(EventArgument,
{
    /* EventArgument */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(EntityEventArgument)

    /* EntityEventArgument */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(VmEventArgument)
},
{
    /* no properties */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ExtendedElementDescription
 *            extends ElementDescription
 */

/* esxVI_ExtendedElementDescription_Alloc */
ESX_VI__TEMPLATE__ALLOC(ExtendedElementDescription)

/* esxVI_ExtendedElementDescription_Free */
ESX_VI__TEMPLATE__FREE(ExtendedElementDescription,
{
    esxVI_ElementDescription *next = (esxVI_ElementDescription *)item->_next;

    esxVI_ElementDescription_Free(&next);
    item->_next = (esxVI_ExtendedElementDescription *)next;

    /* Description */
    VIR_FREE(item->label);
    VIR_FREE(item->summary);

    /* ElementDescription */
    VIR_FREE(item->key);

    /* ExtendedElementDescription */
    VIR_FREE(item->messageCatalogKeyPrefix);
    esxVI_KeyAnyValue_Free(&item->messageArg);
})

/* esxVI_ExtendedElementDescription_Validate */
ESX_VI__TEMPLATE__VALIDATE(ExtendedElementDescription,
{
    /* Description */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(label)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(summary)

    /* ElementDescription */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)

    /* ExtendedElementDescription */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(messageCatalogKeyPrefix)
})

/* esxVI_ExtendedElementDescription_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(ExtendedElementDescription,
{
})

/* esxVI_ExtendedElementDescription_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(ExtendedElementDescription)

/* esxVI_ExtendedElementDescription_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(ExtendedElementDescription,
{
    /* Description */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, label)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, summary)

    /* ElementDescription */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)

    /* ExtendedElementDescription */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, messageCatalogKeyPrefix)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(KeyAnyValue, messageArg)
})

/* esxVI_ExtendedElementDescription_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(ExtendedElementDescription)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: FileBackedVirtualDiskSpec
 *            extends VirtualDiskSpec
 */

/* esxVI_FileBackedVirtualDiskSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(FileBackedVirtualDiskSpec)

/* esxVI_FileBackedVirtualDiskSpec_Free */
ESX_VI__TEMPLATE__FREE(FileBackedVirtualDiskSpec,
{
    /* VirtualDiskSpec */
    VIR_FREE(item->diskType);
    VIR_FREE(item->adapterType);

    /* FileBackedVirtualDiskSpec */
    esxVI_Long_Free(&item->capacityKb);
})

/* esxVI_FileBackedVirtualDiskSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(FileBackedVirtualDiskSpec,
{
    /* VirtualDiskSpec */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(diskType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(adapterType)

    /* FileBackedVirtualDiskSpec */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(capacityKb)
})

/* esxVI_FileBackedVirtualDiskSpec_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(FileBackedVirtualDiskSpec,
{
})

/* esxVI_FileBackedVirtualDiskSpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(FileBackedVirtualDiskSpec,
{
    /* VirtualDiskSpec */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, diskType)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, adapterType)

    /* FileBackedVirtualDiskSpec */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Long, capacityKb)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: FileInfo
 *            extended by FloppyImageFileInfo
 *                        FolderFileInfo
 *                        IsoImageFileInfo
 *                        VmConfigFileInfo
 *                        VmDiskFileInfo
 *                        VmLogFileInfo
 *                        VmNvramFileInfo
 *                        VmSnapshotFileInfo
 */

/* esxVI_FileInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(FileInfo)

/* esxVI_FileInfo_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(FileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__DISPATCH__FREE(FloppyImageFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__FREE(FolderFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__FREE(IsoImageFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmConfigFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmDiskFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmLogFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmNvramFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmSnapshotFileInfo)

    /* VmConfigFileInfo */
    ESX_VI__TEMPLATE__DISPATCH__FREE(TemplateConfigFileInfo)
},
{
    esxVI_FileInfo_Free(&item->_next);

    VIR_FREE(item->path);
    esxVI_Long_Free(&item->fileSize);
    esxVI_DateTime_Free(&item->modification);
    VIR_FREE(item->owner);
})

/* esxVI_FileInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(FileInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)
})

/* esxVI_FileInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(FileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(FloppyImageFileInfo)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(FolderFileInfo)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(IsoImageFileInfo)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmConfigFileInfo)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmDiskFileInfo)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmLogFileInfo)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmNvramFileInfo)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmSnapshotFileInfo)

    /* VmConfigFileInfo */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(TemplateConfigFileInfo)
})

/* esxVI_FileInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(FileInfo)

/* esxVI_FileInfo_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(FileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(FloppyImageFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(FolderFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(IsoImageFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(VmConfigFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(VmDiskFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(VmLogFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(VmNvramFileInfo)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(VmSnapshotFileInfo)

    /* VmConfigFileInfo */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(TemplateConfigFileInfo)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, modification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, owner)
})

/* esxVI_FileInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(FileInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: FileQuery
 *            extended by FloppyImageFileQuery
 *                        FolderFileQuery
 *                        IsoImageFileQuery
 *                        VmConfigFileQuery
 *                        VmDiskFileQuery
 *                        VmLogFileQuery
 *                        VmNvramFileQuery
 *                        VmSnapshotFileQuery
 */

/* esxVI_FileQuery_Alloc */
ESX_VI__TEMPLATE__ALLOC(FileQuery)

/* esxVI_FileQuery_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(FileQuery,
{
    /* FileQuery */
    ESX_VI__TEMPLATE__DISPATCH__FREE(FloppyImageFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__FREE(FolderFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__FREE(IsoImageFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmConfigFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmDiskFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmLogFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmNvramFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__FREE(VmSnapshotFileQuery)

    /* VmConfigFileQuery */
    ESX_VI__TEMPLATE__DISPATCH__FREE(TemplateConfigFileQuery)
},
{
    esxVI_FileQuery_Free(&item->_next);

    /* no properties */
})

/* esxVI_FileQuery_Validate */
ESX_VI__TEMPLATE__VALIDATE(FileQuery,
{
    /* no properties */
})

/* esxVI_FileQuery_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(FileQuery,
{
    /* FileQuery */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(FloppyImageFileQuery)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(FolderFileQuery)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(IsoImageFileQuery)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmConfigFileQuery)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmDiskFileQuery)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmLogFileQuery)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmNvramFileQuery)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(VmSnapshotFileQuery)

    /* VmConfigFileQuery */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(TemplateConfigFileQuery)
})

/* esxVI_FileQuery_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(FileQuery)

/* esxVI_FileQuery_Serialize */
ESX_VI__TEMPLATE__DYNAMIC_SERIALIZE(FileQuery,
{
    /* FileQuery */
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(FloppyImageFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(FolderFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(IsoImageFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(VmConfigFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(VmDiskFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(VmLogFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(VmNvramFileQuery)
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(VmSnapshotFileQuery)

    /* VmConfigFileQuery */
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(TemplateConfigFileQuery)
},
{
    /* no properties */
})

/* esxVI_FileQuery_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(FileQuery)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: FileQueryFlags
 */

/* esxVI_FileQueryFlags_Alloc */
ESX_VI__TEMPLATE__ALLOC(FileQueryFlags)

/* esxVI_FileQueryFlags_Free */
ESX_VI__TEMPLATE__FREE(FileQueryFlags,
{
    /* no properties to be freed */
})

/* esxVI_FileQueryFlags_Validate */
ESX_VI__TEMPLATE__VALIDATE(FileQueryFlags,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(fileType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(fileSize)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(modification)
})

/* esxVI_FileQueryFlags_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(FileQueryFlags,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, fileType)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, modification)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, fileOwner)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: FloppyImageFileInfo
 *            extends FileInfo
 */

/* esxVI_FloppyImageFileInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(FloppyImageFileInfo)

/* esxVI_FloppyImageFileInfo_Free */
ESX_VI__TEMPLATE__FREE(FloppyImageFileInfo,
{
    esxVI_FileInfo *next = (esxVI_FileInfo *)item->_next;

    esxVI_FileInfo_Free(&next);
    item->_next = (esxVI_FloppyImageFileInfo *)next;

    /* FileInfo */
    VIR_FREE(item->path);
    esxVI_Long_Free(&item->fileSize);
    esxVI_DateTime_Free(&item->modification);
    VIR_FREE(item->owner);

    /* FloppyImageFileInfo */
    /* no properties */
})

/* esxVI_FloppyImageFileInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(FloppyImageFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)

    /* FloppyImageFileInfo */
    /* no properties */
})

/* esxVI_FloppyImageFileInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(FloppyImageFileInfo,
{
})

/* esxVI_FloppyImageFileInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(FloppyImageFileInfo)

/* esxVI_FloppyImageFileInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(FloppyImageFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, modification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, owner)

    /* FloppyImageFileInfo */
    /* no properties */
})

/* esxVI_FloppyImageFileInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(FloppyImageFileInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: FloppyImageFileQuery
 *            extends FileQuery
 */

/* esxVI_FloppyImageFileQuery_Alloc */
ESX_VI__TEMPLATE__ALLOC(FloppyImageFileQuery)

/* esxVI_FloppyImageFileQuery_Free */
ESX_VI__TEMPLATE__FREE(FloppyImageFileQuery,
{
    esxVI_FileQuery *next = (esxVI_FileQuery *)item->_next;

    esxVI_FileQuery_Free(&next);
    item->_next = (esxVI_FloppyImageFileQuery *)next;

    /* FileQuery */
    /* no properties */

    /* FloppyImageFileQuery */
    /* no properties */
})

/* esxVI_FloppyImageFileQuery_Validate */
ESX_VI__TEMPLATE__VALIDATE(FloppyImageFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* FloppyImageFileQuery */
    /* no properties */
})

/* esxVI_FloppyImageFileQuery_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(FloppyImageFileQuery,
{
})

/* esxVI_FloppyImageFileQuery_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(FloppyImageFileQuery)

/* esxVI_FloppyImageFileQuery_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(FloppyImageFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* FloppyImageFileQuery */
    /* no properties */
})

/* esxVI_FloppyImageFileQuery_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(FloppyImageFileQuery)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: FolderFileInfo
 *            extends FileInfo
 */

/* esxVI_FolderFileInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(FolderFileInfo)

/* esxVI_FolderFileInfo_Free */
ESX_VI__TEMPLATE__FREE(FolderFileInfo,
{
    esxVI_FileInfo *next = (esxVI_FileInfo *)item->_next;

    esxVI_FileInfo_Free(&next);
    item->_next = (esxVI_FolderFileInfo *)next;

    /* FileInfo */
    VIR_FREE(item->path);
    esxVI_Long_Free(&item->fileSize);
    esxVI_DateTime_Free(&item->modification);
    VIR_FREE(item->owner);

    /* FolderFileInfo */
    /* no properties */
})

/* esxVI_FolderFileInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(FolderFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)

    /* FolderFileInfo */
    /* no properties */
})

/* esxVI_FolderFileInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(FolderFileInfo,
{
})

/* esxVI_FolderFileInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(FolderFileInfo)

/* esxVI_FolderFileInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(FolderFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, modification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, owner)

    /* FolderFileInfo */
    /* no properties */
})

/* esxVI_FolderFileInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(FolderFileInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: FolderFileQuery
 *            extends FileQuery
 */

/* esxVI_FolderFileQuery_Alloc */
ESX_VI__TEMPLATE__ALLOC(FolderFileQuery)

/* esxVI_FolderFileQuery_Free */
ESX_VI__TEMPLATE__FREE(FolderFileQuery,
{
    esxVI_FileQuery *next = (esxVI_FileQuery *)item->_next;

    esxVI_FileQuery_Free(&next);
    item->_next = (esxVI_FolderFileQuery *)next;

    /* FileQuery */
    /* no properties */

    /* FolderFileQuery */
    /* no properties */
})

/* esxVI_FolderFileQuery_Validate */
ESX_VI__TEMPLATE__VALIDATE(FolderFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* FolderFileQuery */
    /* no properties */
})

/* esxVI_FolderFileQuery_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(FolderFileQuery,
{
})

/* esxVI_FolderFileQuery_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(FolderFileQuery)

/* esxVI_FolderFileQuery_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(FolderFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* FolderFileQuery */
    /* no properties */
})

/* esxVI_FolderFileQuery_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(FolderFileQuery)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostAutoStartManagerConfig
 */

/* esxVI_HostAutoStartManagerConfig_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostAutoStartManagerConfig)

/* esxVI_HostAutoStartManagerConfig_Free */
ESX_VI__TEMPLATE__FREE(HostAutoStartManagerConfig,
{
    esxVI_AutoStartDefaults_Free(&item->defaults);
    esxVI_AutoStartPowerInfo_Free(&item->powerInfo);
})

/* esxVI_HostAutoStartManagerConfig_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostAutoStartManagerConfig,
{
    /* no required properties */
})

/* esxVI_HostAutoStartManagerConfig_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostAutoStartManagerConfig,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(AutoStartDefaults, defaults)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(AutoStartPowerInfo, powerInfo)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostBlockAdapterTargetTransport
 *            extends HostTargetTransport
 */

/* esxVI_HostBlockAdapterTargetTransport_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostBlockAdapterTargetTransport)

/* esxVI_HostBlockAdapterTargetTransport_Free */
ESX_VI__TEMPLATE__FREE(HostBlockAdapterTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostBlockAdapterTargetTransport */
    /* no properties */
})

/* esxVI_HostBlockAdapterTargetTransport_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostBlockAdapterTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostBlockAdapterTargetTransport */
    /* no properties */
})

/* esxVI_HostBlockAdapterTargetTransport_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostBlockAdapterTargetTransport,
{
})

/* esxVI_HostBlockAdapterTargetTransport_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostBlockAdapterTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostBlockAdapterTargetTransport */
    /* no properties */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostBlockHba
 *            extends HostHostBusAdapter
 */

/* esxVI_HostBlockHba_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostBlockHba)

/* esxVI_HostBlockHba_Free */
ESX_VI__TEMPLATE__FREE(HostBlockHba,
{
    esxVI_HostHostBusAdapter *next = (esxVI_HostHostBusAdapter *)item->_next;

    esxVI_HostHostBusAdapter_Free(&next);
    item->_next = (esxVI_HostBlockHba *)next;

    /* HostHostBusAdapter */
    VIR_FREE(item->key);
    VIR_FREE(item->device);
    esxVI_Int_Free(&item->bus);
    VIR_FREE(item->status);
    VIR_FREE(item->model);
    VIR_FREE(item->driver);
    VIR_FREE(item->pci);

    /* HostBlockHba */
    /* no properties */
})

/* esxVI_HostBlockHba_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostBlockHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(device)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(bus)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(status)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(model)

    /* HostBlockHba */
    /* no properties */
})

/* esxVI_HostBlockHba_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostBlockHba,
{
})

/* esxVI_HostBlockHba_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostBlockHba)

/* esxVI_HostBlockHba_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostBlockHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, bus)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, status)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, pci)

    /* HostBlockHba */
    /* no properties */
})

/* esxVI_HostBlockHba_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostBlockHba)

/* esxVI_HostBlockHba_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostBlockHba)

/* esxVI_HostBlockHba_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostBlockHba)

/* esxVI_HostBlockHba_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostBlockHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, bus)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, status)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, pci)

    /* HostBlockHba */
    /* no properties */
})

/* esxVI_HostBlockHba_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostBlockHba)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostConfigManager
 */

/* esxVI_HostConfigManager_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostConfigManager)

/* esxVI_HostConfigManager_Free */
ESX_VI__TEMPLATE__FREE(HostConfigManager,
{
    esxVI_ManagedObjectReference_Free(&item->cpuScheduler);
    esxVI_ManagedObjectReference_Free(&item->datastoreSystem);
    esxVI_ManagedObjectReference_Free(&item->memoryManager);
    esxVI_ManagedObjectReference_Free(&item->storageSystem);
    esxVI_ManagedObjectReference_Free(&item->networkSystem);
    esxVI_ManagedObjectReference_Free(&item->vmotionSystem);
    esxVI_ManagedObjectReference_Free(&item->virtualNicManager);
    esxVI_ManagedObjectReference_Free(&item->serviceSystem);
    esxVI_ManagedObjectReference_Free(&item->firewallSystem);
    esxVI_ManagedObjectReference_Free(&item->advancedOption);
    esxVI_ManagedObjectReference_Free(&item->diagnosticSystem);
    esxVI_ManagedObjectReference_Free(&item->autoStartManager);
    esxVI_ManagedObjectReference_Free(&item->snmpSystem);
    esxVI_ManagedObjectReference_Free(&item->dateTimeSystem);
    esxVI_ManagedObjectReference_Free(&item->patchManager);
    esxVI_ManagedObjectReference_Free(&item->bootDeviceSystem);
    esxVI_ManagedObjectReference_Free(&item->firmwareSystem);
    esxVI_ManagedObjectReference_Free(&item->healthStatusSystem);
    esxVI_ManagedObjectReference_Free(&item->pciPassthruSystem);
    esxVI_ManagedObjectReference_Free(&item->licenseManager);
    esxVI_ManagedObjectReference_Free(&item->kernelModuleSystem);
})

/* esxVI_HostConfigManager_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostConfigManager,
{
    /* no required properties */
})

/* esxVI_HostConfigManager_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostConfigManager)

/* esxVI_HostConfigManager_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostConfigManager,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, cpuScheduler)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, datastoreSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, memoryManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, storageSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, networkSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, vmotionSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, virtualNicManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, serviceSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, firewallSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, advancedOption)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, diagnosticSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, autoStartManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, snmpSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, dateTimeSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, patchManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, bootDeviceSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, firmwareSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, healthStatusSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, pciPassthruSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, licenseManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, kernelModuleSystem)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostCpuIdInfo
 */

/* esxVI_HostCpuIdInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostCpuIdInfo)

/* esxVI_HostCpuIdInfo_Free */
ESX_VI__TEMPLATE__FREE(HostCpuIdInfo,
{
    esxVI_HostCpuIdInfo_Free(&item->_next);

    esxVI_Int_Free(&item->level);
    VIR_FREE(item->vendor);
    VIR_FREE(item->eax);
    VIR_FREE(item->ebx);
    VIR_FREE(item->ecx);
    VIR_FREE(item->edx);
})

/* esxVI_HostCpuIdInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostCpuIdInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(level)
})

/* esxVI_HostCpuIdInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostCpuIdInfo)

/* esxVI_HostCpuIdInfo_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostCpuIdInfo)

/* esxVI_HostCpuIdInfo_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostCpuIdInfo)

/* esxVI_HostCpuIdInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostCpuIdInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, level)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, vendor)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, eax)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, ebx)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, ecx)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, edx)
})

/* esxVI_HostCpuIdInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostCpuIdInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostDatastoreBrowserSearchResults
 */

/* esxVI_HostDatastoreBrowserSearchResults_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostDatastoreBrowserSearchResults)

/* esxVI_HostDatastoreBrowserSearchResults_Free */
ESX_VI__TEMPLATE__FREE(HostDatastoreBrowserSearchResults,
{
    esxVI_HostDatastoreBrowserSearchResults_Free(&item->_next);

    esxVI_ManagedObjectReference_Free(&item->datastore);
    VIR_FREE(item->folderPath);
    esxVI_FileInfo_Free(&item->file);
})

/* esxVI_HostDatastoreBrowserSearchResults_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostDatastoreBrowserSearchResults,
{
    /* no required properties */
})

/* esxVI_HostDatastoreBrowserSearchResults_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostDatastoreBrowserSearchResults)

/* esxVI_HostDatastoreBrowserSearchResults_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostDatastoreBrowserSearchResults)

/* esxVI_HostDatastoreBrowserSearchResults_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostDatastoreBrowserSearchResults)

/* esxVI_HostDatastoreBrowserSearchResults_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostDatastoreBrowserSearchResults,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, datastore)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, folderPath)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(FileInfo, file)
})

/* esxVI_HostDatastoreBrowserSearchResults_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostDatastoreBrowserSearchResults)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostDatastoreBrowserSearchSpec
 */

/* esxVI_HostDatastoreBrowserSearchSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostDatastoreBrowserSearchSpec)

/* esxVI_HostDatastoreBrowserSearchSpec_Free */
ESX_VI__TEMPLATE__FREE(HostDatastoreBrowserSearchSpec,
{
    esxVI_FileQuery_Free(&item->query);
    esxVI_FileQueryFlags_Free(&item->details);
    esxVI_String_Free(&item->matchPattern);
})

/* esxVI_HostDatastoreBrowserSearchSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostDatastoreBrowserSearchSpec,
{
    /* no required properties */
})

/* esxVI_HostDatastoreBrowserSearchSpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostDatastoreBrowserSearchSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(FileQuery, query)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(FileQueryFlags, details)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, searchCaseInsensitive)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(String, matchPattern)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, sortFoldersFirst)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostDevice
 *            extended by ScsiLun
 */

/* esxVI_HostDevice_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostDevice)

/* esxVI_HostDevice_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(HostDevice,
{
    /* HostDevice */
    ESX_VI__TEMPLATE__DISPATCH__FREE(ScsiLun)

    /* ScsiLun */
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostScsiDisk)
},
{
    esxVI_HostDevice_Free(&item->_next);

    VIR_FREE(item->deviceName);
    VIR_FREE(item->deviceType);
})

/* esxVI_HostDevice_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostDevice,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(deviceName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(deviceType)
})

/* esxVI_HostDevice_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostDevice,
{
    /* HostDevice */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(ScsiLun)

    /* ScsiLun */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostScsiDisk)
})

/* esxVI_HostDevice_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostDevice)

/* esxVI_HostDevice_DeepCopy */
ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY(HostDevice,
{
    /* HostDevice */
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(ScsiLun)

    /* ScsiLun */
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(HostScsiDisk)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, deviceName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, deviceType)
})

/* esxVI_HostDevice_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostDevice)

/* esxVI_HostDevice_CastFromAnyType */
ESX_VI__TEMPLATE__DYNAMIC_CAST_FROM_ANY_TYPE(HostDevice,
{
    /* HostDevice */
    ESX_VI__TEMPLATE__DISPATCH__CAST_FROM_ANY_TYPE(ScsiLun)

    /* ScsiLun */
    ESX_VI__TEMPLATE__DISPATCH__CAST_FROM_ANY_TYPE(HostScsiDisk)
})

/* esxVI_HostDevice_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostDevice)

/* esxVI_HostDevice_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(HostDevice,
{
    /* HostDevice */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(ScsiLun)

    /* ScsiLun */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostScsiDisk)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, deviceName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, deviceType)
})

/* esxVI_HostDevice_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostDevice)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostDiskDimensionsLba
 */

/* esxVI_HostDiskDimensionsLba_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostDiskDimensionsLba)

/* esxVI_HostDiskDimensionsLba_Free */
ESX_VI__TEMPLATE__FREE(HostDiskDimensionsLba,
{
    esxVI_Int_Free(&item->blockSize);
    esxVI_Long_Free(&item->block);
})

/* esxVI_HostDiskDimensionsLba_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostDiskDimensionsLba,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(blockSize)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(block)
})

/* esxVI_HostDiskDimensionsLba_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostDiskDimensionsLba,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, blockSize)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Long, block)
})

/* esxVI_HostDiskDimensionsLba_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostDiskDimensionsLba,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, blockSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, block)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostFibreChannelHba
 *            extends HostHostBusAdapter
 */

/* esxVI_HostFibreChannelHba_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostFibreChannelHba)

/* esxVI_HostFibreChannelHba_Free */
ESX_VI__TEMPLATE__FREE(HostFibreChannelHba,
{
    esxVI_HostHostBusAdapter *next = (esxVI_HostHostBusAdapter *)item->_next;

    esxVI_HostHostBusAdapter_Free(&next);
    item->_next = (esxVI_HostFibreChannelHba *)next;

    /* HostHostBusAdapter */
    VIR_FREE(item->key);
    VIR_FREE(item->device);
    esxVI_Int_Free(&item->bus);
    VIR_FREE(item->status);
    VIR_FREE(item->model);
    VIR_FREE(item->driver);
    VIR_FREE(item->pci);

    /* HostFibreChannelHba */
    esxVI_Long_Free(&item->portWorldWideName);
    esxVI_Long_Free(&item->nodeWorldWideName);
    esxVI_Long_Free(&item->speed);
})

/* esxVI_HostFibreChannelHba_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostFibreChannelHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(device)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(bus)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(status)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(model)

    /* HostFibreChannelHba */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(portWorldWideName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(nodeWorldWideName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(portType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(speed)
})

/* esxVI_HostFibreChannelHba_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostFibreChannelHba,
{
})

/* esxVI_HostFibreChannelHba_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostFibreChannelHba)

/* esxVI_HostFibreChannelHba_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostFibreChannelHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, bus)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, status)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, pci)

    /* HostFibreChannelHba */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Long, portWorldWideName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Long, nodeWorldWideName)
    (*dest)->portType = src->portType;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Long, speed)
})

/* esxVI_HostFibreChannelHba_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostFibreChannelHba)

/* esxVI_HostFibreChannelHba_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostFibreChannelHba)

/* esxVI_HostFibreChannelHba_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostFibreChannelHba)

/* esxVI_HostFibreChannelHba_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostFibreChannelHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, bus)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, status)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, pci)

    /* HostFibreChannelHba */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, portWorldWideName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, nodeWorldWideName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(FibreChannelPortType, portType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, speed)
})

/* esxVI_HostFibreChannelHba_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostFibreChannelHba)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostFibreChannelTargetTransport
 *            extends HostTargetTransport
 */

/* esxVI_HostFibreChannelTargetTransport_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostFibreChannelTargetTransport)

/* esxVI_HostFibreChannelTargetTransport_Free */
ESX_VI__TEMPLATE__FREE(HostFibreChannelTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostFibreChannelTargetTransport */
    esxVI_Long_Free(&item->portWorldWideName);
    esxVI_Long_Free(&item->nodeWorldWideName);
})

/* esxVI_HostFibreChannelTargetTransport_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostFibreChannelTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostFibreChannelTargetTransport */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(portWorldWideName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(nodeWorldWideName)
})

/* esxVI_HostFibreChannelTargetTransport_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostFibreChannelTargetTransport,
{
})

/* esxVI_HostFibreChannelTargetTransport_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostFibreChannelTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostFibreChannelTargetTransport */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, portWorldWideName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, nodeWorldWideName)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostFileSystemVolume
 *            extended by HostNasVolume
 *                        HostVmfsVolume
 */

/* esxVI_HostFileSystemVolume_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostFileSystemVolume)

/* esxVI_HostFileSystemVolume_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(HostFileSystemVolume,
{
    /* HostFileSystemVolume */
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostNasVolume)
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostVmfsVolume)
},
{
    VIR_FREE(item->type);
    VIR_FREE(item->name);
    esxVI_Long_Free(&item->capacity);
})

/* esxVI_HostFileSystemVolume_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostFileSystemVolume,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(type)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(capacity)
})

/* esxVI_HostFileSystemVolume_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(HostFileSystemVolume,
{
    /* HostFileSystemVolume */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostNasVolume)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostVmfsVolume)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, type)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, capacity)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostHostBusAdapter
 *            extended by HostBlockHba
 *                        HostFibreChannelHba
 *                        HostInternetScsiHba
 *                        HostParallelScsiHba
 */

/* esxVI_HostHostBusAdapter_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostHostBusAdapter)

/* esxVI_HostHostBusAdapter_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(HostHostBusAdapter,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostBlockHba)
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostFibreChannelHba)
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostInternetScsiHba)
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostParallelScsiHba)
},
{
    esxVI_HostHostBusAdapter_Free(&item->_next);

    VIR_FREE(item->key);
    VIR_FREE(item->device);
    esxVI_Int_Free(&item->bus);
    VIR_FREE(item->status);
    VIR_FREE(item->model);
    VIR_FREE(item->driver);
    VIR_FREE(item->pci);
})

/* esxVI_HostHostBusAdapter_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostHostBusAdapter,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(device)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(bus)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(status)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(model)
})

/* esxVI_HostHostBusAdapter_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostHostBusAdapter,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostBlockHba)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostFibreChannelHba)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostInternetScsiHba)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostParallelScsiHba)
})

/* esxVI_HostHostBusAdapter_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostHostBusAdapter)

/* esxVI_HostHostBusAdapter_DeepCopy */
ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY(HostHostBusAdapter,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(HostBlockHba)
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(HostFibreChannelHba)
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(HostInternetScsiHba)
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(HostParallelScsiHba)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, bus)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, status)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, pci)
})

/* esxVI_HostHostBusAdapter_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostHostBusAdapter)

/* esxVI_HostHostBusAdapter_CastFromAnyType */
ESX_VI__TEMPLATE__DYNAMIC_CAST_FROM_ANY_TYPE(HostHostBusAdapter,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__DISPATCH__CAST_FROM_ANY_TYPE(HostBlockHba)
    ESX_VI__TEMPLATE__DISPATCH__CAST_FROM_ANY_TYPE(HostFibreChannelHba)
    ESX_VI__TEMPLATE__DISPATCH__CAST_FROM_ANY_TYPE(HostInternetScsiHba)
    ESX_VI__TEMPLATE__DISPATCH__CAST_FROM_ANY_TYPE(HostParallelScsiHba)
})

/* esxVI_HostHostBusAdapter_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostHostBusAdapter)

/* esxVI_HostHostBusAdapter_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(HostHostBusAdapter,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostBlockHba)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostFibreChannelHba)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostInternetScsiHba)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostParallelScsiHba)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, bus)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, status)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, pci)
})

/* esxVI_HostHostBusAdapter_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostHostBusAdapter)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHba
 *            extends HostHostBusAdapter
 */

/* esxVI_HostInternetScsiHba_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHba)

/* esxVI_HostInternetScsiHba_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHba,
{
    esxVI_HostHostBusAdapter *next = (esxVI_HostHostBusAdapter *)item->_next;

    esxVI_HostHostBusAdapter_Free(&next);
    item->_next = (esxVI_HostInternetScsiHba *)next;

    /* HostHostBusAdapter */
    VIR_FREE(item->key);
    VIR_FREE(item->device);
    esxVI_Int_Free(&item->bus);
    VIR_FREE(item->status);
    VIR_FREE(item->model);
    VIR_FREE(item->driver);
    VIR_FREE(item->pci);

    /* HostInternetScsiHba */
    esxVI_HostInternetScsiHbaDiscoveryCapabilities_Free(&item->discoveryCapabilities);
    esxVI_HostInternetScsiHbaDiscoveryProperties_Free(&item->discoveryProperties);
    esxVI_HostInternetScsiHbaAuthenticationCapabilities_Free(&item->authenticationCapabilities);
    esxVI_HostInternetScsiHbaAuthenticationProperties_Free(&item->authenticationProperties);
    esxVI_HostInternetScsiHbaDigestCapabilities_Free(&item->digestCapabilities);
    esxVI_HostInternetScsiHbaDigestProperties_Free(&item->digestProperties);
    esxVI_HostInternetScsiHbaIPCapabilities_Free(&item->ipCapabilities);
    esxVI_HostInternetScsiHbaIPProperties_Free(&item->ipProperties);
    /* FIXME: supportedAdvancedOptions is currently ignored */
    esxVI_HostInternetScsiHbaParamValue_Free(&item->advancedOptions);
    VIR_FREE(item->iScsiName);
    VIR_FREE(item->iScsiAlias);
    esxVI_HostInternetScsiHbaSendTarget_Free(&item->configuredSendTarget);
    esxVI_HostInternetScsiHbaStaticTarget_Free(&item->configuredStaticTarget);
    esxVI_Int_Free(&item->maxSpeedMb);
    esxVI_Int_Free(&item->currentSpeedMb);
})

/* esxVI_HostInternetScsiHba_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(device)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(bus)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(status)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(model)

    /* HostInternetScsiHba */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(isSoftwareBased)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(discoveryCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(discoveryProperties)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(authenticationCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(authenticationProperties)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(ipCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(ipProperties)
    /* FIXME: supportedAdvancedOptions is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(iScsiName)
})

/* esxVI_HostInternetScsiHba_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostInternetScsiHba,
{
})

/* esxVI_HostInternetScsiHba_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostInternetScsiHba)

/* esxVI_HostInternetScsiHba_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, bus)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, status)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, pci)

    /* HostInternetScsiHba */
    (*dest)->isSoftwareBased = src->isSoftwareBased;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaDiscoveryCapabilities, discoveryCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaDiscoveryProperties, discoveryProperties)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaAuthenticationCapabilities, authenticationCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaAuthenticationProperties, authenticationProperties)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaDigestCapabilities, digestCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaDigestProperties, digestProperties)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaIPCapabilities, ipCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaIPProperties, ipProperties)
    /* FIXME: supportedAdvancedOptions is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(HostInternetScsiHbaParamValue, advancedOptions)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, iScsiName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, iScsiAlias)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(HostInternetScsiHbaSendTarget, configuredSendTarget)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(HostInternetScsiHbaStaticTarget, configuredStaticTarget)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, maxSpeedMb)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, currentSpeedMb)
})

/* esxVI_HostInternetScsiHba_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostInternetScsiHba)

/* esxVI_HostInternetScsiHba_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostInternetScsiHba)

/* esxVI_HostInternetScsiHba_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostInternetScsiHba)

/* esxVI_HostInternetScsiHba_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, bus)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, status)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, pci)

    /* HostInternetScsiHba */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, isSoftwareBased)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaDiscoveryCapabilities, discoveryCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaDiscoveryProperties, discoveryProperties)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaAuthenticationCapabilities, authenticationCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaAuthenticationProperties, authenticationProperties)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaDigestCapabilities, digestCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaDigestProperties, digestProperties)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaIPCapabilities, ipCapabilities)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaIPProperties, ipProperties)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(supportedAdvancedOptions) /* FIXME */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(HostInternetScsiHbaParamValue, advancedOptions)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, iScsiName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, iScsiAlias)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(HostInternetScsiHbaSendTarget, configuredSendTarget)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(HostInternetScsiHbaStaticTarget, configuredStaticTarget)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, maxSpeedMb)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, currentSpeedMb)
})

/* esxVI_HostInternetScsiHba_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostInternetScsiHba)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaAuthenticationCapabilities
 */

/* esxVI_HostInternetScsiHbaAuthenticationCapabilities_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaAuthenticationCapabilities)

/* esxVI_HostInternetScsiHbaAuthenticationCapabilities_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaAuthenticationCapabilities,
{
    /* no properties to be freed */
})

/* esxVI_HostInternetScsiHbaAuthenticationCapabilities_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaAuthenticationCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(chapAuthSettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(krb5AuthSettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(srpAuthSettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(spkmAuthSettable)
})

/* esxVI_HostInternetScsiHbaAuthenticationCapabilities_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaAuthenticationCapabilities,
{
    (*dest)->chapAuthSettable = src->chapAuthSettable;
    (*dest)->krb5AuthSettable = src->krb5AuthSettable;
    (*dest)->srpAuthSettable = src->srpAuthSettable;
    (*dest)->spkmAuthSettable = src->spkmAuthSettable;
    (*dest)->mutualChapSettable = src->mutualChapSettable;
    (*dest)->targetChapSettable = src->targetChapSettable;
    (*dest)->targetMutualChapSettable = src->targetMutualChapSettable;
})

/* esxVI_HostInternetScsiHbaAuthenticationCapabilities_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaAuthenticationCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, chapAuthSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, krb5AuthSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, srpAuthSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, spkmAuthSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, mutualChapSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, targetChapSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, targetMutualChapSettable)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaAuthenticationProperties
 */

/* esxVI_HostInternetScsiHbaAuthenticationProperties_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaAuthenticationProperties)

/* esxVI_HostInternetScsiHbaAuthenticationProperties_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaAuthenticationProperties,
{
    VIR_FREE(item->chapName);
    VIR_FREE(item->chapSecret);
    VIR_FREE(item->chapAuthenticationType);
    VIR_FREE(item->mutualChapName);
    VIR_FREE(item->mutualChapSecret);
    VIR_FREE(item->mutualChapAuthenticationType);
})

/* esxVI_HostInternetScsiHbaAuthenticationProperties_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaAuthenticationProperties,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(chapAuthEnabled)
})

/* esxVI_HostInternetScsiHbaAuthenticationProperties_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaAuthenticationProperties,
{
    (*dest)->chapAuthEnabled = src->chapAuthEnabled;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, chapName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, chapSecret)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, chapAuthenticationType)
    (*dest)->chapInherited = src->chapInherited;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, mutualChapName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, mutualChapSecret)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, mutualChapAuthenticationType)
    (*dest)->mutualChapInherited = src->mutualChapInherited;
})

/* esxVI_HostInternetScsiHbaAuthenticationProperties_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaAuthenticationProperties,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, chapAuthEnabled)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, chapName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, chapSecret)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, chapAuthenticationType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, chapInherited)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, mutualChapName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, mutualChapSecret)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, mutualChapAuthenticationType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, mutualChapInherited)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaDigestCapabilities
 */

/* esxVI_HostInternetScsiHbaDigestCapabilities_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaDigestCapabilities)

/* esxVI_HostInternetScsiHbaDigestCapabilities_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaDigestCapabilities,
{
    /* no properties to be freed */
})

/* esxVI_HostInternetScsiHbaDigestCapabilities_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaDigestCapabilities,
{
    /* no required properties */
})

/* esxVI_HostInternetScsiHbaDigestCapabilities_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaDigestCapabilities,
{
    (*dest)->headerDigestSettable = src->headerDigestSettable;
    (*dest)->dataDigestSettable = src->dataDigestSettable;
    (*dest)->targetHeaderDigestSettable = src->targetHeaderDigestSettable;
    (*dest)->targetDataDigestSettable = src->targetDataDigestSettable;
})

/* esxVI_HostInternetScsiHbaDigestCapabilities_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaDigestCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, headerDigestSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, dataDigestSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, targetHeaderDigestSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, targetDataDigestSettable)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaDigestProperties
 */

/* esxVI_HostInternetScsiHbaDigestProperties_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaDigestProperties)

/* esxVI_HostInternetScsiHbaDigestProperties_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaDigestProperties,
{
    VIR_FREE(item->headerDigestType);
    VIR_FREE(item->dataDigestType);
})

/* esxVI_HostInternetScsiHbaDigestProperties_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaDigestProperties,
{
    /* no required properties */
})

/* esxVI_HostInternetScsiHbaDigestProperties_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaDigestProperties,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, headerDigestType)
    (*dest)->headerDigestInherited = src->headerDigestInherited;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, dataDigestType)
    (*dest)->dataDigestInherited = src->dataDigestInherited;
})

/* esxVI_HostInternetScsiHbaDigestProperties_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaDigestProperties,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, headerDigestType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, headerDigestInherited)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, dataDigestType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, dataDigestInherited)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaDiscoveryCapabilities
 */

/* esxVI_HostInternetScsiHbaDiscoveryCapabilities_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaDiscoveryCapabilities)

/* esxVI_HostInternetScsiHbaDiscoveryCapabilities_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaDiscoveryCapabilities,
{
    /* no properties to be freed */
})

/* esxVI_HostInternetScsiHbaDiscoveryCapabilities_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaDiscoveryCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(iSnsDiscoverySettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(slpDiscoverySettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(staticTargetDiscoverySettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(sendTargetsDiscoverySettable)
})

/* esxVI_HostInternetScsiHbaDiscoveryCapabilities_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaDiscoveryCapabilities,
{
    (*dest)->iSnsDiscoverySettable = src->iSnsDiscoverySettable;
    (*dest)->slpDiscoverySettable = src->slpDiscoverySettable;
    (*dest)->staticTargetDiscoverySettable = src->staticTargetDiscoverySettable;
    (*dest)->sendTargetsDiscoverySettable = src->sendTargetsDiscoverySettable;
})

/* esxVI_HostInternetScsiHbaDiscoveryCapabilities_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaDiscoveryCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, iSnsDiscoverySettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, slpDiscoverySettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, staticTargetDiscoverySettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, sendTargetsDiscoverySettable)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaDiscoveryProperties
 */

/* esxVI_HostInternetScsiHbaDiscoveryProperties_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaDiscoveryProperties)

/* esxVI_HostInternetScsiHbaDiscoveryProperties_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaDiscoveryProperties,
{
    VIR_FREE(item->iSnsDiscoveryMethod);
    VIR_FREE(item->iSnsHost);
    VIR_FREE(item->slpDiscoveryMethod);
    VIR_FREE(item->slpHost);
})

/* esxVI_HostInternetScsiHbaDiscoveryProperties_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaDiscoveryProperties,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(iSnsDiscoveryEnabled)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(slpDiscoveryEnabled)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(staticTargetDiscoveryEnabled)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(sendTargetsDiscoveryEnabled)
})

/* esxVI_HostInternetScsiHbaDiscoveryProperties_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaDiscoveryProperties,
{
    (*dest)->iSnsDiscoveryEnabled = src->iSnsDiscoveryEnabled;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, iSnsDiscoveryMethod)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, iSnsHost)
    (*dest)->slpDiscoveryEnabled = src->slpDiscoveryEnabled;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, slpDiscoveryMethod)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, slpHost)
    (*dest)->staticTargetDiscoveryEnabled = src->staticTargetDiscoveryEnabled;
    (*dest)->sendTargetsDiscoveryEnabled = src->sendTargetsDiscoveryEnabled;
})

/* esxVI_HostInternetScsiHbaDiscoveryProperties_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaDiscoveryProperties,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, iSnsDiscoveryEnabled)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, iSnsDiscoveryMethod)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, iSnsHost)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, slpDiscoveryEnabled)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, slpDiscoveryMethod)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, slpHost)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, staticTargetDiscoveryEnabled)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, sendTargetsDiscoveryEnabled)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaIPCapabilities
 */

/* esxVI_HostInternetScsiHbaIPCapabilities_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaIPCapabilities)

/* esxVI_HostInternetScsiHbaIPCapabilities_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaIPCapabilities,
{
    /* no properties to be freed */
})

/* esxVI_HostInternetScsiHbaIPCapabilities_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaIPCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(addressSettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(ipConfigurationMethodSettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(subnetMaskSettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(defaultGatewaySettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(primaryDnsServerAddressSettable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(alternateDnsServerAddressSettable)
})

/* esxVI_HostInternetScsiHbaIPCapabilities_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaIPCapabilities,
{
    (*dest)->addressSettable = src->addressSettable;
    (*dest)->ipConfigurationMethodSettable = src->ipConfigurationMethodSettable;
    (*dest)->subnetMaskSettable = src->subnetMaskSettable;
    (*dest)->defaultGatewaySettable = src->defaultGatewaySettable;
    (*dest)->primaryDnsServerAddressSettable = src->primaryDnsServerAddressSettable;
    (*dest)->alternateDnsServerAddressSettable = src->alternateDnsServerAddressSettable;
    (*dest)->ipv6Supported = src->ipv6Supported;
    (*dest)->arpRedirectSettable = src->arpRedirectSettable;
    (*dest)->mtuSettable = src->mtuSettable;
    (*dest)->hostNameAsTargetAddress = src->hostNameAsTargetAddress;
})

/* esxVI_HostInternetScsiHbaIPCapabilities_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaIPCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, addressSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, ipConfigurationMethodSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, subnetMaskSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, defaultGatewaySettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, primaryDnsServerAddressSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, alternateDnsServerAddressSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, ipv6Supported)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, arpRedirectSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, mtuSettable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, hostNameAsTargetAddress)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaIPProperties
 */

/* esxVI_HostInternetScsiHbaIPProperties_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaIPProperties)

/* esxVI_HostInternetScsiHbaIPProperties_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaIPProperties,
{
    VIR_FREE(item->mac);
    VIR_FREE(item->address);
    VIR_FREE(item->subnetMask);
    VIR_FREE(item->defaultGateway);
    VIR_FREE(item->primaryDnsServerAddress);
    VIR_FREE(item->alternateDnsServerAddress);
    VIR_FREE(item->ipv6Address);
    VIR_FREE(item->ipv6SubnetMask);
    VIR_FREE(item->ipv6DefaultGateway);
    esxVI_Int_Free(&item->mtu);
})

/* esxVI_HostInternetScsiHbaIPProperties_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaIPProperties,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(dhcpConfigurationEnabled)
})

/* esxVI_HostInternetScsiHbaIPProperties_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaIPProperties,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, mac)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, address)
    (*dest)->dhcpConfigurationEnabled = src->dhcpConfigurationEnabled;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, subnetMask)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, defaultGateway)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, primaryDnsServerAddress)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, alternateDnsServerAddress)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, ipv6Address)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, ipv6SubnetMask)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, ipv6DefaultGateway)
    (*dest)->arpRedirectEnabled = src->arpRedirectEnabled;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, mtu)
    (*dest)->jumboFramesEnabled = src->jumboFramesEnabled;
})

/* esxVI_HostInternetScsiHbaIPProperties_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaIPProperties,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, mac)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, address)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, dhcpConfigurationEnabled)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, subnetMask)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, defaultGateway)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, primaryDnsServerAddress)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, alternateDnsServerAddress)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, ipv6Address)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, ipv6SubnetMask)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, ipv6DefaultGateway)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, arpRedirectEnabled)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, mtu)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, jumboFramesEnabled)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaParamValue
 *            extends OptionValue
 */

/* esxVI_HostInternetScsiHbaParamValue_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaParamValue)

/* esxVI_HostInternetScsiHbaParamValue_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaParamValue,
{
    esxVI_OptionValue *next = (esxVI_OptionValue *)item->_next;

    esxVI_OptionValue_Free(&next);
    item->_next = (esxVI_HostInternetScsiHbaParamValue *)next;

    /* OptionValue */
    VIR_FREE(item->key);
    esxVI_AnyType_Free(&item->value);

    /* HostInternetScsiHbaParamValue */
    /* no properties to be freed */
})

/* esxVI_HostInternetScsiHbaParamValue_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaParamValue,
{
    /* OptionValue */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)

    /* HostInternetScsiHbaParamValue */
    /* no required properties */
})

/* esxVI_HostInternetScsiHbaParamValue_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostInternetScsiHbaParamValue,
{
})

/* esxVI_HostInternetScsiHbaParamValue_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostInternetScsiHbaParamValue)

/* esxVI_HostInternetScsiHbaParamValue_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaParamValue,
{
    /* OptionValue */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(AnyType, value)

    /* HostInternetScsiHbaParamValue */
    (*dest)->isInherited = src->isInherited;
})

/* esxVI_HostInternetScsiHbaParamValue_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostInternetScsiHbaParamValue)

/* esxVI_HostInternetScsiHbaParamValue_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaParamValue,
{
    /* OptionValue */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(AnyType, value)

    /* HostInternetScsiHbaParamValue */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, isInherited)
})

/* esxVI_HostInternetScsiHbaParamValue_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostInternetScsiHbaParamValue)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaSendTarget
 */

/* esxVI_HostInternetScsiHbaSendTarget_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaSendTarget)

/* esxVI_HostInternetScsiHbaSendTarget_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaSendTarget,
{
    esxVI_HostInternetScsiHbaSendTarget_Free(&item->_next);

    VIR_FREE(item->address);
    esxVI_Int_Free(&item->port);
    esxVI_HostInternetScsiHbaAuthenticationProperties_Free(&item->authenticationProperties);
    esxVI_HostInternetScsiHbaDigestProperties_Free(&item->digestProperties);
    /* FIXME: supportedAdvancedOptions is currently ignored */
    esxVI_HostInternetScsiHbaParamValue_Free(&item->advancedOptions);
    VIR_FREE(item->parent);
})

/* esxVI_HostInternetScsiHbaSendTarget_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaSendTarget,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(address)
    /* FIXME: supportedAdvancedOptions is currently ignored */
})

/* esxVI_HostInternetScsiHbaSendTarget_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostInternetScsiHbaSendTarget)

/* esxVI_HostInternetScsiHbaSendTarget_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaSendTarget,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, address)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, port)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaAuthenticationProperties, authenticationProperties)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaDigestProperties, digestProperties)
    /* FIXME: supportedAdvancedOptions is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(HostInternetScsiHbaParamValue, advancedOptions)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, parent)
})

/* esxVI_HostInternetScsiHbaSendTarget_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostInternetScsiHbaSendTarget)

/* esxVI_HostInternetScsiHbaSendTarget_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaSendTarget,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, address)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, port)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaAuthenticationProperties, authenticationProperties)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaDigestProperties, digestProperties)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(supportedAdvancedOptions) /* FIXME */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(HostInternetScsiHbaParamValue, advancedOptions)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, parent)
})

/* esxVI_HostInternetScsiHbaSendTarget_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostInternetScsiHbaSendTarget)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiHbaStaticTarget
 */

/* esxVI_HostInternetScsiHbaStaticTarget_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiHbaStaticTarget)

/* esxVI_HostInternetScsiHbaStaticTarget_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiHbaStaticTarget,
{
    esxVI_HostInternetScsiHbaStaticTarget_Free(&item->_next);

    VIR_FREE(item->address);
    esxVI_Int_Free(&item->port);
    VIR_FREE(item->iScsiName);
    esxVI_HostInternetScsiHbaAuthenticationProperties_Free(&item->authenticationProperties);
    esxVI_HostInternetScsiHbaDigestProperties_Free(&item->digestProperties);
    /* FIXME: supportedAdvancedOptions is currently ignored */
    esxVI_HostInternetScsiHbaParamValue_Free(&item->advancedOptions);
    VIR_FREE(item->parent);
})

/* esxVI_HostInternetScsiHbaStaticTarget_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiHbaStaticTarget,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(address)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(iScsiName)
    /* FIXME: supportedAdvancedOptions is currently ignored */
})

/* esxVI_HostInternetScsiHbaStaticTarget_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostInternetScsiHbaStaticTarget)

/* esxVI_HostInternetScsiHbaStaticTarget_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostInternetScsiHbaStaticTarget,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, address)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, port)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, iScsiName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaAuthenticationProperties, authenticationProperties)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostInternetScsiHbaDigestProperties, digestProperties)
    /* FIXME: supportedAdvancedOptions is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(HostInternetScsiHbaParamValue, advancedOptions)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, parent)
})

/* esxVI_HostInternetScsiHbaStaticTarget_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostInternetScsiHbaStaticTarget)

/* esxVI_HostInternetScsiHbaStaticTarget_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiHbaStaticTarget,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, address)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, port)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, iScsiName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaAuthenticationProperties, authenticationProperties)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostInternetScsiHbaDigestProperties, digestProperties)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(supportedAdvancedOptions) /* FIXME */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(HostInternetScsiHbaParamValue, advancedOptions)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, parent)
})

/* esxVI_HostInternetScsiHbaStaticTarget_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostInternetScsiHbaStaticTarget)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostInternetScsiTargetTransport
 *            extends HostTargetTransport
 */

/* esxVI_HostInternetScsiTargetTransport_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostInternetScsiTargetTransport)

/* esxVI_HostInternetScsiTargetTransport_Free */
ESX_VI__TEMPLATE__FREE(HostInternetScsiTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostInternetScsiTargetTransport */
    VIR_FREE(item->iScsiName);
    VIR_FREE(item->iScsiAlias);
    esxVI_String_Free(&item->address);
})

/* esxVI_HostInternetScsiTargetTransport_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostInternetScsiTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostInternetScsiTargetTransport */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(iScsiName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(iScsiAlias)
})

/* esxVI_HostInternetScsiTargetTransport_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostInternetScsiTargetTransport,
{
})

/* esxVI_HostInternetScsiTargetTransport_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostInternetScsiTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostInternetScsiTargetTransport */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, iScsiName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, iScsiAlias)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, address)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostIpConfig
 */

/* esxVI_HostIpConfig_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostIpConfig)

/* esxVI_HostIpConfig_Free */
ESX_VI__TEMPLATE__FREE(HostIpConfig,
{
    VIR_FREE(item->ipAddress);
    VIR_FREE(item->subnetMask);
    /* FIXME: ipV6Config is currently ignored */
})

/* esxVI_HostIpConfig_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostIpConfig,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(dhcp)
    /* FIXME: ipV6Config is currently ignored */
})

/* esxVI_HostIpConfig_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostIpConfig,
{
    (*dest)->dhcp = src->dhcp;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, ipAddress)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, subnetMask)
    /* FIXME: ipV6Config is currently ignored */
})

/* esxVI_HostIpConfig_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostIpConfig,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, dhcp)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, ipAddress)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, subnetMask)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(ipV6Config) /* FIXME */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostMountInfo
 */

/* esxVI_HostMountInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostMountInfo)

/* esxVI_HostMountInfo_Free */
ESX_VI__TEMPLATE__FREE(HostMountInfo,
{
    VIR_FREE(item->path);
    VIR_FREE(item->accessMode);
})

/* esxVI_HostMountInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostMountInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(accessMode)
})

/* esxVI_HostMountInfo_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostMountInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, accessMode)
    (*dest)->accessible = src->accessible;
})

/* esxVI_HostMountInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostMountInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, accessMode)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, accessible)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostNasVolume
 *            extends HostFileSystemVolume
 */

/* esxVI_HostNasVolume_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostNasVolume)

/* esxVI_HostNasVolume_Free */
ESX_VI__TEMPLATE__FREE(HostNasVolume,
{
    /* HostFileSystemVolume */
    VIR_FREE(item->type);
    VIR_FREE(item->name);
    esxVI_Long_Free(&item->capacity);

    /* HostNasVolume */
    VIR_FREE(item->remoteHost);
    VIR_FREE(item->remotePath);
    VIR_FREE(item->userName);
})

/* esxVI_HostNasVolume_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostNasVolume,
{
    /* HostFileSystemVolume */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(type)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(capacity)

    /* HostNasVolume */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(remoteHost)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(remotePath)
})

/* esxVI_HostNasVolume_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostNasVolume,
{
    /* HostFileSystemVolume */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, type)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, capacity)

    /* HostNasVolume */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, remoteHost)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, remotePath)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, userName)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostNetOffloadCapabilities
 */

/* esxVI_HostNetOffloadCapabilities_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostNetOffloadCapabilities)

/* esxVI_HostNetOffloadCapabilities_Free */
ESX_VI__TEMPLATE__FREE(HostNetOffloadCapabilities,
{
    /* no properties to be freed */
})

/* esxVI_HostNetOffloadCapabilities_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostNetOffloadCapabilities,
{
    /* no required properties */
})

/* esxVI_HostNetOffloadCapabilities_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostNetOffloadCapabilities,
{
    (*dest)->csumOffload = src->csumOffload;
    (*dest)->tcpSegmentation = src->tcpSegmentation;
    (*dest)->zeroCopyXmit = src->zeroCopyXmit;
})

/* esxVI_HostNetOffloadCapabilities_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostNetOffloadCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, csumOffload)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, tcpSegmentation)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, zeroCopyXmit)
})

/* esxVI_HostNetOffloadCapabilities_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostNetOffloadCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, csumOffload)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, tcpSegmentation)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, zeroCopyXmit)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostNetworkPolicy
 */

/* esxVI_HostNetworkPolicy_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostNetworkPolicy)

/* esxVI_HostNetworkPolicy_Free */
ESX_VI__TEMPLATE__FREE(HostNetworkPolicy,
{
    esxVI_HostNetworkSecurityPolicy_Free(&item->security);
    esxVI_HostNicTeamingPolicy_Free(&item->nicTeaming);
    esxVI_HostNetOffloadCapabilities_Free(&item->offloadPolicy);
    esxVI_HostNetworkTrafficShapingPolicy_Free(&item->shapingPolicy);
})

/* esxVI_HostNetworkPolicy_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostNetworkPolicy,
{
    /* no required properties */
})

/* esxVI_HostNetworkPolicy_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostNetworkPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostNetworkSecurityPolicy, security)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostNicTeamingPolicy, nicTeaming)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostNetOffloadCapabilities, offloadPolicy)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostNetworkTrafficShapingPolicy, shapingPolicy)
})

/* esxVI_HostNetworkPolicy_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostNetworkPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(HostNetworkSecurityPolicy, security)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(HostNicTeamingPolicy, nicTeaming)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(HostNetOffloadCapabilities, offloadPolicy)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(HostNetworkTrafficShapingPolicy, shapingPolicy)
})

/* esxVI_HostNetworkPolicy_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostNetworkPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostNetworkSecurityPolicy, security)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostNicTeamingPolicy, nicTeaming)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostNetOffloadCapabilities, offloadPolicy)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostNetworkTrafficShapingPolicy, shapingPolicy)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostNetworkSecurityPolicy
 */

/* esxVI_HostNetworkSecurityPolicy_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostNetworkSecurityPolicy)

/* esxVI_HostNetworkSecurityPolicy_Free */
ESX_VI__TEMPLATE__FREE(HostNetworkSecurityPolicy,
{
    /* no properties to be freed */
})

/* esxVI_HostNetworkSecurityPolicy_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostNetworkSecurityPolicy,
{
    /* no required properties */
})

/* esxVI_HostNetworkSecurityPolicy_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostNetworkSecurityPolicy,
{
    (*dest)->allowPromiscuous = src->allowPromiscuous;
    (*dest)->macChanges = src->macChanges;
    (*dest)->forgedTransmits = src->forgedTransmits;
})

/* esxVI_HostNetworkSecurityPolicy_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostNetworkSecurityPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, allowPromiscuous)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, macChanges)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, forgedTransmits)
})

/* esxVI_HostNetworkSecurityPolicy_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostNetworkSecurityPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, allowPromiscuous)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, macChanges)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, forgedTransmits)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostNetworkTrafficShapingPolicy
 */

/* esxVI_HostNetworkTrafficShapingPolicy_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostNetworkTrafficShapingPolicy)

/* esxVI_HostNetworkTrafficShapingPolicy_Free */
ESX_VI__TEMPLATE__FREE(HostNetworkTrafficShapingPolicy,
{
    esxVI_Long_Free(&item->averageBandwidth);
    esxVI_Long_Free(&item->peakBandwidth);
    esxVI_Long_Free(&item->burstSize);
})

/* esxVI_HostNetworkTrafficShapingPolicy_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostNetworkTrafficShapingPolicy,
{
    /* no required properties */
})

/* esxVI_HostNetworkTrafficShapingPolicy_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostNetworkTrafficShapingPolicy,
{
    (*dest)->enabled = src->enabled;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Long, averageBandwidth)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Long, peakBandwidth)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Long, burstSize)
})

/* esxVI_HostNetworkTrafficShapingPolicy_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostNetworkTrafficShapingPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, enabled)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Long, averageBandwidth)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Long, peakBandwidth)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Long, burstSize)
})

/* esxVI_HostNetworkTrafficShapingPolicy_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostNetworkTrafficShapingPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, enabled)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, averageBandwidth)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, peakBandwidth)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, burstSize)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostNicFailureCriteria
 */

/* esxVI_HostNicFailureCriteria_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostNicFailureCriteria)

/* esxVI_HostNicFailureCriteria_Free */
ESX_VI__TEMPLATE__FREE(HostNicFailureCriteria,
{
    VIR_FREE(item->checkSpeed);
    esxVI_Int_Free(&item->speed);
    esxVI_Int_Free(&item->percentage);
})

/* esxVI_HostNicFailureCriteria_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostNicFailureCriteria,
{
    /* no required properties */
})

/* esxVI_HostNicFailureCriteria_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostNicFailureCriteria,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, checkSpeed)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, speed)
    (*dest)->checkDuplex = src->checkDuplex;
    (*dest)->fullDuplex = src->fullDuplex;
    (*dest)->checkErrorPercent = src->checkErrorPercent;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, percentage)
    (*dest)->checkBeacon = src->checkBeacon;
})

/* esxVI_HostNicFailureCriteria_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostNicFailureCriteria,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, checkSpeed)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, speed)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, checkDuplex)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, fullDuplex)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, checkErrorPercent)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, percentage)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, checkBeacon)
})

/* esxVI_HostNicFailureCriteria_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostNicFailureCriteria,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, checkSpeed)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, speed)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, checkDuplex)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, fullDuplex)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, checkErrorPercent)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, percentage)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, checkBeacon)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostNicOrderPolicy
 */

/* esxVI_HostNicOrderPolicy_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostNicOrderPolicy)

/* esxVI_HostNicOrderPolicy_Free */
ESX_VI__TEMPLATE__FREE(HostNicOrderPolicy,
{
    esxVI_String_Free(&item->activeNic);
    esxVI_String_Free(&item->standbyNic);
})

/* esxVI_HostNicOrderPolicy_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostNicOrderPolicy,
{
    /* no required properties */
})

/* esxVI_HostNicOrderPolicy_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostNicOrderPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(String, activeNic)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(String, standbyNic)
})

/* esxVI_HostNicOrderPolicy_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostNicOrderPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(String, activeNic)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(String, standbyNic)
})

/* esxVI_HostNicOrderPolicy_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostNicOrderPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, activeNic)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, standbyNic)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostNicTeamingPolicy
 */

/* esxVI_HostNicTeamingPolicy_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostNicTeamingPolicy)

/* esxVI_HostNicTeamingPolicy_Free */
ESX_VI__TEMPLATE__FREE(HostNicTeamingPolicy,
{
    VIR_FREE(item->policy);
    esxVI_HostNicFailureCriteria_Free(&item->failureCriteria);
    esxVI_HostNicOrderPolicy_Free(&item->nicOrder);
})

/* esxVI_HostNicTeamingPolicy_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostNicTeamingPolicy,
{
    /* no required properties */
})

/* esxVI_HostNicTeamingPolicy_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostNicTeamingPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, policy)
    (*dest)->reversePolicy = src->reversePolicy;
    (*dest)->notifySwitches = src->notifySwitches;
    (*dest)->rollingOrder = src->rollingOrder;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostNicFailureCriteria, failureCriteria)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostNicOrderPolicy, nicOrder)
})

/* esxVI_HostNicTeamingPolicy_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostNicTeamingPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, policy)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, reversePolicy)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, notifySwitches)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, rollingOrder)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(HostNicFailureCriteria, failureCriteria)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(HostNicOrderPolicy, nicOrder)
})

/* esxVI_HostNicTeamingPolicy_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostNicTeamingPolicy,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, policy)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, reversePolicy)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, notifySwitches)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, rollingOrder)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostNicFailureCriteria, failureCriteria)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostNicOrderPolicy, nicOrder)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostParallelScsiHba
 *            extends HostHostBusAdapter
 */

/* esxVI_HostParallelScsiHba_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostParallelScsiHba)

/* esxVI_HostParallelScsiHba_Free */
ESX_VI__TEMPLATE__FREE(HostParallelScsiHba,
{
    esxVI_HostHostBusAdapter *next = (esxVI_HostHostBusAdapter *)item->_next;

    esxVI_HostHostBusAdapter_Free(&next);
    item->_next = (esxVI_HostParallelScsiHba *)next;

    /* HostHostBusAdapter */
    VIR_FREE(item->key);
    VIR_FREE(item->device);
    esxVI_Int_Free(&item->bus);
    VIR_FREE(item->status);
    VIR_FREE(item->model);
    VIR_FREE(item->driver);
    VIR_FREE(item->pci);

    /* HostParallelScsiHba */
    /* no properties */
})

/* esxVI_HostParallelScsiHba_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostParallelScsiHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(device)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(bus)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(status)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(model)

    /* HostParallelScsiHba */
    /* no properties */
})

/* esxVI_HostParallelScsiHba_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostParallelScsiHba,
{
})

/* esxVI_HostParallelScsiHba_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostParallelScsiHba)

/* esxVI_HostParallelScsiHba_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostParallelScsiHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, bus)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, status)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, pci)

    /* HostParallelScsiHba */
    /* no properties */
})

/* esxVI_HostParallelScsiHba_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostParallelScsiHba)

/* esxVI_HostParallelScsiHba_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostParallelScsiHba)

/* esxVI_HostParallelScsiHba_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostParallelScsiHba)

/* esxVI_HostParallelScsiHba_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostParallelScsiHba,
{
    /* HostHostBusAdapter */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, bus)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, status)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, pci)

    /* HostParallelScsiHba */
    /* no properties */
})

/* esxVI_HostParallelScsiHba_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostParallelScsiHba)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostParallelScsiTargetTransport
 *            extends HostTargetTransport
 */

/* esxVI_HostParallelScsiTargetTransport_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostParallelScsiTargetTransport)

/* esxVI_HostParallelScsiTargetTransport_Free */
ESX_VI__TEMPLATE__FREE(HostParallelScsiTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostParallelScsiTargetTransport */
    /* no properties */
})

/* esxVI_HostParallelScsiTargetTransport_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostParallelScsiTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostParallelScsiTargetTransport */
    /* no properties */
})

/* esxVI_HostParallelScsiTargetTransport_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostParallelScsiTargetTransport,
{
})

/* esxVI_HostParallelScsiTargetTransport_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostParallelScsiTargetTransport,
{
    /* HostTargetTransport */
    /* no properties */

    /* HostParallelScsiTargetTransport */
    /* no properties */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostPortGroup
 */

/* esxVI_HostPortGroup_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostPortGroup)

/* esxVI_HostPortGroup_Free */
ESX_VI__TEMPLATE__FREE(HostPortGroup,
{
    esxVI_HostPortGroup_Free(&item->_next);

    VIR_FREE(item->key);
    esxVI_HostPortGroupPort_Free(&item->port);
    VIR_FREE(item->vswitch);
    esxVI_HostNetworkPolicy_Free(&item->computedPolicy);
    esxVI_HostPortGroupSpec_Free(&item->spec);
})

/* esxVI_HostPortGroup_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostPortGroup,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(computedPolicy)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(spec)
})

/* esxVI_HostPortGroup_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostPortGroup)

/* esxVI_HostPortGroup_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostPortGroup)

/* esxVI_HostPortGroup_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostPortGroup)

/* esxVI_HostPortGroup_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostPortGroup,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(HostPortGroupPort, port)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, vswitch)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostNetworkPolicy, computedPolicy)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostPortGroupSpec, spec)
})

/* esxVI_HostPortGroup_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostPortGroup)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostPortGroupPort
 */

/* esxVI_HostPortGroupPort_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostPortGroupPort)

/* esxVI_HostPortGroupPort_Free */
ESX_VI__TEMPLATE__FREE(HostPortGroupPort,
{
    esxVI_HostPortGroupPort_Free(&item->_next);

    VIR_FREE(item->key);
    esxVI_String_Free(&item->mac);
    VIR_FREE(item->type);
})

/* esxVI_HostPortGroupPort_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostPortGroupPort,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(type)
})

/* esxVI_HostPortGroupPort_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostPortGroupPort)

/* esxVI_HostPortGroupPort_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostPortGroupPort,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, mac)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, type)
})

/* esxVI_HostPortGroupPort_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostPortGroupPort)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostPortGroupSpec
 */

/* esxVI_HostPortGroupSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostPortGroupSpec)

/* esxVI_HostPortGroupSpec_Free */
ESX_VI__TEMPLATE__FREE(HostPortGroupSpec,
{
    VIR_FREE(item->name);
    esxVI_Int_Free(&item->vlanId);
    VIR_FREE(item->vswitchName);
    esxVI_HostNetworkPolicy_Free(&item->policy);
})

/* esxVI_HostPortGroupSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostPortGroupSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(vlanId)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(vswitchName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(policy)
})

/* esxVI_HostPortGroupSpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostPortGroupSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, vlanId)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, vswitchName)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(HostNetworkPolicy, policy)
})

/* esxVI_HostPortGroupSpec_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostPortGroupSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, vlanId)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, vswitchName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostNetworkPolicy, policy)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostScsiDisk
 *            extends ScsiLun
 */

/* esxVI_HostScsiDisk_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostScsiDisk)

/* esxVI_HostScsiDisk_Free */
ESX_VI__TEMPLATE__FREE(HostScsiDisk,
{
    esxVI_ScsiLun *next = (esxVI_ScsiLun *)item->_next;

    esxVI_ScsiLun_Free(&next);
    item->_next = (esxVI_HostScsiDisk *)next;

    /* HostDevice */
    VIR_FREE(item->deviceName);
    VIR_FREE(item->deviceType);

    /* ScsiLun */
    VIR_FREE(item->key);
    VIR_FREE(item->uuid);
    esxVI_ScsiLunDescriptor_Free(&item->descriptor);
    VIR_FREE(item->canonicalName);
    VIR_FREE(item->displayName);
    VIR_FREE(item->lunType);
    VIR_FREE(item->vendor);
    VIR_FREE(item->model);
    VIR_FREE(item->revision);
    esxVI_Int_Free(&item->scsiLevel);
    VIR_FREE(item->serialNumber);
    esxVI_ScsiLunDurableName_Free(&item->durableName);
    esxVI_ScsiLunDurableName_Free(&item->alternateName);
    esxVI_Byte_Free(&item->standardInquiry);
    esxVI_Int_Free(&item->queueDepth);
    esxVI_String_Free(&item->operationalState);
    esxVI_ScsiLunCapabilities_Free(&item->capabilities);

    /* HostScsiDisk */
    esxVI_HostDiskDimensionsLba_Free(&item->capacity);
    VIR_FREE(item->devicePath);
})

/* esxVI_HostScsiDisk_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostScsiDisk,
{
    /* HostDevice */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(deviceName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(deviceType)

    /* ScsiLun */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(uuid)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(lunType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(operationalState)

    /* HostScsiDisk */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(capacity)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(devicePath)
})

/* esxVI_HostScsiDisk_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostScsiDisk,
{
})

/* esxVI_HostScsiDisk_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostScsiDisk)

/* esxVI_HostScsiDisk_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostScsiDisk,
{
    /* HostDevice */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, deviceName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, deviceType)

    /* ScsiLun */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, uuid)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(ScsiLunDescriptor, descriptor)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, canonicalName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, displayName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, lunType)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, vendor)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, revision)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, scsiLevel)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, serialNumber)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(ScsiLunDurableName, durableName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(ScsiLunDurableName, alternateName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(Byte, standardInquiry)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, queueDepth)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(String, operationalState)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(ScsiLunCapabilities, capabilities)

    /* HostScsiDisk */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostDiskDimensionsLba, capacity)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, devicePath)
})

/* esxVI_HostScsiDisk_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostScsiDisk)

/* esxVI_HostScsiDisk_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostScsiDisk)

/* esxVI_HostScsiDisk_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostScsiDisk)

/* esxVI_HostScsiDisk_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostScsiDisk,
{
    /* HostDevice */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, deviceName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, deviceType)

    /* ScsiLun */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, uuid)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(ScsiLunDescriptor, descriptor)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, canonicalName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, displayName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, lunType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, vendor)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, revision)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, scsiLevel)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, serialNumber)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ScsiLunDurableName, durableName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(ScsiLunDurableName, alternateName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(Byte, standardInquiry)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, queueDepth)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, operationalState)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ScsiLunCapabilities, capabilities)

    /* HostScsiDisk */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostDiskDimensionsLba, capacity)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, devicePath)
})

/* esxVI_HostScsiDisk_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostScsiDisk)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostScsiDiskPartition
 */

/* esxVI_HostScsiDiskPartition_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostScsiDiskPartition)

/* esxVI_HostScsiDiskPartition_Free */
ESX_VI__TEMPLATE__FREE(HostScsiDiskPartition,
{
    esxVI_HostScsiDiskPartition_Free(&item->_next);

    VIR_FREE(item->diskName);
    esxVI_Int_Free(&item->partition);
})

/* esxVI_HostScsiDiskPartition_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostScsiDiskPartition,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(diskName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(partition)
})

/* esxVI_HostScsiDiskPartition_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostScsiDiskPartition)

/* esxVI_HostScsiDiskPartition_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostScsiDiskPartition,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, diskName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, partition)
})

/* esxVI_HostScsiDiskPartition_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostScsiDiskPartition)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostScsiTopologyInterface
 */

/* esxVI_HostScsiTopologyInterface_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostScsiTopologyInterface)

/* esxVI_HostScsiTopologyInterface_Free */
ESX_VI__TEMPLATE__FREE(HostScsiTopologyInterface,
{
    esxVI_HostScsiTopologyInterface_Free(&item->_next);

    VIR_FREE(item->key);
    VIR_FREE(item->adapter);
    esxVI_HostScsiTopologyTarget_Free(&item->target);
})

/* esxVI_HostScsiTopologyInterface_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostScsiTopologyInterface,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(adapter)
})

/* esxVI_HostScsiTopologyInterface_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostScsiTopologyInterface)

/* esxVI_HostScsiTopologyInterface_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostScsiTopologyInterface)

/* esxVI_HostScsiTopologyInterface_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostScsiTopologyInterface)

/* esxVI_HostScsiTopologyInterface_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostScsiTopologyInterface,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, adapter)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(HostScsiTopologyTarget, target)
})

/* esxVI_HostScsiTopologyInterface_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostScsiTopologyInterface)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostScsiTopologyLun
 */

/* esxVI_HostScsiTopologyLun_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostScsiTopologyLun)

/* esxVI_HostScsiTopologyLun_Free */
ESX_VI__TEMPLATE__FREE(HostScsiTopologyLun,
{
    esxVI_HostScsiTopologyLun_Free(&item->_next);

    VIR_FREE(item->key);
    esxVI_Int_Free(&item->lun);
    VIR_FREE(item->scsiLun);
})

/* esxVI_HostScsiTopologyLun_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostScsiTopologyLun,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(lun)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(scsiLun)
})

/* esxVI_HostScsiTopologyLun_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostScsiTopologyLun)

/* esxVI_HostScsiTopologyLun_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostScsiTopologyLun,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, lun)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, scsiLun)
})

/* esxVI_HostScsiTopologyLun_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostScsiTopologyLun)

/* esxVI_HostScsiTopologyLun_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostScsiTopologyLun)

/* esxVI_HostScsiTopologyLun_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostScsiTopologyLun)

/* esxVI_HostScsiTopologyLun_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostScsiTopologyLun,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, lun)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, scsiLun)
})

/* esxVI_HostScsiTopologyLun_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostScsiTopologyLun)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostScsiTopologyTarget
 */

/* esxVI_HostScsiTopologyTarget_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostScsiTopologyTarget)

/* esxVI_HostScsiTopologyTarget_Free */
ESX_VI__TEMPLATE__FREE(HostScsiTopologyTarget,
{
    esxVI_HostScsiTopologyTarget_Free(&item->_next);

    VIR_FREE(item->key);
    esxVI_Int_Free(&item->target);
    esxVI_HostScsiTopologyLun_Free(&item->lun);
    esxVI_HostTargetTransport_Free(&item->transport);
})

/* esxVI_HostScsiTopologyTarget_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostScsiTopologyTarget,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(target)
})

/* esxVI_HostScsiTopologyTarget_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostScsiTopologyTarget)

/* esxVI_HostScsiTopologyTarget_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostScsiTopologyTarget)

/* esxVI_HostScsiTopologyTarget_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostScsiTopologyTarget)

/* esxVI_HostScsiTopologyTarget_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostScsiTopologyTarget,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, target)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(HostScsiTopologyLun, lun)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostTargetTransport, transport)
})

/* esxVI_HostScsiTopologyTarget_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostScsiTopologyTarget)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostTargetTransport
 *            extended by HostBlockAdapterTargetTransport
 *                        HostFibreChannelTargetTransport
 *                        HostInternetScsiTargetTransport
 *                        HostParallelScsiTargetTransport
 */

/* esxVI_HostTargetTransport_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostTargetTransport)

/* esxVI_HostTargetTransport_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(HostTargetTransport,
{
    /* HostTargetTransport */
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostBlockAdapterTargetTransport)
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostFibreChannelTargetTransport)
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostInternetScsiTargetTransport)
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostParallelScsiTargetTransport)
},
{
    /* no properties */
})

/* esxVI_HostTargetTransport_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostTargetTransport,
{
    /* no properties */
})

/* esxVI_HostTargetTransport_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostTargetTransport,
{
    /* HostTargetTransport */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostBlockAdapterTargetTransport)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostFibreChannelTargetTransport)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostInternetScsiTargetTransport)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostParallelScsiTargetTransport)
})

/* esxVI_HostTargetTransport_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(HostTargetTransport,
{
    /* HostTargetTransport */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostBlockAdapterTargetTransport)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostFibreChannelTargetTransport)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostInternetScsiTargetTransport)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostParallelScsiTargetTransport)
},
{
    /* no properties */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostVirtualSwitch
 */

/* esxVI_HostVirtualSwitch_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostVirtualSwitch)

/* esxVI_HostVirtualSwitch_Free */
ESX_VI__TEMPLATE__FREE(HostVirtualSwitch,
{
    esxVI_HostVirtualSwitch_Free(&item->_next);

    VIR_FREE(item->name);
    VIR_FREE(item->key);
    esxVI_Int_Free(&item->numPorts);
    esxVI_Int_Free(&item->numPortsAvailable);
    esxVI_Int_Free(&item->mtu);
    esxVI_String_Free(&item->portgroup);
    esxVI_String_Free(&item->pnic);
    esxVI_HostVirtualSwitchSpec_Free(&item->spec);
})

/* esxVI_HostVirtualSwitch_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostVirtualSwitch,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(numPorts)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(numPortsAvailable)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(spec)
})

/* esxVI_HostVirtualSwitch_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(HostVirtualSwitch)

/* esxVI_HostVirtualSwitch_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostVirtualSwitch,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, numPorts)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, numPortsAvailable)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, mtu)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(String, portgroup)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(String, pnic)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostVirtualSwitchSpec, spec)
})

/* esxVI_HostVirtualSwitch_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(HostVirtualSwitch)

/* esxVI_HostVirtualSwitch_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(HostVirtualSwitch)

/* esxVI_HostVirtualSwitch_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(HostVirtualSwitch)

/* esxVI_HostVirtualSwitch_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostVirtualSwitch,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, numPorts)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, numPortsAvailable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, mtu)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, portgroup)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, pnic)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostVirtualSwitchSpec, spec)
})

/* esxVI_HostVirtualSwitch_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(HostVirtualSwitch)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostVirtualSwitchAutoBridge
 *            extends HostVirtualSwitchBridge
 */

/* esxVI_HostVirtualSwitchAutoBridge_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostVirtualSwitchAutoBridge)

/* esxVI_HostVirtualSwitchAutoBridge_Free */
ESX_VI__TEMPLATE__FREE(HostVirtualSwitchAutoBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchAutoBridge */
    esxVI_String_Free(&item->excludedNicDevice);
})

/* esxVI_HostVirtualSwitchAutoBridge_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostVirtualSwitchAutoBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchAutoBridge */
    /* no required properties */
})

/* esxVI_HostVirtualSwitchAutoBridge_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostVirtualSwitchAutoBridge,
{
})

/* esxVI_HostVirtualSwitchAutoBridge_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostVirtualSwitchAutoBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchAutoBridge */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(String, excludedNicDevice)
})

/* esxVI_HostVirtualSwitchAutoBridge_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostVirtualSwitchAutoBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchAutoBridge */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(String, excludedNicDevice)
})

/* esxVI_HostVirtualSwitchAutoBridge_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostVirtualSwitchAutoBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchAutoBridge */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, excludedNicDevice)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostVirtualSwitchBeaconConfig
 */

/* esxVI_HostVirtualSwitchBeaconConfig_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostVirtualSwitchBeaconConfig)

/* esxVI_HostVirtualSwitchBeaconConfig_Free */
ESX_VI__TEMPLATE__FREE(HostVirtualSwitchBeaconConfig,
{
    esxVI_Int_Free(&item->interval);
})

/* esxVI_HostVirtualSwitchBeaconConfig_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostVirtualSwitchBeaconConfig,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(interval)
})

/* esxVI_HostVirtualSwitchBeaconConfig_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostVirtualSwitchBeaconConfig,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, interval)
})

/* esxVI_HostVirtualSwitchBeaconConfig_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostVirtualSwitchBeaconConfig,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, interval)
})

/* esxVI_HostVirtualSwitchBeaconConfig_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostVirtualSwitchBeaconConfig,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, interval)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostVirtualSwitchBondBridge
 *            extends HostVirtualSwitchBridge
 */

/* esxVI_HostVirtualSwitchBondBridge_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostVirtualSwitchBondBridge)

/* esxVI_HostVirtualSwitchBondBridge_Free */
ESX_VI__TEMPLATE__FREE(HostVirtualSwitchBondBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchBondBridge */
    esxVI_String_Free(&item->nicDevice);
    esxVI_HostVirtualSwitchBeaconConfig_Free(&item->beacon);
    /* FIXME: linkDiscoveryProtocolConfig is currently ignored */
})

/* esxVI_HostVirtualSwitchBondBridge_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostVirtualSwitchBondBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchBondBridge */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(nicDevice)
    /* FIXME: linkDiscoveryProtocolConfig is currently ignored */
})

/* esxVI_HostVirtualSwitchBondBridge_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostVirtualSwitchBondBridge,
{
})

/* esxVI_HostVirtualSwitchBondBridge_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostVirtualSwitchBondBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchBondBridge */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(String, nicDevice)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostVirtualSwitchBeaconConfig, beacon)
    /* FIXME: linkDiscoveryProtocolConfig is currently ignored */
})

/* esxVI_HostVirtualSwitchBondBridge_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostVirtualSwitchBondBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchBondBridge */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(String, nicDevice)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(HostVirtualSwitchBeaconConfig, beacon)
    /* FIXME: linkDiscoveryProtocolConfig is currently ignored */
})

/* esxVI_HostVirtualSwitchBondBridge_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostVirtualSwitchBondBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchBondBridge */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, nicDevice)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostVirtualSwitchBeaconConfig, beacon)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(linkDiscoveryProtocolConfig) /* FIXME */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostVirtualSwitchBridge
 *            extended by HostVirtualSwitchAutoBridge
 *                        HostVirtualSwitchBondBridge
 *                        HostVirtualSwitchSimpleBridge
 */

/* esxVI_HostVirtualSwitchBridge_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostVirtualSwitchBridge)

/* esxVI_HostVirtualSwitchBridge_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(HostVirtualSwitchBridge,
{
    /* HostVirtualSwitchBridge */
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostVirtualSwitchAutoBridge)
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostVirtualSwitchBondBridge)
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostVirtualSwitchSimpleBridge)
},
{
    /* no properties */
})

/* esxVI_HostVirtualSwitchBridge_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostVirtualSwitchBridge,
{
    /* no properties */
})

/* esxVI_HostVirtualSwitchBridge_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostVirtualSwitchBridge,
{
    /* HostVirtualSwitchBridge */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostVirtualSwitchAutoBridge)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostVirtualSwitchBondBridge)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostVirtualSwitchSimpleBridge)
})

/* esxVI_HostVirtualSwitchBridge_DeepCopy */
ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY(HostVirtualSwitchBridge,
{
    /* HostVirtualSwitchBridge */
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(HostVirtualSwitchAutoBridge)
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(HostVirtualSwitchBondBridge)
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(HostVirtualSwitchSimpleBridge)
},
{
    /* no properties */
})

/* esxVI_HostVirtualSwitchBridge_Serialize */
ESX_VI__TEMPLATE__DYNAMIC_SERIALIZE(HostVirtualSwitchBridge,
{
    /* HostVirtualSwitchBridge */
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(HostVirtualSwitchAutoBridge)
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(HostVirtualSwitchBondBridge)
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(HostVirtualSwitchSimpleBridge)
},
{
    /* no properties */
})

/* esxVI_HostVirtualSwitchBridge_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(HostVirtualSwitchBridge,
{
    /* HostVirtualSwitchBridge */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostVirtualSwitchAutoBridge)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostVirtualSwitchBondBridge)
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostVirtualSwitchSimpleBridge)
},
{
    /* no properties */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostVirtualSwitchSimpleBridge
 *            extends HostVirtualSwitchBridge
 */

/* esxVI_HostVirtualSwitchSimpleBridge_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostVirtualSwitchSimpleBridge)

/* esxVI_HostVirtualSwitchSimpleBridge_Free */
ESX_VI__TEMPLATE__FREE(HostVirtualSwitchSimpleBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchSimpleBridge */
    VIR_FREE(item->nicDevice);
})

/* esxVI_HostVirtualSwitchSimpleBridge_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostVirtualSwitchSimpleBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchSimpleBridge */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(nicDevice)
})

/* esxVI_HostVirtualSwitchSimpleBridge_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(HostVirtualSwitchSimpleBridge,
{
})

/* esxVI_HostVirtualSwitchSimpleBridge_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostVirtualSwitchSimpleBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchSimpleBridge */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, nicDevice)
})

/* esxVI_HostVirtualSwitchSimpleBridge_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostVirtualSwitchSimpleBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchSimpleBridge */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, nicDevice)
})

/* esxVI_HostVirtualSwitchSimpleBridge_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostVirtualSwitchSimpleBridge,
{
    /* HostVirtualSwitchBridge */
    /* no properties */

    /* HostVirtualSwitchSimpleBridge */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, nicDevice)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostVirtualSwitchSpec
 */

/* esxVI_HostVirtualSwitchSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostVirtualSwitchSpec)

/* esxVI_HostVirtualSwitchSpec_Free */
ESX_VI__TEMPLATE__FREE(HostVirtualSwitchSpec,
{
    esxVI_Int_Free(&item->numPorts);
    esxVI_HostVirtualSwitchBridge_Free(&item->bridge);
    esxVI_HostNetworkPolicy_Free(&item->policy);
    esxVI_Int_Free(&item->mtu);
})

/* esxVI_HostVirtualSwitchSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostVirtualSwitchSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(numPorts)
})

/* esxVI_HostVirtualSwitchSpec_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(HostVirtualSwitchSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, numPorts)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostVirtualSwitchBridge, bridge)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostNetworkPolicy, policy)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, mtu)
})

/* esxVI_HostVirtualSwitchSpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(HostVirtualSwitchSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, numPorts)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(HostVirtualSwitchBridge, bridge)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(HostNetworkPolicy, policy)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, mtu)
})

/* esxVI_HostVirtualSwitchSpec_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostVirtualSwitchSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, numPorts)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostVirtualSwitchBridge, bridge)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostNetworkPolicy, policy)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, mtu)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: HostVmfsVolume
 *            extends HostFileSystemVolume
 */

/* esxVI_HostVmfsVolume_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostVmfsVolume)

/* esxVI_HostVmfsVolume_Free */
ESX_VI__TEMPLATE__FREE(HostVmfsVolume,
{
    /* HostFileSystemVolume */
    VIR_FREE(item->type);
    VIR_FREE(item->name);
    esxVI_Long_Free(&item->capacity);

    /* HostVmfsVolume */
    esxVI_Int_Free(&item->blockSizeMb);
    esxVI_Int_Free(&item->maxBlocks);
    esxVI_Int_Free(&item->majorVersion);
    VIR_FREE(item->version);
    VIR_FREE(item->uuid);
    esxVI_HostScsiDiskPartition_Free(&item->extent);
    /* FIXME: forceMountedInfo is currently ignored */
})

/* esxVI_HostVmfsVolume_Validate */
ESX_VI__TEMPLATE__VALIDATE(HostVmfsVolume,
{
    /* HostFileSystemVolume */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(type)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(capacity)

    /* HostVmfsVolume */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(blockSizeMb)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(maxBlocks)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(majorVersion)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(version)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(uuid)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(extent)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(vmfsUpgradable)
    /* FIXME: forceMountedInfo is currently ignored */
})

/* esxVI_HostVmfsVolume_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(HostVmfsVolume,
{
    /* HostFileSystemVolume */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, type)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, capacity)

    /* HostVmfsVolume */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, blockSizeMb)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, maxBlocks)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, majorVersion)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, version)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, uuid)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(HostScsiDiskPartition, extent)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, vmfsUpgradable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(forceMountedInfo) /* FIXME */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: IsoImageFileInfo
 *            extends FileInfo
 */

/* esxVI_IsoImageFileInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(IsoImageFileInfo)

/* esxVI_IsoImageFileInfo_Free */
ESX_VI__TEMPLATE__FREE(IsoImageFileInfo,
{
    esxVI_FileInfo *next = (esxVI_FileInfo *)item->_next;

    esxVI_FileInfo_Free(&next);
    item->_next = (esxVI_IsoImageFileInfo *)next;

    /* FileInfo */
    VIR_FREE(item->path);
    esxVI_Long_Free(&item->fileSize);
    esxVI_DateTime_Free(&item->modification);
    VIR_FREE(item->owner);

    /* IsoImageFileInfo */
    /* no properties */
})

/* esxVI_IsoImageFileInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(IsoImageFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)

    /* IsoImageFileInfo */
    /* no properties */
})

/* esxVI_IsoImageFileInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(IsoImageFileInfo,
{
})

/* esxVI_IsoImageFileInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(IsoImageFileInfo)

/* esxVI_IsoImageFileInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(IsoImageFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, modification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, owner)

    /* IsoImageFileInfo */
    /* no properties */
})

/* esxVI_IsoImageFileInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(IsoImageFileInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: IsoImageFileQuery
 *            extends FileQuery
 */

/* esxVI_IsoImageFileQuery_Alloc */
ESX_VI__TEMPLATE__ALLOC(IsoImageFileQuery)

/* esxVI_IsoImageFileQuery_Free */
ESX_VI__TEMPLATE__FREE(IsoImageFileQuery,
{
    esxVI_FileQuery *next = (esxVI_FileQuery *)item->_next;

    esxVI_FileQuery_Free(&next);
    item->_next = (esxVI_IsoImageFileQuery *)next;

    /* FileQuery */
    /* no properties */

    /* IsoImageFileQuery */
    /* no properties */
})

/* esxVI_IsoImageFileQuery_Validate */
ESX_VI__TEMPLATE__VALIDATE(IsoImageFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* IsoImageFileQuery */
    /* no properties */
})

/* esxVI_IsoImageFileQuery_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(IsoImageFileQuery,
{
})

/* esxVI_IsoImageFileQuery_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(IsoImageFileQuery)

/* esxVI_IsoImageFileQuery_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(IsoImageFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* IsoImageFileQuery */
    /* no properties */
})

/* esxVI_IsoImageFileQuery_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(IsoImageFileQuery)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: KeyAnyValue
 */

/* esxVI_KeyAnyValue_Alloc */
ESX_VI__TEMPLATE__ALLOC(KeyAnyValue)

/* esxVI_KeyAnyValue_Free */
ESX_VI__TEMPLATE__FREE(KeyAnyValue,
{
    esxVI_KeyAnyValue_Free(&item->_next);

    VIR_FREE(item->key);
    esxVI_AnyType_Free(&item->value);
})

/* esxVI_KeyAnyValue_Validate */
ESX_VI__TEMPLATE__VALIDATE(KeyAnyValue,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(value)
})

/* esxVI_KeyAnyValue_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(KeyAnyValue)

/* esxVI_KeyAnyValue_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(KeyAnyValue,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(AnyType, value)
})

/* esxVI_KeyAnyValue_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(KeyAnyValue)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: LocalDatastoreInfo
 *            extends DatastoreInfo
 */

/* esxVI_LocalDatastoreInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(LocalDatastoreInfo)

/* esxVI_LocalDatastoreInfo_Free */
ESX_VI__TEMPLATE__FREE(LocalDatastoreInfo,
{
    /* DatastoreInfo */
    VIR_FREE(item->name);
    VIR_FREE(item->url);
    esxVI_Long_Free(&item->freeSpace);
    esxVI_Long_Free(&item->maxFileSize);
    esxVI_DateTime_Free(&item->timestamp);

    /* LocalDatastoreInfo */
    VIR_FREE(item->path);
})

/* esxVI_LocalDatastoreInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(LocalDatastoreInfo,
{
    /* DatastoreInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(url)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(freeSpace)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(maxFileSize)

    /* LocalDatastoreInfo */
    /* no required properties */
})

/* esxVI_LocalDatastoreInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(LocalDatastoreInfo,
{
})

/* esxVI_LocalDatastoreInfo_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(LocalDatastoreInfo)

/* esxVI_LocalDatastoreInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(LocalDatastoreInfo,
{
    /* DatastoreInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, url)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, freeSpace)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, maxFileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, timestamp)

    /* LocalDatastoreInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: LocalizedMethodFault
 */

/* esxVI_LocalizedMethodFault_Alloc */
ESX_VI__TEMPLATE__ALLOC(LocalizedMethodFault)

/* esxVI_LocalizedMethodFault_Free */
ESX_VI__TEMPLATE__FREE(LocalizedMethodFault,
{
    esxVI_MethodFault_Free(&item->fault);
    VIR_FREE(item->localizedMessage);
})

/* esxVI_LocalizedMethodFault_Validate */
ESX_VI__TEMPLATE__VALIDATE(LocalizedMethodFault,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(fault)
})

/* esxVI_LocalizedMethodFault_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(LocalizedMethodFault,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(MethodFault, fault)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, localizedMessage)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: NasDatastoreInfo
 *            extends DatastoreInfo
 */

/* esxVI_NasDatastoreInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(NasDatastoreInfo)

/* esxVI_NasDatastoreInfo_Free */
ESX_VI__TEMPLATE__FREE(NasDatastoreInfo,
{
    /* DatastoreInfo */
    VIR_FREE(item->name);
    VIR_FREE(item->url);
    esxVI_Long_Free(&item->freeSpace);
    esxVI_Long_Free(&item->maxFileSize);
    esxVI_DateTime_Free(&item->timestamp);

    /* NasDatastoreInfo */
    esxVI_HostNasVolume_Free(&item->nas);
})

/* esxVI_NasDatastoreInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(NasDatastoreInfo,
{
    /* DatastoreInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(url)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(freeSpace)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(maxFileSize)

    /* NasDatastoreInfo */
    /* no required properties */
})

/* esxVI_NasDatastoreInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(NasDatastoreInfo,
{
})

/* esxVI_NasDatastoreInfo_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(NasDatastoreInfo)

/* esxVI_NasDatastoreInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(NasDatastoreInfo,
{
    /* DatastoreInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, url)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, freeSpace)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, maxFileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, timestamp)

    /* NasDatastoreInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostNasVolume, nas)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ObjectContent
 */

/* esxVI_ObjectContent_Alloc */
ESX_VI__TEMPLATE__ALLOC(ObjectContent)

/* esxVI_ObjectContent_Free */
ESX_VI__TEMPLATE__FREE(ObjectContent,
{
    esxVI_ObjectContent_Free(&item->_next);

    esxVI_ManagedObjectReference_Free(&item->obj);
    esxVI_DynamicProperty_Free(&item->propSet);
    /* FIXME: missingSet is currently ignored */
})

/* esxVI_ObjectContent_Validate */
ESX_VI__TEMPLATE__VALIDATE(ObjectContent,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(obj)
    /* FIXME: missingSet is currently ignored */
})

/* esxVI_ObjectContent_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(ObjectContent)

/* esxVI_ObjectContent_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(ObjectContent,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(ManagedObjectReference, obj)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(DynamicProperty, propSet)
    /* FIXME: missingSet is currently ignored */
})

/* esxVI_ObjectContent_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(ObjectContent)

/* esxVI_ObjectContent_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(ObjectContent,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, obj)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(DynamicProperty, propSet)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(missingSet) /* FIXME */
})

/* esxVI_ObjectContent_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(ObjectContent)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ObjectSpec
 */

/* esxVI_ObjectSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(ObjectSpec)

/* esxVI_ObjectSpec_Free */
ESX_VI__TEMPLATE__FREE(ObjectSpec,
{
    esxVI_ObjectSpec_Free(&item->_next);

    esxVI_ManagedObjectReference_Free(&item->obj);
    esxVI_SelectionSpec_Free(&item->selectSet);
})

/* esxVI_ObjectSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(ObjectSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(obj)
})

/* esxVI_ObjectSpec_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(ObjectSpec)

/* esxVI_ObjectSpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(ObjectSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(ManagedObjectReference, obj)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, skip)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(SelectionSpec, selectSet)
})

/* esxVI_ObjectSpec_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(ObjectSpec)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ObjectUpdate
 */

/* esxVI_ObjectUpdate_Alloc */
ESX_VI__TEMPLATE__ALLOC(ObjectUpdate)

/* esxVI_ObjectUpdate_Free */
ESX_VI__TEMPLATE__FREE(ObjectUpdate,
{
    esxVI_ObjectUpdate_Free(&item->_next);

    esxVI_ManagedObjectReference_Free(&item->obj);
    esxVI_PropertyChange_Free(&item->changeSet);
    /* FIXME: missingSet is currently ignored */
})

/* esxVI_ObjectUpdate_Validate */
ESX_VI__TEMPLATE__VALIDATE(ObjectUpdate,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(kind)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(obj)
    /* FIXME: missingSet is currently ignored */
})

/* esxVI_ObjectUpdate_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(ObjectUpdate)

/* esxVI_ObjectUpdate_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(ObjectUpdate,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ObjectUpdateKind, kind)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, obj)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(PropertyChange, changeSet)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(missingSet) /* FIXME */
})

/* esxVI_ObjectUpdate_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(ObjectUpdate)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: OptionType
 *            extended by ChoiceOption
 */

/* esxVI_OptionType_Alloc */
ESX_VI__TEMPLATE__ALLOC(OptionType)

/* esxVI_OptionType_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(OptionType,
{
    /* OptionType */
    ESX_VI__TEMPLATE__DISPATCH__FREE(ChoiceOption)
},
{
    /* no properties to be freed */
})

/* esxVI_OptionType_Validate */
ESX_VI__TEMPLATE__VALIDATE(OptionType,
{
    /* no required properties */
})

/* esxVI_OptionType_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(OptionType,
{
    /* OptionType */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(ChoiceOption)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, valueIsReadonly)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: OptionValue
 *            extended by HostInternetScsiHbaParamValue
 */

/* esxVI_OptionValue_Alloc */
ESX_VI__TEMPLATE__ALLOC(OptionValue)

/* esxVI_OptionValue_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(OptionValue,
{
    /* OptionValue */
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostInternetScsiHbaParamValue)
},
{
    esxVI_OptionValue_Free(&item->_next);

    VIR_FREE(item->key);
    esxVI_AnyType_Free(&item->value);
})

/* esxVI_OptionValue_Validate */
ESX_VI__TEMPLATE__VALIDATE(OptionValue,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
})

/* esxVI_OptionValue_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(OptionValue,
{
    /* OptionValue */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostInternetScsiHbaParamValue)
})

/* esxVI_OptionValue_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(OptionValue)

/* esxVI_OptionValue_DeepCopy */
ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY(OptionValue,
{
    /* OptionValue */
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(HostInternetScsiHbaParamValue)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(AnyType, value)
})

/* esxVI_OptionValue_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(OptionValue)

/* esxVI_OptionValue_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(OptionValue,
{
    /* OptionValue */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostInternetScsiHbaParamValue)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(AnyType, value)
})

/* esxVI_OptionValue_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(OptionValue)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PerfCounterInfo
 */

/* esxVI_PerfCounterInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(PerfCounterInfo)

/* esxVI_PerfCounterInfo_Free */
ESX_VI__TEMPLATE__FREE(PerfCounterInfo,
{
    esxVI_PerfCounterInfo_Free(&item->_next);

    esxVI_Int_Free(&item->key);
    esxVI_ElementDescription_Free(&item->nameInfo);
    esxVI_ElementDescription_Free(&item->groupInfo);
    esxVI_ElementDescription_Free(&item->unitInfo);
    esxVI_Int_Free(&item->level);
    esxVI_Int_Free(&item->associatedCounterId);
})

/* esxVI_PerfCounterInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(PerfCounterInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(nameInfo)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(groupInfo)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(unitInfo)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(rollupType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(statsType)
})

/* esxVI_PerfCounterInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PerfCounterInfo)

/* esxVI_PerfCounterInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(PerfCounterInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ElementDescription, nameInfo)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ElementDescription, groupInfo)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ElementDescription, unitInfo)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(PerfSummaryType, rollupType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(PerfStatsType, statsType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, level)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(Int, associatedCounterId)
})

/* esxVI_PerfCounterInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PerfCounterInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PerfEntityMetric
 *            extends PerfEntityMetricBase
 */

/* esxVI_PerfEntityMetric_Alloc */
ESX_VI__TEMPLATE__ALLOC(PerfEntityMetric)

/* esxVI_PerfEntityMetric_Free */
ESX_VI__TEMPLATE__FREE(PerfEntityMetric,
{
    esxVI_PerfEntityMetricBase *next = (esxVI_PerfEntityMetricBase *)item->_next;

    esxVI_PerfEntityMetricBase_Free(&next);
    item->_next = (esxVI_PerfEntityMetric *)next;

    /* PerfEntityMetricBase */
    esxVI_ManagedObjectReference_Free(&item->entity);

    /* PerfEntityMetric */
    esxVI_PerfSampleInfo_Free(&item->sampleInfo);
    esxVI_PerfMetricSeries_Free(&item->value);
})

/* esxVI_PerfEntityMetric_Validate */
ESX_VI__TEMPLATE__VALIDATE(PerfEntityMetric,
{
    /* PerfEntityMetricBase */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(entity)

    /* PerfEntityMetric */
    /* no required properties */
})

/* esxVI_PerfEntityMetric_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(PerfEntityMetric,
{
})

/* esxVI_PerfEntityMetric_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PerfEntityMetric)

/* esxVI_PerfEntityMetric_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(PerfEntityMetric,
{
    /* PerfEntityMetricBase */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, entity)

    /* PerfEntityMetric */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(PerfSampleInfo, sampleInfo)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(PerfMetricSeries, value)
})

/* esxVI_PerfEntityMetric_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PerfEntityMetric)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PerfEntityMetricBase
 *            extended by PerfEntityMetric
 */

/* esxVI_PerfEntityMetricBase_Alloc */
ESX_VI__TEMPLATE__ALLOC(PerfEntityMetricBase)

/* esxVI_PerfEntityMetricBase_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(PerfEntityMetricBase,
{
    /* PerfEntityMetricBase */
    ESX_VI__TEMPLATE__DISPATCH__FREE(PerfEntityMetric)
},
{
    esxVI_PerfEntityMetricBase_Free(&item->_next);

    esxVI_ManagedObjectReference_Free(&item->entity);
})

/* esxVI_PerfEntityMetricBase_Validate */
ESX_VI__TEMPLATE__VALIDATE(PerfEntityMetricBase,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(entity)
})

/* esxVI_PerfEntityMetricBase_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(PerfEntityMetricBase,
{
    /* PerfEntityMetricBase */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(PerfEntityMetric)
})

/* esxVI_PerfEntityMetricBase_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PerfEntityMetricBase)

/* esxVI_PerfEntityMetricBase_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(PerfEntityMetricBase,
{
    /* PerfEntityMetricBase */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(PerfEntityMetric)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, entity)
})

/* esxVI_PerfEntityMetricBase_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PerfEntityMetricBase)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PerfMetricId
 */

/* esxVI_PerfMetricId_Alloc */
ESX_VI__TEMPLATE__ALLOC(PerfMetricId)

/* esxVI_PerfMetricId_Free */
ESX_VI__TEMPLATE__FREE(PerfMetricId,
{
    esxVI_PerfMetricId_Free(&item->_next);

    esxVI_Int_Free(&item->counterId);
    VIR_FREE(item->instance);
})

/* esxVI_PerfMetricId_Validate */
ESX_VI__TEMPLATE__VALIDATE(PerfMetricId,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(counterId)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(instance)
})

/* esxVI_PerfMetricId_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PerfMetricId)

/* esxVI_PerfMetricId_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(PerfMetricId,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, counterId)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, instance)
})

/* esxVI_PerfMetricId_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(PerfMetricId)

/* esxVI_PerfMetricId_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(PerfMetricId,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, counterId)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, instance)
})

/* esxVI_PerfMetricId_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PerfMetricId)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PerfMetricIntSeries
 *            extends PerfMetricSeries
 */

/* esxVI_PerfMetricIntSeries_Alloc */
ESX_VI__TEMPLATE__ALLOC(PerfMetricIntSeries)

/* esxVI_PerfMetricIntSeries_Free */
ESX_VI__TEMPLATE__FREE(PerfMetricIntSeries,
{
    esxVI_PerfMetricSeries *next = (esxVI_PerfMetricSeries *)item->_next;

    esxVI_PerfMetricSeries_Free(&next);
    item->_next = (esxVI_PerfMetricIntSeries *)next;

    /* PerfMetricSeries */
    esxVI_PerfMetricId_Free(&item->id);

    /* PerfMetricIntSeries */
    esxVI_Long_Free(&item->value);
})

/* esxVI_PerfMetricIntSeries_Validate */
ESX_VI__TEMPLATE__VALIDATE(PerfMetricIntSeries,
{
    /* PerfMetricSeries */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(id)

    /* PerfMetricIntSeries */
    /* no required properties */
})

/* esxVI_PerfMetricIntSeries_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(PerfMetricIntSeries,
{
})

/* esxVI_PerfMetricIntSeries_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PerfMetricIntSeries)

/* esxVI_PerfMetricIntSeries_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(PerfMetricIntSeries,
{
    /* PerfMetricSeries */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(PerfMetricId, id)

    /* PerfMetricIntSeries */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(Long, value)
})

/* esxVI_PerfMetricIntSeries_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PerfMetricIntSeries)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PerfMetricSeries
 *            extended by PerfMetricIntSeries
 */

/* esxVI_PerfMetricSeries_Alloc */
ESX_VI__TEMPLATE__ALLOC(PerfMetricSeries)

/* esxVI_PerfMetricSeries_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(PerfMetricSeries,
{
    /* PerfMetricSeries */
    ESX_VI__TEMPLATE__DISPATCH__FREE(PerfMetricIntSeries)
},
{
    esxVI_PerfMetricSeries_Free(&item->_next);

    esxVI_PerfMetricId_Free(&item->id);
})

/* esxVI_PerfMetricSeries_Validate */
ESX_VI__TEMPLATE__VALIDATE(PerfMetricSeries,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(id)
})

/* esxVI_PerfMetricSeries_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(PerfMetricSeries,
{
    /* PerfMetricSeries */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(PerfMetricIntSeries)
})

/* esxVI_PerfMetricSeries_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PerfMetricSeries)

/* esxVI_PerfMetricSeries_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(PerfMetricSeries,
{
    /* PerfMetricSeries */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(PerfMetricIntSeries)
},
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(PerfMetricId, id)
})

/* esxVI_PerfMetricSeries_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PerfMetricSeries)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PerfQuerySpec
 */

/* esxVI_PerfQuerySpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(PerfQuerySpec)

/* esxVI_PerfQuerySpec_Free */
ESX_VI__TEMPLATE__FREE(PerfQuerySpec,
{
    esxVI_PerfQuerySpec_Free(&item->_next);

    esxVI_ManagedObjectReference_Free(&item->entity);
    esxVI_DateTime_Free(&item->startTime);
    esxVI_DateTime_Free(&item->endTime);
    esxVI_Int_Free(&item->maxSample);
    esxVI_PerfMetricId_Free(&item->metricId);
    esxVI_Int_Free(&item->intervalId);
    VIR_FREE(item->format);
})

/* esxVI_PerfQuerySpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(PerfQuerySpec,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(entity)
})

/* esxVI_PerfQuerySpec_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PerfQuerySpec)

/* esxVI_PerfQuerySpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(PerfQuerySpec,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(ManagedObjectReference, entity)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(DateTime, startTime)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(DateTime, endTime)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, maxSample)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(PerfMetricId, metricId)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, intervalId)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, format)
})

/* esxVI_PerfQuerySpec_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(PerfQuerySpec)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PerfSampleInfo
 */

/* esxVI_PerfSampleInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(PerfSampleInfo)

/* esxVI_PerfSampleInfo_Free */
ESX_VI__TEMPLATE__FREE(PerfSampleInfo,
{
    esxVI_PerfSampleInfo_Free(&item->_next);

    esxVI_DateTime_Free(&item->timestamp);
    esxVI_Int_Free(&item->interval);
})

/* esxVI_PerfSampleInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(PerfSampleInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(timestamp)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(interval)
})

/* esxVI_PerfSampleInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PerfSampleInfo)

/* esxVI_PerfSampleInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(PerfSampleInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, timestamp)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, interval)
})

/* esxVI_PerfSampleInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PerfSampleInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PhysicalNic
 */

/* esxVI_PhysicalNic_Alloc */
ESX_VI__TEMPLATE__ALLOC(PhysicalNic)

/* esxVI_PhysicalNic_Free */
ESX_VI__TEMPLATE__FREE(PhysicalNic,
{
    esxVI_PhysicalNic_Free(&item->_next);

    VIR_FREE(item->key);
    VIR_FREE(item->device);
    VIR_FREE(item->pci);
    VIR_FREE(item->driver);
    esxVI_PhysicalNicLinkInfo_Free(&item->linkSpeed);
    esxVI_PhysicalNicLinkInfo_Free(&item->validLinkSpecification);
    esxVI_PhysicalNicSpec_Free(&item->spec);
    VIR_FREE(item->mac);
})

/* esxVI_PhysicalNic_Validate */
ESX_VI__TEMPLATE__VALIDATE(PhysicalNic,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(device)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(pci)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(spec)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(wakeOnLanSupported)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(mac)
})

/* esxVI_PhysicalNic_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PhysicalNic)

/* esxVI_PhysicalNic_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(PhysicalNic,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, pci)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(PhysicalNicLinkInfo, linkSpeed)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(PhysicalNicLinkInfo, validLinkSpecification)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(PhysicalNicSpec, spec)
    (*dest)->wakeOnLanSupported = src->wakeOnLanSupported;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, mac)
})

/* esxVI_PhysicalNic_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(PhysicalNic)

/* esxVI_PhysicalNic_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(PhysicalNic)

/* esxVI_PhysicalNic_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(PhysicalNic)

/* esxVI_PhysicalNic_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(PhysicalNic,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, device)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, pci)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, driver)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(PhysicalNicLinkInfo, linkSpeed)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(PhysicalNicLinkInfo, validLinkSpecification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(PhysicalNicSpec, spec)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, wakeOnLanSupported)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, mac)
})

/* esxVI_PhysicalNic_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PhysicalNic)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PhysicalNicLinkInfo
 */

/* esxVI_PhysicalNicLinkInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(PhysicalNicLinkInfo)

/* esxVI_PhysicalNicLinkInfo_Free */
ESX_VI__TEMPLATE__FREE(PhysicalNicLinkInfo,
{
    esxVI_PhysicalNicLinkInfo_Free(&item->_next);

    esxVI_Int_Free(&item->speedMb);
})

/* esxVI_PhysicalNicLinkInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(PhysicalNicLinkInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(speedMb)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(duplex)
})

/* esxVI_PhysicalNicLinkInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PhysicalNicLinkInfo)

/* esxVI_PhysicalNicLinkInfo_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(PhysicalNicLinkInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, speedMb)
    (*dest)->duplex = src->duplex;
})

/* esxVI_PhysicalNicLinkInfo_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(PhysicalNicLinkInfo)

/* esxVI_PhysicalNicLinkInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(PhysicalNicLinkInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, speedMb)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, duplex)
})

/* esxVI_PhysicalNicLinkInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PhysicalNicLinkInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PhysicalNicSpec
 */

/* esxVI_PhysicalNicSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(PhysicalNicSpec)

/* esxVI_PhysicalNicSpec_Free */
ESX_VI__TEMPLATE__FREE(PhysicalNicSpec,
{
    esxVI_HostIpConfig_Free(&item->ip);
    esxVI_PhysicalNicLinkInfo_Free(&item->linkSpeed);
})

/* esxVI_PhysicalNicSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(PhysicalNicSpec,
{
    /* no required properties */
})

/* esxVI_PhysicalNicSpec_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(PhysicalNicSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(HostIpConfig, ip)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(PhysicalNicLinkInfo, linkSpeed)
})

/* esxVI_PhysicalNicSpec_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(PhysicalNicSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostIpConfig, ip)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(PhysicalNicLinkInfo, linkSpeed)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PropertyChange
 */

/* esxVI_PropertyChange_Alloc */
ESX_VI__TEMPLATE__ALLOC(PropertyChange)

/* esxVI_PropertyChange_Free */
ESX_VI__TEMPLATE__FREE(PropertyChange,
{
    esxVI_PropertyChange_Free(&item->_next);

    VIR_FREE(item->name);
    esxVI_AnyType_Free(&item->val);
})

/* esxVI_PropertyChange_Validate */
ESX_VI__TEMPLATE__VALIDATE(PropertyChange,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(op)
})

/* esxVI_PropertyChange_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PropertyChange)

/* esxVI_PropertyChange_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(PropertyChange,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(PropertyChangeOp, op)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(AnyType, val)
})

/* esxVI_PropertyChange_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PropertyChange)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PropertyFilterSpec
 */

/* esxVI_PropertyFilterSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(PropertyFilterSpec)

/* esxVI_PropertyFilterSpec_Free */
ESX_VI__TEMPLATE__FREE(PropertyFilterSpec,
{
    esxVI_PropertyFilterSpec_Free(&item->_next);

    esxVI_PropertySpec_Free(&item->propSet);
    esxVI_ObjectSpec_Free(&item->objectSet);
})

/* esxVI_PropertyFilterSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(PropertyFilterSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(propSet)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(objectSet)
})

/* esxVI_PropertyFilterSpec_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PropertyFilterSpec)

/* esxVI_PropertyFilterSpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(PropertyFilterSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(PropertySpec, propSet)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(ObjectSpec, objectSet)
})

/* esxVI_PropertyFilterSpec_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(PropertyFilterSpec)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PropertyFilterUpdate
 */

/* esxVI_PropertyFilterUpdate_Alloc */
ESX_VI__TEMPLATE__ALLOC(PropertyFilterUpdate)

/* esxVI_PropertyFilterUpdate_Free */
ESX_VI__TEMPLATE__FREE(PropertyFilterUpdate,
{
    esxVI_PropertyFilterUpdate_Free(&item->_next);

    esxVI_ManagedObjectReference_Free(&item->filter);
    esxVI_ObjectUpdate_Free(&item->objectSet);
    /* FIXME: missingSet is currently ignored */
})

/* esxVI_PropertyFilterUpdate_Validate */
ESX_VI__TEMPLATE__VALIDATE(PropertyFilterUpdate,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(filter)
    /* FIXME: missingSet is currently ignored */
})

/* esxVI_PropertyFilterUpdate_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PropertyFilterUpdate)

/* esxVI_PropertyFilterUpdate_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(PropertyFilterUpdate,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, filter)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(ObjectUpdate, objectSet)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(missingSet) /* FIXME */
})

/* esxVI_PropertyFilterUpdate_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(PropertyFilterUpdate)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: PropertySpec
 */

/* esxVI_PropertySpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(PropertySpec)

/* esxVI_PropertySpec_Free */
ESX_VI__TEMPLATE__FREE(PropertySpec,
{
    esxVI_PropertySpec_Free(&item->_next);

    VIR_FREE(item->type);
    esxVI_String_Free(&item->pathSet);
})

/* esxVI_PropertySpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(PropertySpec,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(type)
})

/* esxVI_PropertySpec_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(PropertySpec)

/* esxVI_PropertySpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(PropertySpec,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, type)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, all)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(String, pathSet)
})

/* esxVI_PropertySpec_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(PropertySpec)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ResourceAllocationInfo
 */

/* esxVI_ResourceAllocationInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(ResourceAllocationInfo)

/* esxVI_ResourceAllocationInfo_Free */
ESX_VI__TEMPLATE__FREE(ResourceAllocationInfo,
{
    esxVI_Long_Free(&item->reservation);
    esxVI_Long_Free(&item->limit);
    esxVI_SharesInfo_Free(&item->shares);
    esxVI_Long_Free(&item->overheadLimit);
})

/* esxVI_ResourceAllocationInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(ResourceAllocationInfo,
{
    /* no required properties */
})

/* esxVI_ResourceAllocationInfo_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(ResourceAllocationInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Long, reservation)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, expandableReservation)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Long, limit)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(SharesInfo, shares)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Long, overheadLimit)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ResourcePoolResourceUsage
 */

/* esxVI_ResourcePoolResourceUsage_Alloc */
ESX_VI__TEMPLATE__ALLOC(ResourcePoolResourceUsage)

/* esxVI_ResourcePoolResourceUsage_Free */
ESX_VI__TEMPLATE__FREE(ResourcePoolResourceUsage,
{
    esxVI_Long_Free(&item->reservationUsed);
    esxVI_Long_Free(&item->reservationUsedForVm);
    esxVI_Long_Free(&item->unreservedForPool);
    esxVI_Long_Free(&item->unreservedForVm);
    esxVI_Long_Free(&item->overallUsage);
    esxVI_Long_Free(&item->maxUsage);
})

/* esxVI_ResourcePoolResourceUsage_Validate */
ESX_VI__TEMPLATE__VALIDATE(ResourcePoolResourceUsage,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(reservationUsed)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(reservationUsedForVm)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(unreservedForPool)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(unreservedForVm)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(overallUsage)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(maxUsage)
})

/* esxVI_ResourcePoolResourceUsage_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(ResourcePoolResourceUsage)

/* esxVI_ResourcePoolResourceUsage_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(ResourcePoolResourceUsage,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, reservationUsed)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, reservationUsedForVm)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, unreservedForPool)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, unreservedForVm)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, overallUsage)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, maxUsage)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ScsiLun
 *            extends HostDevice
 *            extended by HostScsiDisk
 */

/* esxVI_ScsiLun_Alloc */
ESX_VI__TEMPLATE__ALLOC(ScsiLun)

/* esxVI_ScsiLun_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(ScsiLun,
{
    /* ScsiLun */
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostScsiDisk)
},
{
    esxVI_HostDevice *next = (esxVI_HostDevice *)item->_next;

    esxVI_HostDevice_Free(&next);
    item->_next = (esxVI_ScsiLun *)next;

    /* HostDevice */
    VIR_FREE(item->deviceName);
    VIR_FREE(item->deviceType);

    /* ScsiLun */
    VIR_FREE(item->key);
    VIR_FREE(item->uuid);
    esxVI_ScsiLunDescriptor_Free(&item->descriptor);
    VIR_FREE(item->canonicalName);
    VIR_FREE(item->displayName);
    VIR_FREE(item->lunType);
    VIR_FREE(item->vendor);
    VIR_FREE(item->model);
    VIR_FREE(item->revision);
    esxVI_Int_Free(&item->scsiLevel);
    VIR_FREE(item->serialNumber);
    esxVI_ScsiLunDurableName_Free(&item->durableName);
    esxVI_ScsiLunDurableName_Free(&item->alternateName);
    esxVI_Byte_Free(&item->standardInquiry);
    esxVI_Int_Free(&item->queueDepth);
    esxVI_String_Free(&item->operationalState);
    esxVI_ScsiLunCapabilities_Free(&item->capabilities);
})

/* esxVI_ScsiLun_Validate */
ESX_VI__TEMPLATE__VALIDATE(ScsiLun,
{
    /* HostDevice */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(deviceName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(deviceType)

    /* ScsiLun */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(uuid)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(lunType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(operationalState)
})

/* esxVI_ScsiLun_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(ScsiLun,
{
    /* ScsiLun */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(HostScsiDisk)
})

/* esxVI_ScsiLun_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(ScsiLun)

/* esxVI_ScsiLun_DeepCopy */
ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY(ScsiLun,
{
    /* ScsiLun */
    ESX_VI__TEMPLATE__DISPATCH__DEEP_COPY(HostScsiDisk)
},
{
    /* HostDevice */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, deviceName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, deviceType)

    /* ScsiLun */
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, uuid)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(ScsiLunDescriptor, descriptor)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, canonicalName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, displayName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, lunType)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, vendor)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, revision)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, scsiLevel)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, serialNumber)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(ScsiLunDurableName, durableName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(ScsiLunDurableName, alternateName)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(Byte, standardInquiry)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, queueDepth)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(String, operationalState)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(ScsiLunCapabilities, capabilities)
})

/* esxVI_ScsiLun_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(ScsiLun)

/* esxVI_ScsiLun_CastFromAnyType */
ESX_VI__TEMPLATE__DYNAMIC_CAST_FROM_ANY_TYPE(ScsiLun,
{
    /* ScsiLun */
    ESX_VI__TEMPLATE__DISPATCH__CAST_FROM_ANY_TYPE(HostScsiDisk)
})

/* esxVI_ScsiLun_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(ScsiLun)

/* esxVI_ScsiLun_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(ScsiLun,
{
    /* ScsiLun */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(HostScsiDisk)
},
{
    /* HostDevice */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, deviceName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, deviceType)

    /* ScsiLun */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, uuid)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(ScsiLunDescriptor, descriptor)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, canonicalName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, displayName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, lunType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, vendor)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, model)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, revision)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, scsiLevel)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, serialNumber)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ScsiLunDurableName, durableName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(ScsiLunDurableName, alternateName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(Byte, standardInquiry)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, queueDepth)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, operationalState)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ScsiLunCapabilities, capabilities)
})

/* esxVI_ScsiLun_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(ScsiLun)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ScsiLunCapabilities
 */

/* esxVI_ScsiLunCapabilities_Alloc */
ESX_VI__TEMPLATE__ALLOC(ScsiLunCapabilities)

/* esxVI_ScsiLunCapabilities_Free */
ESX_VI__TEMPLATE__FREE(ScsiLunCapabilities,
{
    /* no properties to be freed */
})

/* esxVI_ScsiLunCapabilities_Validate */
ESX_VI__TEMPLATE__VALIDATE(ScsiLunCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(updateDisplayNameSupported)
})

/* esxVI_ScsiLunCapabilities_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(ScsiLunCapabilities,
{
    (*dest)->updateDisplayNameSupported = src->updateDisplayNameSupported;
})

/* esxVI_ScsiLunCapabilities_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(ScsiLunCapabilities,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, updateDisplayNameSupported)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ScsiLunDescriptor
 */

/* esxVI_ScsiLunDescriptor_Alloc */
ESX_VI__TEMPLATE__ALLOC(ScsiLunDescriptor)

/* esxVI_ScsiLunDescriptor_Free */
ESX_VI__TEMPLATE__FREE(ScsiLunDescriptor,
{
    esxVI_ScsiLunDescriptor_Free(&item->_next);

    VIR_FREE(item->quality);
    VIR_FREE(item->id);
})

/* esxVI_ScsiLunDescriptor_Validate */
ESX_VI__TEMPLATE__VALIDATE(ScsiLunDescriptor,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(quality)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(id)
})

/* esxVI_ScsiLunDescriptor_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(ScsiLunDescriptor)

/* esxVI_ScsiLunDescriptor_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(ScsiLunDescriptor,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, quality)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, id)
})

/* esxVI_ScsiLunDescriptor_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(ScsiLunDescriptor)

/* esxVI_ScsiLunDescriptor_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(ScsiLunDescriptor,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, quality)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, id)
})

/* esxVI_ScsiLunDescriptor_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(ScsiLunDescriptor)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ScsiLunDurableName
 */

/* esxVI_ScsiLunDurableName_Alloc */
ESX_VI__TEMPLATE__ALLOC(ScsiLunDurableName)

/* esxVI_ScsiLunDurableName_Free */
ESX_VI__TEMPLATE__FREE(ScsiLunDurableName,
{
    esxVI_ScsiLunDurableName_Free(&item->_next);

    VIR_FREE(item->namespace);
    esxVI_Byte_Free(&item->namespaceId);
    esxVI_Byte_Free(&item->data);
})

/* esxVI_ScsiLunDurableName_Validate */
ESX_VI__TEMPLATE__VALIDATE(ScsiLunDurableName,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(namespace)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(namespaceId)
})

/* esxVI_ScsiLunDurableName_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(ScsiLunDurableName)

/* esxVI_ScsiLunDurableName_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(ScsiLunDurableName,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, namespace)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Byte, namespaceId)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(Byte, data)
})

/* esxVI_ScsiLunDurableName_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(ScsiLunDurableName)

/* esxVI_ScsiLunDurableName_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(ScsiLunDurableName,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, namespace)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Byte, namespaceId)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(Byte, data)
})

/* esxVI_ScsiLunDurableName_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(ScsiLunDurableName)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: SelectionSpec
 *            extended by TraversalSpec
 */

/* esxVI_SelectionSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(SelectionSpec)

/* esxVI_SelectionSpec_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(SelectionSpec,
{
    /* SelectionSpec */
    ESX_VI__TEMPLATE__DISPATCH__FREE(TraversalSpec)
},
{
    esxVI_SelectionSpec_Free(&item->_next);

    VIR_FREE(item->name);
})

/* esxVI_SelectionSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(SelectionSpec,
{
    /* no required properties */
})

/* esxVI_SelectionSpec_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(SelectionSpec,
{
    /* SelectionSpec */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(TraversalSpec)
})

/* esxVI_SelectionSpec_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(SelectionSpec)

/* esxVI_SelectionSpec_Serialize */
ESX_VI__TEMPLATE__DYNAMIC_SERIALIZE(SelectionSpec,
{
    /* SelectionSpec */
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(TraversalSpec)
},
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, name)
})

/* esxVI_SelectionSpec_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(SelectionSpec)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: ServiceContent
 */

/* esxVI_ServiceContent_Alloc */
ESX_VI__TEMPLATE__ALLOC(ServiceContent)

/* esxVI_ServiceContent_Free */
ESX_VI__TEMPLATE__FREE(ServiceContent,
{
    esxVI_ManagedObjectReference_Free(&item->rootFolder);
    esxVI_ManagedObjectReference_Free(&item->propertyCollector);
    esxVI_ManagedObjectReference_Free(&item->viewManager);
    esxVI_AboutInfo_Free(&item->about);
    esxVI_ManagedObjectReference_Free(&item->setting);
    esxVI_ManagedObjectReference_Free(&item->userDirectory);
    esxVI_ManagedObjectReference_Free(&item->sessionManager);
    esxVI_ManagedObjectReference_Free(&item->authorizationManager);
    esxVI_ManagedObjectReference_Free(&item->perfManager);
    esxVI_ManagedObjectReference_Free(&item->scheduledTaskManager);
    esxVI_ManagedObjectReference_Free(&item->alarmManager);
    esxVI_ManagedObjectReference_Free(&item->eventManager);
    esxVI_ManagedObjectReference_Free(&item->taskManager);
    esxVI_ManagedObjectReference_Free(&item->extensionManager);
    esxVI_ManagedObjectReference_Free(&item->customizationSpecManager);
    esxVI_ManagedObjectReference_Free(&item->customFieldsManager);
    esxVI_ManagedObjectReference_Free(&item->accountManager);
    esxVI_ManagedObjectReference_Free(&item->diagnosticManager);
    esxVI_ManagedObjectReference_Free(&item->licenseManager);
    esxVI_ManagedObjectReference_Free(&item->searchIndex);
    esxVI_ManagedObjectReference_Free(&item->fileManager);
    esxVI_ManagedObjectReference_Free(&item->virtualDiskManager);
    esxVI_ManagedObjectReference_Free(&item->virtualizationManager);
    esxVI_ManagedObjectReference_Free(&item->snmpSystem);
    esxVI_ManagedObjectReference_Free(&item->vmProvisioningChecker);
    esxVI_ManagedObjectReference_Free(&item->vmCompatibilityChecker);
    esxVI_ManagedObjectReference_Free(&item->ovfManager);
    esxVI_ManagedObjectReference_Free(&item->ipPoolManager);
    esxVI_ManagedObjectReference_Free(&item->dvSwitchManager);
    esxVI_ManagedObjectReference_Free(&item->hostProfileManager);
    esxVI_ManagedObjectReference_Free(&item->clusterProfileManager);
    esxVI_ManagedObjectReference_Free(&item->complianceManager);
    esxVI_ManagedObjectReference_Free(&item->localizationManager);
})

/* esxVI_ServiceContent_Validate */
ESX_VI__TEMPLATE__VALIDATE(ServiceContent,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(rootFolder)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(propertyCollector)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(about)
})

/* esxVI_ServiceContent_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(ServiceContent,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, rootFolder)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, propertyCollector)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, viewManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(AboutInfo, about)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, setting)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, userDirectory)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, sessionManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, authorizationManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, perfManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, scheduledTaskManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, alarmManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, eventManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, taskManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, extensionManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, customizationSpecManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, customFieldsManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, accountManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, diagnosticManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, licenseManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, searchIndex)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, fileManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, virtualDiskManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, virtualizationManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, snmpSystem)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, vmProvisioningChecker)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, vmCompatibilityChecker)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, ovfManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, ipPoolManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, dvSwitchManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, hostProfileManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, clusterProfileManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, complianceManager)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, localizationManager)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: SharesInfo
 */

/* esxVI_SharesInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(SharesInfo)

/* esxVI_SharesInfo_Free */
ESX_VI__TEMPLATE__FREE(SharesInfo,
{
    esxVI_Int_Free(&item->shares);
})

/* esxVI_SharesInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(SharesInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(shares)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(level)
})

/* esxVI_SharesInfo_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(SharesInfo)

/* esxVI_SharesInfo_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(SharesInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, shares)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(SharesLevel, level)
})

/* esxVI_SharesInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(SharesInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, shares)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(SharesLevel, level)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: TaskInfo
 */

/* esxVI_TaskInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(TaskInfo)

/* esxVI_TaskInfo_Free */
ESX_VI__TEMPLATE__FREE(TaskInfo,
{
    esxVI_TaskInfo_Free(&item->_next);

    VIR_FREE(item->key);
    esxVI_ManagedObjectReference_Free(&item->task);
    /* FIXME: description is currently ignored */
    VIR_FREE(item->name);
    VIR_FREE(item->descriptionId);
    esxVI_ManagedObjectReference_Free(&item->entity);
    VIR_FREE(item->entityName);
    esxVI_ManagedObjectReference_Free(&item->locked);
    esxVI_LocalizedMethodFault_Free(&item->error);
    esxVI_AnyType_Free(&item->result);
    esxVI_Int_Free(&item->progress);
    /* FIXME: reason is currently ignored */
    esxVI_DateTime_Free(&item->queueTime);
    esxVI_DateTime_Free(&item->startTime);
    esxVI_DateTime_Free(&item->completeTime);
    esxVI_Int_Free(&item->eventChainId);
    VIR_FREE(item->changeTag);
    VIR_FREE(item->parentTaskKey);
    VIR_FREE(item->rootTaskKey);
})

/* esxVI_TaskInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(TaskInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(task)
    /* FIXME: description is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(descriptionId)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(state)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(cancelled)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(cancelable)
    /* FIXME: reason is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(queueTime)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(eventChainId)
})

/* esxVI_TaskInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(TaskInfo)

/* esxVI_TaskInfo_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(TaskInfo)

/* esxVI_TaskInfo_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(TaskInfo)

/* esxVI_TaskInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(TaskInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, task)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(description) /* FIXME */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, descriptionId)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, entity)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, entityName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(ManagedObjectReference, locked)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(TaskInfoState, state)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, cancelled)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, cancelable)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(LocalizedMethodFault, error)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(AnyType, result)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, progress)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(reason) /* FIXME */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, queueTime)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, startTime)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, completeTime)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, eventChainId)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, changeTag)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, parentTaskKey)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, rootTaskKey)
})

/* esxVI_TaskInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(TaskInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: TemplateConfigFileInfo
 *            extends VmConfigFileInfo
 */

/* esxVI_TemplateConfigFileInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(TemplateConfigFileInfo)

/* esxVI_TemplateConfigFileInfo_Free */
ESX_VI__TEMPLATE__FREE(TemplateConfigFileInfo,
{
    esxVI_VmConfigFileInfo *next = (esxVI_VmConfigFileInfo *)item->_next;

    esxVI_VmConfigFileInfo_Free(&next);
    item->_next = (esxVI_TemplateConfigFileInfo *)next;

    /* FileInfo */
    VIR_FREE(item->path);
    esxVI_Long_Free(&item->fileSize);
    esxVI_DateTime_Free(&item->modification);
    VIR_FREE(item->owner);

    /* VmConfigFileInfo */
    esxVI_Int_Free(&item->configVersion);

    /* TemplateConfigFileInfo */
    /* no properties */
})

/* esxVI_TemplateConfigFileInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(TemplateConfigFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)

    /* VmConfigFileInfo */
    /* no required properties */

    /* TemplateConfigFileInfo */
    /* no properties */
})

/* esxVI_TemplateConfigFileInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(TemplateConfigFileInfo,
{
})

/* esxVI_TemplateConfigFileInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(TemplateConfigFileInfo)

/* esxVI_TemplateConfigFileInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(TemplateConfigFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, modification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, owner)

    /* VmConfigFileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, configVersion)

    /* TemplateConfigFileInfo */
    /* no properties */
})

/* esxVI_TemplateConfigFileInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(TemplateConfigFileInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: TemplateConfigFileQuery
 *            extends VmConfigFileQuery
 */

/* esxVI_TemplateConfigFileQuery_Alloc */
ESX_VI__TEMPLATE__ALLOC(TemplateConfigFileQuery)

/* esxVI_TemplateConfigFileQuery_Free */
ESX_VI__TEMPLATE__FREE(TemplateConfigFileQuery,
{
    esxVI_VmConfigFileQuery *next = (esxVI_VmConfigFileQuery *)item->_next;

    esxVI_VmConfigFileQuery_Free(&next);
    item->_next = (esxVI_TemplateConfigFileQuery *)next;

    /* FileQuery */
    /* no properties */

    /* VmConfigFileQuery */
    esxVI_VmConfigFileQueryFilter_Free(&item->filter);
    esxVI_VmConfigFileQueryFlags_Free(&item->details);

    /* TemplateConfigFileQuery */
    /* no properties */
})

/* esxVI_TemplateConfigFileQuery_Validate */
ESX_VI__TEMPLATE__VALIDATE(TemplateConfigFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmConfigFileQuery */
    /* no required properties */

    /* TemplateConfigFileQuery */
    /* no properties */
})

/* esxVI_TemplateConfigFileQuery_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(TemplateConfigFileQuery,
{
})

/* esxVI_TemplateConfigFileQuery_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(TemplateConfigFileQuery)

/* esxVI_TemplateConfigFileQuery_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(TemplateConfigFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmConfigFileQuery */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(VmConfigFileQueryFilter, filter)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(VmConfigFileQueryFlags, details)

    /* TemplateConfigFileQuery */
    /* no properties */
})

/* esxVI_TemplateConfigFileQuery_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(TemplateConfigFileQuery)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: TraversalSpec
 *            extends SelectionSpec
 */

/* esxVI_TraversalSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(TraversalSpec)

/* esxVI_TraversalSpec_Free */
ESX_VI__TEMPLATE__FREE(TraversalSpec,
{
    esxVI_SelectionSpec *next = (esxVI_SelectionSpec *)item->_next;

    esxVI_SelectionSpec_Free(&next);
    item->_next = (esxVI_TraversalSpec *)next;

    /* SelectionSpec */
    VIR_FREE(item->name);

    /* TraversalSpec */
    VIR_FREE(item->type);
    VIR_FREE(item->path);
    esxVI_SelectionSpec_Free(&item->selectSet);
})

/* esxVI_TraversalSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(TraversalSpec,
{
    /* SelectionSpec */
    /* no required properties */

    /* TraversalSpec */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(type)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)
})

/* esxVI_TraversalSpec_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(TraversalSpec,
{
})

/* esxVI_TraversalSpec_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(TraversalSpec)

/* esxVI_TraversalSpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(TraversalSpec,
{
    /* SelectionSpec */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, name)

    /* TraversalSpec */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, type)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, skip)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(SelectionSpec, selectSet)
})

/* esxVI_TraversalSpec_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(TraversalSpec)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: UpdateSet
 */

/* esxVI_UpdateSet_Alloc */
ESX_VI__TEMPLATE__ALLOC(UpdateSet)

/* esxVI_UpdateSet_Free */
ESX_VI__TEMPLATE__FREE(UpdateSet,
{
    VIR_FREE(item->version);
    esxVI_PropertyFilterUpdate_Free(&item->filterSet);
})

/* esxVI_UpdateSet_Validate */
ESX_VI__TEMPLATE__VALIDATE(UpdateSet,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(version)
})

/* esxVI_UpdateSet_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(UpdateSet,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, version)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(PropertyFilterUpdate, filterSet)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: UserSession
 */

/* esxVI_UserSession_Alloc */
ESX_VI__TEMPLATE__ALLOC(UserSession)

/* esxVI_UserSession_Free */
ESX_VI__TEMPLATE__FREE(UserSession,
{
    VIR_FREE(item->key);
    VIR_FREE(item->userName);
    VIR_FREE(item->fullName);
    esxVI_DateTime_Free(&item->loginTime);
    esxVI_DateTime_Free(&item->lastActiveTime);
    VIR_FREE(item->locale);
    VIR_FREE(item->messageLocale);
})

/* esxVI_UserSession_Validate */
ESX_VI__TEMPLATE__VALIDATE(UserSession,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(key)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(userName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(fullName)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(loginTime)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(lastActiveTime)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(locale)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(messageLocale)
})

/* esxVI_UserSession_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(UserSession)

/* esxVI_UserSession_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(UserSession,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, key)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, userName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, fullName)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, loginTime)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, lastActiveTime)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, locale)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, messageLocale)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VirtualDiskSpec
 *            extended by DeviceBackedVirtualDiskSpec
 *                        FileBackedVirtualDiskSpec
 */

/* esxVI_VirtualDiskSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(VirtualDiskSpec)

/* esxVI_VirtualDiskSpec_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(VirtualDiskSpec,
{
    /* VirtualDiskSpec */
    ESX_VI__TEMPLATE__DISPATCH__FREE(DeviceBackedVirtualDiskSpec)
    ESX_VI__TEMPLATE__DISPATCH__FREE(FileBackedVirtualDiskSpec)
},
{
    VIR_FREE(item->diskType);
    VIR_FREE(item->adapterType);
})

/* esxVI_VirtualDiskSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(VirtualDiskSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(diskType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(adapterType)
})

/* esxVI_VirtualDiskSpec_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VirtualDiskSpec,
{
    /* VirtualDiskSpec */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(DeviceBackedVirtualDiskSpec)
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(FileBackedVirtualDiskSpec)
})

/* esxVI_VirtualDiskSpec_Serialize */
ESX_VI__TEMPLATE__DYNAMIC_SERIALIZE(VirtualDiskSpec,
{
    /* VirtualDiskSpec */
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(DeviceBackedVirtualDiskSpec)
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(FileBackedVirtualDiskSpec)
},
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, diskType)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, adapterType)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VirtualMachineConfigSpec
 */

/* esxVI_VirtualMachineConfigSpec_Alloc */
ESX_VI__TEMPLATE__ALLOC(VirtualMachineConfigSpec)

/* esxVI_VirtualMachineConfigSpec_Free */
ESX_VI__TEMPLATE__FREE(VirtualMachineConfigSpec,
{
    VIR_FREE(item->changeVersion);
    VIR_FREE(item->name);
    VIR_FREE(item->version);
    VIR_FREE(item->uuid);
    VIR_FREE(item->instanceUuid);
    esxVI_Long_Free(&item->npivNodeWorldWideName);
    esxVI_Long_Free(&item->npivPortWorldWideName);
    VIR_FREE(item->npivWorldWideNameType);
    /* FIXME: npivDesiredNodeWwns is currently ignored */
    /* FIXME: npivDesiredPortWwns is currently ignored */
    VIR_FREE(item->npivWorldWideNameOp);
    VIR_FREE(item->locationId);
    VIR_FREE(item->guestId);
    VIR_FREE(item->alternateGuestName);
    VIR_FREE(item->annotation);
    /* FIXME: files is currently ignored */
    /* FIXME: tools is currently ignored */
    /* FIXME: flags is currently ignored */
    /* FIXME: consolePreferences is currently ignored */
    /* FIXME: powerOpInfo is currently ignored */
    esxVI_Int_Free(&item->numCPUs);
    esxVI_Long_Free(&item->memoryMB);
    /* FIXME: deviceChange is currently ignored */
    esxVI_ResourceAllocationInfo_Free(&item->cpuAllocation);
    esxVI_ResourceAllocationInfo_Free(&item->memoryAllocation);
    /* FIXME: cpuAffinity is currently ignored */
    /* FIXME: memoryAffinity is currently ignored */
    /* FIXME: networkShaper is currently ignored */
    /* FIXME: cpuFeatureMask is currently ignored */
    /* FIXME: extraConfig is currently ignored */
    VIR_FREE(item->swapPlacement);
    /* FIXME: bootOptions is currently ignored */
    /* FIXME: vAppConfig is currently ignored */
    /* FIXME: ftInfo is currently ignored */
})

/* esxVI_VirtualMachineConfigSpec_Validate */
ESX_VI__TEMPLATE__VALIDATE(VirtualMachineConfigSpec,
{
    /* FIXME: npivDesiredNodeWwns is currently ignored */
    /* FIXME: npivDesiredPortWwns is currently ignored */
    /* FIXME: files is currently ignored */
    /* FIXME: tools is currently ignored */
    /* FIXME: flags is currently ignored */
    /* FIXME: consolePreferences is currently ignored */
    /* FIXME: powerOpInfo is currently ignored */
    /* FIXME: deviceChange is currently ignored */
    /* FIXME: cpuAffinity is currently ignored */
    /* FIXME: memoryAffinity is currently ignored */
    /* FIXME: networkShaper is currently ignored */
    /* FIXME: cpuFeatureMask is currently ignored */
    /* FIXME: extraConfig is currently ignored */
    /* FIXME: bootOptions is currently ignored */
    /* FIXME: vAppConfig is currently ignored */
    /* FIXME: ftInfo is currently ignored */
})

/* esxVI_VirtualMachineConfigSpec_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(VirtualMachineConfigSpec,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, changeVersion)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, version)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, uuid)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, instanceUuid)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(Long, npivNodeWorldWideName)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(Long, npivPortWorldWideName)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, npivWorldWideNameType)
    /* FIXME: npivDesiredNodeWwns is currently ignored */
    /* FIXME: npivDesiredPortWwns is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, npivTemporaryDisabled)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, npivOnNonRdmDisks)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, npivWorldWideNameOp)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, locationId)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, guestId)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, alternateGuestName)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, annotation)
    /* FIXME: files is currently ignored */
    /* FIXME: tools is currently ignored */
    /* FIXME: flags is currently ignored */
    /* FIXME: consolePreferences is currently ignored */
    /* FIXME: powerOpInfo is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Int, numCPUs)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Long, memoryMB)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, memoryHotAddEnabled)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, cpuHotAddEnabled)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, cpuHotRemoveEnabled)
    /* FIXME: deviceChange is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(ResourceAllocationInfo, cpuAllocation)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(ResourceAllocationInfo, memoryAllocation)
    /* FIXME: cpuAffinity is currently ignored */
    /* FIXME: memoryAffinity is currently ignored */
    /* FIXME: networkShaper is currently ignored */
    /* FIXME: cpuFeatureMask is currently ignored */
    /* FIXME: extraConfig is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_VALUE(String, swapPlacement)
    /* FIXME: bootOptions is currently ignored */
    /* FIXME: vAppConfig is currently ignored */
    /* FIXME: ftInfo is currently ignored */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, vAppConfigRemoved)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, vAssertsEnabled)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, changeTrackingEnabled)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VirtualMachineQuestionInfo
 */

/* esxVI_VirtualMachineQuestionInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(VirtualMachineQuestionInfo)

/* esxVI_VirtualMachineQuestionInfo_Free */
ESX_VI__TEMPLATE__FREE(VirtualMachineQuestionInfo,
{
    VIR_FREE(item->id);
    VIR_FREE(item->text);
    esxVI_ChoiceOption_Free(&item->choice);
    /* FIXME: message is currently ignored */
})

/* esxVI_VirtualMachineQuestionInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(VirtualMachineQuestionInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(id)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(text)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(choice)
    /* FIXME: message is currently ignored */
})

/* esxVI_VirtualMachineQuestionInfo_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(VirtualMachineQuestionInfo)

/* esxVI_VirtualMachineQuestionInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(VirtualMachineQuestionInfo,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, id)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, text)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ChoiceOption, choice)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_IGNORE(message) /* FIXME */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VirtualMachineSnapshotTree
 */

/* esxVI_VirtualMachineSnapshotTree_Alloc */
ESX_VI__TEMPLATE__ALLOC(VirtualMachineSnapshotTree)

/* esxVI_VirtualMachineSnapshotTree_Free */
ESX_VI__TEMPLATE__FREE(VirtualMachineSnapshotTree,
{
    esxVI_VirtualMachineSnapshotTree_Free(&item->_next);

    esxVI_ManagedObjectReference_Free(&item->snapshot);
    esxVI_ManagedObjectReference_Free(&item->vm);
    VIR_FREE(item->name);
    VIR_FREE(item->description);
    esxVI_Int_Free(&item->id);
    esxVI_DateTime_Free(&item->createTime);
    VIR_FREE(item->backupManifest);
    esxVI_VirtualMachineSnapshotTree_Free(&item->childSnapshotList);
})

/* esxVI_VirtualMachineSnapshotTree_Validate */
ESX_VI__TEMPLATE__VALIDATE(VirtualMachineSnapshotTree,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(snapshot)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(vm)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(description)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(createTime)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(state)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(quiesced)
})

/* esxVI_VirtualMachineSnapshotTree_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VirtualMachineSnapshotTree)

/* esxVI_VirtualMachineSnapshotTree_DeepCopy */
ESX_VI__TEMPLATE__DEEP_COPY(VirtualMachineSnapshotTree,
{
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(ManagedObjectReference, snapshot)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(ManagedObjectReference, vm)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, description)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(Int, id)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY(DateTime, createTime)
    (*dest)->state = src->state;
    (*dest)->quiesced = src->quiesced;
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_VALUE(String, backupManifest)
    ESX_VI__TEMPLATE__PROPERTY__DEEP_COPY_LIST(VirtualMachineSnapshotTree, childSnapshotList)
    (*dest)->replaySupported = src->replaySupported;
})

/* esxVI_VirtualMachineSnapshotTree_DeepCopyList */
ESX_VI__TEMPLATE__LIST__DEEP_COPY(VirtualMachineSnapshotTree)

/* esxVI_VirtualMachineSnapshotTree_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(VirtualMachineSnapshotTree)

/* esxVI_VirtualMachineSnapshotTree_CastListFromAnyType */
ESX_VI__TEMPLATE__LIST__CAST_FROM_ANY_TYPE(VirtualMachineSnapshotTree)

/* esxVI_VirtualMachineSnapshotTree_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(VirtualMachineSnapshotTree,
{
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, snapshot)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, vm)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, description)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, id)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, createTime)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(VirtualMachinePowerState, state)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, quiesced)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, backupManifest)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(VirtualMachineSnapshotTree, childSnapshotList)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, replaySupported)
})

/* esxVI_VirtualMachineSnapshotTree_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(VirtualMachineSnapshotTree)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmConfigFileInfo
 *            extends FileInfo
 *            extended by TemplateConfigFileInfo
 */

/* esxVI_VmConfigFileInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmConfigFileInfo)

/* esxVI_VmConfigFileInfo_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(VmConfigFileInfo,
{
    /* VmConfigFileInfo */
    ESX_VI__TEMPLATE__DISPATCH__FREE(TemplateConfigFileInfo)
},
{
    esxVI_FileInfo *next = (esxVI_FileInfo *)item->_next;

    esxVI_FileInfo_Free(&next);
    item->_next = (esxVI_VmConfigFileInfo *)next;

    /* FileInfo */
    VIR_FREE(item->path);
    esxVI_Long_Free(&item->fileSize);
    esxVI_DateTime_Free(&item->modification);
    VIR_FREE(item->owner);

    /* VmConfigFileInfo */
    esxVI_Int_Free(&item->configVersion);
})

/* esxVI_VmConfigFileInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmConfigFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)

    /* VmConfigFileInfo */
    /* no required properties */
})

/* esxVI_VmConfigFileInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmConfigFileInfo,
{
    /* VmConfigFileInfo */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(TemplateConfigFileInfo)
})

/* esxVI_VmConfigFileInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VmConfigFileInfo)

/* esxVI_VmConfigFileInfo_Deserialize */
ESX_VI__TEMPLATE__DYNAMIC_DESERIALIZE(VmConfigFileInfo,
{
    /* VmConfigFileInfo */
    ESX_VI__TEMPLATE__DISPATCH__DESERIALIZE(TemplateConfigFileInfo)
},
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, modification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, owner)

    /* VmConfigFileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, configVersion)
})

/* esxVI_VmConfigFileInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(VmConfigFileInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmConfigFileQuery
 *            extends FileQuery
 *            extended by TemplateConfigFileQuery
 */

/* esxVI_VmConfigFileQuery_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmConfigFileQuery)

/* esxVI_VmConfigFileQuery_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(VmConfigFileQuery,
{
    /* VmConfigFileQuery */
    ESX_VI__TEMPLATE__DISPATCH__FREE(TemplateConfigFileQuery)
},
{
    esxVI_FileQuery *next = (esxVI_FileQuery *)item->_next;

    esxVI_FileQuery_Free(&next);
    item->_next = (esxVI_VmConfigFileQuery *)next;

    /* FileQuery */
    /* no properties */

    /* VmConfigFileQuery */
    esxVI_VmConfigFileQueryFilter_Free(&item->filter);
    esxVI_VmConfigFileQueryFlags_Free(&item->details);
})

/* esxVI_VmConfigFileQuery_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmConfigFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmConfigFileQuery */
    /* no required properties */
})

/* esxVI_VmConfigFileQuery_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmConfigFileQuery,
{
    /* VmConfigFileQuery */
    ESX_VI__TEMPLATE__DYNAMIC_CAST__ACCEPT(TemplateConfigFileQuery)
})

/* esxVI_VmConfigFileQuery_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VmConfigFileQuery)

/* esxVI_VmConfigFileQuery_Serialize */
ESX_VI__TEMPLATE__DYNAMIC_SERIALIZE(VmConfigFileQuery,
{
    /* VmConfigFileQuery */
    ESX_VI__TEMPLATE__DISPATCH__SERIALIZE(TemplateConfigFileQuery)
},
{
    /* FileQuery */
    /* no properties */

    /* VmConfigFileQuery */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(VmConfigFileQueryFilter, filter)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(VmConfigFileQueryFlags, details)
})

/* esxVI_VmConfigFileQuery_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(VmConfigFileQuery)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmConfigFileQueryFilter
 */

/* esxVI_VmConfigFileQueryFilter_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmConfigFileQueryFilter)

/* esxVI_VmConfigFileQueryFilter_Free */
ESX_VI__TEMPLATE__FREE(VmConfigFileQueryFilter,
{
    esxVI_Int_Free(&item->matchConfigVersion);
})

/* esxVI_VmConfigFileQueryFilter_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmConfigFileQueryFilter,
{
    /* no required properties */
})

/* esxVI_VmConfigFileQueryFilter_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(VmConfigFileQueryFilter,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(Int, matchConfigVersion)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmConfigFileQueryFlags
 */

/* esxVI_VmConfigFileQueryFlags_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmConfigFileQueryFlags)

/* esxVI_VmConfigFileQueryFlags_Free */
ESX_VI__TEMPLATE__FREE(VmConfigFileQueryFlags,
{
    /* no properties to be freed */
})

/* esxVI_VmConfigFileQueryFlags_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmConfigFileQueryFlags,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(configVersion)
})

/* esxVI_VmConfigFileQueryFlags_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(VmConfigFileQueryFlags,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, configVersion)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmDiskFileInfo
 *            extends FileInfo
 */

/* esxVI_VmDiskFileInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmDiskFileInfo)

/* esxVI_VmDiskFileInfo_Free */
ESX_VI__TEMPLATE__FREE(VmDiskFileInfo,
{
    esxVI_FileInfo *next = (esxVI_FileInfo *)item->_next;

    esxVI_FileInfo_Free(&next);
    item->_next = (esxVI_VmDiskFileInfo *)next;

    /* FileInfo */
    VIR_FREE(item->path);
    esxVI_Long_Free(&item->fileSize);
    esxVI_DateTime_Free(&item->modification);
    VIR_FREE(item->owner);

    /* VmDiskFileInfo */
    VIR_FREE(item->diskType);
    esxVI_Long_Free(&item->capacityKb);
    esxVI_Int_Free(&item->hardwareVersion);
    VIR_FREE(item->controllerType);
    esxVI_String_Free(&item->diskExtents);
})

/* esxVI_VmDiskFileInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmDiskFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)

    /* VmDiskFileInfo */
    /* no required properties */
})

/* esxVI_VmDiskFileInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmDiskFileInfo,
{
})

/* esxVI_VmDiskFileInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VmDiskFileInfo)

/* esxVI_VmDiskFileInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(VmDiskFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, modification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, owner)

    /* VmDiskFileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, diskType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, capacityKb)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Int, hardwareVersion)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, controllerType)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_LIST(String, diskExtents)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Boolean, thin)
})

/* esxVI_VmDiskFileInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(VmDiskFileInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmDiskFileQuery
 *            extends FileQuery
 */

/* esxVI_VmDiskFileQuery_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmDiskFileQuery)

/* esxVI_VmDiskFileQuery_Free */
ESX_VI__TEMPLATE__FREE(VmDiskFileQuery,
{
    esxVI_FileQuery *next = (esxVI_FileQuery *)item->_next;

    esxVI_FileQuery_Free(&next);
    item->_next = (esxVI_VmDiskFileQuery *)next;

    /* FileQuery */
    /* no properties */

    /* VmDiskFileQuery */
    esxVI_VmDiskFileQueryFilter_Free(&item->filter);
    esxVI_VmDiskFileQueryFlags_Free(&item->details);
})

/* esxVI_VmDiskFileQuery_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmDiskFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmDiskFileQuery */
    /* no required properties */
})

/* esxVI_VmDiskFileQuery_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmDiskFileQuery,
{
})

/* esxVI_VmDiskFileQuery_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VmDiskFileQuery)

/* esxVI_VmDiskFileQuery_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(VmDiskFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmDiskFileQuery */
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(VmDiskFileQueryFilter, filter)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(VmDiskFileQueryFlags, details)
})

/* esxVI_VmDiskFileQuery_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(VmDiskFileQuery)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmDiskFileQueryFilter
 */

/* esxVI_VmDiskFileQueryFilter_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmDiskFileQueryFilter)

/* esxVI_VmDiskFileQueryFilter_Free */
ESX_VI__TEMPLATE__FREE(VmDiskFileQueryFilter,
{
    esxVI_String_Free(&item->diskType);
    esxVI_Int_Free(&item->matchHardwareVersion);
    esxVI_String_Free(&item->controllerType);
})

/* esxVI_VmDiskFileQueryFilter_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmDiskFileQueryFilter,
{
    /* no required properties */
})

/* esxVI_VmDiskFileQueryFilter_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(VmDiskFileQueryFilter,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(String, diskType)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(Int, matchHardwareVersion)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE_LIST(String, controllerType)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, thin)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmDiskFileQueryFlags
 */

/* esxVI_VmDiskFileQueryFlags_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmDiskFileQueryFlags)

/* esxVI_VmDiskFileQueryFlags_Free */
ESX_VI__TEMPLATE__FREE(VmDiskFileQueryFlags,
{
    /* no properties to be freed */
})

/* esxVI_VmDiskFileQueryFlags_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmDiskFileQueryFlags,
{
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(diskType)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(capacityKb)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(hardwareVersion)
})

/* esxVI_VmDiskFileQueryFlags_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(VmDiskFileQueryFlags,
{
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, diskType)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, capacityKb)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, hardwareVersion)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, controllerType)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, diskExtents)
    ESX_VI__TEMPLATE__PROPERTY__SERIALIZE(Boolean, thin)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmEventArgument
 *            extends EntityEventArgument
 */

/* esxVI_VmEventArgument_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmEventArgument)

/* esxVI_VmEventArgument_Free */
ESX_VI__TEMPLATE__FREE(VmEventArgument,
{
    /* EventArgument */
    /* no properties */

    /* EntityEventArgument */
    VIR_FREE(item->name);

    /* VmEventArgument */
    esxVI_ManagedObjectReference_Free(&item->vm);
})

/* esxVI_VmEventArgument_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmEventArgument,
{
    /* EventArgument */
    /* no properties */

    /* EntityEventArgument */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)

    /* VmEventArgument */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(vm)
})

/* esxVI_VmEventArgument_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(VmEventArgument,
{
    /* EventArgument */
    /* no properties */

    /* EntityEventArgument */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)

    /* VmEventArgument */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(ManagedObjectReference, vm)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmLogFileInfo
 *            extends FileInfo
 */

/* esxVI_VmLogFileInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmLogFileInfo)

/* esxVI_VmLogFileInfo_Free */
ESX_VI__TEMPLATE__FREE(VmLogFileInfo,
{
    esxVI_FileInfo *next = (esxVI_FileInfo *)item->_next;

    esxVI_FileInfo_Free(&next);
    item->_next = (esxVI_VmLogFileInfo *)next;

    /* FileInfo */
    VIR_FREE(item->path);
    esxVI_Long_Free(&item->fileSize);
    esxVI_DateTime_Free(&item->modification);
    VIR_FREE(item->owner);

    /* VmLogFileInfo */
    /* no properties */
})

/* esxVI_VmLogFileInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmLogFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)

    /* VmLogFileInfo */
    /* no properties */
})

/* esxVI_VmLogFileInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmLogFileInfo,
{
})

/* esxVI_VmLogFileInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VmLogFileInfo)

/* esxVI_VmLogFileInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(VmLogFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, modification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, owner)

    /* VmLogFileInfo */
    /* no properties */
})

/* esxVI_VmLogFileInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(VmLogFileInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmLogFileQuery
 *            extends FileQuery
 */

/* esxVI_VmLogFileQuery_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmLogFileQuery)

/* esxVI_VmLogFileQuery_Free */
ESX_VI__TEMPLATE__FREE(VmLogFileQuery,
{
    esxVI_FileQuery *next = (esxVI_FileQuery *)item->_next;

    esxVI_FileQuery_Free(&next);
    item->_next = (esxVI_VmLogFileQuery *)next;

    /* FileQuery */
    /* no properties */

    /* VmLogFileQuery */
    /* no properties */
})

/* esxVI_VmLogFileQuery_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmLogFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmLogFileQuery */
    /* no properties */
})

/* esxVI_VmLogFileQuery_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmLogFileQuery,
{
})

/* esxVI_VmLogFileQuery_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VmLogFileQuery)

/* esxVI_VmLogFileQuery_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(VmLogFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmLogFileQuery */
    /* no properties */
})

/* esxVI_VmLogFileQuery_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(VmLogFileQuery)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmNvramFileInfo
 *            extends FileInfo
 */

/* esxVI_VmNvramFileInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmNvramFileInfo)

/* esxVI_VmNvramFileInfo_Free */
ESX_VI__TEMPLATE__FREE(VmNvramFileInfo,
{
    esxVI_FileInfo *next = (esxVI_FileInfo *)item->_next;

    esxVI_FileInfo_Free(&next);
    item->_next = (esxVI_VmNvramFileInfo *)next;

    /* FileInfo */
    VIR_FREE(item->path);
    esxVI_Long_Free(&item->fileSize);
    esxVI_DateTime_Free(&item->modification);
    VIR_FREE(item->owner);

    /* VmNvramFileInfo */
    /* no properties */
})

/* esxVI_VmNvramFileInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmNvramFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)

    /* VmNvramFileInfo */
    /* no properties */
})

/* esxVI_VmNvramFileInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmNvramFileInfo,
{
})

/* esxVI_VmNvramFileInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VmNvramFileInfo)

/* esxVI_VmNvramFileInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(VmNvramFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, modification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, owner)

    /* VmNvramFileInfo */
    /* no properties */
})

/* esxVI_VmNvramFileInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(VmNvramFileInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmNvramFileQuery
 *            extends FileQuery
 */

/* esxVI_VmNvramFileQuery_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmNvramFileQuery)

/* esxVI_VmNvramFileQuery_Free */
ESX_VI__TEMPLATE__FREE(VmNvramFileQuery,
{
    esxVI_FileQuery *next = (esxVI_FileQuery *)item->_next;

    esxVI_FileQuery_Free(&next);
    item->_next = (esxVI_VmNvramFileQuery *)next;

    /* FileQuery */
    /* no properties */

    /* VmNvramFileQuery */
    /* no properties */
})

/* esxVI_VmNvramFileQuery_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmNvramFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmNvramFileQuery */
    /* no properties */
})

/* esxVI_VmNvramFileQuery_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmNvramFileQuery,
{
})

/* esxVI_VmNvramFileQuery_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VmNvramFileQuery)

/* esxVI_VmNvramFileQuery_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(VmNvramFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmNvramFileQuery */
    /* no properties */
})

/* esxVI_VmNvramFileQuery_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(VmNvramFileQuery)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmSnapshotFileInfo
 *            extends FileInfo
 */

/* esxVI_VmSnapshotFileInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmSnapshotFileInfo)

/* esxVI_VmSnapshotFileInfo_Free */
ESX_VI__TEMPLATE__FREE(VmSnapshotFileInfo,
{
    esxVI_FileInfo *next = (esxVI_FileInfo *)item->_next;

    esxVI_FileInfo_Free(&next);
    item->_next = (esxVI_VmSnapshotFileInfo *)next;

    /* FileInfo */
    VIR_FREE(item->path);
    esxVI_Long_Free(&item->fileSize);
    esxVI_DateTime_Free(&item->modification);
    VIR_FREE(item->owner);

    /* VmSnapshotFileInfo */
    /* no properties */
})

/* esxVI_VmSnapshotFileInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmSnapshotFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(path)

    /* VmSnapshotFileInfo */
    /* no properties */
})

/* esxVI_VmSnapshotFileInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmSnapshotFileInfo,
{
})

/* esxVI_VmSnapshotFileInfo_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VmSnapshotFileInfo)

/* esxVI_VmSnapshotFileInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(VmSnapshotFileInfo,
{
    /* FileInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, path)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, fileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, modification)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, owner)

    /* VmSnapshotFileInfo */
    /* no properties */
})

/* esxVI_VmSnapshotFileInfo_DeserializeList */
ESX_VI__TEMPLATE__LIST__DESERIALIZE(VmSnapshotFileInfo)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmSnapshotFileQuery
 *            extends FileQuery
 */

/* esxVI_VmSnapshotFileQuery_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmSnapshotFileQuery)

/* esxVI_VmSnapshotFileQuery_Free */
ESX_VI__TEMPLATE__FREE(VmSnapshotFileQuery,
{
    esxVI_FileQuery *next = (esxVI_FileQuery *)item->_next;

    esxVI_FileQuery_Free(&next);
    item->_next = (esxVI_VmSnapshotFileQuery *)next;

    /* FileQuery */
    /* no properties */

    /* VmSnapshotFileQuery */
    /* no properties */
})

/* esxVI_VmSnapshotFileQuery_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmSnapshotFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmSnapshotFileQuery */
    /* no properties */
})

/* esxVI_VmSnapshotFileQuery_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmSnapshotFileQuery,
{
})

/* esxVI_VmSnapshotFileQuery_AppendToList */
ESX_VI__TEMPLATE__LIST__APPEND(VmSnapshotFileQuery)

/* esxVI_VmSnapshotFileQuery_Serialize */
ESX_VI__TEMPLATE__SERIALIZE(VmSnapshotFileQuery,
{
    /* FileQuery */
    /* no properties */

    /* VmSnapshotFileQuery */
    /* no properties */
})

/* esxVI_VmSnapshotFileQuery_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE(VmSnapshotFileQuery)



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Object: VmfsDatastoreInfo
 *            extends DatastoreInfo
 */

/* esxVI_VmfsDatastoreInfo_Alloc */
ESX_VI__TEMPLATE__ALLOC(VmfsDatastoreInfo)

/* esxVI_VmfsDatastoreInfo_Free */
ESX_VI__TEMPLATE__FREE(VmfsDatastoreInfo,
{
    /* DatastoreInfo */
    VIR_FREE(item->name);
    VIR_FREE(item->url);
    esxVI_Long_Free(&item->freeSpace);
    esxVI_Long_Free(&item->maxFileSize);
    esxVI_DateTime_Free(&item->timestamp);

    /* VmfsDatastoreInfo */
    esxVI_HostVmfsVolume_Free(&item->vmfs);
})

/* esxVI_VmfsDatastoreInfo_Validate */
ESX_VI__TEMPLATE__VALIDATE(VmfsDatastoreInfo,
{
    /* DatastoreInfo */
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(name)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(url)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(freeSpace)
    ESX_VI__TEMPLATE__PROPERTY__REQUIRE(maxFileSize)

    /* VmfsDatastoreInfo */
    /* no required properties */
})

/* esxVI_VmfsDatastoreInfo_DynamicCast */
ESX_VI__TEMPLATE__DYNAMIC_CAST(VmfsDatastoreInfo,
{
})

/* esxVI_VmfsDatastoreInfo_CastFromAnyType */
ESX_VI__TEMPLATE__CAST_FROM_ANY_TYPE(VmfsDatastoreInfo)

/* esxVI_VmfsDatastoreInfo_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE(VmfsDatastoreInfo,
{
    /* DatastoreInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, name)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE_VALUE(String, url)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, freeSpace)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(Long, maxFileSize)
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(DateTime, timestamp)

    /* VmfsDatastoreInfo */
    ESX_VI__TEMPLATE__PROPERTY__DESERIALIZE(HostVmfsVolume, vmfs)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Managed Object: ComputeResource
 *                    extends ManagedEntity
 */

/* esxVI_ComputeResource_Alloc */
ESX_VI__TEMPLATE__ALLOC(ComputeResource)

/* esxVI_ComputeResource_Free */
ESX_VI__TEMPLATE__FREE(ComputeResource,
{
    esxVI_ManagedObjectReference_Free(&item->_reference);

    /* ManagedEntity */
    VIR_FREE(item->name);

    /* ComputeResource */
    esxVI_ManagedObjectReference_Free(&item->host);
    esxVI_ManagedObjectReference_Free(&item->resourcePool);
})

/* esxVI_ComputeResource_Validate */
ESX_VI__TEMPLATE__MANAGED_VALIDATE(ComputeResource,
{
    /* ManagedEntity */
    ESX_VI__TEMPLATE__PROPERTY__MANAGED_REQUIRE(name)

    /* ComputeResource */
    /* no required properties */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Managed Object: Datacenter
 *                    extends ManagedEntity
 */

/* esxVI_Datacenter_Alloc */
ESX_VI__TEMPLATE__ALLOC(Datacenter)

/* esxVI_Datacenter_Free */
ESX_VI__TEMPLATE__FREE(Datacenter,
{
    esxVI_ManagedObjectReference_Free(&item->_reference);

    /* ManagedEntity */
    VIR_FREE(item->name);

    /* Datacenter */
    esxVI_ManagedObjectReference_Free(&item->hostFolder);
    esxVI_ManagedObjectReference_Free(&item->vmFolder);
})

/* esxVI_Datacenter_Validate */
ESX_VI__TEMPLATE__MANAGED_VALIDATE(Datacenter,
{
    /* ManagedEntity */
    ESX_VI__TEMPLATE__PROPERTY__MANAGED_REQUIRE(name)

    /* Datacenter */
    ESX_VI__TEMPLATE__PROPERTY__MANAGED_REQUIRE(hostFolder)
    ESX_VI__TEMPLATE__PROPERTY__MANAGED_REQUIRE(vmFolder)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Managed Object: Folder
 *                    extends ManagedEntity
 */

/* esxVI_Folder_Alloc */
ESX_VI__TEMPLATE__ALLOC(Folder)

/* esxVI_Folder_Free */
ESX_VI__TEMPLATE__FREE(Folder,
{
    esxVI_ManagedObjectReference_Free(&item->_reference);

    /* ManagedEntity */
    VIR_FREE(item->name);

    /* Folder */
    /* no properties */
})

/* esxVI_Folder_Validate */
ESX_VI__TEMPLATE__MANAGED_VALIDATE(Folder,
{
    /* ManagedEntity */
    ESX_VI__TEMPLATE__PROPERTY__MANAGED_REQUIRE(name)

    /* Folder */
    /* no properties */
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Managed Object: HostSystem
 *                    extends ManagedEntity
 */

/* esxVI_HostSystem_Alloc */
ESX_VI__TEMPLATE__ALLOC(HostSystem)

/* esxVI_HostSystem_Free */
ESX_VI__TEMPLATE__FREE(HostSystem,
{
    esxVI_ManagedObjectReference_Free(&item->_reference);

    /* ManagedEntity */
    VIR_FREE(item->name);

    /* HostSystem */
    esxVI_HostConfigManager_Free(&item->configManager);
})

/* esxVI_HostSystem_Validate */
ESX_VI__TEMPLATE__MANAGED_VALIDATE(HostSystem,
{
    /* ManagedEntity */
    ESX_VI__TEMPLATE__PROPERTY__MANAGED_REQUIRE(name)

    /* HostSystem */
    ESX_VI__TEMPLATE__PROPERTY__MANAGED_REQUIRE(configManager)
})



/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * VI Managed Object: ManagedEntity
 *                    extended by ComputeResource
 *                                Datacenter
 *                                Folder
 *                                HostSystem
 */

/* esxVI_ManagedEntity_Alloc */
ESX_VI__TEMPLATE__ALLOC(ManagedEntity)

/* esxVI_ManagedEntity_Free */
ESX_VI__TEMPLATE__DYNAMIC_FREE(ManagedEntity,
{
    /* ManagedEntity */
    ESX_VI__TEMPLATE__DISPATCH__FREE(ComputeResource)
    ESX_VI__TEMPLATE__DISPATCH__FREE(Datacenter)
    ESX_VI__TEMPLATE__DISPATCH__FREE(Folder)
    ESX_VI__TEMPLATE__DISPATCH__FREE(HostSystem)
},
{
    esxVI_ManagedObjectReference_Free(&item->_reference);

    VIR_FREE(item->name);
})

/* esxVI_ManagedEntity_Validate */
ESX_VI__TEMPLATE__MANAGED_VALIDATE(ManagedEntity,
{
    ESX_VI__TEMPLATE__PROPERTY__MANAGED_REQUIRE(name)
})



