#>cpp
#pragma once
#include <string>

#include "raft/snapshot_metadata.capnp.h"
#include "utils/typeinfo.hpp"
cpp<#

(lcp:namespace raft)

(lcp:capnp-namespace "raft")

(lcp:define-struct snapshot-metadata ()
  ((last-included-term :uint64_t)
   (last-included-index :uint64_t)
   (snapshot-filename "std::string"))
   (:public #>cpp
   SnapshotMetadata() = default;
   SnapshotMetadata(uint64_t _last_included_term, uint64_t _last_included_index,
                    const std::string &_snapshot_filename)
       : last_included_term(_last_included_term),
         last_included_index(_last_included_index),
         snapshot_filename(_snapshot_filename) {}
   cpp<#)
  (:serialize (:slk) (:capnp)))

(lcp:pop-namespace) ;; raft
