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


#ifndef FLATBUFFERS_GENERATED_CUSTOMOPATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
#define FLATBUFFERS_GENERATED_CUSTOMOPATTRIBUTES_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 == 25 &&
              FLATBUFFERS_VERSION_MINOR == 9 &&
              FLATBUFFERS_VERSION_REVISION == 23,
             "Non-compatible flatbuffers version included");

namespace hipdnn_flatbuffers_sdk {
namespace data_objects {

struct CustomOpAttributes;
struct CustomOpAttributesBuilder;
struct CustomOpAttributesT;

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

struct CustomOpAttributesT : public ::flatbuffers::NativeTable {
  typedef CustomOpAttributes TableType;
  std::string custom_op_id{};
  std::vector<int64_t> input_tensor_uids{};
  std::vector<int64_t> output_tensor_uids{};
  std::vector<uint8_t> data{};
};

/// Attributes for a custom (plugin-provided) operation.
struct CustomOpAttributes FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef CustomOpAttributesT NativeTableType;
  typedef CustomOpAttributesBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_CUSTOM_OP_ID = 4,
    VT_INPUT_TENSOR_UIDS = 6,
    VT_OUTPUT_TENSOR_UIDS = 8,
    VT_DATA = 10
  };
  /// Unique identifier for the plugin operation, using dotted namespace
  /// notation: "<plugin>.<operation>" (e.g. "example.rope", "mylib.fused_add").
  const ::flatbuffers::String *custom_op_id() const {
    return GetPointer<const ::flatbuffers::String *>(VT_CUSTOM_OP_ID);
  }
  ::flatbuffers::String *mutable_custom_op_id() {
    return GetPointer<::flatbuffers::String *>(VT_CUSTOM_OP_ID);
  }
  const ::flatbuffers::Vector<int64_t> *input_tensor_uids() const {
    return GetPointer<const ::flatbuffers::Vector<int64_t> *>(VT_INPUT_TENSOR_UIDS);
  }
  ::flatbuffers::Vector<int64_t> *mutable_input_tensor_uids() {
    return GetPointer<::flatbuffers::Vector<int64_t> *>(VT_INPUT_TENSOR_UIDS);
  }
  const ::flatbuffers::Vector<int64_t> *output_tensor_uids() const {
    return GetPointer<const ::flatbuffers::Vector<int64_t> *>(VT_OUTPUT_TENSOR_UIDS);
  }
  ::flatbuffers::Vector<int64_t> *mutable_output_tensor_uids() {
    return GetPointer<::flatbuffers::Vector<int64_t> *>(VT_OUTPUT_TENSOR_UIDS);
  }
  const ::flatbuffers::Vector<uint8_t> *data() const {
    return GetPointer<const ::flatbuffers::Vector<uint8_t> *>(VT_DATA);
  }
  ::flatbuffers::Vector<uint8_t> *mutable_data() {
    return GetPointer<::flatbuffers::Vector<uint8_t> *>(VT_DATA);
  }
  bool Verify(::flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyOffset(verifier, VT_CUSTOM_OP_ID) &&
           verifier.VerifyString(custom_op_id()) &&
           VerifyOffset(verifier, VT_INPUT_TENSOR_UIDS) &&
           verifier.VerifyVector(input_tensor_uids()) &&
           VerifyOffset(verifier, VT_OUTPUT_TENSOR_UIDS) &&
           verifier.VerifyVector(output_tensor_uids()) &&
           VerifyOffset(verifier, VT_DATA) &&
           verifier.VerifyVector(data()) &&
           verifier.EndTable();
  }
  CustomOpAttributesT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(CustomOpAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<CustomOpAttributes> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const CustomOpAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct CustomOpAttributesBuilder {
  typedef CustomOpAttributes Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_custom_op_id(::flatbuffers::Offset<::flatbuffers::String> custom_op_id) {
    fbb_.AddOffset(CustomOpAttributes::VT_CUSTOM_OP_ID, custom_op_id);
  }
  void add_input_tensor_uids(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> input_tensor_uids) {
    fbb_.AddOffset(CustomOpAttributes::VT_INPUT_TENSOR_UIDS, input_tensor_uids);
  }
  void add_output_tensor_uids(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> output_tensor_uids) {
    fbb_.AddOffset(CustomOpAttributes::VT_OUTPUT_TENSOR_UIDS, output_tensor_uids);
  }
  void add_data(::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> data) {
    fbb_.AddOffset(CustomOpAttributes::VT_DATA, data);
  }
  explicit CustomOpAttributesBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<CustomOpAttributes> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<CustomOpAttributes>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<CustomOpAttributes> CreateCustomOpAttributes(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    ::flatbuffers::Offset<::flatbuffers::String> custom_op_id = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> input_tensor_uids = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> output_tensor_uids = 0,
    ::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> data = 0) {
  CustomOpAttributesBuilder builder_(_fbb);
  builder_.add_data(data);
  builder_.add_output_tensor_uids(output_tensor_uids);
  builder_.add_input_tensor_uids(input_tensor_uids);
  builder_.add_custom_op_id(custom_op_id);
  return builder_.Finish();
}

inline ::flatbuffers::Offset<CustomOpAttributes> CreateCustomOpAttributesDirect(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    const char *custom_op_id = nullptr,
    const std::vector<int64_t> *input_tensor_uids = nullptr,
    const std::vector<int64_t> *output_tensor_uids = nullptr,
    const std::vector<uint8_t> *data = nullptr) {
  auto custom_op_id__ = custom_op_id ? _fbb.CreateString(custom_op_id) : 0;
  auto input_tensor_uids__ = input_tensor_uids ? _fbb.CreateVector<int64_t>(*input_tensor_uids) : 0;
  auto output_tensor_uids__ = output_tensor_uids ? _fbb.CreateVector<int64_t>(*output_tensor_uids) : 0;
  auto data__ = data ? _fbb.CreateVector<uint8_t>(*data) : 0;
  return hipdnn_flatbuffers_sdk::data_objects::CreateCustomOpAttributes(
      _fbb,
      custom_op_id__,
      input_tensor_uids__,
      output_tensor_uids__,
      data__);
}

::flatbuffers::Offset<CustomOpAttributes> CreateCustomOpAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const CustomOpAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);


inline bool operator==(const CustomOpAttributesT &lhs, const CustomOpAttributesT &rhs) {
  return
      (lhs.custom_op_id == rhs.custom_op_id) &&
      (lhs.input_tensor_uids == rhs.input_tensor_uids) &&
      (lhs.output_tensor_uids == rhs.output_tensor_uids) &&
      (lhs.data == rhs.data);
}

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


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

inline void CustomOpAttributes::UnPackTo(CustomOpAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = custom_op_id(); if (_e) _o->custom_op_id = _e->str(); }
  { auto _e = input_tensor_uids(); if (_e) { _o->input_tensor_uids.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->input_tensor_uids[_i] = _e->Get(_i); } } else { _o->input_tensor_uids.resize(0); } }
  { auto _e = output_tensor_uids(); if (_e) { _o->output_tensor_uids.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->output_tensor_uids[_i] = _e->Get(_i); } } else { _o->output_tensor_uids.resize(0); } }
  { auto _e = data(); if (_e) { _o->data.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->data.begin()); } }
}

inline ::flatbuffers::Offset<CustomOpAttributes> CustomOpAttributes::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const CustomOpAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return CreateCustomOpAttributes(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<CustomOpAttributes> CreateCustomOpAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const CustomOpAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const CustomOpAttributesT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _custom_op_id = _o->custom_op_id.empty() ? 0 : _fbb.CreateString(_o->custom_op_id);
  auto _input_tensor_uids = _o->input_tensor_uids.size() ? _fbb.CreateVector(_o->input_tensor_uids) : 0;
  auto _output_tensor_uids = _o->output_tensor_uids.size() ? _fbb.CreateVector(_o->output_tensor_uids) : 0;
  auto _data = _o->data.size() ? _fbb.CreateVector(_o->data) : 0;
  return hipdnn_flatbuffers_sdk::data_objects::CreateCustomOpAttributes(
      _fbb,
      _custom_op_id,
      _input_tensor_uids,
      _output_tensor_uids,
      _data);
}

}  // namespace data_objects
}  // namespace hipdnn_flatbuffers_sdk

#endif  // FLATBUFFERS_GENERATED_CUSTOMOPATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
