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

#include "config.h"

#include <glib.h>

#include "fwupd-security-attr-struct.h"

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

/**
 * fwupd_security_attr_flag_to_string:
 * @val: value, e.g. %FWUPD_SECURITY_ATTR_FLAG_SUCCESS
 *
 * Converts an enumerated value to a string.
 *
 * Returns: identifier string
 *
 * Since: 1.5.0
 **/
const gchar *
fwupd_security_attr_flag_to_string(FwupdSecurityAttrFlags val)
{
    if (val == FWUPD_SECURITY_ATTR_FLAG_NONE)
        return "none";
    if (val == FWUPD_SECURITY_ATTR_FLAG_SUCCESS)
        return "success";
    if (val == FWUPD_SECURITY_ATTR_FLAG_OBSOLETED)
        return "obsoleted";
    if (val == FWUPD_SECURITY_ATTR_FLAG_MISSING_DATA)
        return "missing-data";
    if (val == FWUPD_SECURITY_ATTR_FLAG_RUNTIME_UPDATES)
        return "runtime-updates";
    if (val == FWUPD_SECURITY_ATTR_FLAG_RUNTIME_ATTESTATION)
        return "runtime-attestation";
    if (val == FWUPD_SECURITY_ATTR_FLAG_RUNTIME_ISSUE)
        return "runtime-issue";
    if (val == FWUPD_SECURITY_ATTR_FLAG_ACTION_CONTACT_OEM)
        return "action-contact-oem";
    if (val == FWUPD_SECURITY_ATTR_FLAG_ACTION_CONFIG_FW)
        return "action-config-fw";
    if (val == FWUPD_SECURITY_ATTR_FLAG_ACTION_CONFIG_OS)
        return "action-config-os";
    if (val == FWUPD_SECURITY_ATTR_FLAG_CAN_FIX)
        return "can-fix";
    if (val == FWUPD_SECURITY_ATTR_FLAG_CAN_UNDO)
        return "can-undo";
    return NULL;
}


/**
 * fwupd_security_attr_result_to_string:
 * @val: value, e.g. %FWUPD_SECURITY_ATTR_RESULT_ENABLED
 *
 * Converts an enumerated value to a string.
 *
 * Returns: identifier string
 *
 * Since: 1.5.0
 **/
const gchar *
fwupd_security_attr_result_to_string(FwupdSecurityAttrResult val)
{
    if (val == FWUPD_SECURITY_ATTR_RESULT_ENABLED)
        return "enabled";
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_ENABLED)
        return "not-enabled";
    if (val == FWUPD_SECURITY_ATTR_RESULT_VALID)
        return "valid";
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_VALID)
        return "not-valid";
    if (val == FWUPD_SECURITY_ATTR_RESULT_LOCKED)
        return "locked";
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_LOCKED)
        return "not-locked";
    if (val == FWUPD_SECURITY_ATTR_RESULT_ENCRYPTED)
        return "encrypted";
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_ENCRYPTED)
        return "not-encrypted";
    if (val == FWUPD_SECURITY_ATTR_RESULT_TAINTED)
        return "tainted";
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_TAINTED)
        return "not-tainted";
    if (val == FWUPD_SECURITY_ATTR_RESULT_FOUND)
        return "found";
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_FOUND)
        return "not-found";
    if (val == FWUPD_SECURITY_ATTR_RESULT_SUPPORTED)
        return "supported";
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_SUPPORTED)
        return "not-supported";
    return NULL;
}
