instatask_generated.h 7.9 KB

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