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


#ifndef FLATBUFFERS_GENERATED_ENGINEDETAILS_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
#define FLATBUFFERS_GENERATED_ENGINEDETAILS_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_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 == 12 &&
              FLATBUFFERS_VERSION_REVISION == 23,
             "Non-compatible flatbuffers version included");

#include "knob_value_generated.h"

namespace hipdnn_flatbuffers_sdk {
namespace data_objects {

struct EngineDetails;
struct EngineDetailsBuilder;
struct EngineDetailsT;

bool operator==(const EngineDetailsT &lhs, const EngineDetailsT &rhs);
bool operator!=(const EngineDetailsT &lhs, const EngineDetailsT &rhs);

struct EngineDetailsT : public ::flatbuffers::NativeTable {
  typedef EngineDetails TableType;
  int64_t engine_id = 0;
  std::vector<std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::KnobT>> knobs{};
  EngineDetailsT() = default;
  EngineDetailsT(const EngineDetailsT &o);
  EngineDetailsT(EngineDetailsT&&) FLATBUFFERS_NOEXCEPT = default;
  EngineDetailsT &operator=(EngineDetailsT o) FLATBUFFERS_NOEXCEPT;
};

struct EngineDetails FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef EngineDetailsT NativeTableType;
  typedef EngineDetailsBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_ENGINE_ID = 4,
    VT_KNOBS = 6
  };
  int64_t engine_id() const {
    return GetField<int64_t>(VT_ENGINE_ID, 0);
  }
  bool mutate_engine_id(int64_t _engine_id = 0) {
    return SetField<int64_t>(VT_ENGINE_ID, _engine_id, 0);
  }
  const ::flatbuffers::Vector<::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::Knob>> *knobs() const {
    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::Knob>> *>(VT_KNOBS);
  }
  ::flatbuffers::Vector<::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::Knob>> *mutable_knobs() {
    return GetPointer<::flatbuffers::Vector<::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::Knob>> *>(VT_KNOBS);
  }
  bool Verify(::flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int64_t>(verifier, VT_ENGINE_ID, 8) &&
           VerifyOffset(verifier, VT_KNOBS) &&
           verifier.VerifyVector(knobs()) &&
           verifier.VerifyVectorOfTables(knobs()) &&
           verifier.EndTable();
  }
  EngineDetailsT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(EngineDetailsT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<EngineDetails> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const EngineDetailsT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct EngineDetailsBuilder {
  typedef EngineDetails Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_engine_id(int64_t engine_id) {
    fbb_.AddElement<int64_t>(EngineDetails::VT_ENGINE_ID, engine_id, 0);
  }
  void add_knobs(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::Knob>>> knobs) {
    fbb_.AddOffset(EngineDetails::VT_KNOBS, knobs);
  }
  explicit EngineDetailsBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<EngineDetails> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<EngineDetails>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<EngineDetails> CreateEngineDetails(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t engine_id = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::Knob>>> knobs = 0) {
  EngineDetailsBuilder builder_(_fbb);
  builder_.add_engine_id(engine_id);
  builder_.add_knobs(knobs);
  return builder_.Finish();
}

inline ::flatbuffers::Offset<EngineDetails> CreateEngineDetailsDirect(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t engine_id = 0,
    const std::vector<::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::Knob>> *knobs = nullptr) {
  auto knobs__ = knobs ? _fbb.CreateVector<::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::Knob>>(*knobs) : 0;
  return hipdnn_flatbuffers_sdk::data_objects::CreateEngineDetails(
      _fbb,
      engine_id,
      knobs__);
}

::flatbuffers::Offset<EngineDetails> CreateEngineDetails(::flatbuffers::FlatBufferBuilder &_fbb, const EngineDetailsT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);


inline bool operator==(const EngineDetailsT &lhs, const EngineDetailsT &rhs) {
  return
      (lhs.engine_id == rhs.engine_id) &&
      (lhs.knobs.size() == rhs.knobs.size() && std::equal(lhs.knobs.cbegin(), lhs.knobs.cend(), rhs.knobs.cbegin(), [](std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::KnobT> const &a, std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::KnobT> const &b) { return (a == b) || (a && b && *a == *b); }));
}

inline bool operator!=(const EngineDetailsT &lhs, const EngineDetailsT &rhs) {
    return !(lhs == rhs);
}


inline EngineDetailsT::EngineDetailsT(const EngineDetailsT &o)
      : engine_id(o.engine_id) {
  knobs.reserve(o.knobs.size());
  for (const auto &knobs_ : o.knobs) { knobs.emplace_back((knobs_) ? new hipdnn_flatbuffers_sdk::data_objects::KnobT(*knobs_) : nullptr); }
}

inline EngineDetailsT &EngineDetailsT::operator=(EngineDetailsT o) FLATBUFFERS_NOEXCEPT {
  std::swap(engine_id, o.engine_id);
  std::swap(knobs, o.knobs);
  return *this;
}

inline EngineDetailsT *EngineDetails::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
  auto _o = std::unique_ptr<EngineDetailsT>(new EngineDetailsT());
  UnPackTo(_o.get(), _resolver);
  return _o.release();
}

inline void EngineDetails::UnPackTo(EngineDetailsT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = engine_id(); _o->engine_id = _e; }
  { auto _e = knobs(); if (_e) { _o->knobs.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->knobs[_i]) { _e->Get(_i)->UnPackTo(_o->knobs[_i].get(), _resolver); } else { _o->knobs[_i] = std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::KnobT>(_e->Get(_i)->UnPack(_resolver)); }; } } else { _o->knobs.resize(0); } }
}

inline ::flatbuffers::Offset<EngineDetails> EngineDetails::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const EngineDetailsT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return CreateEngineDetails(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<EngineDetails> CreateEngineDetails(::flatbuffers::FlatBufferBuilder &_fbb, const EngineDetailsT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const EngineDetailsT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _engine_id = _o->engine_id;
  auto _knobs = _o->knobs.size() ? _fbb.CreateVector<::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::Knob>> (_o->knobs.size(), [](size_t i, _VectorArgs *__va) { return CreateKnob(*__va->__fbb, __va->__o->knobs[i].get(), __va->__rehasher); }, &_va ) : 0;
  return hipdnn_flatbuffers_sdk::data_objects::CreateEngineDetails(
      _fbb,
      _engine_id,
      _knobs);
}

inline const hipdnn_flatbuffers_sdk::data_objects::EngineDetails *GetEngineDetails(const void *buf) {
  return ::flatbuffers::GetRoot<hipdnn_flatbuffers_sdk::data_objects::EngineDetails>(buf);
}

inline const hipdnn_flatbuffers_sdk::data_objects::EngineDetails *GetSizePrefixedEngineDetails(const void *buf) {
  return ::flatbuffers::GetSizePrefixedRoot<hipdnn_flatbuffers_sdk::data_objects::EngineDetails>(buf);
}

inline EngineDetails *GetMutableEngineDetails(void *buf) {
  return ::flatbuffers::GetMutableRoot<EngineDetails>(buf);
}

inline hipdnn_flatbuffers_sdk::data_objects::EngineDetails *GetMutableSizePrefixedEngineDetails(void *buf) {
  return ::flatbuffers::GetMutableSizePrefixedRoot<hipdnn_flatbuffers_sdk::data_objects::EngineDetails>(buf);
}

inline bool VerifyEngineDetailsBuffer(
    ::flatbuffers::Verifier &verifier) {
  return verifier.VerifyBuffer<hipdnn_flatbuffers_sdk::data_objects::EngineDetails>(nullptr);
}

inline bool VerifySizePrefixedEngineDetailsBuffer(
    ::flatbuffers::Verifier &verifier) {
  return verifier.VerifySizePrefixedBuffer<hipdnn_flatbuffers_sdk::data_objects::EngineDetails>(nullptr);
}

inline void FinishEngineDetailsBuffer(
    ::flatbuffers::FlatBufferBuilder &fbb,
    ::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::EngineDetails> root) {
  fbb.Finish(root);
}

inline void FinishSizePrefixedEngineDetailsBuffer(
    ::flatbuffers::FlatBufferBuilder &fbb,
    ::flatbuffers::Offset<hipdnn_flatbuffers_sdk::data_objects::EngineDetails> root) {
  fbb.FinishSizePrefixed(root);
}

inline std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::EngineDetailsT> UnPackEngineDetails(
    const void *buf,
    const ::flatbuffers::resolver_function_t *res = nullptr) {
  return std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::EngineDetailsT>(GetEngineDetails(buf)->UnPack(res));
}

inline std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::EngineDetailsT> UnPackSizePrefixedEngineDetails(
    const void *buf,
    const ::flatbuffers::resolver_function_t *res = nullptr) {
  return std::unique_ptr<hipdnn_flatbuffers_sdk::data_objects::EngineDetailsT>(GetSizePrefixedEngineDetails(buf)->UnPack(res));
}

}  // namespace data_objects
}  // namespace hipdnn_flatbuffers_sdk

#endif  // FLATBUFFERS_GENERATED_ENGINEDETAILS_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
