firestore.nanopb.cc 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952
  1. /*
  2. * Copyright 2024 Google LLC
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* Automatically generated nanopb constant definitions */
  17. /* Generated by nanopb-0.3.9.8 */
  18. #include "firestore.nanopb.h"
  19. #include "Firestore/core/src/nanopb/pretty_printing.h"
  20. namespace firebase {
  21. namespace firestore {
  22. using nanopb::PrintEnumField;
  23. using nanopb::PrintHeader;
  24. using nanopb::PrintMessageField;
  25. using nanopb::PrintPrimitiveField;
  26. using nanopb::PrintTail;
  27. /* @@protoc_insertion_point(includes) */
  28. #if PB_PROTO_HEADER_VERSION != 30
  29. #error Regenerate this file with the current version of nanopb generator.
  30. #endif
  31. const pb_field_t google_firestore_v1_GetDocumentRequest_fields[5] = {
  32. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_GetDocumentRequest, name, name, 0),
  33. PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_GetDocumentRequest, mask, name, &google_firestore_v1_DocumentMask_fields),
  34. PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 3, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_GetDocumentRequest, transaction, mask, 0),
  35. PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_GetDocumentRequest, read_time, mask, &google_protobuf_Timestamp_fields),
  36. PB_LAST_FIELD
  37. };
  38. const pb_field_t google_firestore_v1_ListDocumentsRequest_fields[10] = {
  39. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListDocumentsRequest, parent, parent, 0),
  40. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, collection_id, parent, 0),
  41. PB_FIELD( 3, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_ListDocumentsRequest, page_size, collection_id, 0),
  42. PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, page_token, page_size, 0),
  43. PB_FIELD( 6, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, order_by, page_token, 0),
  44. PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_ListDocumentsRequest, mask, order_by, &google_firestore_v1_DocumentMask_fields),
  45. PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 8, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, transaction, mask, 0),
  46. PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 10, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListDocumentsRequest, read_time, mask, &google_protobuf_Timestamp_fields),
  47. PB_FIELD( 12, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1_ListDocumentsRequest, show_missing, read_time, 0),
  48. PB_LAST_FIELD
  49. };
  50. const pb_field_t google_firestore_v1_ListDocumentsResponse_fields[3] = {
  51. PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_ListDocumentsResponse, documents, documents, &google_firestore_v1_Document_fields),
  52. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsResponse, next_page_token, documents, 0),
  53. PB_LAST_FIELD
  54. };
  55. const pb_field_t google_firestore_v1_CreateDocumentRequest_fields[6] = {
  56. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_CreateDocumentRequest, parent, parent, 0),
  57. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_CreateDocumentRequest, collection_id, parent, 0),
  58. PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_CreateDocumentRequest, document_id, collection_id, 0),
  59. PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_CreateDocumentRequest, document, document_id, &google_firestore_v1_Document_fields),
  60. PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_CreateDocumentRequest, mask, document, &google_firestore_v1_DocumentMask_fields),
  61. PB_LAST_FIELD
  62. };
  63. const pb_field_t google_firestore_v1_UpdateDocumentRequest_fields[5] = {
  64. PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_UpdateDocumentRequest, document, document, &google_firestore_v1_Document_fields),
  65. PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_UpdateDocumentRequest, update_mask, document, &google_firestore_v1_DocumentMask_fields),
  66. PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_UpdateDocumentRequest, mask, update_mask, &google_firestore_v1_DocumentMask_fields),
  67. PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_UpdateDocumentRequest, current_document, mask, &google_firestore_v1_Precondition_fields),
  68. PB_LAST_FIELD
  69. };
  70. const pb_field_t google_firestore_v1_DeleteDocumentRequest_fields[3] = {
  71. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DeleteDocumentRequest, name, name, 0),
  72. PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_DeleteDocumentRequest, current_document, name, &google_firestore_v1_Precondition_fields),
  73. PB_LAST_FIELD
  74. };
  75. const pb_field_t google_firestore_v1_BatchGetDocumentsRequest_fields[7] = {
  76. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_BatchGetDocumentsRequest, database, database, 0),
  77. PB_FIELD( 2, BYTES , REPEATED, POINTER , OTHER, google_firestore_v1_BatchGetDocumentsRequest, documents, database, 0),
  78. PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_BatchGetDocumentsRequest, mask, documents, &google_firestore_v1_DocumentMask_fields),
  79. PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 4, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_BatchGetDocumentsRequest, transaction, mask, 0),
  80. PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_BatchGetDocumentsRequest, new_transaction, mask, &google_firestore_v1_TransactionOptions_fields),
  81. PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_BatchGetDocumentsRequest, read_time, mask, &google_protobuf_Timestamp_fields),
  82. PB_LAST_FIELD
  83. };
  84. const pb_field_t google_firestore_v1_BatchGetDocumentsResponse_fields[5] = {
  85. PB_ANONYMOUS_ONEOF_FIELD(result, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_BatchGetDocumentsResponse, found, found, &google_firestore_v1_Document_fields),
  86. PB_ANONYMOUS_ONEOF_FIELD(result, 2, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_BatchGetDocumentsResponse, missing, missing, 0),
  87. PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_BatchGetDocumentsResponse, transaction, missing, 0),
  88. PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_BatchGetDocumentsResponse, read_time, transaction, &google_protobuf_Timestamp_fields),
  89. PB_LAST_FIELD
  90. };
  91. const pb_field_t google_firestore_v1_BeginTransactionRequest_fields[3] = {
  92. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_BeginTransactionRequest, database, database, 0),
  93. PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_BeginTransactionRequest, options, database, &google_firestore_v1_TransactionOptions_fields),
  94. PB_LAST_FIELD
  95. };
  96. const pb_field_t google_firestore_v1_BeginTransactionResponse_fields[2] = {
  97. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_BeginTransactionResponse, transaction, transaction, 0),
  98. PB_LAST_FIELD
  99. };
  100. const pb_field_t google_firestore_v1_CommitRequest_fields[4] = {
  101. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_CommitRequest, database, database, 0),
  102. PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_CommitRequest, writes, database, &google_firestore_v1_Write_fields),
  103. PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_CommitRequest, transaction, writes, 0),
  104. PB_LAST_FIELD
  105. };
  106. const pb_field_t google_firestore_v1_CommitResponse_fields[3] = {
  107. PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_CommitResponse, write_results, write_results, &google_firestore_v1_WriteResult_fields),
  108. PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_CommitResponse, commit_time, write_results, &google_protobuf_Timestamp_fields),
  109. PB_LAST_FIELD
  110. };
  111. const pb_field_t google_firestore_v1_RollbackRequest_fields[3] = {
  112. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_RollbackRequest, database, database, 0),
  113. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_RollbackRequest, transaction, database, 0),
  114. PB_LAST_FIELD
  115. };
  116. const pb_field_t google_firestore_v1_RunQueryRequest_fields[6] = {
  117. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_RunQueryRequest, parent, parent, 0),
  118. PB_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_RunQueryRequest, structured_query, parent, &google_firestore_v1_StructuredQuery_fields),
  119. PB_ONEOF_FIELD(consistency_selector, 5, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_RunQueryRequest, transaction, query_type.structured_query, 0),
  120. PB_ONEOF_FIELD(consistency_selector, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_RunQueryRequest, new_transaction, query_type.structured_query, &google_firestore_v1_TransactionOptions_fields),
  121. PB_ONEOF_FIELD(consistency_selector, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_RunQueryRequest, read_time, query_type.structured_query, &google_protobuf_Timestamp_fields),
  122. PB_LAST_FIELD
  123. };
  124. const pb_field_t google_firestore_v1_RunQueryResponse_fields[5] = {
  125. PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_RunQueryResponse, document, document, &google_firestore_v1_Document_fields),
  126. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_RunQueryResponse, transaction, document, 0),
  127. PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_RunQueryResponse, read_time, transaction, &google_protobuf_Timestamp_fields),
  128. PB_FIELD( 4, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_RunQueryResponse, skipped_results, read_time, 0),
  129. PB_LAST_FIELD
  130. };
  131. const pb_field_t google_firestore_v1_RunAggregationQueryRequest_fields[6] = {
  132. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_RunAggregationQueryRequest, parent, parent, 0),
  133. PB_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_RunAggregationQueryRequest, structured_aggregation_query, parent, &google_firestore_v1_StructuredAggregationQuery_fields),
  134. PB_ONEOF_FIELD(consistency_selector, 4, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_RunAggregationQueryRequest, transaction, query_type.structured_aggregation_query, 0),
  135. PB_ONEOF_FIELD(consistency_selector, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_RunAggregationQueryRequest, new_transaction, query_type.structured_aggregation_query, &google_firestore_v1_TransactionOptions_fields),
  136. PB_ONEOF_FIELD(consistency_selector, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_RunAggregationQueryRequest, read_time, query_type.structured_aggregation_query, &google_protobuf_Timestamp_fields),
  137. PB_LAST_FIELD
  138. };
  139. const pb_field_t google_firestore_v1_RunAggregationQueryResponse_fields[4] = {
  140. PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_RunAggregationQueryResponse, result, result, &google_firestore_v1_AggregationResult_fields),
  141. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_RunAggregationQueryResponse, transaction, result, 0),
  142. PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_RunAggregationQueryResponse, read_time, transaction, &google_protobuf_Timestamp_fields),
  143. PB_LAST_FIELD
  144. };
  145. const pb_field_t google_firestore_v1_WriteRequest_fields[6] = {
  146. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_WriteRequest, database, database, 0),
  147. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteRequest, stream_id, database, 0),
  148. PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteRequest, writes, stream_id, &google_firestore_v1_Write_fields),
  149. PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteRequest, stream_token, writes, 0),
  150. PB_FIELD( 5, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteRequest, labels, stream_token, &google_firestore_v1_WriteRequest_LabelsEntry_fields),
  151. PB_LAST_FIELD
  152. };
  153. const pb_field_t google_firestore_v1_WriteRequest_LabelsEntry_fields[3] = {
  154. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_WriteRequest_LabelsEntry, key, key, 0),
  155. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteRequest_LabelsEntry, value, key, 0),
  156. PB_LAST_FIELD
  157. };
  158. const pb_field_t google_firestore_v1_WriteResponse_fields[5] = {
  159. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_WriteResponse, stream_id, stream_id, 0),
  160. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteResponse, stream_token, stream_id, 0),
  161. PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteResponse, write_results, stream_token, &google_firestore_v1_WriteResult_fields),
  162. PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_WriteResponse, commit_time, write_results, &google_protobuf_Timestamp_fields),
  163. PB_LAST_FIELD
  164. };
  165. const pb_field_t google_firestore_v1_ListenRequest_fields[5] = {
  166. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListenRequest, database, database, 0),
  167. PB_ANONYMOUS_ONEOF_FIELD(target_change, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_ListenRequest, add_target, database, &google_firestore_v1_Target_fields),
  168. PB_ANONYMOUS_ONEOF_FIELD(target_change, 3, INT32 , ONEOF, STATIC , UNION, google_firestore_v1_ListenRequest, remove_target, database, 0),
  169. PB_FIELD( 4, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_ListenRequest, labels, remove_target, &google_firestore_v1_ListenRequest_LabelsEntry_fields),
  170. PB_LAST_FIELD
  171. };
  172. const pb_field_t google_firestore_v1_ListenRequest_LabelsEntry_fields[3] = {
  173. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListenRequest_LabelsEntry, key, key, 0),
  174. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListenRequest_LabelsEntry, value, key, 0),
  175. PB_LAST_FIELD
  176. };
  177. const pb_field_t google_firestore_v1_ListenResponse_fields[6] = {
  178. PB_ANONYMOUS_ONEOF_FIELD(response_type, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_ListenResponse, target_change, target_change, &google_firestore_v1_TargetChange_fields),
  179. PB_ANONYMOUS_ONEOF_FIELD(response_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, document_change, document_change, &google_firestore_v1_DocumentChange_fields),
  180. PB_ANONYMOUS_ONEOF_FIELD(response_type, 4, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, document_delete, document_delete, &google_firestore_v1_DocumentDelete_fields),
  181. PB_ANONYMOUS_ONEOF_FIELD(response_type, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, filter, filter, &google_firestore_v1_ExistenceFilter_fields),
  182. PB_ANONYMOUS_ONEOF_FIELD(response_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, document_remove, document_remove, &google_firestore_v1_DocumentRemove_fields),
  183. PB_LAST_FIELD
  184. };
  185. const pb_field_t google_firestore_v1_Target_fields[8] = {
  186. PB_ONEOF_FIELD(target_type, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_Target, query, query, &google_firestore_v1_Target_QueryTarget_fields),
  187. PB_ONEOF_FIELD(target_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Target, documents, documents, &google_firestore_v1_Target_DocumentsTarget_fields),
  188. PB_ONEOF_FIELD(resume_type, 4, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_Target, resume_token, target_type.documents, 0),
  189. PB_ONEOF_FIELD(resume_type, 11, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Target, read_time, target_type.documents, &google_protobuf_Timestamp_fields),
  190. PB_FIELD( 5, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_Target, target_id, resume_type.read_time, 0),
  191. PB_FIELD( 6, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1_Target, once, target_id, 0),
  192. PB_FIELD( 12, MESSAGE , OPTIONAL, STATIC , OTHER, google_firestore_v1_Target, expected_count, once, &google_protobuf_Int32Value_fields),
  193. PB_LAST_FIELD
  194. };
  195. const pb_field_t google_firestore_v1_Target_DocumentsTarget_fields[2] = {
  196. PB_FIELD( 2, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1_Target_DocumentsTarget, documents, documents, 0),
  197. PB_LAST_FIELD
  198. };
  199. const pb_field_t google_firestore_v1_Target_QueryTarget_fields[3] = {
  200. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_Target_QueryTarget, parent, parent, 0),
  201. PB_ANONYMOUS_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_Target_QueryTarget, structured_query, parent, &google_firestore_v1_StructuredQuery_fields),
  202. PB_LAST_FIELD
  203. };
  204. const pb_field_t google_firestore_v1_TargetChange_fields[6] = {
  205. PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1_TargetChange, target_change_type, target_change_type, 0),
  206. PB_FIELD( 2, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_TargetChange, target_ids, target_change_type, 0),
  207. PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_firestore_v1_TargetChange, cause, target_ids, &google_rpc_Status_fields),
  208. PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_TargetChange, resume_token, cause, 0),
  209. PB_FIELD( 6, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_TargetChange, read_time, resume_token, &google_protobuf_Timestamp_fields),
  210. PB_LAST_FIELD
  211. };
  212. const pb_field_t google_firestore_v1_ListCollectionIdsRequest_fields[4] = {
  213. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListCollectionIdsRequest, parent, parent, 0),
  214. PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_ListCollectionIdsRequest, page_size, parent, 0),
  215. PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListCollectionIdsRequest, page_token, page_size, 0),
  216. PB_LAST_FIELD
  217. };
  218. const pb_field_t google_firestore_v1_ListCollectionIdsResponse_fields[3] = {
  219. PB_FIELD( 1, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1_ListCollectionIdsResponse, collection_ids, collection_ids, 0),
  220. PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListCollectionIdsResponse, next_page_token, collection_ids, 0),
  221. PB_LAST_FIELD
  222. };
  223. /* Check that field information fits in pb_field_t */
  224. #if !defined(PB_FIELD_32BIT)
  225. /* If you get an error here, it means that you need to define PB_FIELD_32BIT
  226. * compile-time option. You can do that in pb.h or on compiler command line.
  227. *
  228. * The reason you need to do this is that some of your messages contain tag
  229. * numbers or field sizes that are larger than what can fit in 8 or 16 bit
  230. * field descriptors.
  231. */
  232. PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_GetDocumentRequest, read_time) < 65536 && pb_membersize(google_firestore_v1_GetDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1_ListDocumentsRequest, read_time) < 65536 && pb_membersize(google_firestore_v1_ListDocumentsRequest, mask) < 65536 && pb_membersize(google_firestore_v1_CreateDocumentRequest, document) < 65536 && pb_membersize(google_firestore_v1_CreateDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, document) < 65536 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, update_mask) < 65536 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, current_document) < 65536 && pb_membersize(google_firestore_v1_DeleteDocumentRequest, current_document) < 65536 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, new_transaction) < 65536 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, read_time) < 65536 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, mask) < 65536 && pb_membersize(google_firestore_v1_BatchGetDocumentsResponse, found) < 65536 && pb_membersize(google_firestore_v1_BatchGetDocumentsResponse, read_time) < 65536 && pb_membersize(google_firestore_v1_BeginTransactionRequest, options) < 65536 && pb_membersize(google_firestore_v1_CommitResponse, commit_time) < 65536 && pb_membersize(google_firestore_v1_RunQueryRequest, query_type.structured_query) < 65536 && pb_membersize(google_firestore_v1_RunQueryRequest, consistency_selector.new_transaction) < 65536 && pb_membersize(google_firestore_v1_RunQueryRequest, consistency_selector.read_time) < 65536 && pb_membersize(google_firestore_v1_RunQueryResponse, document) < 65536 && pb_membersize(google_firestore_v1_RunQueryResponse, read_time) < 65536 && pb_membersize(google_firestore_v1_RunAggregationQueryRequest, query_type.structured_aggregation_query) < 65536 && pb_membersize(google_firestore_v1_RunAggregationQueryRequest, consistency_selector.new_transaction) < 65536 && pb_membersize(google_firestore_v1_RunAggregationQueryRequest, consistency_selector.read_time) < 65536 && pb_membersize(google_firestore_v1_RunAggregationQueryResponse, result) < 65536 && pb_membersize(google_firestore_v1_RunAggregationQueryResponse, read_time) < 65536 && pb_membersize(google_firestore_v1_WriteResponse, commit_time) < 65536 && pb_membersize(google_firestore_v1_ListenRequest, add_target) < 65536 && pb_membersize(google_firestore_v1_ListenResponse, target_change) < 65536 && pb_membersize(google_firestore_v1_ListenResponse, document_change) < 65536 && pb_membersize(google_firestore_v1_ListenResponse, document_delete) < 65536 && pb_membersize(google_firestore_v1_ListenResponse, filter) < 65536 && pb_membersize(google_firestore_v1_ListenResponse, document_remove) < 65536 && pb_membersize(google_firestore_v1_Target, target_type.query) < 65536 && pb_membersize(google_firestore_v1_Target, target_type.documents) < 65536 && pb_membersize(google_firestore_v1_Target, resume_type.read_time) < 65536 && pb_membersize(google_firestore_v1_Target, expected_count) < 65536 && pb_membersize(google_firestore_v1_Target_QueryTarget, structured_query) < 65536 && pb_membersize(google_firestore_v1_TargetChange, cause) < 65536 && pb_membersize(google_firestore_v1_TargetChange, read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_GetDocumentRequest_google_firestore_v1_ListDocumentsRequest_google_firestore_v1_ListDocumentsResponse_google_firestore_v1_CreateDocumentRequest_google_firestore_v1_UpdateDocumentRequest_google_firestore_v1_DeleteDocumentRequest_google_firestore_v1_BatchGetDocumentsRequest_google_firestore_v1_BatchGetDocumentsResponse_google_firestore_v1_BeginTransactionRequest_google_firestore_v1_BeginTransactionResponse_google_firestore_v1_CommitRequest_google_firestore_v1_CommitResponse_google_firestore_v1_RollbackRequest_google_firestore_v1_RunQueryRequest_google_firestore_v1_RunQueryResponse_google_firestore_v1_RunAggregationQueryRequest_google_firestore_v1_RunAggregationQueryResponse_google_firestore_v1_WriteRequest_google_firestore_v1_WriteRequest_LabelsEntry_google_firestore_v1_WriteResponse_google_firestore_v1_ListenRequest_google_firestore_v1_ListenRequest_LabelsEntry_google_firestore_v1_ListenResponse_google_firestore_v1_Target_google_firestore_v1_Target_DocumentsTarget_google_firestore_v1_Target_QueryTarget_google_firestore_v1_TargetChange_google_firestore_v1_ListCollectionIdsRequest_google_firestore_v1_ListCollectionIdsResponse)
  233. #endif
  234. #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
  235. /* If you get an error here, it means that you need to define PB_FIELD_16BIT
  236. * compile-time option. You can do that in pb.h or on compiler command line.
  237. *
  238. * The reason you need to do this is that some of your messages contain tag
  239. * numbers or field sizes that are larger than what can fit in the default
  240. * 8 bit descriptors.
  241. */
  242. PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_GetDocumentRequest, read_time) < 256 && pb_membersize(google_firestore_v1_GetDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1_ListDocumentsRequest, read_time) < 256 && pb_membersize(google_firestore_v1_ListDocumentsRequest, mask) < 256 && pb_membersize(google_firestore_v1_CreateDocumentRequest, document) < 256 && pb_membersize(google_firestore_v1_CreateDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, document) < 256 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, update_mask) < 256 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, current_document) < 256 && pb_membersize(google_firestore_v1_DeleteDocumentRequest, current_document) < 256 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, new_transaction) < 256 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, read_time) < 256 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, mask) < 256 && pb_membersize(google_firestore_v1_BatchGetDocumentsResponse, found) < 256 && pb_membersize(google_firestore_v1_BatchGetDocumentsResponse, read_time) < 256 && pb_membersize(google_firestore_v1_BeginTransactionRequest, options) < 256 && pb_membersize(google_firestore_v1_CommitResponse, commit_time) < 256 && pb_membersize(google_firestore_v1_RunQueryRequest, query_type.structured_query) < 256 && pb_membersize(google_firestore_v1_RunQueryRequest, consistency_selector.new_transaction) < 256 && pb_membersize(google_firestore_v1_RunQueryRequest, consistency_selector.read_time) < 256 && pb_membersize(google_firestore_v1_RunQueryResponse, document) < 256 && pb_membersize(google_firestore_v1_RunQueryResponse, read_time) < 256 && pb_membersize(google_firestore_v1_RunAggregationQueryRequest, query_type.structured_aggregation_query) < 256 && pb_membersize(google_firestore_v1_RunAggregationQueryRequest, consistency_selector.new_transaction) < 256 && pb_membersize(google_firestore_v1_RunAggregationQueryRequest, consistency_selector.read_time) < 256 && pb_membersize(google_firestore_v1_RunAggregationQueryResponse, result) < 256 && pb_membersize(google_firestore_v1_RunAggregationQueryResponse, read_time) < 256 && pb_membersize(google_firestore_v1_WriteResponse, commit_time) < 256 && pb_membersize(google_firestore_v1_ListenRequest, add_target) < 256 && pb_membersize(google_firestore_v1_ListenResponse, target_change) < 256 && pb_membersize(google_firestore_v1_ListenResponse, document_change) < 256 && pb_membersize(google_firestore_v1_ListenResponse, document_delete) < 256 && pb_membersize(google_firestore_v1_ListenResponse, filter) < 256 && pb_membersize(google_firestore_v1_ListenResponse, document_remove) < 256 && pb_membersize(google_firestore_v1_Target, target_type.query) < 256 && pb_membersize(google_firestore_v1_Target, target_type.documents) < 256 && pb_membersize(google_firestore_v1_Target, resume_type.read_time) < 256 && pb_membersize(google_firestore_v1_Target, expected_count) < 256 && pb_membersize(google_firestore_v1_Target_QueryTarget, structured_query) < 256 && pb_membersize(google_firestore_v1_TargetChange, cause) < 256 && pb_membersize(google_firestore_v1_TargetChange, read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_GetDocumentRequest_google_firestore_v1_ListDocumentsRequest_google_firestore_v1_ListDocumentsResponse_google_firestore_v1_CreateDocumentRequest_google_firestore_v1_UpdateDocumentRequest_google_firestore_v1_DeleteDocumentRequest_google_firestore_v1_BatchGetDocumentsRequest_google_firestore_v1_BatchGetDocumentsResponse_google_firestore_v1_BeginTransactionRequest_google_firestore_v1_BeginTransactionResponse_google_firestore_v1_CommitRequest_google_firestore_v1_CommitResponse_google_firestore_v1_RollbackRequest_google_firestore_v1_RunQueryRequest_google_firestore_v1_RunQueryResponse_google_firestore_v1_RunAggregationQueryRequest_google_firestore_v1_RunAggregationQueryResponse_google_firestore_v1_WriteRequest_google_firestore_v1_WriteRequest_LabelsEntry_google_firestore_v1_WriteResponse_google_firestore_v1_ListenRequest_google_firestore_v1_ListenRequest_LabelsEntry_google_firestore_v1_ListenResponse_google_firestore_v1_Target_google_firestore_v1_Target_DocumentsTarget_google_firestore_v1_Target_QueryTarget_google_firestore_v1_TargetChange_google_firestore_v1_ListCollectionIdsRequest_google_firestore_v1_ListCollectionIdsResponse)
  243. #endif
  244. const char* EnumToString(
  245. google_firestore_v1_TargetChange_TargetChangeType value) {
  246. switch (value) {
  247. case google_firestore_v1_TargetChange_TargetChangeType_NO_CHANGE:
  248. return "NO_CHANGE";
  249. case google_firestore_v1_TargetChange_TargetChangeType_ADD:
  250. return "ADD";
  251. case google_firestore_v1_TargetChange_TargetChangeType_REMOVE:
  252. return "REMOVE";
  253. case google_firestore_v1_TargetChange_TargetChangeType_CURRENT:
  254. return "CURRENT";
  255. case google_firestore_v1_TargetChange_TargetChangeType_RESET:
  256. return "RESET";
  257. }
  258. return "<unknown enum value>";
  259. }
  260. std::string google_firestore_v1_GetDocumentRequest::ToString(int indent) const {
  261. std::string tostring_header = PrintHeader(indent, "GetDocumentRequest", this);
  262. std::string tostring_result;
  263. tostring_result += PrintPrimitiveField("name: ", name, indent + 1, false);
  264. tostring_result += PrintMessageField("mask ", mask, indent + 1, false);
  265. switch (which_consistency_selector) {
  266. case google_firestore_v1_GetDocumentRequest_transaction_tag:
  267. tostring_result += PrintPrimitiveField("transaction: ",
  268. transaction, indent + 1, true);
  269. break;
  270. case google_firestore_v1_GetDocumentRequest_read_time_tag:
  271. tostring_result += PrintMessageField("read_time ",
  272. read_time, indent + 1, true);
  273. break;
  274. }
  275. std::string tostring_tail = PrintTail(indent);
  276. return tostring_header + tostring_result + tostring_tail;
  277. }
  278. std::string google_firestore_v1_ListDocumentsRequest::ToString(int indent) const {
  279. std::string tostring_header = PrintHeader(indent, "ListDocumentsRequest", this);
  280. std::string tostring_result;
  281. tostring_result += PrintPrimitiveField("parent: ",
  282. parent, indent + 1, false);
  283. tostring_result += PrintPrimitiveField("collection_id: ",
  284. collection_id, indent + 1, false);
  285. tostring_result += PrintPrimitiveField("page_size: ",
  286. page_size, indent + 1, false);
  287. tostring_result += PrintPrimitiveField("page_token: ",
  288. page_token, indent + 1, false);
  289. tostring_result += PrintPrimitiveField("order_by: ",
  290. order_by, indent + 1, false);
  291. tostring_result += PrintMessageField("mask ", mask, indent + 1, false);
  292. switch (which_consistency_selector) {
  293. case google_firestore_v1_ListDocumentsRequest_transaction_tag:
  294. tostring_result += PrintPrimitiveField("transaction: ",
  295. transaction, indent + 1, true);
  296. break;
  297. case google_firestore_v1_ListDocumentsRequest_read_time_tag:
  298. tostring_result += PrintMessageField("read_time ",
  299. read_time, indent + 1, true);
  300. break;
  301. }
  302. tostring_result += PrintPrimitiveField("show_missing: ",
  303. show_missing, indent + 1, false);
  304. std::string tostring_tail = PrintTail(indent);
  305. return tostring_header + tostring_result + tostring_tail;
  306. }
  307. std::string google_firestore_v1_ListDocumentsResponse::ToString(int indent) const {
  308. std::string tostring_header = PrintHeader(indent, "ListDocumentsResponse", this);
  309. std::string tostring_result;
  310. for (pb_size_t i = 0; i != documents_count; ++i) {
  311. tostring_result += PrintMessageField("documents ",
  312. documents[i], indent + 1, true);
  313. }
  314. tostring_result += PrintPrimitiveField("next_page_token: ",
  315. next_page_token, indent + 1, false);
  316. bool is_root = indent == 0;
  317. if (!tostring_result.empty() || is_root) {
  318. std::string tostring_tail = PrintTail(indent);
  319. return tostring_header + tostring_result + tostring_tail;
  320. } else {
  321. return "";
  322. }
  323. }
  324. std::string google_firestore_v1_CreateDocumentRequest::ToString(int indent) const {
  325. std::string tostring_header = PrintHeader(indent, "CreateDocumentRequest", this);
  326. std::string tostring_result;
  327. tostring_result += PrintPrimitiveField("parent: ",
  328. parent, indent + 1, false);
  329. tostring_result += PrintPrimitiveField("collection_id: ",
  330. collection_id, indent + 1, false);
  331. tostring_result += PrintPrimitiveField("document_id: ",
  332. document_id, indent + 1, false);
  333. tostring_result += PrintMessageField("document ",
  334. document, indent + 1, false);
  335. tostring_result += PrintMessageField("mask ", mask, indent + 1, false);
  336. std::string tostring_tail = PrintTail(indent);
  337. return tostring_header + tostring_result + tostring_tail;
  338. }
  339. std::string google_firestore_v1_UpdateDocumentRequest::ToString(int indent) const {
  340. std::string tostring_header = PrintHeader(indent, "UpdateDocumentRequest", this);
  341. std::string tostring_result;
  342. tostring_result += PrintMessageField("document ",
  343. document, indent + 1, false);
  344. tostring_result += PrintMessageField("update_mask ",
  345. update_mask, indent + 1, false);
  346. tostring_result += PrintMessageField("mask ", mask, indent + 1, false);
  347. tostring_result += PrintMessageField("current_document ",
  348. current_document, indent + 1, false);
  349. std::string tostring_tail = PrintTail(indent);
  350. return tostring_header + tostring_result + tostring_tail;
  351. }
  352. std::string google_firestore_v1_DeleteDocumentRequest::ToString(int indent) const {
  353. std::string tostring_header = PrintHeader(indent, "DeleteDocumentRequest", this);
  354. std::string tostring_result;
  355. tostring_result += PrintPrimitiveField("name: ", name, indent + 1, false);
  356. tostring_result += PrintMessageField("current_document ",
  357. current_document, indent + 1, false);
  358. std::string tostring_tail = PrintTail(indent);
  359. return tostring_header + tostring_result + tostring_tail;
  360. }
  361. std::string google_firestore_v1_BatchGetDocumentsRequest::ToString(int indent) const {
  362. std::string tostring_header = PrintHeader(indent, "BatchGetDocumentsRequest", this);
  363. std::string tostring_result;
  364. tostring_result += PrintPrimitiveField("database: ",
  365. database, indent + 1, false);
  366. for (pb_size_t i = 0; i != documents_count; ++i) {
  367. tostring_result += PrintPrimitiveField("documents: ",
  368. documents[i], indent + 1, true);
  369. }
  370. tostring_result += PrintMessageField("mask ", mask, indent + 1, false);
  371. switch (which_consistency_selector) {
  372. case google_firestore_v1_BatchGetDocumentsRequest_transaction_tag:
  373. tostring_result += PrintPrimitiveField("transaction: ",
  374. transaction, indent + 1, true);
  375. break;
  376. case google_firestore_v1_BatchGetDocumentsRequest_new_transaction_tag:
  377. tostring_result += PrintMessageField("new_transaction ",
  378. new_transaction, indent + 1, true);
  379. break;
  380. case google_firestore_v1_BatchGetDocumentsRequest_read_time_tag:
  381. tostring_result += PrintMessageField("read_time ",
  382. read_time, indent + 1, true);
  383. break;
  384. }
  385. std::string tostring_tail = PrintTail(indent);
  386. return tostring_header + tostring_result + tostring_tail;
  387. }
  388. std::string google_firestore_v1_BatchGetDocumentsResponse::ToString(int indent) const {
  389. std::string tostring_header = PrintHeader(indent, "BatchGetDocumentsResponse", this);
  390. std::string tostring_result;
  391. switch (which_result) {
  392. case google_firestore_v1_BatchGetDocumentsResponse_found_tag:
  393. tostring_result += PrintMessageField("found ",
  394. found, indent + 1, true);
  395. break;
  396. case google_firestore_v1_BatchGetDocumentsResponse_missing_tag:
  397. tostring_result += PrintPrimitiveField("missing: ",
  398. missing, indent + 1, true);
  399. break;
  400. }
  401. tostring_result += PrintPrimitiveField("transaction: ",
  402. transaction, indent + 1, false);
  403. tostring_result += PrintMessageField("read_time ",
  404. read_time, indent + 1, false);
  405. std::string tostring_tail = PrintTail(indent);
  406. return tostring_header + tostring_result + tostring_tail;
  407. }
  408. std::string google_firestore_v1_BeginTransactionRequest::ToString(int indent) const {
  409. std::string tostring_header = PrintHeader(indent, "BeginTransactionRequest", this);
  410. std::string tostring_result;
  411. tostring_result += PrintPrimitiveField("database: ",
  412. database, indent + 1, false);
  413. tostring_result += PrintMessageField("options ",
  414. options, indent + 1, false);
  415. std::string tostring_tail = PrintTail(indent);
  416. return tostring_header + tostring_result + tostring_tail;
  417. }
  418. std::string google_firestore_v1_BeginTransactionResponse::ToString(int indent) const {
  419. std::string tostring_header = PrintHeader(indent, "BeginTransactionResponse", this);
  420. std::string tostring_result;
  421. tostring_result += PrintPrimitiveField("transaction: ",
  422. transaction, indent + 1, false);
  423. bool is_root = indent == 0;
  424. if (!tostring_result.empty() || is_root) {
  425. std::string tostring_tail = PrintTail(indent);
  426. return tostring_header + tostring_result + tostring_tail;
  427. } else {
  428. return "";
  429. }
  430. }
  431. std::string google_firestore_v1_CommitRequest::ToString(int indent) const {
  432. std::string tostring_header = PrintHeader(indent, "CommitRequest", this);
  433. std::string tostring_result;
  434. tostring_result += PrintPrimitiveField("database: ",
  435. database, indent + 1, false);
  436. for (pb_size_t i = 0; i != writes_count; ++i) {
  437. tostring_result += PrintMessageField("writes ",
  438. writes[i], indent + 1, true);
  439. }
  440. tostring_result += PrintPrimitiveField("transaction: ",
  441. transaction, indent + 1, false);
  442. bool is_root = indent == 0;
  443. if (!tostring_result.empty() || is_root) {
  444. std::string tostring_tail = PrintTail(indent);
  445. return tostring_header + tostring_result + tostring_tail;
  446. } else {
  447. return "";
  448. }
  449. }
  450. std::string google_firestore_v1_CommitResponse::ToString(int indent) const {
  451. std::string tostring_header = PrintHeader(indent, "CommitResponse", this);
  452. std::string tostring_result;
  453. for (pb_size_t i = 0; i != write_results_count; ++i) {
  454. tostring_result += PrintMessageField("write_results ",
  455. write_results[i], indent + 1, true);
  456. }
  457. tostring_result += PrintMessageField("commit_time ",
  458. commit_time, indent + 1, false);
  459. std::string tostring_tail = PrintTail(indent);
  460. return tostring_header + tostring_result + tostring_tail;
  461. }
  462. std::string google_firestore_v1_RollbackRequest::ToString(int indent) const {
  463. std::string tostring_header = PrintHeader(indent, "RollbackRequest", this);
  464. std::string tostring_result;
  465. tostring_result += PrintPrimitiveField("database: ",
  466. database, indent + 1, false);
  467. tostring_result += PrintPrimitiveField("transaction: ",
  468. transaction, indent + 1, false);
  469. bool is_root = indent == 0;
  470. if (!tostring_result.empty() || is_root) {
  471. std::string tostring_tail = PrintTail(indent);
  472. return tostring_header + tostring_result + tostring_tail;
  473. } else {
  474. return "";
  475. }
  476. }
  477. std::string google_firestore_v1_RunQueryRequest::ToString(int indent) const {
  478. std::string tostring_header = PrintHeader(indent, "RunQueryRequest", this);
  479. std::string tostring_result;
  480. tostring_result += PrintPrimitiveField("parent: ",
  481. parent, indent + 1, false);
  482. switch (which_query_type) {
  483. case google_firestore_v1_RunQueryRequest_structured_query_tag:
  484. tostring_result += PrintMessageField("structured_query ",
  485. query_type.structured_query, indent + 1, true);
  486. break;
  487. }
  488. switch (which_consistency_selector) {
  489. case google_firestore_v1_RunQueryRequest_transaction_tag:
  490. tostring_result += PrintPrimitiveField("transaction: ",
  491. consistency_selector.transaction, indent + 1, true);
  492. break;
  493. case google_firestore_v1_RunQueryRequest_new_transaction_tag:
  494. tostring_result += PrintMessageField("new_transaction ",
  495. consistency_selector.new_transaction, indent + 1, true);
  496. break;
  497. case google_firestore_v1_RunQueryRequest_read_time_tag:
  498. tostring_result += PrintMessageField("read_time ",
  499. consistency_selector.read_time, indent + 1, true);
  500. break;
  501. }
  502. bool is_root = indent == 0;
  503. if (!tostring_result.empty() || is_root) {
  504. std::string tostring_tail = PrintTail(indent);
  505. return tostring_header + tostring_result + tostring_tail;
  506. } else {
  507. return "";
  508. }
  509. }
  510. std::string google_firestore_v1_RunQueryResponse::ToString(int indent) const {
  511. std::string tostring_header = PrintHeader(indent, "RunQueryResponse", this);
  512. std::string tostring_result;
  513. tostring_result += PrintMessageField("document ",
  514. document, indent + 1, false);
  515. tostring_result += PrintPrimitiveField("transaction: ",
  516. transaction, indent + 1, false);
  517. tostring_result += PrintMessageField("read_time ",
  518. read_time, indent + 1, false);
  519. tostring_result += PrintPrimitiveField("skipped_results: ",
  520. skipped_results, indent + 1, false);
  521. std::string tostring_tail = PrintTail(indent);
  522. return tostring_header + tostring_result + tostring_tail;
  523. }
  524. std::string google_firestore_v1_RunAggregationQueryRequest::ToString(int indent) const {
  525. std::string tostring_header = PrintHeader(indent, "RunAggregationQueryRequest", this);
  526. std::string tostring_result;
  527. tostring_result += PrintPrimitiveField("parent: ",
  528. parent, indent + 1, false);
  529. switch (which_query_type) {
  530. case google_firestore_v1_RunAggregationQueryRequest_structured_aggregation_query_tag:
  531. tostring_result += PrintMessageField("structured_aggregation_query ",
  532. query_type.structured_aggregation_query, indent + 1, true);
  533. break;
  534. }
  535. switch (which_consistency_selector) {
  536. case google_firestore_v1_RunAggregationQueryRequest_transaction_tag:
  537. tostring_result += PrintPrimitiveField("transaction: ",
  538. consistency_selector.transaction, indent + 1, true);
  539. break;
  540. case google_firestore_v1_RunAggregationQueryRequest_new_transaction_tag:
  541. tostring_result += PrintMessageField("new_transaction ",
  542. consistency_selector.new_transaction, indent + 1, true);
  543. break;
  544. case google_firestore_v1_RunAggregationQueryRequest_read_time_tag:
  545. tostring_result += PrintMessageField("read_time ",
  546. consistency_selector.read_time, indent + 1, true);
  547. break;
  548. }
  549. bool is_root = indent == 0;
  550. if (!tostring_result.empty() || is_root) {
  551. std::string tostring_tail = PrintTail(indent);
  552. return tostring_header + tostring_result + tostring_tail;
  553. } else {
  554. return "";
  555. }
  556. }
  557. std::string google_firestore_v1_RunAggregationQueryResponse::ToString(int indent) const {
  558. std::string tostring_header = PrintHeader(indent, "RunAggregationQueryResponse", this);
  559. std::string tostring_result;
  560. tostring_result += PrintMessageField("result ", result, indent + 1, false);
  561. tostring_result += PrintPrimitiveField("transaction: ",
  562. transaction, indent + 1, false);
  563. tostring_result += PrintMessageField("read_time ",
  564. read_time, indent + 1, false);
  565. std::string tostring_tail = PrintTail(indent);
  566. return tostring_header + tostring_result + tostring_tail;
  567. }
  568. std::string google_firestore_v1_WriteRequest::ToString(int indent) const {
  569. std::string tostring_header = PrintHeader(indent, "WriteRequest", this);
  570. std::string tostring_result;
  571. tostring_result += PrintPrimitiveField("database: ",
  572. database, indent + 1, false);
  573. tostring_result += PrintPrimitiveField("stream_id: ",
  574. stream_id, indent + 1, false);
  575. for (pb_size_t i = 0; i != writes_count; ++i) {
  576. tostring_result += PrintMessageField("writes ",
  577. writes[i], indent + 1, true);
  578. }
  579. tostring_result += PrintPrimitiveField("stream_token: ",
  580. stream_token, indent + 1, false);
  581. for (pb_size_t i = 0; i != labels_count; ++i) {
  582. tostring_result += PrintMessageField("labels ",
  583. labels[i], indent + 1, true);
  584. }
  585. bool is_root = indent == 0;
  586. if (!tostring_result.empty() || is_root) {
  587. std::string tostring_tail = PrintTail(indent);
  588. return tostring_header + tostring_result + tostring_tail;
  589. } else {
  590. return "";
  591. }
  592. }
  593. std::string google_firestore_v1_WriteRequest_LabelsEntry::ToString(int indent) const {
  594. std::string tostring_header = PrintHeader(indent, "LabelsEntry", this);
  595. std::string tostring_result;
  596. tostring_result += PrintPrimitiveField("key: ", key, indent + 1, false);
  597. tostring_result += PrintPrimitiveField("value: ",
  598. value, indent + 1, false);
  599. bool is_root = indent == 0;
  600. if (!tostring_result.empty() || is_root) {
  601. std::string tostring_tail = PrintTail(indent);
  602. return tostring_header + tostring_result + tostring_tail;
  603. } else {
  604. return "";
  605. }
  606. }
  607. std::string google_firestore_v1_WriteResponse::ToString(int indent) const {
  608. std::string tostring_header = PrintHeader(indent, "WriteResponse", this);
  609. std::string tostring_result;
  610. tostring_result += PrintPrimitiveField("stream_id: ",
  611. stream_id, indent + 1, false);
  612. tostring_result += PrintPrimitiveField("stream_token: ",
  613. stream_token, indent + 1, false);
  614. for (pb_size_t i = 0; i != write_results_count; ++i) {
  615. tostring_result += PrintMessageField("write_results ",
  616. write_results[i], indent + 1, true);
  617. }
  618. tostring_result += PrintMessageField("commit_time ",
  619. commit_time, indent + 1, false);
  620. std::string tostring_tail = PrintTail(indent);
  621. return tostring_header + tostring_result + tostring_tail;
  622. }
  623. std::string google_firestore_v1_ListenRequest::ToString(int indent) const {
  624. std::string tostring_header = PrintHeader(indent, "ListenRequest", this);
  625. std::string tostring_result;
  626. tostring_result += PrintPrimitiveField("database: ",
  627. database, indent + 1, false);
  628. switch (which_target_change) {
  629. case google_firestore_v1_ListenRequest_add_target_tag:
  630. tostring_result += PrintMessageField("add_target ",
  631. add_target, indent + 1, true);
  632. break;
  633. case google_firestore_v1_ListenRequest_remove_target_tag:
  634. tostring_result += PrintPrimitiveField("remove_target: ",
  635. remove_target, indent + 1, true);
  636. break;
  637. }
  638. for (pb_size_t i = 0; i != labels_count; ++i) {
  639. tostring_result += PrintMessageField("labels ",
  640. labels[i], indent + 1, true);
  641. }
  642. bool is_root = indent == 0;
  643. if (!tostring_result.empty() || is_root) {
  644. std::string tostring_tail = PrintTail(indent);
  645. return tostring_header + tostring_result + tostring_tail;
  646. } else {
  647. return "";
  648. }
  649. }
  650. std::string google_firestore_v1_ListenRequest_LabelsEntry::ToString(int indent) const {
  651. std::string tostring_header = PrintHeader(indent, "LabelsEntry", this);
  652. std::string tostring_result;
  653. tostring_result += PrintPrimitiveField("key: ", key, indent + 1, false);
  654. tostring_result += PrintPrimitiveField("value: ",
  655. value, indent + 1, false);
  656. bool is_root = indent == 0;
  657. if (!tostring_result.empty() || is_root) {
  658. std::string tostring_tail = PrintTail(indent);
  659. return tostring_header + tostring_result + tostring_tail;
  660. } else {
  661. return "";
  662. }
  663. }
  664. std::string google_firestore_v1_ListenResponse::ToString(int indent) const {
  665. std::string tostring_header = PrintHeader(indent, "ListenResponse", this);
  666. std::string tostring_result;
  667. switch (which_response_type) {
  668. case google_firestore_v1_ListenResponse_target_change_tag:
  669. tostring_result += PrintMessageField("target_change ",
  670. target_change, indent + 1, true);
  671. break;
  672. case google_firestore_v1_ListenResponse_document_change_tag:
  673. tostring_result += PrintMessageField("document_change ",
  674. document_change, indent + 1, true);
  675. break;
  676. case google_firestore_v1_ListenResponse_document_delete_tag:
  677. tostring_result += PrintMessageField("document_delete ",
  678. document_delete, indent + 1, true);
  679. break;
  680. case google_firestore_v1_ListenResponse_filter_tag:
  681. tostring_result += PrintMessageField("filter ",
  682. filter, indent + 1, true);
  683. break;
  684. case google_firestore_v1_ListenResponse_document_remove_tag:
  685. tostring_result += PrintMessageField("document_remove ",
  686. document_remove, indent + 1, true);
  687. break;
  688. }
  689. bool is_root = indent == 0;
  690. if (!tostring_result.empty() || is_root) {
  691. std::string tostring_tail = PrintTail(indent);
  692. return tostring_header + tostring_result + tostring_tail;
  693. } else {
  694. return "";
  695. }
  696. }
  697. std::string google_firestore_v1_Target::ToString(int indent) const {
  698. std::string tostring_header = PrintHeader(indent, "Target", this);
  699. std::string tostring_result;
  700. switch (which_target_type) {
  701. case google_firestore_v1_Target_query_tag:
  702. tostring_result += PrintMessageField("query ",
  703. target_type.query, indent + 1, true);
  704. break;
  705. case google_firestore_v1_Target_documents_tag:
  706. tostring_result += PrintMessageField("documents ",
  707. target_type.documents, indent + 1, true);
  708. break;
  709. }
  710. switch (which_resume_type) {
  711. case google_firestore_v1_Target_resume_token_tag:
  712. tostring_result += PrintPrimitiveField("resume_token: ",
  713. resume_type.resume_token, indent + 1, true);
  714. break;
  715. case google_firestore_v1_Target_read_time_tag:
  716. tostring_result += PrintMessageField("read_time ",
  717. resume_type.read_time, indent + 1, true);
  718. break;
  719. }
  720. tostring_result += PrintPrimitiveField("target_id: ",
  721. target_id, indent + 1, false);
  722. tostring_result += PrintPrimitiveField("once: ", once, indent + 1, false);
  723. if (has_expected_count) {
  724. tostring_result += PrintMessageField("expected_count ",
  725. expected_count, indent + 1, true);
  726. }
  727. std::string tostring_tail = PrintTail(indent);
  728. return tostring_header + tostring_result + tostring_tail;
  729. }
  730. std::string google_firestore_v1_Target_DocumentsTarget::ToString(int indent) const {
  731. std::string tostring_header = PrintHeader(indent, "DocumentsTarget", this);
  732. std::string tostring_result;
  733. for (pb_size_t i = 0; i != documents_count; ++i) {
  734. tostring_result += PrintPrimitiveField("documents: ",
  735. documents[i], indent + 1, true);
  736. }
  737. bool is_root = indent == 0;
  738. if (!tostring_result.empty() || is_root) {
  739. std::string tostring_tail = PrintTail(indent);
  740. return tostring_header + tostring_result + tostring_tail;
  741. } else {
  742. return "";
  743. }
  744. }
  745. std::string google_firestore_v1_Target_QueryTarget::ToString(int indent) const {
  746. std::string tostring_header = PrintHeader(indent, "QueryTarget", this);
  747. std::string tostring_result;
  748. tostring_result += PrintPrimitiveField("parent: ",
  749. parent, indent + 1, false);
  750. switch (which_query_type) {
  751. case google_firestore_v1_Target_QueryTarget_structured_query_tag:
  752. tostring_result += PrintMessageField("structured_query ",
  753. structured_query, indent + 1, true);
  754. break;
  755. }
  756. bool is_root = indent == 0;
  757. if (!tostring_result.empty() || is_root) {
  758. std::string tostring_tail = PrintTail(indent);
  759. return tostring_header + tostring_result + tostring_tail;
  760. } else {
  761. return "";
  762. }
  763. }
  764. std::string google_firestore_v1_TargetChange::ToString(int indent) const {
  765. std::string tostring_header = PrintHeader(indent, "TargetChange", this);
  766. std::string tostring_result;
  767. tostring_result += PrintEnumField("target_change_type: ",
  768. target_change_type, indent + 1, false);
  769. for (pb_size_t i = 0; i != target_ids_count; ++i) {
  770. tostring_result += PrintPrimitiveField("target_ids: ",
  771. target_ids[i], indent + 1, true);
  772. }
  773. if (has_cause) {
  774. tostring_result += PrintMessageField("cause ",
  775. cause, indent + 1, true);
  776. }
  777. tostring_result += PrintPrimitiveField("resume_token: ",
  778. resume_token, indent + 1, false);
  779. tostring_result += PrintMessageField("read_time ",
  780. read_time, indent + 1, false);
  781. std::string tostring_tail = PrintTail(indent);
  782. return tostring_header + tostring_result + tostring_tail;
  783. }
  784. std::string google_firestore_v1_ListCollectionIdsRequest::ToString(int indent) const {
  785. std::string tostring_header = PrintHeader(indent, "ListCollectionIdsRequest", this);
  786. std::string tostring_result;
  787. tostring_result += PrintPrimitiveField("parent: ",
  788. parent, indent + 1, false);
  789. tostring_result += PrintPrimitiveField("page_size: ",
  790. page_size, indent + 1, false);
  791. tostring_result += PrintPrimitiveField("page_token: ",
  792. page_token, indent + 1, false);
  793. bool is_root = indent == 0;
  794. if (!tostring_result.empty() || is_root) {
  795. std::string tostring_tail = PrintTail(indent);
  796. return tostring_header + tostring_result + tostring_tail;
  797. } else {
  798. return "";
  799. }
  800. }
  801. std::string google_firestore_v1_ListCollectionIdsResponse::ToString(int indent) const {
  802. std::string tostring_header = PrintHeader(indent, "ListCollectionIdsResponse", this);
  803. std::string tostring_result;
  804. for (pb_size_t i = 0; i != collection_ids_count; ++i) {
  805. tostring_result += PrintPrimitiveField("collection_ids: ",
  806. collection_ids[i], indent + 1, true);
  807. }
  808. tostring_result += PrintPrimitiveField("next_page_token: ",
  809. next_page_token, indent + 1, false);
  810. bool is_root = indent == 0;
  811. if (!tostring_result.empty() || is_root) {
  812. std::string tostring_tail = PrintTail(indent);
  813. return tostring_header + tostring_result + tostring_tail;
  814. } else {
  815. return "";
  816. }
  817. }
  818. } // namespace firestore
  819. } // namespace firebase
  820. /* @@protoc_insertion_point(eof) */