/* auto-generated, do not modify */
#include "config.h"

#include "fu-ti-tps6598x-struct.h"
#include "fu-byte-array.h"
#include "fu-mem-private.h"
#include "fu-string.h"

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

const gchar *
fu_ti_tps6598x_sfwi_to_string(FuTiTps6598xSfwi val)
{
    if (val == FU_TI_TPS6598X_SFWI_SUCCESS)
        return "success";
    if (val == FU_TI_TPS6598X_SFWI_FAIL_FLASH_ERROR_OR_BUSY)
        return "fail-flash-error-or-busy";
    if (val == FU_TI_TPS6598X_SFWI_FAIL_FLASH_INVALID_ADDRESS)
        return "fail-flash-invalid-address";
    if (val == FU_TI_TPS6598X_SFWI_FAIL_LAST_BOOT_WAS_UART)
        return "fail-last-boot-was-uart";
    if (val == FU_TI_TPS6598X_SFWI_FAIL_SFWI_AFTER_COMPLETE)
        return "fail-sfwi-after-complete";
    if (val == FU_TI_TPS6598X_SFWI_FAIL_NO_VALID_FLASH_REGION)
        return "fail-no-valid-flash-region";
    if (val == FU_TI_TPS6598X_SFWI_FAIL_UNKNOWN_ERROR)
        return "fail-unknown-error";
    return NULL;
}

const gchar *
fu_ti_tps6598x_sfwd_to_string(FuTiTps6598xSfwd val)
{
    if (val == FU_TI_TPS6598X_SFWD_SUCCESS)
        return "success";
    if (val == FU_TI_TPS6598X_SFWD_FAIL_FLASH_ERASE_WRITE_ERROR)
        return "fail-flash-erase-write-error";
    if (val == FU_TI_TPS6598X_SFWD_FAIL_SFWI_NOT_RUN_FIRST)
        return "fail-sfwi-not-run-first";
    if (val == FU_TI_TPS6598X_SFWD_FAIL_TOO_MUCH_DATA)
        return "fail-too-much-data";
    if (val == FU_TI_TPS6598X_SFWD_FAIL_ID_NOT_IN_HEADER)
        return "fail-id-not-in-header";
    if (val == FU_TI_TPS6598X_SFWD_FAIL_BINARY_TOO_LARGE)
        return "fail-binary-too-large";
    if (val == FU_TI_TPS6598X_SFWD_FAIL_DEVICE_ID_MISMATCH)
        return "fail-device-id-mismatch";
    if (val == FU_TI_TPS6598X_SFWD_FAIL_FLASH_ERROR_READ_ONLY)
        return "fail-flash-error-read-only";
    if (val == FU_TI_TPS6598X_SFWD_FAIL_UNKNOWN_ERROR)
        return "fail-unknown-error";
    return NULL;
}

const gchar *
fu_ti_tps6598x_sfws_to_string(FuTiTps6598xSfws val)
{
    if (val == FU_TI_TPS6598X_SFWS_SUCCESS)
        return "success";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_FLASH_ERASE_WRITE_ERROR)
        return "fail-flash-erase-write-error";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_SFWD_NOT_RUN_OR_NO_KEY_EXISTS)
        return "fail-sfwd-not-run-or-no-key-exists";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_TOO_MUCH_DATA)
        return "fail-too-much-data";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_CRC_FAIL)
        return "fail-crc-fail";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_DID_CHECK_FAIL)
        return "fail-did-check-fail";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_VERSION_CHECK_FAIL)
        return "fail-version-check-fail";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_NO_HASH_MATCH_RULE_SATISFIED)
        return "fail-no-hash-match-rule-satisfied";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_ENGR_FW_UPDATE_ATTEMPT_WHILE_RUNNING_PROD)
        return "fail-engr-fw-update-attempt-while-running-prod";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_INCOMPATIBLE_ROM_VERSION)
        return "fail-incompatible-rom-version";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_CRC_BUSY)
        return "fail-crc-busy";
    if (val == FU_TI_TPS6598X_SFWS_FAIL_UNKNOWN_ERROR)
        return "fail-unknown-error";
    return NULL;
}
