wrappers.nanopb.cc 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. /*
  2. * Copyright 2023 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 "wrappers.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_protobuf_DoubleValue_fields[2] = {
  32. PB_FIELD( 1, DOUBLE , SINGULAR, STATIC , FIRST, google_protobuf_DoubleValue, value, value, 0),
  33. PB_LAST_FIELD
  34. };
  35. const pb_field_t google_protobuf_FloatValue_fields[2] = {
  36. PB_FIELD( 1, FLOAT , SINGULAR, STATIC , FIRST, google_protobuf_FloatValue, value, value, 0),
  37. PB_LAST_FIELD
  38. };
  39. const pb_field_t google_protobuf_Int64Value_fields[2] = {
  40. PB_FIELD( 1, INT64 , SINGULAR, STATIC , FIRST, google_protobuf_Int64Value, value, value, 0),
  41. PB_LAST_FIELD
  42. };
  43. const pb_field_t google_protobuf_UInt64Value_fields[2] = {
  44. PB_FIELD( 1, UINT64 , SINGULAR, STATIC , FIRST, google_protobuf_UInt64Value, value, value, 0),
  45. PB_LAST_FIELD
  46. };
  47. const pb_field_t google_protobuf_Int32Value_fields[2] = {
  48. PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, google_protobuf_Int32Value, value, value, 0),
  49. PB_LAST_FIELD
  50. };
  51. const pb_field_t google_protobuf_UInt32Value_fields[2] = {
  52. PB_FIELD( 1, UINT32 , SINGULAR, STATIC , FIRST, google_protobuf_UInt32Value, value, value, 0),
  53. PB_LAST_FIELD
  54. };
  55. const pb_field_t google_protobuf_BoolValue_fields[2] = {
  56. PB_FIELD( 1, BOOL , SINGULAR, STATIC , FIRST, google_protobuf_BoolValue, value, value, 0),
  57. PB_LAST_FIELD
  58. };
  59. const pb_field_t google_protobuf_StringValue_fields[2] = {
  60. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_protobuf_StringValue, value, value, 0),
  61. PB_LAST_FIELD
  62. };
  63. const pb_field_t google_protobuf_BytesValue_fields[2] = {
  64. PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_protobuf_BytesValue, value, value, 0),
  65. PB_LAST_FIELD
  66. };
  67. /* On some platforms (such as AVR), double is really float.
  68. * These are not directly supported by nanopb, but see example_avr_double.
  69. * To get rid of this error, remove any double fields from your .proto.
  70. */
  71. PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)
  72. std::string google_protobuf_DoubleValue::ToString(int indent) const {
  73. std::string tostring_header = PrintHeader(indent, "DoubleValue", this);
  74. std::string tostring_result;
  75. tostring_result += PrintPrimitiveField("value: ",
  76. value, indent + 1, false);
  77. bool is_root = indent == 0;
  78. if (!tostring_result.empty() || is_root) {
  79. std::string tostring_tail = PrintTail(indent);
  80. return tostring_header + tostring_result + tostring_tail;
  81. } else {
  82. return "";
  83. }
  84. }
  85. std::string google_protobuf_FloatValue::ToString(int indent) const {
  86. std::string tostring_header = PrintHeader(indent, "FloatValue", this);
  87. std::string tostring_result;
  88. tostring_result += PrintPrimitiveField("value: ",
  89. value, indent + 1, false);
  90. bool is_root = indent == 0;
  91. if (!tostring_result.empty() || is_root) {
  92. std::string tostring_tail = PrintTail(indent);
  93. return tostring_header + tostring_result + tostring_tail;
  94. } else {
  95. return "";
  96. }
  97. }
  98. std::string google_protobuf_Int64Value::ToString(int indent) const {
  99. std::string tostring_header = PrintHeader(indent, "Int64Value", this);
  100. std::string tostring_result;
  101. tostring_result += PrintPrimitiveField("value: ",
  102. value, indent + 1, false);
  103. bool is_root = indent == 0;
  104. if (!tostring_result.empty() || is_root) {
  105. std::string tostring_tail = PrintTail(indent);
  106. return tostring_header + tostring_result + tostring_tail;
  107. } else {
  108. return "";
  109. }
  110. }
  111. std::string google_protobuf_UInt64Value::ToString(int indent) const {
  112. std::string tostring_header = PrintHeader(indent, "UInt64Value", this);
  113. std::string tostring_result;
  114. tostring_result += PrintPrimitiveField("value: ",
  115. value, indent + 1, false);
  116. bool is_root = indent == 0;
  117. if (!tostring_result.empty() || is_root) {
  118. std::string tostring_tail = PrintTail(indent);
  119. return tostring_header + tostring_result + tostring_tail;
  120. } else {
  121. return "";
  122. }
  123. }
  124. std::string google_protobuf_Int32Value::ToString(int indent) const {
  125. std::string tostring_header = PrintHeader(indent, "Int32Value", this);
  126. std::string tostring_result;
  127. tostring_result += PrintPrimitiveField("value: ",
  128. value, indent + 1, false);
  129. bool is_root = indent == 0;
  130. if (!tostring_result.empty() || is_root) {
  131. std::string tostring_tail = PrintTail(indent);
  132. return tostring_header + tostring_result + tostring_tail;
  133. } else {
  134. return "";
  135. }
  136. }
  137. std::string google_protobuf_UInt32Value::ToString(int indent) const {
  138. std::string tostring_header = PrintHeader(indent, "UInt32Value", this);
  139. std::string tostring_result;
  140. tostring_result += PrintPrimitiveField("value: ",
  141. value, indent + 1, false);
  142. bool is_root = indent == 0;
  143. if (!tostring_result.empty() || is_root) {
  144. std::string tostring_tail = PrintTail(indent);
  145. return tostring_header + tostring_result + tostring_tail;
  146. } else {
  147. return "";
  148. }
  149. }
  150. std::string google_protobuf_BoolValue::ToString(int indent) const {
  151. std::string tostring_header = PrintHeader(indent, "BoolValue", this);
  152. std::string tostring_result;
  153. tostring_result += PrintPrimitiveField("value: ",
  154. value, indent + 1, false);
  155. bool is_root = indent == 0;
  156. if (!tostring_result.empty() || is_root) {
  157. std::string tostring_tail = PrintTail(indent);
  158. return tostring_header + tostring_result + tostring_tail;
  159. } else {
  160. return "";
  161. }
  162. }
  163. std::string google_protobuf_StringValue::ToString(int indent) const {
  164. std::string tostring_header = PrintHeader(indent, "StringValue", this);
  165. std::string tostring_result;
  166. tostring_result += PrintPrimitiveField("value: ",
  167. value, indent + 1, false);
  168. bool is_root = indent == 0;
  169. if (!tostring_result.empty() || is_root) {
  170. std::string tostring_tail = PrintTail(indent);
  171. return tostring_header + tostring_result + tostring_tail;
  172. } else {
  173. return "";
  174. }
  175. }
  176. std::string google_protobuf_BytesValue::ToString(int indent) const {
  177. std::string tostring_header = PrintHeader(indent, "BytesValue", this);
  178. std::string tostring_result;
  179. tostring_result += PrintPrimitiveField("value: ",
  180. value, indent + 1, false);
  181. bool is_root = indent == 0;
  182. if (!tostring_result.empty() || is_root) {
  183. std::string tostring_tail = PrintTail(indent);
  184. return tostring_header + tostring_result + tostring_tail;
  185. } else {
  186. return "";
  187. }
  188. }
  189. } // namespace firestore
  190. } // namespace firebase
  191. /* @@protoc_insertion_point(eof) */