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

#include <array>
#include <string_view>

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

#include "history_types.h"

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

namespace dwarfs::thrift::history {

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

auto dwarfs_version::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, patch_) ||
         ::dtld::should_write_regular(opts, is_release_);
}

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() ||
         version_.has_any_fields_for_write(opts) ||
         ::dtld::should_write_regular(opts, system_id_) ||
         ::dtld::should_write_regular(opts, compiler_id_);
}

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

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

} // namespace dwarfs::thrift::history

namespace dwarfs::thrift_lite {

} // namespace dwarfs::thrift_lite
