instatask_generated.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. // automatically generated by the FlatBuffers compiler, do not modify
  2. #ifndef FLATBUFFERS_GENERATED_INSTATASK_IGDATA_H_
  3. #define FLATBUFFERS_GENERATED_INSTATASK_IGDATA_H_
  4. #include "flatbuffers/flatbuffers.h"
  5. namespace IGData {
  6. struct IGTask;
  7. struct IGTask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  8. enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
  9. VT_ID = 4,
  10. VT_FILE_INFO = 6,
  11. VT_TIME = 8,
  12. VT_DESCRIPTION = 10,
  13. VT_HASHTAGS = 12,
  14. VT_REQUESTED_BY = 14,
  15. VT_REQUESTED_BY_PHRASE = 16,
  16. VT_PROMOTE_SHARE = 18,
  17. VT_LINK_BIO = 20,
  18. VT_IS_VIDEO = 22,
  19. VT_MASK = 24,
  20. VT_HEADER = 26
  21. };
  22. int32_t id() const {
  23. return GetField<int32_t>(VT_ID, 0);
  24. }
  25. const flatbuffers::String *file_info() const {
  26. return GetPointer<const flatbuffers::String *>(VT_FILE_INFO);
  27. }
  28. const flatbuffers::String *time() const {
  29. return GetPointer<const flatbuffers::String *>(VT_TIME);
  30. }
  31. const flatbuffers::String *description() const {
  32. return GetPointer<const flatbuffers::String *>(VT_DESCRIPTION);
  33. }
  34. const flatbuffers::String *hashtags() const {
  35. return GetPointer<const flatbuffers::String *>(VT_HASHTAGS);
  36. }
  37. const flatbuffers::String *requested_by() const {
  38. return GetPointer<const flatbuffers::String *>(VT_REQUESTED_BY);
  39. }
  40. const flatbuffers::String *requested_by_phrase() const {
  41. return GetPointer<const flatbuffers::String *>(VT_REQUESTED_BY_PHRASE);
  42. }
  43. const flatbuffers::String *promote_share() const {
  44. return GetPointer<const flatbuffers::String *>(VT_PROMOTE_SHARE);
  45. }
  46. const flatbuffers::String *link_bio() const {
  47. return GetPointer<const flatbuffers::String *>(VT_LINK_BIO);
  48. }
  49. bool is_video() const {
  50. return GetField<uint8_t>(VT_IS_VIDEO, 0) != 0;
  51. }
  52. int32_t mask() const {
  53. return GetField<int32_t>(VT_MASK, 0);
  54. }
  55. const flatbuffers::String *header() const {
  56. return GetPointer<const flatbuffers::String *>(VT_HEADER);
  57. }
  58. bool Verify(flatbuffers::Verifier &verifier) const {
  59. return VerifyTableStart(verifier) &&
  60. VerifyField<int32_t>(verifier, VT_ID) &&
  61. VerifyOffset(verifier, VT_FILE_INFO) &&
  62. verifier.VerifyString(file_info()) &&
  63. VerifyOffset(verifier, VT_TIME) &&
  64. verifier.VerifyString(time()) &&
  65. VerifyOffset(verifier, VT_DESCRIPTION) &&
  66. verifier.VerifyString(description()) &&
  67. VerifyOffset(verifier, VT_HASHTAGS) &&
  68. verifier.VerifyString(hashtags()) &&
  69. VerifyOffset(verifier, VT_REQUESTED_BY) &&
  70. verifier.VerifyString(requested_by()) &&
  71. VerifyOffset(verifier, VT_REQUESTED_BY_PHRASE) &&
  72. verifier.VerifyString(requested_by_phrase()) &&
  73. VerifyOffset(verifier, VT_PROMOTE_SHARE) &&
  74. verifier.VerifyString(promote_share()) &&
  75. VerifyOffset(verifier, VT_LINK_BIO) &&
  76. verifier.VerifyString(link_bio()) &&
  77. VerifyField<uint8_t>(verifier, VT_IS_VIDEO) &&
  78. VerifyField<int32_t>(verifier, VT_MASK) &&
  79. VerifyOffset(verifier, VT_HEADER) &&
  80. verifier.VerifyString(header()) &&
  81. verifier.EndTable();
  82. }
  83. };
  84. struct IGTaskBuilder {
  85. flatbuffers::FlatBufferBuilder &fbb_;
  86. flatbuffers::uoffset_t start_;
  87. void add_id(int32_t id) {
  88. fbb_.AddElement<int32_t>(IGTask::VT_ID, id, 0);
  89. }
  90. void add_file_info(flatbuffers::Offset<flatbuffers::String> file_info) {
  91. fbb_.AddOffset(IGTask::VT_FILE_INFO, file_info);
  92. }
  93. void add_time(flatbuffers::Offset<flatbuffers::String> time) {
  94. fbb_.AddOffset(IGTask::VT_TIME, time);
  95. }
  96. void add_description(flatbuffers::Offset<flatbuffers::String> description) {
  97. fbb_.AddOffset(IGTask::VT_DESCRIPTION, description);
  98. }
  99. void add_hashtags(flatbuffers::Offset<flatbuffers::String> hashtags) {
  100. fbb_.AddOffset(IGTask::VT_HASHTAGS, hashtags);
  101. }
  102. void add_requested_by(flatbuffers::Offset<flatbuffers::String> requested_by) {
  103. fbb_.AddOffset(IGTask::VT_REQUESTED_BY, requested_by);
  104. }
  105. void add_requested_by_phrase(flatbuffers::Offset<flatbuffers::String> requested_by_phrase) {
  106. fbb_.AddOffset(IGTask::VT_REQUESTED_BY_PHRASE, requested_by_phrase);
  107. }
  108. void add_promote_share(flatbuffers::Offset<flatbuffers::String> promote_share) {
  109. fbb_.AddOffset(IGTask::VT_PROMOTE_SHARE, promote_share);
  110. }
  111. void add_link_bio(flatbuffers::Offset<flatbuffers::String> link_bio) {
  112. fbb_.AddOffset(IGTask::VT_LINK_BIO, link_bio);
  113. }
  114. void add_is_video(bool is_video) {
  115. fbb_.AddElement<uint8_t>(IGTask::VT_IS_VIDEO, static_cast<uint8_t>(is_video), 0);
  116. }
  117. void add_mask(int32_t mask) {
  118. fbb_.AddElement<int32_t>(IGTask::VT_MASK, mask, 0);
  119. }
  120. void add_header(flatbuffers::Offset<flatbuffers::String> header) {
  121. fbb_.AddOffset(IGTask::VT_HEADER, header);
  122. }
  123. explicit IGTaskBuilder(flatbuffers::FlatBufferBuilder &_fbb)
  124. : fbb_(_fbb) {
  125. start_ = fbb_.StartTable();
  126. }
  127. IGTaskBuilder &operator=(const IGTaskBuilder &);
  128. flatbuffers::Offset<IGTask> Finish() {
  129. const auto end = fbb_.EndTable(start_);
  130. auto o = flatbuffers::Offset<IGTask>(end);
  131. return o;
  132. }
  133. };
  134. inline flatbuffers::Offset<IGTask> CreateIGTask(
  135. flatbuffers::FlatBufferBuilder &_fbb,
  136. int32_t id = 0,
  137. flatbuffers::Offset<flatbuffers::String> file_info = 0,
  138. flatbuffers::Offset<flatbuffers::String> time = 0,
  139. flatbuffers::Offset<flatbuffers::String> description = 0,
  140. flatbuffers::Offset<flatbuffers::String> hashtags = 0,
  141. flatbuffers::Offset<flatbuffers::String> requested_by = 0,
  142. flatbuffers::Offset<flatbuffers::String> requested_by_phrase = 0,
  143. flatbuffers::Offset<flatbuffers::String> promote_share = 0,
  144. flatbuffers::Offset<flatbuffers::String> link_bio = 0,
  145. bool is_video = false,
  146. int32_t mask = 0,
  147. flatbuffers::Offset<flatbuffers::String> header = 0) {
  148. IGTaskBuilder builder_(_fbb);
  149. builder_.add_header(header);
  150. builder_.add_mask(mask);
  151. builder_.add_link_bio(link_bio);
  152. builder_.add_promote_share(promote_share);
  153. builder_.add_requested_by_phrase(requested_by_phrase);
  154. builder_.add_requested_by(requested_by);
  155. builder_.add_hashtags(hashtags);
  156. builder_.add_description(description);
  157. builder_.add_time(time);
  158. builder_.add_file_info(file_info);
  159. builder_.add_id(id);
  160. builder_.add_is_video(is_video);
  161. return builder_.Finish();
  162. }
  163. inline flatbuffers::Offset<IGTask> CreateIGTaskDirect(
  164. flatbuffers::FlatBufferBuilder &_fbb,
  165. int32_t id = 0,
  166. const char *file_info = nullptr,
  167. const char *time = nullptr,
  168. const char *description = nullptr,
  169. const char *hashtags = nullptr,
  170. const char *requested_by = nullptr,
  171. const char *requested_by_phrase = nullptr,
  172. const char *promote_share = nullptr,
  173. const char *link_bio = nullptr,
  174. bool is_video = false,
  175. int32_t mask = 0,
  176. const char *header = nullptr) {
  177. auto file_info__ = file_info ? _fbb.CreateString(file_info) : 0;
  178. auto time__ = time ? _fbb.CreateString(time) : 0;
  179. auto description__ = description ? _fbb.CreateString(description) : 0;
  180. auto hashtags__ = hashtags ? _fbb.CreateString(hashtags) : 0;
  181. auto requested_by__ = requested_by ? _fbb.CreateString(requested_by) : 0;
  182. auto requested_by_phrase__ = requested_by_phrase ? _fbb.CreateString(requested_by_phrase) : 0;
  183. auto promote_share__ = promote_share ? _fbb.CreateString(promote_share) : 0;
  184. auto link_bio__ = link_bio ? _fbb.CreateString(link_bio) : 0;
  185. auto header__ = header ? _fbb.CreateString(header) : 0;
  186. return IGData::CreateIGTask(
  187. _fbb,
  188. id,
  189. file_info__,
  190. time__,
  191. description__,
  192. hashtags__,
  193. requested_by__,
  194. requested_by_phrase__,
  195. promote_share__,
  196. link_bio__,
  197. is_video,
  198. mask,
  199. header__);
  200. }
  201. inline const IGData::IGTask *GetIGTask(const void *buf) {
  202. return flatbuffers::GetRoot<IGData::IGTask>(buf);
  203. }
  204. inline const IGData::IGTask *GetSizePrefixedIGTask(const void *buf) {
  205. return flatbuffers::GetSizePrefixedRoot<IGData::IGTask>(buf);
  206. }
  207. inline bool VerifyIGTaskBuffer(
  208. flatbuffers::Verifier &verifier) {
  209. return verifier.VerifyBuffer<IGData::IGTask>(nullptr);
  210. }
  211. inline bool VerifySizePrefixedIGTaskBuffer(
  212. flatbuffers::Verifier &verifier) {
  213. return verifier.VerifySizePrefixedBuffer<IGData::IGTask>(nullptr);
  214. }
  215. inline void FinishIGTaskBuffer(
  216. flatbuffers::FlatBufferBuilder &fbb,
  217. flatbuffers::Offset<IGData::IGTask> root) {
  218. fbb.Finish(root);
  219. }
  220. inline void FinishSizePrefixedIGTaskBuffer(
  221. flatbuffers::FlatBufferBuilder &fbb,
  222. flatbuffers::Offset<IGData::IGTask> root) {
  223. fbb.FinishSizePrefixed(root);
  224. }
  225. } // namespace IGData
  226. #endif // FLATBUFFERS_GENERATED_INSTATASK_IGDATA_H_