/* AUTOMATICALLY GENERATED by qapi-gen.py DO NOT MODIFY */

/*
 * Schema-defined QAPI types
 *
 * Copyright IBM, Corp. 2011
 * Copyright (c) 2013-2018 Red Hat Inc.
 *
 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
 * See the COPYING.LIB file in the top-level directory.
 */

#include "qemu/osdep.h"
#include "qapi/dealloc-visitor.h"
#include "qapi-types-misc-i386.h"
#include "qapi-visit-misc-i386.h"
#include "qapi-features.h"

const QEnumLookup SevState_lookup = {
    .array = (const char *const[]) {
        [SEV_STATE_UNINIT] = "uninit",
        [SEV_STATE_LAUNCH_UPDATE] = "launch-update",
        [SEV_STATE_LAUNCH_SECRET] = "launch-secret",
        [SEV_STATE_RUNNING] = "running",
        [SEV_STATE_SEND_UPDATE] = "send-update",
        [SEV_STATE_RECEIVE_UPDATE] = "receive-update",
    },
    .size = SEV_STATE__MAX
};

const QEnumLookup SevGuestType_lookup = {
    .array = (const char *const[]) {
        [SEV_GUEST_TYPE_SEV] = "sev",
        [SEV_GUEST_TYPE_SEV_SNP] = "sev-snp",
    },
    .size = SEV_GUEST_TYPE__MAX
};

void qapi_free_SevGuestInfo(SevGuestInfo *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_SevGuestInfo(v, NULL, &obj, NULL);
    visit_free(v);
}

void qapi_free_SevSnpGuestInfo(SevSnpGuestInfo *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_SevSnpGuestInfo(v, NULL, &obj, NULL);
    visit_free(v);
}

void qapi_free_SevInfo(SevInfo *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_SevInfo(v, NULL, &obj, NULL);
    visit_free(v);
}

void qapi_free_SevLaunchMeasureInfo(SevLaunchMeasureInfo *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_SevLaunchMeasureInfo(v, NULL, &obj, NULL);
    visit_free(v);
}

void qapi_free_SevCapability(SevCapability *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_SevCapability(v, NULL, &obj, NULL);
    visit_free(v);
}

void qapi_free_SevAttestationReport(SevAttestationReport *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_SevAttestationReport(v, NULL, &obj, NULL);
    visit_free(v);
}

void qapi_free_SgxEpcSection(SgxEpcSection *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_SgxEpcSection(v, NULL, &obj, NULL);
    visit_free(v);
}

void qapi_free_SgxEpcSectionList(SgxEpcSectionList *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_SgxEpcSectionList(v, NULL, &obj, NULL);
    visit_free(v);
}

void qapi_free_SgxInfo(SgxInfo *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_SgxInfo(v, NULL, &obj, NULL);
    visit_free(v);
}

const QEnumLookup EvtchnPortType_lookup = {
    .array = (const char *const[]) {
        [EVTCHN_PORT_TYPE_CLOSED] = "closed",
        [EVTCHN_PORT_TYPE_UNBOUND] = "unbound",
        [EVTCHN_PORT_TYPE_INTERDOMAIN] = "interdomain",
        [EVTCHN_PORT_TYPE_PIRQ] = "pirq",
        [EVTCHN_PORT_TYPE_VIRQ] = "virq",
        [EVTCHN_PORT_TYPE_IPI] = "ipi",
    },
    .size = EVTCHN_PORT_TYPE__MAX
};

void qapi_free_EvtchnInfo(EvtchnInfo *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_EvtchnInfo(v, NULL, &obj, NULL);
    visit_free(v);
}

void qapi_free_EvtchnInfoList(EvtchnInfoList *obj)
{
    Visitor *v;

    if (!obj) {
        return;
    }

    v = qapi_dealloc_visitor_new();
    visit_type_EvtchnInfoList(v, NULL, &obj, NULL);
    visit_free(v);
}

/* Dummy declaration to prevent empty .o file */
char qapi_dummy_qapi_types_misc_i386_c;
