bundle.nanopb.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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 header */
  17. /* Generated by nanopb-0.3.9.8 */
  18. #ifndef PB_FIRESTORE_BUNDLE_NANOPB_H_INCLUDED
  19. #define PB_FIRESTORE_BUNDLE_NANOPB_H_INCLUDED
  20. #include <pb.h>
  21. #include "google/firestore/v1/document.nanopb.h"
  22. #include "google/firestore/v1/query.nanopb.h"
  23. #include "google/protobuf/timestamp.nanopb.h"
  24. #include <string>
  25. namespace firebase {
  26. namespace firestore {
  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. /* Enum definitions */
  32. typedef enum _firestore_BundledQuery_LimitType {
  33. firestore_BundledQuery_LimitType_FIRST = 0,
  34. firestore_BundledQuery_LimitType_LAST = 1
  35. } firestore_BundledQuery_LimitType;
  36. #define _firestore_BundledQuery_LimitType_MIN firestore_BundledQuery_LimitType_FIRST
  37. #define _firestore_BundledQuery_LimitType_MAX firestore_BundledQuery_LimitType_LAST
  38. #define _firestore_BundledQuery_LimitType_ARRAYSIZE ((firestore_BundledQuery_LimitType)(firestore_BundledQuery_LimitType_LAST+1))
  39. /* Struct definitions */
  40. typedef struct _firestore_BundleMetadata {
  41. pb_bytes_array_t *id;
  42. google_protobuf_Timestamp create_time;
  43. uint32_t version;
  44. uint32_t total_documents;
  45. uint64_t total_bytes;
  46. std::string ToString(int indent = 0) const;
  47. /* @@protoc_insertion_point(struct:firestore_BundleMetadata) */
  48. } firestore_BundleMetadata;
  49. typedef struct _firestore_BundledDocumentMetadata {
  50. pb_bytes_array_t *name;
  51. google_protobuf_Timestamp read_time;
  52. bool exists;
  53. pb_size_t queries_count;
  54. pb_bytes_array_t **queries;
  55. std::string ToString(int indent = 0) const;
  56. /* @@protoc_insertion_point(struct:firestore_BundledDocumentMetadata) */
  57. } firestore_BundledDocumentMetadata;
  58. typedef struct _firestore_BundledQuery {
  59. pb_bytes_array_t *parent;
  60. pb_size_t which_query_type;
  61. union {
  62. google_firestore_v1_StructuredQuery structured_query;
  63. };
  64. firestore_BundledQuery_LimitType limit_type;
  65. std::string ToString(int indent = 0) const;
  66. /* @@protoc_insertion_point(struct:firestore_BundledQuery) */
  67. } firestore_BundledQuery;
  68. typedef struct _firestore_NamedQuery {
  69. pb_bytes_array_t *name;
  70. firestore_BundledQuery bundled_query;
  71. google_protobuf_Timestamp read_time;
  72. std::string ToString(int indent = 0) const;
  73. /* @@protoc_insertion_point(struct:firestore_NamedQuery) */
  74. } firestore_NamedQuery;
  75. typedef struct _firestore_BundleElement {
  76. pb_size_t which_element_type;
  77. union {
  78. firestore_BundleMetadata metadata;
  79. firestore_NamedQuery named_query;
  80. firestore_BundledDocumentMetadata document_metadata;
  81. google_firestore_v1_Document document;
  82. };
  83. std::string ToString(int indent = 0) const;
  84. /* @@protoc_insertion_point(struct:firestore_BundleElement) */
  85. } firestore_BundleElement;
  86. /* Default values for struct fields */
  87. /* Initializer values for message structs */
  88. #define firestore_BundledQuery_init_default {NULL, 0, {google_firestore_v1_StructuredQuery_init_default}, _firestore_BundledQuery_LimitType_MIN}
  89. #define firestore_NamedQuery_init_default {NULL, firestore_BundledQuery_init_default, google_protobuf_Timestamp_init_default}
  90. #define firestore_BundledDocumentMetadata_init_default {NULL, google_protobuf_Timestamp_init_default, 0, 0, NULL}
  91. #define firestore_BundleMetadata_init_default {NULL, google_protobuf_Timestamp_init_default, 0, 0, 0}
  92. #define firestore_BundleElement_init_default {0, {firestore_BundleMetadata_init_default}}
  93. #define firestore_BundledQuery_init_zero {NULL, 0, {google_firestore_v1_StructuredQuery_init_zero}, _firestore_BundledQuery_LimitType_MIN}
  94. #define firestore_NamedQuery_init_zero {NULL, firestore_BundledQuery_init_zero, google_protobuf_Timestamp_init_zero}
  95. #define firestore_BundledDocumentMetadata_init_zero {NULL, google_protobuf_Timestamp_init_zero, 0, 0, NULL}
  96. #define firestore_BundleMetadata_init_zero {NULL, google_protobuf_Timestamp_init_zero, 0, 0, 0}
  97. #define firestore_BundleElement_init_zero {0, {firestore_BundleMetadata_init_zero}}
  98. /* Field tags (for use in manual encoding/decoding) */
  99. #define firestore_BundleMetadata_id_tag 1
  100. #define firestore_BundleMetadata_create_time_tag 2
  101. #define firestore_BundleMetadata_version_tag 3
  102. #define firestore_BundleMetadata_total_documents_tag 4
  103. #define firestore_BundleMetadata_total_bytes_tag 5
  104. #define firestore_BundledDocumentMetadata_name_tag 1
  105. #define firestore_BundledDocumentMetadata_read_time_tag 2
  106. #define firestore_BundledDocumentMetadata_exists_tag 3
  107. #define firestore_BundledDocumentMetadata_queries_tag 4
  108. #define firestore_BundledQuery_structured_query_tag 2
  109. #define firestore_BundledQuery_parent_tag 1
  110. #define firestore_BundledQuery_limit_type_tag 3
  111. #define firestore_NamedQuery_name_tag 1
  112. #define firestore_NamedQuery_bundled_query_tag 2
  113. #define firestore_NamedQuery_read_time_tag 3
  114. #define firestore_BundleElement_metadata_tag 1
  115. #define firestore_BundleElement_named_query_tag 2
  116. #define firestore_BundleElement_document_metadata_tag 3
  117. #define firestore_BundleElement_document_tag 4
  118. /* Struct field encoding specification for nanopb */
  119. extern const pb_field_t firestore_BundledQuery_fields[4];
  120. extern const pb_field_t firestore_NamedQuery_fields[4];
  121. extern const pb_field_t firestore_BundledDocumentMetadata_fields[5];
  122. extern const pb_field_t firestore_BundleMetadata_fields[6];
  123. extern const pb_field_t firestore_BundleElement_fields[5];
  124. /* Maximum encoded size of messages (where known) */
  125. /* firestore_BundledQuery_size depends on runtime parameters */
  126. /* firestore_NamedQuery_size depends on runtime parameters */
  127. /* firestore_BundledDocumentMetadata_size depends on runtime parameters */
  128. /* firestore_BundleMetadata_size depends on runtime parameters */
  129. /* firestore_BundleElement_size depends on runtime parameters */
  130. /* Message IDs (where set with "msgid" option) */
  131. #ifdef PB_MSGID
  132. #define BUNDLE_MESSAGES \
  133. #endif
  134. const char* EnumToString(firestore_BundledQuery_LimitType value);
  135. } // namespace firestore
  136. } // namespace firebase
  137. /* @@protoc_insertion_point(eof) */
  138. #endif