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


#ifndef FLATBUFFERS_GENERATED_CALMETADATA_H_
#define FLATBUFFERS_GENERATED_CALMETADATA_H_

#include "flatbuffers/flatbuffers.h"

struct Metadata;

struct Metadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_NAME = 4,
    VT_SERIAL = 6,
    VT_TIMESTAMP = 8,
    VT_VERSION_MAJOR = 10,
    VT_VERSION_MINOR = 12
  };
  const flatbuffers::String *name() const {
    return GetPointer<const flatbuffers::String *>(VT_NAME);
  }
  const flatbuffers::String *serial() const {
    return GetPointer<const flatbuffers::String *>(VT_SERIAL);
  }
  uint64_t timestamp() const {
    return GetField<uint64_t>(VT_TIMESTAMP, 0);
  }
  int32_t version_major() const {
    return GetField<int32_t>(VT_VERSION_MAJOR, 0);
  }
  int32_t version_minor() const {
    return GetField<int32_t>(VT_VERSION_MINOR, 0);
  }
  bool Verify(flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyOffset(verifier, VT_NAME) &&
           verifier.VerifyString(name()) &&
           VerifyOffset(verifier, VT_SERIAL) &&
           verifier.VerifyString(serial()) &&
           VerifyField<uint64_t>(verifier, VT_TIMESTAMP) &&
           VerifyField<int32_t>(verifier, VT_VERSION_MAJOR) &&
           VerifyField<int32_t>(verifier, VT_VERSION_MINOR) &&
           verifier.EndTable();
  }
};

struct MetadataBuilder {
  flatbuffers::FlatBufferBuilder &fbb_;
  flatbuffers::uoffset_t start_;
  void add_name(flatbuffers::Offset<flatbuffers::String> name) {
    fbb_.AddOffset(Metadata::VT_NAME, name);
  }
  void add_serial(flatbuffers::Offset<flatbuffers::String> serial) {
    fbb_.AddOffset(Metadata::VT_SERIAL, serial);
  }
  void add_timestamp(uint64_t timestamp) {
    fbb_.AddElement<uint64_t>(Metadata::VT_TIMESTAMP, timestamp, 0);
  }
  void add_version_major(int32_t version_major) {
    fbb_.AddElement<int32_t>(Metadata::VT_VERSION_MAJOR, version_major, 0);
  }
  void add_version_minor(int32_t version_minor) {
    fbb_.AddElement<int32_t>(Metadata::VT_VERSION_MINOR, version_minor, 0);
  }
  explicit MetadataBuilder(flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  MetadataBuilder &operator=(const MetadataBuilder &);
  flatbuffers::Offset<Metadata> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = flatbuffers::Offset<Metadata>(end);
    return o;
  }
};

inline flatbuffers::Offset<Metadata> CreateMetadata(
    flatbuffers::FlatBufferBuilder &_fbb,
    flatbuffers::Offset<flatbuffers::String> name = 0,
    flatbuffers::Offset<flatbuffers::String> serial = 0,
    uint64_t timestamp = 0,
    int32_t version_major = 0,
    int32_t version_minor = 0) {
  MetadataBuilder builder_(_fbb);
  builder_.add_timestamp(timestamp);
  builder_.add_version_minor(version_minor);
  builder_.add_version_major(version_major);
  builder_.add_serial(serial);
  builder_.add_name(name);
  return builder_.Finish();
}

inline flatbuffers::Offset<Metadata> CreateMetadataDirect(
    flatbuffers::FlatBufferBuilder &_fbb,
    const char *name = nullptr,
    const char *serial = nullptr,
    uint64_t timestamp = 0,
    int32_t version_major = 0,
    int32_t version_minor = 0) {
  auto name__ = name ? _fbb.CreateString(name) : 0;
  auto serial__ = serial ? _fbb.CreateString(serial) : 0;
  return CreateMetadata(
      _fbb,
      name__,
      serial__,
      timestamp,
      version_major,
      version_minor);
}

#endif  // FLATBUFFERS_GENERATED_CALMETADATA_H_
