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


#ifndef FLATBUFFERS_GENERATED_ASSET_FLAT_BIGFOOT_H_
#define FLATBUFFERS_GENERATED_ASSET_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 "Engine/Asset/AssetTypeID.hpp"
#include "System/UUID/UUID.hpp"
#include "Engine/Asset/AssetTypeID_generated.hpp"
#include "System/UUID/UUID_generated.hpp"

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

namespace Flat {
namespace Bigfoot {

struct AssetHeader;
struct AssetHeaderBuilder;
struct AssetHeaderT;

struct Asset;
struct AssetBuilder;
struct AssetT;

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

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

struct AssetHeaderT : public ::flatbuffers::NativeTable {
  typedef AssetHeader TableType;
  static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
    return "Flat.Bigfoot.AssetHeaderT";
  }
  ::Bigfoot::UUID uuid{};
  eastl::string name{};
  ::Bigfoot::AssetTypeID type_id{};
  eastl::string type_name{};
  uint32_t version = 0;
};

struct AssetHeader FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef AssetHeaderT NativeTableType;
  typedef AssetHeaderBuilder Builder;
  struct Traits;
  static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
    return AssetHeaderTypeTable();
  }
  static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
    return "Flat.Bigfoot.AssetHeader";
  }
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_UUID = 4,
    VT_NAME = 6,
    VT_TYPE_ID = 8,
    VT_TYPE_NAME = 10,
    VT_VERSION = 12
  };
  const Flat::Bigfoot::UUID *uuid() const {
    return GetStruct<const Flat::Bigfoot::UUID *>(VT_UUID);
  }
  const ::flatbuffers::String *name() const {
    return GetPointer<const ::flatbuffers::String *>(VT_NAME);
  }
  const Flat::Bigfoot::AssetTypeID *type_id() const {
    return GetStruct<const Flat::Bigfoot::AssetTypeID *>(VT_TYPE_ID);
  }
  const ::flatbuffers::String *type_name() const {
    return GetPointer<const ::flatbuffers::String *>(VT_TYPE_NAME);
  }
  uint32_t version() const {
    return GetField<uint32_t>(VT_VERSION, 0);
  }
  template <bool B = false>
  bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyFieldRequired<Flat::Bigfoot::UUID>(verifier, VT_UUID, 1) &&
           VerifyOffsetRequired(verifier, VT_NAME) &&
           verifier.VerifyString(name()) &&
           VerifyFieldRequired<Flat::Bigfoot::AssetTypeID>(verifier, VT_TYPE_ID, 8) &&
           VerifyOffsetRequired(verifier, VT_TYPE_NAME) &&
           verifier.VerifyString(type_name()) &&
           VerifyField<uint32_t>(verifier, VT_VERSION, 4) &&
           verifier.EndTable();
  }
  AssetHeaderT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(AssetHeaderT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<AssetHeader> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct AssetHeaderBuilder {
  typedef AssetHeader Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_uuid(const Flat::Bigfoot::UUID *uuid) {
    fbb_.AddStruct(AssetHeader::VT_UUID, uuid);
  }
  void add_name(::flatbuffers::Offset<::flatbuffers::String> name) {
    fbb_.AddOffset(AssetHeader::VT_NAME, name);
  }
  void add_type_id(const Flat::Bigfoot::AssetTypeID *type_id) {
    fbb_.AddStruct(AssetHeader::VT_TYPE_ID, type_id);
  }
  void add_type_name(::flatbuffers::Offset<::flatbuffers::String> type_name) {
    fbb_.AddOffset(AssetHeader::VT_TYPE_NAME, type_name);
  }
  void add_version(uint32_t version) {
    fbb_.AddElement<uint32_t>(AssetHeader::VT_VERSION, version, 0);
  }
  explicit AssetHeaderBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<AssetHeader> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<AssetHeader>(end);
    fbb_.Required(o, AssetHeader::VT_UUID);
    fbb_.Required(o, AssetHeader::VT_NAME);
    fbb_.Required(o, AssetHeader::VT_TYPE_ID);
    fbb_.Required(o, AssetHeader::VT_TYPE_NAME);
    return o;
  }
};

inline ::flatbuffers::Offset<AssetHeader> CreateAssetHeader(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    const Flat::Bigfoot::UUID *uuid = nullptr,
    ::flatbuffers::Offset<::flatbuffers::String> name = 0,
    const Flat::Bigfoot::AssetTypeID *type_id = nullptr,
    ::flatbuffers::Offset<::flatbuffers::String> type_name = 0,
    uint32_t version = 0) {
  AssetHeaderBuilder builder_(_fbb);
  builder_.add_version(version);
  builder_.add_type_name(type_name);
  builder_.add_type_id(type_id);
  builder_.add_name(name);
  builder_.add_uuid(uuid);
  return builder_.Finish();
}

struct AssetHeader::Traits {
  using type = AssetHeader;
  static auto constexpr Create = CreateAssetHeader;
};

::flatbuffers::Offset<AssetHeader> CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);

struct AssetT : public ::flatbuffers::NativeTable {
  typedef Asset TableType;
  static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
    return "Flat.Bigfoot.AssetT";
  }
  eastl::unique_ptr<Flat::Bigfoot::AssetHeaderT> header{};
  eastl::vector<uint8_t> inner_asset{};
  AssetT() = default;
  AssetT(const AssetT &o);
  AssetT(AssetT&&) FLATBUFFERS_NOEXCEPT = default;
  AssetT &operator=(AssetT o) FLATBUFFERS_NOEXCEPT;
};

struct Asset FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef AssetT NativeTableType;
  typedef AssetBuilder Builder;
  struct Traits;
  static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
    return AssetTypeTable();
  }
  static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
    return "Flat.Bigfoot.Asset";
  }
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_HEADER = 4,
    VT_INNER_ASSET = 6
  };
  const Flat::Bigfoot::AssetHeader *header() const {
    return GetPointer<const Flat::Bigfoot::AssetHeader *>(VT_HEADER);
  }
  const ::flatbuffers::Vector<uint8_t> *inner_asset() const {
    return GetPointer<const ::flatbuffers::Vector<uint8_t> *>(VT_INNER_ASSET);
  }
  template <bool B = false>
  bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyOffsetRequired(verifier, VT_HEADER) &&
           verifier.VerifyTable(header()) &&
           VerifyOffsetRequired(verifier, VT_INNER_ASSET) &&
           verifier.VerifyVector(inner_asset()) &&
           verifier.EndTable();
  }
  AssetT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(AssetT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<Asset> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct AssetBuilder {
  typedef Asset Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_header(::flatbuffers::Offset<Flat::Bigfoot::AssetHeader> header) {
    fbb_.AddOffset(Asset::VT_HEADER, header);
  }
  void add_inner_asset(::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> inner_asset) {
    fbb_.AddOffset(Asset::VT_INNER_ASSET, inner_asset);
  }
  explicit AssetBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<Asset> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<Asset>(end);
    fbb_.Required(o, Asset::VT_HEADER);
    fbb_.Required(o, Asset::VT_INNER_ASSET);
    return o;
  }
};

inline ::flatbuffers::Offset<Asset> CreateAsset(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    ::flatbuffers::Offset<Flat::Bigfoot::AssetHeader> header = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> inner_asset = 0) {
  AssetBuilder builder_(_fbb);
  builder_.add_inner_asset(inner_asset);
  builder_.add_header(header);
  return builder_.Finish();
}

struct Asset::Traits {
  using type = Asset;
  static auto constexpr Create = CreateAsset;
};

::flatbuffers::Offset<Asset> CreateAsset(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);

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

inline void AssetHeader::UnPackTo(AssetHeaderT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = uuid(); if (_e) _o->uuid = ::flatbuffers::UnPack(*_e); }
  { auto _e = name(); if (_e) _o->name = eastl::string(_e->c_str(), _e->size()); }
  { auto _e = type_id(); if (_e) _o->type_id = ::flatbuffers::UnPack(*_e); }
  { auto _e = type_name(); if (_e) _o->type_name = eastl::string(_e->c_str(), _e->size()); }
  { auto _e = version(); _o->version = _e; }
}

inline ::flatbuffers::Offset<AssetHeader> CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return AssetHeader::Pack(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<AssetHeader> AssetHeader::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetHeaderT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _uuid = ::flatbuffers::Pack(_o->uuid);
  auto _name = _fbb.CreateString(_o->name);
  auto _type_id = ::flatbuffers::Pack(_o->type_id);
  auto _type_name = _fbb.CreateString(_o->type_name);
  auto _version = _o->version;
  return Flat::Bigfoot::CreateAssetHeader(
      _fbb,
      &_uuid,
      _name,
      &_type_id,
      _type_name,
      _version);
}

inline AssetT::AssetT(const AssetT &o)
      : header((o.header) ? new Flat::Bigfoot::AssetHeaderT(*o.header) : nullptr),
        inner_asset(o.inner_asset) {
}

inline AssetT &AssetT::operator=(AssetT o) FLATBUFFERS_NOEXCEPT {
  std::swap(header, o.header);
  std::swap(inner_asset, o.inner_asset);
  return *this;
}

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

inline void Asset::UnPackTo(AssetT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = header(); if (_e) { if(_o->header) { _e->UnPackTo(_o->header.get(), _resolver); } else { _o->header = eastl::unique_ptr<Flat::Bigfoot::AssetHeaderT>(_e->UnPack(_resolver)); } } else if (_o->header) { _o->header.reset(); } }
  { auto _e = inner_asset(); if (_e) { _o->inner_asset.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->inner_asset.begin()); } }
}

inline ::flatbuffers::Offset<Asset> CreateAsset(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return Asset::Pack(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<Asset> Asset::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _header = _o->header ? CreateAssetHeader(_fbb, _o->header.get(), _rehasher) : 0;
  auto _inner_asset = _fbb.CreateVector(_o->inner_asset.data(), _o->inner_asset.size());
  return Flat::Bigfoot::CreateAsset(
      _fbb,
      _header,
      _inner_asset);
}

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

inline const ::flatbuffers::TypeTable *AssetTypeTable() {
  static const ::flatbuffers::TypeCode type_codes[] = {
    { ::flatbuffers::ET_SEQUENCE, 0, 0 },
    { ::flatbuffers::ET_UCHAR, 1, -1 }
  };
  static const ::flatbuffers::TypeFunction type_refs[] = {
    Flat::Bigfoot::AssetHeaderTypeTable
  };
  static const ::flatbuffers::TypeTable tt = {
    ::flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, nullptr
  };
  return &tt;
}

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

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

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

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

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

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

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

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

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

}  // namespace Bigfoot
}  // namespace Flat

#endif  // FLATBUFFERS_GENERATED_ASSET_FLAT_BIGFOOT_H_
