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

#include "fu-hid-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_hid_item_tag_to_string(FuHidItemTag val)
{
    if (val == FU_HID_ITEM_TAG_UNKNOWN)
        return "unknown";
    if (val == FU_HID_ITEM_TAG_INPUT)
        return "input";
    if (val == FU_HID_ITEM_TAG_OUTPUT)
        return "output";
    if (val == FU_HID_ITEM_TAG_FEATURE)
        return "feature";
    if (val == FU_HID_ITEM_TAG_COLLECTION)
        return "collection";
    if (val == FU_HID_ITEM_TAG_END_COLLECTION)
        return "end-collection";
    if (val == FU_HID_ITEM_TAG_USAGE_PAGE)
        return "usage-page";
    if (val == FU_HID_ITEM_TAG_LOGICAL_MINIMUM)
        return "logical-minimum";
    if (val == FU_HID_ITEM_TAG_LOGICAL_MAXIMUM)
        return "logical-maximum";
    if (val == FU_HID_ITEM_TAG_PHYSICAL_MINIMUM)
        return "physical-minimum";
    if (val == FU_HID_ITEM_TAG_PHYSICAL_MAXIMUM)
        return "physical-maximum";
    if (val == FU_HID_ITEM_TAG_UNIT)
        return "unit";
    if (val == FU_HID_ITEM_TAG_REPORT_SIZE)
        return "report-size";
    if (val == FU_HID_ITEM_TAG_REPORT_ID)
        return "report-id";
    if (val == FU_HID_ITEM_TAG_REPORT_COUNT)
        return "report-count";
    if (val == FU_HID_ITEM_TAG_PUSH)
        return "push";
    if (val == FU_HID_ITEM_TAG_POP)
        return "pop";
    if (val == FU_HID_ITEM_TAG_USAGE)
        return "usage";
    if (val == FU_HID_ITEM_TAG_USAGE_MINIMUM)
        return "usage-minimum";
    if (val == FU_HID_ITEM_TAG_USAGE_MAXIMUM)
        return "usage-maximum";
    if (val == FU_HID_ITEM_TAG_DESIGNATOR_INDEX)
        return "designator-index";
    if (val == FU_HID_ITEM_TAG_DESIGNATOR_MINIMUM)
        return "designator-minimum";
    if (val == FU_HID_ITEM_TAG_DESIGNATOR_MAXIMUM)
        return "designator-maximum";
    if (val == FU_HID_ITEM_TAG_STRING_INDEX)
        return "string-index";
    if (val == FU_HID_ITEM_TAG_STRING_MINIMUM)
        return "string-minimum";
    if (val == FU_HID_ITEM_TAG_STRING_MAXIMUM)
        return "string-maximum";
    if (val == FU_HID_ITEM_TAG_LONG)
        return "long";
    return NULL;
}
FuHidItemTag
fu_hid_item_tag_from_string(const gchar *val)
{
    if (g_strcmp0(val, "unknown") == 0)
        return FU_HID_ITEM_TAG_UNKNOWN;
    if (g_strcmp0(val, "input") == 0)
        return FU_HID_ITEM_TAG_INPUT;
    if (g_strcmp0(val, "output") == 0)
        return FU_HID_ITEM_TAG_OUTPUT;
    if (g_strcmp0(val, "feature") == 0)
        return FU_HID_ITEM_TAG_FEATURE;
    if (g_strcmp0(val, "collection") == 0)
        return FU_HID_ITEM_TAG_COLLECTION;
    if (g_strcmp0(val, "end-collection") == 0)
        return FU_HID_ITEM_TAG_END_COLLECTION;
    if (g_strcmp0(val, "usage-page") == 0)
        return FU_HID_ITEM_TAG_USAGE_PAGE;
    if (g_strcmp0(val, "logical-minimum") == 0)
        return FU_HID_ITEM_TAG_LOGICAL_MINIMUM;
    if (g_strcmp0(val, "logical-maximum") == 0)
        return FU_HID_ITEM_TAG_LOGICAL_MAXIMUM;
    if (g_strcmp0(val, "physical-minimum") == 0)
        return FU_HID_ITEM_TAG_PHYSICAL_MINIMUM;
    if (g_strcmp0(val, "physical-maximum") == 0)
        return FU_HID_ITEM_TAG_PHYSICAL_MAXIMUM;
    if (g_strcmp0(val, "unit") == 0)
        return FU_HID_ITEM_TAG_UNIT;
    if (g_strcmp0(val, "report-size") == 0)
        return FU_HID_ITEM_TAG_REPORT_SIZE;
    if (g_strcmp0(val, "report-id") == 0)
        return FU_HID_ITEM_TAG_REPORT_ID;
    if (g_strcmp0(val, "report-count") == 0)
        return FU_HID_ITEM_TAG_REPORT_COUNT;
    if (g_strcmp0(val, "push") == 0)
        return FU_HID_ITEM_TAG_PUSH;
    if (g_strcmp0(val, "pop") == 0)
        return FU_HID_ITEM_TAG_POP;
    if (g_strcmp0(val, "usage") == 0)
        return FU_HID_ITEM_TAG_USAGE;
    if (g_strcmp0(val, "usage-minimum") == 0)
        return FU_HID_ITEM_TAG_USAGE_MINIMUM;
    if (g_strcmp0(val, "usage-maximum") == 0)
        return FU_HID_ITEM_TAG_USAGE_MAXIMUM;
    if (g_strcmp0(val, "designator-index") == 0)
        return FU_HID_ITEM_TAG_DESIGNATOR_INDEX;
    if (g_strcmp0(val, "designator-minimum") == 0)
        return FU_HID_ITEM_TAG_DESIGNATOR_MINIMUM;
    if (g_strcmp0(val, "designator-maximum") == 0)
        return FU_HID_ITEM_TAG_DESIGNATOR_MAXIMUM;
    if (g_strcmp0(val, "string-index") == 0)
        return FU_HID_ITEM_TAG_STRING_INDEX;
    if (g_strcmp0(val, "string-minimum") == 0)
        return FU_HID_ITEM_TAG_STRING_MINIMUM;
    if (g_strcmp0(val, "string-maximum") == 0)
        return FU_HID_ITEM_TAG_STRING_MAXIMUM;
    if (g_strcmp0(val, "long") == 0)
        return FU_HID_ITEM_TAG_LONG;
    return FU_HID_ITEM_TAG_UNKNOWN;
}

const gchar *
fu_hid_item_kind_to_string(FuHidItemKind val)
{
    if (val == FU_HID_ITEM_KIND_MAIN)
        return "main";
    if (val == FU_HID_ITEM_KIND_GLOBAL)
        return "global";
    if (val == FU_HID_ITEM_KIND_LOCAL)
        return "local";
    return NULL;
}
