// automatically generated by the FlatBuffers compiler, do not modify


#ifndef FLATBUFFERS_GENERATED_ASSETA_FLAT_BIGFOOT_H_
#define FLATBUFFERS_GENERATED_ASSETA_FLAT_BIGFOOT_H_

#include "flatbuffers/flatbuffers.h"

// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
              FLATBUFFERS_VERSION_MINOR == 12 &&
              FLATBUFFERS_VERSION_REVISION == 19,
             "Non-compatible flatbuffers version included");
// Ensure the included flatbuffers.h is Bigfoot's fork - stock
// flatbuffers (or a differently versioned Bigfoot fork) is not compatible.
#ifndef FLATBUFFERS_BIGFOOT_VERSION
#error "This file requires Bigfoot's flatbuffers fork - stock flatbuffers is not compatible"
#endif
static_assert(FLATBUFFERS_BIGFOOT_VERSION == 1,
             "Non-compatible Bigfoot flatbuffers fork version included");

#include "System/UUID/UUID.hpp"
#include "Engine/Asset/Reference.hpp"
#include "Engine/Asset/Reference_generated.hpp"

#include "EASTL/unique_ptr.h"
#include "EASTL/string.h"
#include "EASTL/vector.h"

namespace Flat {
namespace Bigfoot {

struct AssetA;
struct AssetABuilder;
struct AssetAT;

}  // namespace Bigfoot
}  // namespace Flat

namespace Bigfoot {
class AssetA;
}  // namespace Bigfoot

namespace flatbuffers {
Flat::Bigfoot::SoftReference PackSoftReferenceAssetA(const ::Bigfoot::SoftReference<::Bigfoot::AssetA>& p_asset);
::Bigfoot::SoftReference<::Bigfoot::AssetA> UnPackSoftReferenceAssetA(const Flat::Bigfoot::SoftReference& p_asset);
}  // namespace flatbuffers

namespace Flat {
namespace Bigfoot {

inline const ::flatbuffers::TypeTable *AssetATypeTable();

struct AssetAT : public ::flatbuffers::NativeTable {
  typedef AssetA TableType;
  static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
    return "Flat.Bigfoot.AssetAT";
  }
  uint32_t health = 0;
  uint32_t mana = 0;
  ::Bigfoot::SoftReference<::Bigfoot::AssetA> ref_a{};
};

struct AssetA FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef AssetAT NativeTableType;
  typedef AssetABuilder Builder;
  struct Traits;
  static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
    return AssetATypeTable();
  }
  static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
    return "Flat.Bigfoot.AssetA";
  }
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_HEALTH = 4,
    VT_MANA = 6,
    VT_REF_A = 8
  };
  uint32_t health() const {
    return GetField<uint32_t>(VT_HEALTH, 0);
  }
  uint32_t mana() const {
    return GetField<uint32_t>(VT_MANA, 0);
  }
  const Flat::Bigfoot::SoftReference *ref_a() const {
    return GetStruct<const Flat::Bigfoot::SoftReference *>(VT_REF_A);
  }
  template <bool B = false>
  bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<uint32_t>(verifier, VT_HEALTH, 4) &&
           VerifyField<uint32_t>(verifier, VT_MANA, 4) &&
           VerifyField<Flat::Bigfoot::SoftReference>(verifier, VT_REF_A, 1) &&
           verifier.EndTable();
  }
  AssetAT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(AssetAT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<AssetA> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct AssetABuilder {
  typedef AssetA Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_health(uint32_t health) {
    fbb_.AddElement<uint32_t>(AssetA::VT_HEALTH, health, 0);
  }
  void add_mana(uint32_t mana) {
    fbb_.AddElement<uint32_t>(AssetA::VT_MANA, mana, 0);
  }
  void add_ref_a(const Flat::Bigfoot::SoftReference *ref_a) {
    fbb_.AddStruct(AssetA::VT_REF_A, ref_a);
  }
  explicit AssetABuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<AssetA> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<AssetA>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<AssetA> CreateAssetA(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    uint32_t health = 0,
    uint32_t mana = 0,
    const Flat::Bigfoot::SoftReference *ref_a = nullptr) {
  AssetABuilder builder_(_fbb);
  builder_.add_ref_a(ref_a);
  builder_.add_mana(mana);
  builder_.add_health(health);
  return builder_.Finish();
}

struct AssetA::Traits {
  using type = AssetA;
  static auto constexpr Create = CreateAssetA;
};

::flatbuffers::Offset<AssetA> CreateAssetA(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);

inline AssetAT *AssetA::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
  auto _o = std::make_unique<AssetAT>();
  UnPackTo(_o.get(), _resolver);
  return _o.release();
}

inline void AssetA::UnPackTo(AssetAT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = health(); _o->health = _e; }
  { auto _e = mana(); _o->mana = _e; }
  { auto _e = ref_a(); if (_e) _o->ref_a = ::flatbuffers::UnPackSoftReferenceAssetA(*_e); }
}

inline ::flatbuffers::Offset<AssetA> CreateAssetA(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return AssetA::Pack(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<AssetA> AssetA::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetAT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _health = _o->health;
  auto _mana = _o->mana;
  auto _ref_a = ::flatbuffers::PackSoftReferenceAssetA(_o->ref_a);
  return Flat::Bigfoot::CreateAssetA(
      _fbb,
      _health,
      _mana,
      &_ref_a);
}

inline const ::flatbuffers::TypeTable *AssetATypeTable() {
  static const ::flatbuffers::TypeCode type_codes[] = {
    { ::flatbuffers::ET_UINT, 0, -1 },
    { ::flatbuffers::ET_UINT, 0, -1 },
    { ::flatbuffers::ET_SEQUENCE, 0, 0 }
  };
  static const ::flatbuffers::TypeFunction type_refs[] = {
    Flat::Bigfoot::SoftReferenceTypeTable
  };
  static const ::flatbuffers::TypeTable tt = {
    ::flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, nullptr
  };
  return &tt;
}

inline const Flat::Bigfoot::AssetA *GetAssetA(const void *buf) {
  return ::flatbuffers::GetRoot<Flat::Bigfoot::AssetA>(buf);
}

inline const Flat::Bigfoot::AssetA *GetSizePrefixedAssetA(const void *buf) {
  return ::flatbuffers::GetSizePrefixedRoot<Flat::Bigfoot::AssetA>(buf);
}

template <bool B = false>
inline bool VerifyAssetABuffer(
    ::flatbuffers::VerifierTemplate<B> &verifier) {
  return verifier.template VerifyBuffer<Flat::Bigfoot::AssetA>(nullptr);
}

template <bool B = false>
inline bool VerifySizePrefixedAssetABuffer(
    ::flatbuffers::VerifierTemplate<B> &verifier) {
  return verifier.template VerifySizePrefixedBuffer<Flat::Bigfoot::AssetA>(nullptr);
}

inline const char *AssetAExtension() {
  return "bfbs";
}

inline void FinishAssetABuffer(
    ::flatbuffers::FlatBufferBuilder &fbb,
    ::flatbuffers::Offset<Flat::Bigfoot::AssetA> root) {
  fbb.Finish(root);
}

inline void FinishSizePrefixedAssetABuffer(
    ::flatbuffers::FlatBufferBuilder &fbb,
    ::flatbuffers::Offset<Flat::Bigfoot::AssetA> root) {
  fbb.FinishSizePrefixed(root);
}

inline eastl::unique_ptr<Flat::Bigfoot::AssetAT> UnPackAssetA(
    const void *buf,
    const ::flatbuffers::resolver_function_t *res = nullptr) {
  return eastl::unique_ptr<Flat::Bigfoot::AssetAT>(GetAssetA(buf)->UnPack(res));
}

inline eastl::unique_ptr<Flat::Bigfoot::AssetAT> UnPackSizePrefixedAssetA(
    const void *buf,
    const ::flatbuffers::resolver_function_t *res = nullptr) {
  return eastl::unique_ptr<Flat::Bigfoot::AssetAT>(GetSizePrefixedAssetA(buf)->UnPack(res));
}

}  // namespace Bigfoot
}  // namespace Flat

namespace flatbuffers {
#ifndef FLATBUFFERS_BIGFOOT_REF_SOFTREFERENCEASSETA
#define FLATBUFFERS_BIGFOOT_REF_SOFTREFERENCEASSETA
inline Flat::Bigfoot::SoftReference PackSoftReferenceAssetA(const ::Bigfoot::SoftReference<::Bigfoot::AssetA>& p_asset) { return {Pack(p_asset.GetUUID())}; }
inline ::Bigfoot::SoftReference<::Bigfoot::AssetA> UnPackSoftReferenceAssetA(const Flat::Bigfoot::SoftReference& p_asset) { return {UnPack(p_asset.uuid())}; }
#endif  // FLATBUFFERS_BIGFOOT_REF_SOFTREFERENCEASSETA
}  // namespace flatbuffers

#endif  // FLATBUFFERS_GENERATED_ASSETA_FLAT_BIGFOOT_H_
