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


#ifndef FLATBUFFERS_GENERATED_TABLE_OSRM_ENGINE_API_FBRESULT_H_
#define FLATBUFFERS_GENERATED_TABLE_OSRM_ENGINE_API_FBRESULT_H_

#include "flatbuffers/flatbuffers.h"

// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
              FLATBUFFERS_VERSION_MINOR == 3 &&
              FLATBUFFERS_VERSION_REVISION == 25,
             "Non-compatible flatbuffers version included");

#include "waypoint_generated.h"

namespace osrm {
namespace engine {
namespace api {
namespace fbresult {

struct TableResult;
struct TableResultBuilder;

struct TableResult FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef TableResultBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_DURATIONS = 4,
    VT_ROWS = 6,
    VT_COLS = 8,
    VT_DISTANCES = 10,
    VT_DESTINATIONS = 12,
    VT_FALLBACK_SPEED_CELLS = 14
  };
  const ::flatbuffers::Vector<float> *durations() const {
    return GetPointer<const ::flatbuffers::Vector<float> *>(VT_DURATIONS);
  }
  uint16_t rows() const {
    return GetField<uint16_t>(VT_ROWS, 0);
  }
  uint16_t cols() const {
    return GetField<uint16_t>(VT_COLS, 0);
  }
  const ::flatbuffers::Vector<float> *distances() const {
    return GetPointer<const ::flatbuffers::Vector<float> *>(VT_DISTANCES);
  }
  const ::flatbuffers::Vector<::flatbuffers::Offset<osrm::engine::api::fbresult::Waypoint>> *destinations() const {
    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<osrm::engine::api::fbresult::Waypoint>> *>(VT_DESTINATIONS);
  }
  const ::flatbuffers::Vector<uint32_t> *fallback_speed_cells() const {
    return GetPointer<const ::flatbuffers::Vector<uint32_t> *>(VT_FALLBACK_SPEED_CELLS);
  }
  bool Verify(::flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyOffset(verifier, VT_DURATIONS) &&
           verifier.VerifyVector(durations()) &&
           VerifyField<uint16_t>(verifier, VT_ROWS, 2) &&
           VerifyField<uint16_t>(verifier, VT_COLS, 2) &&
           VerifyOffset(verifier, VT_DISTANCES) &&
           verifier.VerifyVector(distances()) &&
           VerifyOffset(verifier, VT_DESTINATIONS) &&
           verifier.VerifyVector(destinations()) &&
           verifier.VerifyVectorOfTables(destinations()) &&
           VerifyOffset(verifier, VT_FALLBACK_SPEED_CELLS) &&
           verifier.VerifyVector(fallback_speed_cells()) &&
           verifier.EndTable();
  }
};

struct TableResultBuilder {
  typedef TableResult Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_durations(::flatbuffers::Offset<::flatbuffers::Vector<float>> durations) {
    fbb_.AddOffset(TableResult::VT_DURATIONS, durations);
  }
  void add_rows(uint16_t rows) {
    fbb_.AddElement<uint16_t>(TableResult::VT_ROWS, rows, 0);
  }
  void add_cols(uint16_t cols) {
    fbb_.AddElement<uint16_t>(TableResult::VT_COLS, cols, 0);
  }
  void add_distances(::flatbuffers::Offset<::flatbuffers::Vector<float>> distances) {
    fbb_.AddOffset(TableResult::VT_DISTANCES, distances);
  }
  void add_destinations(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<osrm::engine::api::fbresult::Waypoint>>> destinations) {
    fbb_.AddOffset(TableResult::VT_DESTINATIONS, destinations);
  }
  void add_fallback_speed_cells(::flatbuffers::Offset<::flatbuffers::Vector<uint32_t>> fallback_speed_cells) {
    fbb_.AddOffset(TableResult::VT_FALLBACK_SPEED_CELLS, fallback_speed_cells);
  }
  explicit TableResultBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<TableResult> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<TableResult>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<TableResult> CreateTableResult(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    ::flatbuffers::Offset<::flatbuffers::Vector<float>> durations = 0,
    uint16_t rows = 0,
    uint16_t cols = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<float>> distances = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<osrm::engine::api::fbresult::Waypoint>>> destinations = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<uint32_t>> fallback_speed_cells = 0) {
  TableResultBuilder builder_(_fbb);
  builder_.add_fallback_speed_cells(fallback_speed_cells);
  builder_.add_destinations(destinations);
  builder_.add_distances(distances);
  builder_.add_durations(durations);
  builder_.add_cols(cols);
  builder_.add_rows(rows);
  return builder_.Finish();
}

inline ::flatbuffers::Offset<TableResult> CreateTableResultDirect(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    const std::vector<float> *durations = nullptr,
    uint16_t rows = 0,
    uint16_t cols = 0,
    const std::vector<float> *distances = nullptr,
    const std::vector<::flatbuffers::Offset<osrm::engine::api::fbresult::Waypoint>> *destinations = nullptr,
    const std::vector<uint32_t> *fallback_speed_cells = nullptr) {
  auto durations__ = durations ? _fbb.CreateVector<float>(*durations) : 0;
  auto distances__ = distances ? _fbb.CreateVector<float>(*distances) : 0;
  auto destinations__ = destinations ? _fbb.CreateVector<::flatbuffers::Offset<osrm::engine::api::fbresult::Waypoint>>(*destinations) : 0;
  auto fallback_speed_cells__ = fallback_speed_cells ? _fbb.CreateVector<uint32_t>(*fallback_speed_cells) : 0;
  return osrm::engine::api::fbresult::CreateTableResult(
      _fbb,
      durations__,
      rows,
      cols,
      distances__,
      destinations__,
      fallback_speed_cells__);
}

}  // namespace fbresult
}  // namespace api
}  // namespace engine
}  // namespace osrm

#endif  // FLATBUFFERS_GENERATED_TABLE_OSRM_ENGINE_API_FBRESULT_H_
