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

#include <array>
#include <string_view>

#include <dwarfs/thrift_lite/detail/protocol_helpers.h>

#include "metadata_types.h"

using namespace std::string_view_literals;
namespace dtl = ::dwarfs::thrift_lite;
namespace dtld = ::dwarfs::thrift_lite::detail;

namespace dwarfs::thrift::metadata {

chunk::chunk() = default;
chunk::chunk(chunk const&) = default;
chunk::chunk(chunk&&) noexcept = default;
auto chunk::operator=(chunk const&) -> chunk& = default;
auto chunk::operator=(chunk&&) noexcept -> chunk& = default;

auto chunk::has_any_fields_for_write(::dtl::writer_options const& opts [[maybe_unused]]) const noexcept -> bool {
  return ::dtld::should_write_regular(opts, block_) ||
         ::dtld::should_write_regular(opts, offset_) ||
         ::dtld::should_write_regular(opts, size_);
}

directory::directory() = default;
directory::directory(directory const&) = default;
directory::directory(directory&&) noexcept = default;
auto directory::operator=(directory const&) -> directory& = default;
auto directory::operator=(directory&&) noexcept -> directory& = default;

auto directory::has_any_fields_for_write(::dtl::writer_options const& opts [[maybe_unused]]) const noexcept -> bool {
  return ::dtld::should_write_regular(opts, parent_entry_) ||
         ::dtld::should_write_regular(opts, first_entry_) ||
         ::dtld::should_write_regular(opts, self_entry_);
}

inode_data::inode_data() = default;
inode_data::inode_data(inode_data const&) = default;
inode_data::inode_data(inode_data&&) noexcept = default;
auto inode_data::operator=(inode_data const&) -> inode_data& = default;
auto inode_data::operator=(inode_data&&) noexcept -> inode_data& = default;

auto inode_data::has_any_fields_for_write(::dtl::writer_options const& opts [[maybe_unused]]) const noexcept -> bool {
  return ::dtld::should_write_regular(opts, mode_index_) ||
         ::dtld::should_write_regular(opts, owner_index_) ||
         ::dtld::should_write_regular(opts, group_index_) ||
         ::dtld::should_write_regular(opts, atime_offset_) ||
         ::dtld::should_write_regular(opts, mtime_offset_) ||
         ::dtld::should_write_regular(opts, ctime_offset_) ||
         ::dtld::should_write_regular(opts, btime_offset_) ||
         ::dtld::should_write_regular(opts, atime_subsec_) ||
         ::dtld::should_write_regular(opts, mtime_subsec_) ||
         ::dtld::should_write_regular(opts, ctime_subsec_) ||
         ::dtld::should_write_regular(opts, btime_subsec_) ||
         ::dtld::should_write_regular(opts, nlink_minus_one_) ||
         ::dtld::should_write_regular(opts, name_index_v2_2_) ||
         ::dtld::should_write_regular(opts, inode_v2_2_);
}

dir_entry::dir_entry() = default;
dir_entry::dir_entry(dir_entry const&) = default;
dir_entry::dir_entry(dir_entry&&) noexcept = default;
auto dir_entry::operator=(dir_entry const&) -> dir_entry& = default;
auto dir_entry::operator=(dir_entry&&) noexcept -> dir_entry& = default;

auto dir_entry::has_any_fields_for_write(::dtl::writer_options const& opts [[maybe_unused]]) const noexcept -> bool {
  return ::dtld::should_write_regular(opts, name_index_) ||
         ::dtld::should_write_regular(opts, inode_num_);
}

fs_options::fs_options() = default;
fs_options::fs_options(fs_options const&) = default;
fs_options::fs_options(fs_options&&) noexcept = default;
auto fs_options::operator=(fs_options const&) -> fs_options& = default;
auto fs_options::operator=(fs_options&&) noexcept -> fs_options& = default;

auto fs_options::has_any_fields_for_write(::dtl::writer_options const& opts [[maybe_unused]]) const noexcept -> bool {
  return isset_.any() ||
         ::dtld::should_write_regular(opts, mtime_only_) ||
         ::dtld::should_write_regular(opts, packed_chunk_table_) ||
         ::dtld::should_write_regular(opts, packed_directories_) ||
         ::dtld::should_write_regular(opts, packed_shared_files_table_) ||
         ::dtld::should_write_regular(opts, has_btime_) ||
         ::dtld::should_write_regular(opts, inodes_have_nlink_);
}

string_table::string_table() = default;
string_table::string_table(string_table const&) = default;
string_table::string_table(string_table&&) noexcept = default;
auto string_table::operator=(string_table const&) -> string_table& = default;
auto string_table::operator=(string_table&&) noexcept -> string_table& = default;

auto string_table::has_any_fields_for_write(::dtl::writer_options const& opts [[maybe_unused]]) const noexcept -> bool {
  return isset_.any() ||
         ::dtld::should_write_regular(opts, buffer_) ||
         ::dtld::should_write_regular(opts, index_) ||
         ::dtld::should_write_regular(opts, packed_index_);
}

inode_size_cache::inode_size_cache() = default;
inode_size_cache::inode_size_cache(inode_size_cache const&) = default;
inode_size_cache::inode_size_cache(inode_size_cache&&) noexcept = default;
auto inode_size_cache::operator=(inode_size_cache const&) -> inode_size_cache& = default;
auto inode_size_cache::operator=(inode_size_cache&&) noexcept -> inode_size_cache& = default;

auto inode_size_cache::has_any_fields_for_write(::dtl::writer_options const& opts [[maybe_unused]]) const noexcept -> bool {
  return ::dtld::should_write_regular(opts, size_lookup_) ||
         ::dtld::should_write_regular(opts, min_chunk_count_) ||
         ::dtld::should_write_regular(opts, allocated_size_lookup_);
}

history_entry::history_entry() = default;
history_entry::history_entry(history_entry const&) = default;
history_entry::history_entry(history_entry&&) noexcept = default;
auto history_entry::operator=(history_entry const&) -> history_entry& = default;
auto history_entry::operator=(history_entry&&) noexcept -> history_entry& = default;

auto history_entry::has_any_fields_for_write(::dtl::writer_options const& opts [[maybe_unused]]) const noexcept -> bool {
  return isset_.any() ||
         ::dtld::should_write_regular(opts, major_) ||
         ::dtld::should_write_regular(opts, minor_) ||
         ::dtld::should_write_regular(opts, block_size_);
}

metadata::metadata() = default;
metadata::metadata(metadata const&) = default;
metadata::metadata(metadata&&) noexcept = default;
auto metadata::operator=(metadata const&) -> metadata& = default;
auto metadata::operator=(metadata&&) noexcept -> metadata& = default;

auto metadata::has_any_fields_for_write(::dtl::writer_options const& opts [[maybe_unused]]) const noexcept -> bool {
  return isset_.any() ||
         ::dtld::should_write_regular(opts, chunks_) ||
         ::dtld::should_write_regular(opts, directories_) ||
         ::dtld::should_write_regular(opts, inodes_) ||
         ::dtld::should_write_regular(opts, chunk_table_) ||
         ::dtld::should_write_regular(opts, entry_table_v2_2_) ||
         ::dtld::should_write_regular(opts, symlink_table_) ||
         ::dtld::should_write_regular(opts, uids_) ||
         ::dtld::should_write_regular(opts, gids_) ||
         ::dtld::should_write_regular(opts, modes_) ||
         ::dtld::should_write_regular(opts, names_) ||
         ::dtld::should_write_regular(opts, symlinks_) ||
         ::dtld::should_write_regular(opts, timestamp_base_) ||
         ::dtld::should_write_regular(opts, block_size_) ||
         ::dtld::should_write_regular(opts, total_fs_size_);
}

} // namespace dwarfs::thrift::metadata

namespace dwarfs::thrift_lite {

} // namespace dwarfs::thrift_lite
