instatask_generated.h 9.0 KB

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