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

#pragma once
#include <fu-input-stream.h>
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructAcpiPhatHdr;

FuStructAcpiPhatHdr *fu_struct_acpi_phat_hdr_ref(FuStructAcpiPhatHdr *st) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_hdr_unref(FuStructAcpiPhatHdr *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructAcpiPhatHdr, fu_struct_acpi_phat_hdr_unref)
gboolean fu_struct_acpi_phat_hdr_validate_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_HDR_OFFSET_MAGIC 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_HDR_SIZE_MAGIC 0x4
#define FU_STRUCT_ACPI_PHAT_HDR_N_ELEMENTS_MAGIC 4
#define FU_STRUCT_ACPI_PHAT_HDR_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_HDR_DEFAULT_MAGIC "PHAT"
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructAcpiPhatHealthRecord;

FuStructAcpiPhatHealthRecord *fu_struct_acpi_phat_health_record_ref(FuStructAcpiPhatHealthRecord *st) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_health_record_unref(FuStructAcpiPhatHealthRecord *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructAcpiPhatHealthRecord, fu_struct_acpi_phat_health_record_unref)
FuStructAcpiPhatHealthRecord *fu_struct_acpi_phat_health_record_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructAcpiPhatHealthRecord *fu_struct_acpi_phat_health_record_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_acpi_phat_health_record_get_signature(const FuStructAcpiPhatHealthRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_acpi_phat_health_record_get_rcdlen(const FuStructAcpiPhatHealthRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_acpi_phat_health_record_get_version(const FuStructAcpiPhatHealthRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_acpi_phat_health_record_get_flags(const FuStructAcpiPhatHealthRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const fwupd_guid_t *fu_struct_acpi_phat_health_record_get_device_signature(const FuStructAcpiPhatHealthRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_acpi_phat_health_record_get_device_specific_data(const FuStructAcpiPhatHealthRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_acpi_phat_health_record_set_signature(FuStructAcpiPhatHealthRecord *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_health_record_set_rcdlen(FuStructAcpiPhatHealthRecord *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_health_record_set_version(FuStructAcpiPhatHealthRecord *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_health_record_set_flags(FuStructAcpiPhatHealthRecord *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_health_record_set_device_signature(FuStructAcpiPhatHealthRecord *st, const fwupd_guid_t *value) G_GNUC_NON_NULL(1, 2);
void fu_struct_acpi_phat_health_record_set_device_specific_data(FuStructAcpiPhatHealthRecord *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_HEALTH_RECORD_OFFSET_SIGNATURE 0x0
#define FU_STRUCT_ACPI_PHAT_HEALTH_RECORD_OFFSET_RCDLEN 0x2
#define FU_STRUCT_ACPI_PHAT_HEALTH_RECORD_OFFSET_VERSION 0x4
#define FU_STRUCT_ACPI_PHAT_HEALTH_RECORD_OFFSET_FLAGS 0x7
#define FU_STRUCT_ACPI_PHAT_HEALTH_RECORD_OFFSET_DEVICE_SIGNATURE 0x8
#define FU_STRUCT_ACPI_PHAT_HEALTH_RECORD_OFFSET_DEVICE_SPECIFIC_DATA 0x18
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_HEALTH_RECORD_SIZE 0x1C
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_HEALTH_RECORD_DEFAULT_SIGNATURE 0x1
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructAcpiPhatVersionElement;

FuStructAcpiPhatVersionElement *fu_struct_acpi_phat_version_element_ref(FuStructAcpiPhatVersionElement *st) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_version_element_unref(FuStructAcpiPhatVersionElement *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructAcpiPhatVersionElement, fu_struct_acpi_phat_version_element_unref)
FuStructAcpiPhatVersionElement *fu_struct_acpi_phat_version_element_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructAcpiPhatVersionElement *fu_struct_acpi_phat_version_element_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const fwupd_guid_t *fu_struct_acpi_phat_version_element_get_component_id(const FuStructAcpiPhatVersionElement *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_acpi_phat_version_element_get_version_value(const FuStructAcpiPhatVersionElement *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gchar *fu_struct_acpi_phat_version_element_get_producer_id(const FuStructAcpiPhatVersionElement *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_acpi_phat_version_element_set_component_id(FuStructAcpiPhatVersionElement *st, const fwupd_guid_t *value) G_GNUC_NON_NULL(1, 2);
void fu_struct_acpi_phat_version_element_set_version_value(FuStructAcpiPhatVersionElement *st, guint64 value) G_GNUC_NON_NULL(1);
gboolean fu_struct_acpi_phat_version_element_set_producer_id(FuStructAcpiPhatVersionElement *st, const gchar *value, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_VERSION_ELEMENT_OFFSET_COMPONENT_ID 0x0
#define FU_STRUCT_ACPI_PHAT_VERSION_ELEMENT_OFFSET_VERSION_VALUE 0x10
#define FU_STRUCT_ACPI_PHAT_VERSION_ELEMENT_OFFSET_PRODUCER_ID 0x18
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_VERSION_ELEMENT_SIZE_PRODUCER_ID 0x4
#define FU_STRUCT_ACPI_PHAT_VERSION_ELEMENT_N_ELEMENTS_PRODUCER_ID 4
#define FU_STRUCT_ACPI_PHAT_VERSION_ELEMENT_SIZE 0x1C
#endif

#ifndef __GI_SCANNER__
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructAcpiPhatVersionRecord;

FuStructAcpiPhatVersionRecord *fu_struct_acpi_phat_version_record_ref(FuStructAcpiPhatVersionRecord *st) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_version_record_unref(FuStructAcpiPhatVersionRecord *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructAcpiPhatVersionRecord, fu_struct_acpi_phat_version_record_unref)
FuStructAcpiPhatVersionRecord *fu_struct_acpi_phat_version_record_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructAcpiPhatVersionRecord *fu_struct_acpi_phat_version_record_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_acpi_phat_version_record_get_signature(const FuStructAcpiPhatVersionRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_acpi_phat_version_record_get_rcdlen(const FuStructAcpiPhatVersionRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_acpi_phat_version_record_get_version(const FuStructAcpiPhatVersionRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_acpi_phat_version_record_get_record_count(const FuStructAcpiPhatVersionRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_acpi_phat_version_record_set_signature(FuStructAcpiPhatVersionRecord *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_version_record_set_rcdlen(FuStructAcpiPhatVersionRecord *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_version_record_set_version(FuStructAcpiPhatVersionRecord *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_acpi_phat_version_record_set_record_count(FuStructAcpiPhatVersionRecord *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_VERSION_RECORD_OFFSET_SIGNATURE 0x0
#define FU_STRUCT_ACPI_PHAT_VERSION_RECORD_OFFSET_RCDLEN 0x2
#define FU_STRUCT_ACPI_PHAT_VERSION_RECORD_OFFSET_VERSION 0x4
#define FU_STRUCT_ACPI_PHAT_VERSION_RECORD_OFFSET_RECORD_COUNT 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_VERSION_RECORD_SIZE 0xC
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ACPI_PHAT_VERSION_RECORD_DEFAULT_SIGNATURE 0x0
#endif
