/*
 * This file is auto-generated, do not modify!
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include "config.h"

#include <glib.h>

#include "fu-context-struct.h"

#ifdef G_LOG_DOMAIN
  #undef G_LOG_DOMAIN
#endif
#define G_LOG_DOMAIN "FuStruct"

/**
 * fu_context_flag_from_string:
 * @val: (nullable): a string, e.g. `save-events`
 *
 * Converts a string to an enumerated value.
 *
 * Returns: enumerated value
 **/
FuContextFlags
fu_context_flag_from_string(const gchar *val)
{
    if (g_strcmp0(val, "none") == 0)
        return FU_CONTEXT_FLAG_NONE;
    if (g_strcmp0(val, "save-events") == 0)
        return FU_CONTEXT_FLAG_SAVE_EVENTS;
    if (g_strcmp0(val, "system-inhibit") == 0)
        return FU_CONTEXT_FLAG_SYSTEM_INHIBIT;
    if (g_strcmp0(val, "loaded-hwinfo") == 0)
        return FU_CONTEXT_FLAG_LOADED_HWINFO;
    if (g_strcmp0(val, "inhibit-volume-mount") == 0)
        return FU_CONTEXT_FLAG_INHIBIT_VOLUME_MOUNT;
    if (g_strcmp0(val, "fde-bitlocker") == 0)
        return FU_CONTEXT_FLAG_FDE_BITLOCKER;
    if (g_strcmp0(val, "fde-snapd") == 0)
        return FU_CONTEXT_FLAG_FDE_SNAPD;
    if (g_strcmp0(val, "ignore-efivars-free-space") == 0)
        return FU_CONTEXT_FLAG_IGNORE_EFIVARS_FREE_SPACE;
    if (g_strcmp0(val, "no-idle-sources") == 0)
        return FU_CONTEXT_FLAG_NO_IDLE_SOURCES;
    if (g_strcmp0(val, "insecure-uefi") == 0)
        return FU_CONTEXT_FLAG_INSECURE_UEFI;
    if (g_strcmp0(val, "is-hypervisor") == 0)
        return FU_CONTEXT_FLAG_IS_HYPERVISOR;
    if (g_strcmp0(val, "is-hypervisor-privileged") == 0)
        return FU_CONTEXT_FLAG_IS_HYPERVISOR_PRIVILEGED;
    if (g_strcmp0(val, "is-container") == 0)
        return FU_CONTEXT_FLAG_IS_CONTAINER;
    if (g_strcmp0(val, "smbios-uefi-enabled") == 0)
        return FU_CONTEXT_FLAG_SMBIOS_UEFI_ENABLED;
    if (g_strcmp0(val, "no-quirks") == 0)
        return FU_CONTEXT_FLAG_NO_QUIRKS;
    if (g_strcmp0(val, "dummy-efivars") == 0)
        return FU_CONTEXT_FLAG_DUMMY_EFIVARS;
    if (g_strcmp0(val, "is-server") == 0)
        return FU_CONTEXT_FLAG_IS_SERVER;
    return FU_CONTEXT_FLAG_NONE;
}



