// @generated by thrift-lite.py; do not edit.
#pragma once

#include <bitset>
#include <cstddef>
#include <cstdint>
#include <map>
#include <set>
#include <span>
#include <string>
#include <string_view>
#include <vector>

#include <dwarfs/thrift_lite/concepts.h>
#include <dwarfs/thrift_lite/enum_traits.h>
#include <dwarfs/thrift_lite/field_ref.h>
#include <dwarfs/thrift_lite/types.h>

namespace dwarfs::thrift_lite {

struct writer_options;

} // namespace dwarfs::thrift_lite

namespace dwarfs::thrift::metadata {

using UInt8 = std::uint8_t;
using UInt16 = std::uint16_t;
using UInt32 = std::uint32_t;
using UInt64 = std::uint64_t;

class chunk final {
 public:
  chunk();
  chunk(chunk const&);
  chunk(chunk&&) noexcept;
  auto operator=(chunk const&) -> chunk&;
  auto operator=(chunk&&) noexcept -> chunk&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(chunk const& lhs, chunk const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto block() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{block_};
  }
  auto block_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{block_};
  }
  auto block() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{block_};
  }
  auto block_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{block_};
  }

  auto offset() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{offset_};
  }
  auto offset_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{offset_};
  }
  auto offset() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{offset_};
  }
  auto offset_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{offset_};
  }

  auto size() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{size_};
  }
  auto size_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{size_};
  }
  auto size() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{size_};
  }
  auto size_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{size_};
  }

 private:
  UInt32 block_{};
  UInt32 offset_{};
  UInt32 size_{};
};

class directory final {
 public:
  directory();
  directory(directory const&);
  directory(directory&&) noexcept;
  auto operator=(directory const&) -> directory&;
  auto operator=(directory&&) noexcept -> directory&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(directory const& lhs, directory const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto parent_entry() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{parent_entry_};
  }
  auto parent_entry_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{parent_entry_};
  }
  auto parent_entry() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{parent_entry_};
  }
  auto parent_entry_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{parent_entry_};
  }

  auto first_entry() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{first_entry_};
  }
  auto first_entry_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{first_entry_};
  }
  auto first_entry() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{first_entry_};
  }
  auto first_entry_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{first_entry_};
  }

  auto self_entry() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{self_entry_};
  }
  auto self_entry_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{self_entry_};
  }
  auto self_entry() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{self_entry_};
  }
  auto self_entry_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{self_entry_};
  }

 private:
  UInt32 parent_entry_{};
  UInt32 first_entry_{};
  UInt32 self_entry_{};
};

class inode_data final {
 public:
  inode_data();
  inode_data(inode_data const&);
  inode_data(inode_data&&) noexcept;
  auto operator=(inode_data const&) -> inode_data&;
  auto operator=(inode_data&&) noexcept -> inode_data&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(inode_data const& lhs, inode_data const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto mode_index() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{mode_index_};
  }
  auto mode_index_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{mode_index_};
  }
  auto mode_index() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{mode_index_};
  }
  auto mode_index_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{mode_index_};
  }

  auto owner_index() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{owner_index_};
  }
  auto owner_index_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{owner_index_};
  }
  auto owner_index() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{owner_index_};
  }
  auto owner_index_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{owner_index_};
  }

  auto group_index() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{group_index_};
  }
  auto group_index_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{group_index_};
  }
  auto group_index() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{group_index_};
  }
  auto group_index_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{group_index_};
  }

  auto atime_offset() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{atime_offset_};
  }
  auto atime_offset_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{atime_offset_};
  }
  auto atime_offset() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{atime_offset_};
  }
  auto atime_offset_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{atime_offset_};
  }

  auto mtime_offset() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{mtime_offset_};
  }
  auto mtime_offset_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{mtime_offset_};
  }
  auto mtime_offset() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{mtime_offset_};
  }
  auto mtime_offset_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{mtime_offset_};
  }

  auto ctime_offset() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{ctime_offset_};
  }
  auto ctime_offset_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{ctime_offset_};
  }
  auto ctime_offset() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{ctime_offset_};
  }
  auto ctime_offset_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{ctime_offset_};
  }

  auto btime_offset() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{btime_offset_};
  }
  auto btime_offset_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{btime_offset_};
  }
  auto btime_offset() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{btime_offset_};
  }
  auto btime_offset_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{btime_offset_};
  }

  auto atime_subsec() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{atime_subsec_};
  }
  auto atime_subsec_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{atime_subsec_};
  }
  auto atime_subsec() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{atime_subsec_};
  }
  auto atime_subsec_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{atime_subsec_};
  }

  auto mtime_subsec() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{mtime_subsec_};
  }
  auto mtime_subsec_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{mtime_subsec_};
  }
  auto mtime_subsec() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{mtime_subsec_};
  }
  auto mtime_subsec_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{mtime_subsec_};
  }

  auto ctime_subsec() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{ctime_subsec_};
  }
  auto ctime_subsec_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{ctime_subsec_};
  }
  auto ctime_subsec() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{ctime_subsec_};
  }
  auto ctime_subsec_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{ctime_subsec_};
  }

  auto btime_subsec() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{btime_subsec_};
  }
  auto btime_subsec_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{btime_subsec_};
  }
  auto btime_subsec() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{btime_subsec_};
  }
  auto btime_subsec_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{btime_subsec_};
  }

  auto nlink_minus_one() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{nlink_minus_one_};
  }
  auto nlink_minus_one_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{nlink_minus_one_};
  }
  auto nlink_minus_one() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{nlink_minus_one_};
  }
  auto nlink_minus_one_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{nlink_minus_one_};
  }

  auto name_index_v2_2() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{name_index_v2_2_};
  }
  auto name_index_v2_2_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{name_index_v2_2_};
  }
  auto name_index_v2_2() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{name_index_v2_2_};
  }
  auto name_index_v2_2_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{name_index_v2_2_};
  }

  auto inode_v2_2() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{inode_v2_2_};
  }
  auto inode_v2_2_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{inode_v2_2_};
  }
  auto inode_v2_2() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{inode_v2_2_};
  }
  auto inode_v2_2_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{inode_v2_2_};
  }

 private:
  UInt32 mode_index_{};
  UInt32 owner_index_{};
  UInt32 group_index_{};
  UInt64 atime_offset_{};
  UInt64 mtime_offset_{};
  UInt64 ctime_offset_{};
  UInt64 btime_offset_{};
  UInt64 atime_subsec_{};
  UInt64 mtime_subsec_{};
  UInt64 ctime_subsec_{};
  UInt64 btime_subsec_{};
  UInt32 nlink_minus_one_{};
  UInt32 name_index_v2_2_{};
  UInt32 inode_v2_2_{};
};

class dir_entry final {
 public:
  dir_entry();
  dir_entry(dir_entry const&);
  dir_entry(dir_entry&&) noexcept;
  auto operator=(dir_entry const&) -> dir_entry&;
  auto operator=(dir_entry&&) noexcept -> dir_entry&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(dir_entry const& lhs, dir_entry const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto name_index() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{name_index_};
  }
  auto name_index_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{name_index_};
  }
  auto name_index() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{name_index_};
  }
  auto name_index_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{name_index_};
  }

  auto inode_num() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{inode_num_};
  }
  auto inode_num_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{inode_num_};
  }
  auto inode_num() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{inode_num_};
  }
  auto inode_num_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{inode_num_};
  }

 private:
  UInt32 name_index_{};
  UInt32 inode_num_{};
};

class fs_options final {
 public:
  fs_options();
  fs_options(fs_options const&);
  fs_options(fs_options&&) noexcept;
  auto operator=(fs_options const&) -> fs_options&;
  auto operator=(fs_options&&) noexcept -> fs_options&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(fs_options const& lhs, fs_options const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto mtime_only() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{mtime_only_};
  }
  auto mtime_only_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{mtime_only_};
  }
  auto mtime_only() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{mtime_only_};
  }
  auto mtime_only_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{mtime_only_};
  }

  auto time_resolution_sec() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32&, isset_ref>{time_resolution_sec_, isset_[time_resolution_sec_isset_index]};
  }
  auto time_resolution_sec_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32&, isset_ref>{time_resolution_sec_, isset_[time_resolution_sec_isset_index]};
  }
  auto time_resolution_sec() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32 const&, bool>{time_resolution_sec_, isset_.test(time_resolution_sec_isset_index)};
  }
  auto time_resolution_sec_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32 const&, bool>{time_resolution_sec_, isset_.test(time_resolution_sec_isset_index)};
  }

  auto packed_chunk_table() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{packed_chunk_table_};
  }
  auto packed_chunk_table_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{packed_chunk_table_};
  }
  auto packed_chunk_table() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{packed_chunk_table_};
  }
  auto packed_chunk_table_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{packed_chunk_table_};
  }

  auto packed_directories() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{packed_directories_};
  }
  auto packed_directories_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{packed_directories_};
  }
  auto packed_directories() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{packed_directories_};
  }
  auto packed_directories_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{packed_directories_};
  }

  auto packed_shared_files_table() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{packed_shared_files_table_};
  }
  auto packed_shared_files_table_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{packed_shared_files_table_};
  }
  auto packed_shared_files_table() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{packed_shared_files_table_};
  }
  auto packed_shared_files_table_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{packed_shared_files_table_};
  }

  auto subsecond_resolution_nsec_multiplier() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32&, isset_ref>{subsecond_resolution_nsec_multiplier_, isset_[subsecond_resolution_nsec_multiplier_isset_index]};
  }
  auto subsecond_resolution_nsec_multiplier_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32&, isset_ref>{subsecond_resolution_nsec_multiplier_, isset_[subsecond_resolution_nsec_multiplier_isset_index]};
  }
  auto subsecond_resolution_nsec_multiplier() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32 const&, bool>{subsecond_resolution_nsec_multiplier_, isset_.test(subsecond_resolution_nsec_multiplier_isset_index)};
  }
  auto subsecond_resolution_nsec_multiplier_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32 const&, bool>{subsecond_resolution_nsec_multiplier_, isset_.test(subsecond_resolution_nsec_multiplier_isset_index)};
  }

  auto has_btime() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{has_btime_};
  }
  auto has_btime_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{has_btime_};
  }
  auto has_btime() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{has_btime_};
  }
  auto has_btime_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{has_btime_};
  }

  auto inodes_have_nlink() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{inodes_have_nlink_};
  }
  auto inodes_have_nlink_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{inodes_have_nlink_};
  }
  auto inodes_have_nlink() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{inodes_have_nlink_};
  }
  auto inodes_have_nlink_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{inodes_have_nlink_};
  }

 private:
  static constexpr auto time_resolution_sec_isset_index = std::size_t{0};
  static constexpr auto subsecond_resolution_nsec_multiplier_isset_index = std::size_t{1};
  using isset_type = std::bitset<2>;
  using isset_ref = isset_type::reference;
  isset_type isset_{};
  bool mtime_only_{};
  UInt32 time_resolution_sec_{};
  bool packed_chunk_table_{};
  bool packed_directories_{};
  bool packed_shared_files_table_{};
  UInt32 subsecond_resolution_nsec_multiplier_{};
  bool has_btime_{};
  bool inodes_have_nlink_{};
};

class string_table final {
 public:
  string_table();
  string_table(string_table const&);
  string_table(string_table&&) noexcept;
  auto operator=(string_table const&) -> string_table&;
  auto operator=(string_table&&) noexcept -> string_table&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(string_table const& lhs, string_table const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto buffer() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::string&>{buffer_};
  }
  auto buffer_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::string&>{buffer_};
  }
  auto buffer() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::string const&>{buffer_};
  }
  auto buffer_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::string const&>{buffer_};
  }

  auto symtab() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string&, isset_ref>{symtab_, isset_[symtab_isset_index]};
  }
  auto symtab_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string&, isset_ref>{symtab_, isset_[symtab_isset_index]};
  }
  auto symtab() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string const&, bool>{symtab_, isset_.test(symtab_isset_index)};
  }
  auto symtab_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string const&, bool>{symtab_, isset_.test(symtab_isset_index)};
  }

  auto index() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{index_};
  }
  auto index_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{index_};
  }
  auto index() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{index_};
  }
  auto index_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{index_};
  }

  auto packed_index() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{packed_index_};
  }
  auto packed_index_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{packed_index_};
  }
  auto packed_index() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{packed_index_};
  }
  auto packed_index_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{packed_index_};
  }

 private:
  static constexpr auto symtab_isset_index = std::size_t{0};
  using isset_type = std::bitset<1>;
  using isset_ref = isset_type::reference;
  isset_type isset_{};
  std::string buffer_{};
  std::string symtab_{};
  std::vector<UInt32> index_{};
  bool packed_index_{};
};

class inode_size_cache final {
 public:
  inode_size_cache();
  inode_size_cache(inode_size_cache const&);
  inode_size_cache(inode_size_cache&&) noexcept;
  auto operator=(inode_size_cache const&) -> inode_size_cache&;
  auto operator=(inode_size_cache&&) noexcept -> inode_size_cache&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(inode_size_cache const& lhs, inode_size_cache const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto size_lookup() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::map<UInt32, UInt64>&>{size_lookup_};
  }
  auto size_lookup_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::map<UInt32, UInt64>&>{size_lookup_};
  }
  auto size_lookup() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::map<UInt32, UInt64> const&>{size_lookup_};
  }
  auto size_lookup_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::map<UInt32, UInt64> const&>{size_lookup_};
  }

  auto min_chunk_count() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{min_chunk_count_};
  }
  auto min_chunk_count_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{min_chunk_count_};
  }
  auto min_chunk_count() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{min_chunk_count_};
  }
  auto min_chunk_count_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{min_chunk_count_};
  }

  auto allocated_size_lookup() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::map<UInt32, UInt64>&>{allocated_size_lookup_};
  }
  auto allocated_size_lookup_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::map<UInt32, UInt64>&>{allocated_size_lookup_};
  }
  auto allocated_size_lookup() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::map<UInt32, UInt64> const&>{allocated_size_lookup_};
  }
  auto allocated_size_lookup_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::map<UInt32, UInt64> const&>{allocated_size_lookup_};
  }

 private:
  std::map<UInt32, UInt64> size_lookup_{};
  UInt64 min_chunk_count_{};
  std::map<UInt32, UInt64> allocated_size_lookup_{};
};

class history_entry final {
 public:
  history_entry();
  history_entry(history_entry const&);
  history_entry(history_entry&&) noexcept;
  auto operator=(history_entry const&) -> history_entry&;
  auto operator=(history_entry&&) noexcept -> history_entry&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(history_entry const& lhs, history_entry const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto major() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{major_};
  }
  auto major_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{major_};
  }
  auto major() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{major_};
  }
  auto major_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{major_};
  }

  auto minor() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{minor_};
  }
  auto minor_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{minor_};
  }
  auto minor() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{minor_};
  }
  auto minor_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{minor_};
  }

  auto dwarfs_version() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string&, isset_ref>{dwarfs_version_, isset_[dwarfs_version_isset_index]};
  }
  auto dwarfs_version_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string&, isset_ref>{dwarfs_version_, isset_[dwarfs_version_isset_index]};
  }
  auto dwarfs_version() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string const&, bool>{dwarfs_version_, isset_.test(dwarfs_version_isset_index)};
  }
  auto dwarfs_version_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string const&, bool>{dwarfs_version_, isset_.test(dwarfs_version_isset_index)};
  }

  auto block_size() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{block_size_};
  }
  auto block_size_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{block_size_};
  }
  auto block_size() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{block_size_};
  }
  auto block_size_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{block_size_};
  }

  auto options() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<fs_options&, isset_ref>{options_, isset_[options_isset_index]};
  }
  auto options_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<fs_options&, isset_ref>{options_, isset_[options_isset_index]};
  }
  auto options() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<fs_options const&, bool>{options_, isset_.test(options_isset_index)};
  }
  auto options_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<fs_options const&, bool>{options_, isset_.test(options_isset_index)};
  }

 private:
  static constexpr auto dwarfs_version_isset_index = std::size_t{0};
  static constexpr auto options_isset_index = std::size_t{1};
  using isset_type = std::bitset<2>;
  using isset_ref = isset_type::reference;
  isset_type isset_{};
  UInt8 major_{};
  UInt8 minor_{};
  std::string dwarfs_version_{};
  UInt32 block_size_{};
  fs_options options_{};
};

class metadata final {
 public:
  metadata();
  metadata(metadata const&);
  metadata(metadata&&) noexcept;
  auto operator=(metadata const&) -> metadata&;
  auto operator=(metadata&&) noexcept -> metadata&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(metadata const& lhs, metadata const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto chunks() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<chunk>&>{chunks_};
  }
  auto chunks_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<chunk>&>{chunks_};
  }
  auto chunks() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<chunk> const&>{chunks_};
  }
  auto chunks_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<chunk> const&>{chunks_};
  }

  auto directories() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<directory>&>{directories_};
  }
  auto directories_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<directory>&>{directories_};
  }
  auto directories() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<directory> const&>{directories_};
  }
  auto directories_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<directory> const&>{directories_};
  }

  auto inodes() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<inode_data>&>{inodes_};
  }
  auto inodes_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<inode_data>&>{inodes_};
  }
  auto inodes() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<inode_data> const&>{inodes_};
  }
  auto inodes_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<inode_data> const&>{inodes_};
  }

  auto chunk_table() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{chunk_table_};
  }
  auto chunk_table_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{chunk_table_};
  }
  auto chunk_table() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{chunk_table_};
  }
  auto chunk_table_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{chunk_table_};
  }

  auto entry_table_v2_2() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{entry_table_v2_2_};
  }
  auto entry_table_v2_2_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{entry_table_v2_2_};
  }
  auto entry_table_v2_2() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{entry_table_v2_2_};
  }
  auto entry_table_v2_2_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{entry_table_v2_2_};
  }

  auto symlink_table() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{symlink_table_};
  }
  auto symlink_table_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{symlink_table_};
  }
  auto symlink_table() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{symlink_table_};
  }
  auto symlink_table_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{symlink_table_};
  }

  auto uids() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{uids_};
  }
  auto uids_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{uids_};
  }
  auto uids() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{uids_};
  }
  auto uids_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{uids_};
  }

  auto gids() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{gids_};
  }
  auto gids_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{gids_};
  }
  auto gids() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{gids_};
  }
  auto gids_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{gids_};
  }

  auto modes() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{modes_};
  }
  auto modes_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32>&>{modes_};
  }
  auto modes() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{modes_};
  }
  auto modes_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<UInt32> const&>{modes_};
  }

  auto names() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<std::string>&>{names_};
  }
  auto names_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<std::string>&>{names_};
  }
  auto names() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<std::string> const&>{names_};
  }
  auto names_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<std::string> const&>{names_};
  }

  auto symlinks() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<std::string>&>{symlinks_};
  }
  auto symlinks_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<std::string>&>{symlinks_};
  }
  auto symlinks() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<std::string> const&>{symlinks_};
  }
  auto symlinks_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<std::vector<std::string> const&>{symlinks_};
  }

  auto timestamp_base() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{timestamp_base_};
  }
  auto timestamp_base_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{timestamp_base_};
  }
  auto timestamp_base() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{timestamp_base_};
  }
  auto timestamp_base_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{timestamp_base_};
  }

  auto block_size() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{block_size_};
  }
  auto block_size_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{block_size_};
  }
  auto block_size() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{block_size_};
  }
  auto block_size_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{block_size_};
  }

  auto total_fs_size() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{total_fs_size_};
  }
  auto total_fs_size_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64&>{total_fs_size_};
  }
  auto total_fs_size() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{total_fs_size_};
  }
  auto total_fs_size_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt64 const&>{total_fs_size_};
  }

  auto devices() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt64>&, isset_ref>{devices_, isset_[devices_isset_index]};
  }
  auto devices_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt64>&, isset_ref>{devices_, isset_[devices_isset_index]};
  }
  auto devices() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt64> const&, bool>{devices_, isset_.test(devices_isset_index)};
  }
  auto devices_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt64> const&, bool>{devices_, isset_.test(devices_isset_index)};
  }

  auto options() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<fs_options&, isset_ref>{options_, isset_[options_isset_index]};
  }
  auto options_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<fs_options&, isset_ref>{options_, isset_[options_isset_index]};
  }
  auto options() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<fs_options const&, bool>{options_, isset_.test(options_isset_index)};
  }
  auto options_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<fs_options const&, bool>{options_, isset_.test(options_isset_index)};
  }

  auto dir_entries() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<dir_entry>&, isset_ref>{dir_entries_, isset_[dir_entries_isset_index]};
  }
  auto dir_entries_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<dir_entry>&, isset_ref>{dir_entries_, isset_[dir_entries_isset_index]};
  }
  auto dir_entries() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<dir_entry> const&, bool>{dir_entries_, isset_.test(dir_entries_isset_index)};
  }
  auto dir_entries_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<dir_entry> const&, bool>{dir_entries_, isset_.test(dir_entries_isset_index)};
  }

  auto shared_files_table() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt32>&, isset_ref>{shared_files_table_, isset_[shared_files_table_isset_index]};
  }
  auto shared_files_table_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt32>&, isset_ref>{shared_files_table_, isset_[shared_files_table_isset_index]};
  }
  auto shared_files_table() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt32> const&, bool>{shared_files_table_, isset_.test(shared_files_table_isset_index)};
  }
  auto shared_files_table_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt32> const&, bool>{shared_files_table_, isset_.test(shared_files_table_isset_index)};
  }

  auto total_hardlink_size() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64&, isset_ref>{total_hardlink_size_, isset_[total_hardlink_size_isset_index]};
  }
  auto total_hardlink_size_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64&, isset_ref>{total_hardlink_size_, isset_[total_hardlink_size_isset_index]};
  }
  auto total_hardlink_size() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64 const&, bool>{total_hardlink_size_, isset_.test(total_hardlink_size_isset_index)};
  }
  auto total_hardlink_size_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64 const&, bool>{total_hardlink_size_, isset_.test(total_hardlink_size_isset_index)};
  }

  auto dwarfs_version() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string&, isset_ref>{dwarfs_version_, isset_[dwarfs_version_isset_index]};
  }
  auto dwarfs_version_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string&, isset_ref>{dwarfs_version_, isset_[dwarfs_version_isset_index]};
  }
  auto dwarfs_version() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string const&, bool>{dwarfs_version_, isset_.test(dwarfs_version_isset_index)};
  }
  auto dwarfs_version_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::string const&, bool>{dwarfs_version_, isset_.test(dwarfs_version_isset_index)};
  }

  auto create_timestamp() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64&, isset_ref>{create_timestamp_, isset_[create_timestamp_isset_index]};
  }
  auto create_timestamp_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64&, isset_ref>{create_timestamp_, isset_[create_timestamp_isset_index]};
  }
  auto create_timestamp() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64 const&, bool>{create_timestamp_, isset_.test(create_timestamp_isset_index)};
  }
  auto create_timestamp_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64 const&, bool>{create_timestamp_, isset_.test(create_timestamp_isset_index)};
  }

  auto compact_names() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<string_table&, isset_ref>{compact_names_, isset_[compact_names_isset_index]};
  }
  auto compact_names_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<string_table&, isset_ref>{compact_names_, isset_[compact_names_isset_index]};
  }
  auto compact_names() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<string_table const&, bool>{compact_names_, isset_.test(compact_names_isset_index)};
  }
  auto compact_names_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<string_table const&, bool>{compact_names_, isset_.test(compact_names_isset_index)};
  }

  auto compact_symlinks() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<string_table&, isset_ref>{compact_symlinks_, isset_[compact_symlinks_isset_index]};
  }
  auto compact_symlinks_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<string_table&, isset_ref>{compact_symlinks_, isset_[compact_symlinks_isset_index]};
  }
  auto compact_symlinks() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<string_table const&, bool>{compact_symlinks_, isset_.test(compact_symlinks_isset_index)};
  }
  auto compact_symlinks_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<string_table const&, bool>{compact_symlinks_, isset_.test(compact_symlinks_isset_index)};
  }

  auto preferred_path_separator() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32&, isset_ref>{preferred_path_separator_, isset_[preferred_path_separator_isset_index]};
  }
  auto preferred_path_separator_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32&, isset_ref>{preferred_path_separator_, isset_[preferred_path_separator_isset_index]};
  }
  auto preferred_path_separator() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32 const&, bool>{preferred_path_separator_, isset_.test(preferred_path_separator_isset_index)};
  }
  auto preferred_path_separator_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32 const&, bool>{preferred_path_separator_, isset_.test(preferred_path_separator_isset_index)};
  }

  auto features() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::set<std::string>&, isset_ref>{features_, isset_[features_isset_index]};
  }
  auto features_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::set<std::string>&, isset_ref>{features_, isset_[features_isset_index]};
  }
  auto features() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::set<std::string> const&, bool>{features_, isset_.test(features_isset_index)};
  }
  auto features_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::set<std::string> const&, bool>{features_, isset_.test(features_isset_index)};
  }

  auto category_names() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<std::string>&, isset_ref>{category_names_, isset_[category_names_isset_index]};
  }
  auto category_names_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<std::string>&, isset_ref>{category_names_, isset_[category_names_isset_index]};
  }
  auto category_names() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<std::string> const&, bool>{category_names_, isset_.test(category_names_isset_index)};
  }
  auto category_names_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<std::string> const&, bool>{category_names_, isset_.test(category_names_isset_index)};
  }

  auto block_categories() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt32>&, isset_ref>{block_categories_, isset_[block_categories_isset_index]};
  }
  auto block_categories_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt32>&, isset_ref>{block_categories_, isset_[block_categories_isset_index]};
  }
  auto block_categories() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt32> const&, bool>{block_categories_, isset_.test(block_categories_isset_index)};
  }
  auto block_categories_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt32> const&, bool>{block_categories_, isset_.test(block_categories_isset_index)};
  }

  auto reg_file_size_cache() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<inode_size_cache&, isset_ref>{reg_file_size_cache_, isset_[reg_file_size_cache_isset_index]};
  }
  auto reg_file_size_cache_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<inode_size_cache&, isset_ref>{reg_file_size_cache_, isset_[reg_file_size_cache_isset_index]};
  }
  auto reg_file_size_cache() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<inode_size_cache const&, bool>{reg_file_size_cache_, isset_.test(reg_file_size_cache_isset_index)};
  }
  auto reg_file_size_cache_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<inode_size_cache const&, bool>{reg_file_size_cache_, isset_.test(reg_file_size_cache_isset_index)};
  }

  auto category_metadata_json() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<std::string>&, isset_ref>{category_metadata_json_, isset_[category_metadata_json_isset_index]};
  }
  auto category_metadata_json_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<std::string>&, isset_ref>{category_metadata_json_, isset_[category_metadata_json_isset_index]};
  }
  auto category_metadata_json() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<std::string> const&, bool>{category_metadata_json_, isset_.test(category_metadata_json_isset_index)};
  }
  auto category_metadata_json_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<std::string> const&, bool>{category_metadata_json_, isset_.test(category_metadata_json_isset_index)};
  }

  auto block_category_metadata() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::map<UInt32, UInt32>&, isset_ref>{block_category_metadata_, isset_[block_category_metadata_isset_index]};
  }
  auto block_category_metadata_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::map<UInt32, UInt32>&, isset_ref>{block_category_metadata_, isset_[block_category_metadata_isset_index]};
  }
  auto block_category_metadata() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::map<UInt32, UInt32> const&, bool>{block_category_metadata_, isset_.test(block_category_metadata_isset_index)};
  }
  auto block_category_metadata_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::map<UInt32, UInt32> const&, bool>{block_category_metadata_, isset_.test(block_category_metadata_isset_index)};
  }

  auto metadata_version_history() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<history_entry>&, isset_ref>{metadata_version_history_, isset_[metadata_version_history_isset_index]};
  }
  auto metadata_version_history_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<history_entry>&, isset_ref>{metadata_version_history_, isset_[metadata_version_history_isset_index]};
  }
  auto metadata_version_history() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<history_entry> const&, bool>{metadata_version_history_, isset_.test(metadata_version_history_isset_index)};
  }
  auto metadata_version_history_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<history_entry> const&, bool>{metadata_version_history_, isset_.test(metadata_version_history_isset_index)};
  }

  auto hole_block_index() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32&, isset_ref>{hole_block_index_, isset_[hole_block_index_isset_index]};
  }
  auto hole_block_index_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32&, isset_ref>{hole_block_index_, isset_[hole_block_index_isset_index]};
  }
  auto hole_block_index() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32 const&, bool>{hole_block_index_, isset_.test(hole_block_index_isset_index)};
  }
  auto hole_block_index_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt32 const&, bool>{hole_block_index_, isset_.test(hole_block_index_isset_index)};
  }

  auto large_hole_size() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt64>&, isset_ref>{large_hole_size_, isset_[large_hole_size_isset_index]};
  }
  auto large_hole_size_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt64>&, isset_ref>{large_hole_size_, isset_[large_hole_size_isset_index]};
  }
  auto large_hole_size() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt64> const&, bool>{large_hole_size_, isset_.test(large_hole_size_isset_index)};
  }
  auto large_hole_size_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<std::vector<UInt64> const&, bool>{large_hole_size_, isset_.test(large_hole_size_isset_index)};
  }

  auto total_allocated_fs_size() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64&, isset_ref>{total_allocated_fs_size_, isset_[total_allocated_fs_size_isset_index]};
  }
  auto total_allocated_fs_size_ref() & noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64&, isset_ref>{total_allocated_fs_size_, isset_[total_allocated_fs_size_isset_index]};
  }
  auto total_allocated_fs_size() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64 const&, bool>{total_allocated_fs_size_, isset_.test(total_allocated_fs_size_isset_index)};
  }
  auto total_allocated_fs_size_ref() const& noexcept {
    return ::dwarfs::thrift_lite::optional_field_ref<UInt64 const&, bool>{total_allocated_fs_size_, isset_.test(total_allocated_fs_size_isset_index)};
  }

 private:
  static constexpr auto devices_isset_index = std::size_t{0};
  static constexpr auto options_isset_index = std::size_t{1};
  static constexpr auto dir_entries_isset_index = std::size_t{2};
  static constexpr auto shared_files_table_isset_index = std::size_t{3};
  static constexpr auto total_hardlink_size_isset_index = std::size_t{4};
  static constexpr auto dwarfs_version_isset_index = std::size_t{5};
  static constexpr auto create_timestamp_isset_index = std::size_t{6};
  static constexpr auto compact_names_isset_index = std::size_t{7};
  static constexpr auto compact_symlinks_isset_index = std::size_t{8};
  static constexpr auto preferred_path_separator_isset_index = std::size_t{9};
  static constexpr auto features_isset_index = std::size_t{10};
  static constexpr auto category_names_isset_index = std::size_t{11};
  static constexpr auto block_categories_isset_index = std::size_t{12};
  static constexpr auto reg_file_size_cache_isset_index = std::size_t{13};
  static constexpr auto category_metadata_json_isset_index = std::size_t{14};
  static constexpr auto block_category_metadata_isset_index = std::size_t{15};
  static constexpr auto metadata_version_history_isset_index = std::size_t{16};
  static constexpr auto hole_block_index_isset_index = std::size_t{17};
  static constexpr auto large_hole_size_isset_index = std::size_t{18};
  static constexpr auto total_allocated_fs_size_isset_index = std::size_t{19};
  using isset_type = std::bitset<20>;
  using isset_ref = isset_type::reference;
  isset_type isset_{};
  std::vector<chunk> chunks_{};
  std::vector<directory> directories_{};
  std::vector<inode_data> inodes_{};
  std::vector<UInt32> chunk_table_{};
  std::vector<UInt32> entry_table_v2_2_{};
  std::vector<UInt32> symlink_table_{};
  std::vector<UInt32> uids_{};
  std::vector<UInt32> gids_{};
  std::vector<UInt32> modes_{};
  std::vector<std::string> names_{};
  std::vector<std::string> symlinks_{};
  UInt64 timestamp_base_{};
  UInt32 block_size_{};
  UInt64 total_fs_size_{};
  std::vector<UInt64> devices_{};
  fs_options options_{};
  std::vector<dir_entry> dir_entries_{};
  std::vector<UInt32> shared_files_table_{};
  UInt64 total_hardlink_size_{};
  std::string dwarfs_version_{};
  UInt64 create_timestamp_{};
  string_table compact_names_{};
  string_table compact_symlinks_{};
  UInt32 preferred_path_separator_{};
  std::set<std::string> features_{};
  std::vector<std::string> category_names_{};
  std::vector<UInt32> block_categories_{};
  inode_size_cache reg_file_size_cache_{};
  std::vector<std::string> category_metadata_json_{};
  std::map<UInt32, UInt32> block_category_metadata_{};
  std::vector<history_entry> metadata_version_history_{};
  UInt32 hole_block_index_{};
  std::vector<UInt64> large_hole_size_{};
  UInt64 total_allocated_fs_size_{};
};

} // namespace dwarfs::thrift::metadata

namespace dwarfs::thrift_lite {

} // namespace dwarfs::thrift_lite

#include "metadata_types-inl.h"
