This commit is contained in:
Yao
2024-12-20 17:49:45 +08:00
parent 86b0363ce1
commit 654d456c7d
7011 changed files with 1705926 additions and 7 deletions

View File

@@ -0,0 +1,225 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "bundle.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t firestore_BundledQuery_fields[4] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, firestore_BundledQuery, parent, parent, 0),
PB_ANONYMOUS_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, firestore_BundledQuery, structured_query, parent, &google_firestore_v1_StructuredQuery_fields),
PB_FIELD( 3, UENUM , SINGULAR, STATIC , OTHER, firestore_BundledQuery, limit_type, structured_query, 0),
PB_LAST_FIELD
};
const pb_field_t firestore_NamedQuery_fields[4] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, firestore_NamedQuery, name, name, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, firestore_NamedQuery, bundled_query, name, &firestore_BundledQuery_fields),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, firestore_NamedQuery, read_time, bundled_query, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t firestore_BundledDocumentMetadata_fields[5] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, firestore_BundledDocumentMetadata, name, name, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, firestore_BundledDocumentMetadata, read_time, name, &google_protobuf_Timestamp_fields),
PB_FIELD( 3, BOOL , SINGULAR, STATIC , OTHER, firestore_BundledDocumentMetadata, exists, read_time, 0),
PB_FIELD( 4, BYTES , REPEATED, POINTER , OTHER, firestore_BundledDocumentMetadata, queries, exists, 0),
PB_LAST_FIELD
};
const pb_field_t firestore_BundleMetadata_fields[6] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, firestore_BundleMetadata, id, id, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, firestore_BundleMetadata, create_time, id, &google_protobuf_Timestamp_fields),
PB_FIELD( 3, UINT32 , SINGULAR, STATIC , OTHER, firestore_BundleMetadata, version, create_time, 0),
PB_FIELD( 4, UINT32 , SINGULAR, STATIC , OTHER, firestore_BundleMetadata, total_documents, version, 0),
PB_FIELD( 5, UINT64 , SINGULAR, STATIC , OTHER, firestore_BundleMetadata, total_bytes, total_documents, 0),
PB_LAST_FIELD
};
const pb_field_t firestore_BundleElement_fields[5] = {
PB_ANONYMOUS_ONEOF_FIELD(element_type, 1, MESSAGE , ONEOF, STATIC , FIRST, firestore_BundleElement, metadata, metadata, &firestore_BundleMetadata_fields),
PB_ANONYMOUS_ONEOF_FIELD(element_type, 2, MESSAGE , ONEOF, STATIC , UNION, firestore_BundleElement, named_query, named_query, &firestore_NamedQuery_fields),
PB_ANONYMOUS_ONEOF_FIELD(element_type, 3, MESSAGE , ONEOF, STATIC , UNION, firestore_BundleElement, document_metadata, document_metadata, &firestore_BundledDocumentMetadata_fields),
PB_ANONYMOUS_ONEOF_FIELD(element_type, 4, MESSAGE , ONEOF, STATIC , UNION, firestore_BundleElement, document, document, &google_firestore_v1_Document_fields),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(firestore_BundledQuery, structured_query) < 65536 && pb_membersize(firestore_NamedQuery, bundled_query) < 65536 && pb_membersize(firestore_NamedQuery, read_time) < 65536 && pb_membersize(firestore_BundledDocumentMetadata, read_time) < 65536 && pb_membersize(firestore_BundleMetadata, create_time) < 65536 && pb_membersize(firestore_BundleElement, metadata) < 65536 && pb_membersize(firestore_BundleElement, named_query) < 65536 && pb_membersize(firestore_BundleElement, document_metadata) < 65536 && pb_membersize(firestore_BundleElement, document) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_firestore_BundledQuery_firestore_NamedQuery_firestore_BundledDocumentMetadata_firestore_BundleMetadata_firestore_BundleElement)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(firestore_BundledQuery, structured_query) < 256 && pb_membersize(firestore_NamedQuery, bundled_query) < 256 && pb_membersize(firestore_NamedQuery, read_time) < 256 && pb_membersize(firestore_BundledDocumentMetadata, read_time) < 256 && pb_membersize(firestore_BundleMetadata, create_time) < 256 && pb_membersize(firestore_BundleElement, metadata) < 256 && pb_membersize(firestore_BundleElement, named_query) < 256 && pb_membersize(firestore_BundleElement, document_metadata) < 256 && pb_membersize(firestore_BundleElement, document) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_firestore_BundledQuery_firestore_NamedQuery_firestore_BundledDocumentMetadata_firestore_BundleMetadata_firestore_BundleElement)
#endif
const char* EnumToString(
firestore_BundledQuery_LimitType value) {
switch (value) {
case firestore_BundledQuery_LimitType_FIRST:
return "FIRST";
case firestore_BundledQuery_LimitType_LAST:
return "LAST";
}
return "<unknown enum value>";
}
std::string firestore_BundledQuery::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BundledQuery", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("parent: ",
parent, indent + 1, false);
switch (which_query_type) {
case firestore_BundledQuery_structured_query_tag:
tostring_result += PrintMessageField("structured_query ",
structured_query, indent + 1, true);
break;
}
tostring_result += PrintEnumField("limit_type: ",
limit_type, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string firestore_NamedQuery::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "NamedQuery", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("name: ", name, indent + 1, false);
tostring_result += PrintMessageField("bundled_query ",
bundled_query, indent + 1, false);
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string firestore_BundledDocumentMetadata::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BundledDocumentMetadata", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("name: ", name, indent + 1, false);
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, false);
tostring_result += PrintPrimitiveField("exists: ",
exists, indent + 1, false);
for (pb_size_t i = 0; i != queries_count; ++i) {
tostring_result += PrintPrimitiveField("queries: ",
queries[i], indent + 1, true);
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string firestore_BundleMetadata::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BundleMetadata", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("id: ", id, indent + 1, false);
tostring_result += PrintMessageField("create_time ",
create_time, indent + 1, false);
tostring_result += PrintPrimitiveField("version: ",
version, indent + 1, false);
tostring_result += PrintPrimitiveField("total_documents: ",
total_documents, indent + 1, false);
tostring_result += PrintPrimitiveField("total_bytes: ",
total_bytes, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string firestore_BundleElement::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BundleElement", this);
std::string tostring_result;
switch (which_element_type) {
case firestore_BundleElement_metadata_tag:
tostring_result += PrintMessageField("metadata ",
metadata, indent + 1, true);
break;
case firestore_BundleElement_named_query_tag:
tostring_result += PrintMessageField("named_query ",
named_query, indent + 1, true);
break;
case firestore_BundleElement_document_metadata_tag:
tostring_result += PrintMessageField("document_metadata ",
document_metadata, indent + 1, true);
break;
case firestore_BundleElement_document_tag:
tostring_result += PrintMessageField("document ",
document, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,170 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_FIRESTORE_BUNDLE_NANOPB_H_INCLUDED
#define PB_FIRESTORE_BUNDLE_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/firestore/v1/document.nanopb.h"
#include "google/firestore/v1/query.nanopb.h"
#include "google/protobuf/timestamp.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Enum definitions */
typedef enum _firestore_BundledQuery_LimitType {
firestore_BundledQuery_LimitType_FIRST = 0,
firestore_BundledQuery_LimitType_LAST = 1
} firestore_BundledQuery_LimitType;
#define _firestore_BundledQuery_LimitType_MIN firestore_BundledQuery_LimitType_FIRST
#define _firestore_BundledQuery_LimitType_MAX firestore_BundledQuery_LimitType_LAST
#define _firestore_BundledQuery_LimitType_ARRAYSIZE ((firestore_BundledQuery_LimitType)(firestore_BundledQuery_LimitType_LAST+1))
/* Struct definitions */
typedef struct _firestore_BundleMetadata {
pb_bytes_array_t *id;
google_protobuf_Timestamp create_time;
uint32_t version;
uint32_t total_documents;
uint64_t total_bytes;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_BundleMetadata) */
} firestore_BundleMetadata;
typedef struct _firestore_BundledDocumentMetadata {
pb_bytes_array_t *name;
google_protobuf_Timestamp read_time;
bool exists;
pb_size_t queries_count;
pb_bytes_array_t **queries;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_BundledDocumentMetadata) */
} firestore_BundledDocumentMetadata;
typedef struct _firestore_BundledQuery {
pb_bytes_array_t *parent;
pb_size_t which_query_type;
union {
google_firestore_v1_StructuredQuery structured_query;
};
firestore_BundledQuery_LimitType limit_type;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_BundledQuery) */
} firestore_BundledQuery;
typedef struct _firestore_NamedQuery {
pb_bytes_array_t *name;
firestore_BundledQuery bundled_query;
google_protobuf_Timestamp read_time;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_NamedQuery) */
} firestore_NamedQuery;
typedef struct _firestore_BundleElement {
pb_size_t which_element_type;
union {
firestore_BundleMetadata metadata;
firestore_NamedQuery named_query;
firestore_BundledDocumentMetadata document_metadata;
google_firestore_v1_Document document;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_BundleElement) */
} firestore_BundleElement;
/* Default values for struct fields */
/* Initializer values for message structs */
#define firestore_BundledQuery_init_default {NULL, 0, {google_firestore_v1_StructuredQuery_init_default}, _firestore_BundledQuery_LimitType_MIN}
#define firestore_NamedQuery_init_default {NULL, firestore_BundledQuery_init_default, google_protobuf_Timestamp_init_default}
#define firestore_BundledDocumentMetadata_init_default {NULL, google_protobuf_Timestamp_init_default, 0, 0, NULL}
#define firestore_BundleMetadata_init_default {NULL, google_protobuf_Timestamp_init_default, 0, 0, 0}
#define firestore_BundleElement_init_default {0, {firestore_BundleMetadata_init_default}}
#define firestore_BundledQuery_init_zero {NULL, 0, {google_firestore_v1_StructuredQuery_init_zero}, _firestore_BundledQuery_LimitType_MIN}
#define firestore_NamedQuery_init_zero {NULL, firestore_BundledQuery_init_zero, google_protobuf_Timestamp_init_zero}
#define firestore_BundledDocumentMetadata_init_zero {NULL, google_protobuf_Timestamp_init_zero, 0, 0, NULL}
#define firestore_BundleMetadata_init_zero {NULL, google_protobuf_Timestamp_init_zero, 0, 0, 0}
#define firestore_BundleElement_init_zero {0, {firestore_BundleMetadata_init_zero}}
/* Field tags (for use in manual encoding/decoding) */
#define firestore_BundleMetadata_id_tag 1
#define firestore_BundleMetadata_create_time_tag 2
#define firestore_BundleMetadata_version_tag 3
#define firestore_BundleMetadata_total_documents_tag 4
#define firestore_BundleMetadata_total_bytes_tag 5
#define firestore_BundledDocumentMetadata_name_tag 1
#define firestore_BundledDocumentMetadata_read_time_tag 2
#define firestore_BundledDocumentMetadata_exists_tag 3
#define firestore_BundledDocumentMetadata_queries_tag 4
#define firestore_BundledQuery_structured_query_tag 2
#define firestore_BundledQuery_parent_tag 1
#define firestore_BundledQuery_limit_type_tag 3
#define firestore_NamedQuery_name_tag 1
#define firestore_NamedQuery_bundled_query_tag 2
#define firestore_NamedQuery_read_time_tag 3
#define firestore_BundleElement_metadata_tag 1
#define firestore_BundleElement_named_query_tag 2
#define firestore_BundleElement_document_metadata_tag 3
#define firestore_BundleElement_document_tag 4
/* Struct field encoding specification for nanopb */
extern const pb_field_t firestore_BundledQuery_fields[4];
extern const pb_field_t firestore_NamedQuery_fields[4];
extern const pb_field_t firestore_BundledDocumentMetadata_fields[5];
extern const pb_field_t firestore_BundleMetadata_fields[6];
extern const pb_field_t firestore_BundleElement_fields[5];
/* Maximum encoded size of messages (where known) */
/* firestore_BundledQuery_size depends on runtime parameters */
/* firestore_NamedQuery_size depends on runtime parameters */
/* firestore_BundledDocumentMetadata_size depends on runtime parameters */
/* firestore_BundleMetadata_size depends on runtime parameters */
/* firestore_BundleElement_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define BUNDLE_MESSAGES \
#endif
const char* EnumToString(firestore_BundledQuery_LimitType value);
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,142 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "maybe_document.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t firestore_client_NoDocument_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, firestore_client_NoDocument, name, name, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_NoDocument, read_time, name, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t firestore_client_UnknownDocument_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, firestore_client_UnknownDocument, name, name, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_UnknownDocument, version, name, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t firestore_client_MaybeDocument_fields[5] = {
PB_ANONYMOUS_ONEOF_FIELD(document_type, 1, MESSAGE , ONEOF, STATIC , FIRST, firestore_client_MaybeDocument, no_document, no_document, &firestore_client_NoDocument_fields),
PB_ANONYMOUS_ONEOF_FIELD(document_type, 2, MESSAGE , ONEOF, STATIC , UNION, firestore_client_MaybeDocument, document, document, &google_firestore_v1_Document_fields),
PB_ANONYMOUS_ONEOF_FIELD(document_type, 3, MESSAGE , ONEOF, STATIC , UNION, firestore_client_MaybeDocument, unknown_document, unknown_document, &firestore_client_UnknownDocument_fields),
PB_FIELD( 4, BOOL , SINGULAR, STATIC , OTHER, firestore_client_MaybeDocument, has_committed_mutations, unknown_document, 0),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(firestore_client_NoDocument, read_time) < 65536 && pb_membersize(firestore_client_UnknownDocument, version) < 65536 && pb_membersize(firestore_client_MaybeDocument, no_document) < 65536 && pb_membersize(firestore_client_MaybeDocument, document) < 65536 && pb_membersize(firestore_client_MaybeDocument, unknown_document) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_firestore_client_NoDocument_firestore_client_UnknownDocument_firestore_client_MaybeDocument)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(firestore_client_NoDocument, read_time) < 256 && pb_membersize(firestore_client_UnknownDocument, version) < 256 && pb_membersize(firestore_client_MaybeDocument, no_document) < 256 && pb_membersize(firestore_client_MaybeDocument, document) < 256 && pb_membersize(firestore_client_MaybeDocument, unknown_document) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_firestore_client_NoDocument_firestore_client_UnknownDocument_firestore_client_MaybeDocument)
#endif
std::string firestore_client_NoDocument::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "NoDocument", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("name: ", name, indent + 1, false);
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string firestore_client_UnknownDocument::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "UnknownDocument", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("name: ", name, indent + 1, false);
tostring_result += PrintMessageField("version ",
version, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string firestore_client_MaybeDocument::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "MaybeDocument", this);
std::string tostring_result;
switch (which_document_type) {
case firestore_client_MaybeDocument_no_document_tag:
tostring_result += PrintMessageField("no_document ",
no_document, indent + 1, true);
break;
case firestore_client_MaybeDocument_document_tag:
tostring_result += PrintMessageField("document ",
document, indent + 1, true);
break;
case firestore_client_MaybeDocument_unknown_document_tag:
tostring_result += PrintMessageField("unknown_document ",
unknown_document, indent + 1, true);
break;
}
tostring_result += PrintPrimitiveField("has_committed_mutations: ",
has_committed_mutations, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,112 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_FIRESTORE_CLIENT_MAYBE_DOCUMENT_NANOPB_H_INCLUDED
#define PB_FIRESTORE_CLIENT_MAYBE_DOCUMENT_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/firestore/v1/document.nanopb.h"
#include "google/protobuf/timestamp.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _firestore_client_NoDocument {
pb_bytes_array_t *name;
google_protobuf_Timestamp read_time;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_client_NoDocument) */
} firestore_client_NoDocument;
typedef struct _firestore_client_UnknownDocument {
pb_bytes_array_t *name;
google_protobuf_Timestamp version;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_client_UnknownDocument) */
} firestore_client_UnknownDocument;
typedef struct _firestore_client_MaybeDocument {
pb_size_t which_document_type;
union {
firestore_client_NoDocument no_document;
google_firestore_v1_Document document;
firestore_client_UnknownDocument unknown_document;
};
bool has_committed_mutations;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_client_MaybeDocument) */
} firestore_client_MaybeDocument;
/* Default values for struct fields */
/* Initializer values for message structs */
#define firestore_client_NoDocument_init_default {NULL, google_protobuf_Timestamp_init_default}
#define firestore_client_UnknownDocument_init_default {NULL, google_protobuf_Timestamp_init_default}
#define firestore_client_MaybeDocument_init_default {0, {firestore_client_NoDocument_init_default}, 0}
#define firestore_client_NoDocument_init_zero {NULL, google_protobuf_Timestamp_init_zero}
#define firestore_client_UnknownDocument_init_zero {NULL, google_protobuf_Timestamp_init_zero}
#define firestore_client_MaybeDocument_init_zero {0, {firestore_client_NoDocument_init_zero}, 0}
/* Field tags (for use in manual encoding/decoding) */
#define firestore_client_NoDocument_name_tag 1
#define firestore_client_NoDocument_read_time_tag 2
#define firestore_client_UnknownDocument_name_tag 1
#define firestore_client_UnknownDocument_version_tag 2
#define firestore_client_MaybeDocument_no_document_tag 1
#define firestore_client_MaybeDocument_document_tag 2
#define firestore_client_MaybeDocument_unknown_document_tag 3
#define firestore_client_MaybeDocument_has_committed_mutations_tag 4
/* Struct field encoding specification for nanopb */
extern const pb_field_t firestore_client_NoDocument_fields[3];
extern const pb_field_t firestore_client_UnknownDocument_fields[3];
extern const pb_field_t firestore_client_MaybeDocument_fields[5];
/* Maximum encoded size of messages (where known) */
/* firestore_client_NoDocument_size depends on runtime parameters */
/* firestore_client_UnknownDocument_size depends on runtime parameters */
/* firestore_client_MaybeDocument_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define MAYBE_DOCUMENT_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,121 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "mutation.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t firestore_client_MutationQueue_fields[3] = {
PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, firestore_client_MutationQueue, last_acknowledged_batch_id, last_acknowledged_batch_id, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, firestore_client_MutationQueue, last_stream_token, last_acknowledged_batch_id, 0),
PB_LAST_FIELD
};
const pb_field_t firestore_client_WriteBatch_fields[5] = {
PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, firestore_client_WriteBatch, batch_id, batch_id, 0),
PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, firestore_client_WriteBatch, writes, batch_id, &google_firestore_v1_Write_fields),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_WriteBatch, local_write_time, writes, &google_protobuf_Timestamp_fields),
PB_FIELD( 4, MESSAGE , REPEATED, POINTER , OTHER, firestore_client_WriteBatch, base_writes, local_write_time, &google_firestore_v1_Write_fields),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(firestore_client_WriteBatch, local_write_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_firestore_client_MutationQueue_firestore_client_WriteBatch)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(firestore_client_WriteBatch, local_write_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_firestore_client_MutationQueue_firestore_client_WriteBatch)
#endif
std::string firestore_client_MutationQueue::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "MutationQueue", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("last_acknowledged_batch_id: ",
last_acknowledged_batch_id, indent + 1, false);
tostring_result += PrintPrimitiveField("last_stream_token: ",
last_stream_token, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string firestore_client_WriteBatch::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "WriteBatch", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("batch_id: ",
batch_id, indent + 1, false);
for (pb_size_t i = 0; i != writes_count; ++i) {
tostring_result += PrintMessageField("writes ",
writes[i], indent + 1, true);
}
tostring_result += PrintMessageField("local_write_time ",
local_write_time, indent + 1, false);
for (pb_size_t i = 0; i != base_writes_count; ++i) {
tostring_result += PrintMessageField("base_writes ",
base_writes[i], indent + 1, true);
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,97 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_FIRESTORE_CLIENT_MUTATION_NANOPB_H_INCLUDED
#define PB_FIRESTORE_CLIENT_MUTATION_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/firestore/v1/write.nanopb.h"
#include "google/protobuf/timestamp.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _firestore_client_MutationQueue {
int32_t last_acknowledged_batch_id;
pb_bytes_array_t *last_stream_token;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_client_MutationQueue) */
} firestore_client_MutationQueue;
typedef struct _firestore_client_WriteBatch {
int32_t batch_id;
pb_size_t writes_count;
struct _google_firestore_v1_Write *writes;
google_protobuf_Timestamp local_write_time;
pb_size_t base_writes_count;
struct _google_firestore_v1_Write *base_writes;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_client_WriteBatch) */
} firestore_client_WriteBatch;
/* Default values for struct fields */
/* Initializer values for message structs */
#define firestore_client_MutationQueue_init_default {0, NULL}
#define firestore_client_WriteBatch_init_default {0, 0, NULL, google_protobuf_Timestamp_init_default, 0, NULL}
#define firestore_client_MutationQueue_init_zero {0, NULL}
#define firestore_client_WriteBatch_init_zero {0, 0, NULL, google_protobuf_Timestamp_init_zero, 0, NULL}
/* Field tags (for use in manual encoding/decoding) */
#define firestore_client_MutationQueue_last_acknowledged_batch_id_tag 1
#define firestore_client_MutationQueue_last_stream_token_tag 2
#define firestore_client_WriteBatch_batch_id_tag 1
#define firestore_client_WriteBatch_writes_tag 2
#define firestore_client_WriteBatch_local_write_time_tag 3
#define firestore_client_WriteBatch_base_writes_tag 4
/* Struct field encoding specification for nanopb */
extern const pb_field_t firestore_client_MutationQueue_fields[3];
extern const pb_field_t firestore_client_WriteBatch_fields[5];
/* Maximum encoded size of messages (where known) */
/* firestore_client_MutationQueue_size depends on runtime parameters */
/* firestore_client_WriteBatch_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define MUTATION_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,133 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "target.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t firestore_client_Target_fields[8] = {
PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, firestore_client_Target, target_id, target_id, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_Target, snapshot_version, target_id, &google_protobuf_Timestamp_fields),
PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, firestore_client_Target, resume_token, snapshot_version, 0),
PB_FIELD( 4, INT64 , SINGULAR, STATIC , OTHER, firestore_client_Target, last_listen_sequence_number, resume_token, 0),
PB_ANONYMOUS_ONEOF_FIELD(target_type, 5, MESSAGE , ONEOF, STATIC , OTHER, firestore_client_Target, query, last_listen_sequence_number, &google_firestore_v1_Target_QueryTarget_fields),
PB_ANONYMOUS_ONEOF_FIELD(target_type, 6, MESSAGE , ONEOF, STATIC , UNION, firestore_client_Target, documents, last_listen_sequence_number, &google_firestore_v1_Target_DocumentsTarget_fields),
PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_Target, last_limbo_free_snapshot_version, documents, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t firestore_client_TargetGlobal_fields[5] = {
PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, firestore_client_TargetGlobal, highest_target_id, highest_target_id, 0),
PB_FIELD( 2, INT64 , SINGULAR, STATIC , OTHER, firestore_client_TargetGlobal, highest_listen_sequence_number, highest_target_id, 0),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_TargetGlobal, last_remote_snapshot_version, highest_listen_sequence_number, &google_protobuf_Timestamp_fields),
PB_FIELD( 4, INT32 , SINGULAR, STATIC , OTHER, firestore_client_TargetGlobal, target_count, last_remote_snapshot_version, 0),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(firestore_client_Target, query) < 65536 && pb_membersize(firestore_client_Target, documents) < 65536 && pb_membersize(firestore_client_Target, snapshot_version) < 65536 && pb_membersize(firestore_client_Target, last_limbo_free_snapshot_version) < 65536 && pb_membersize(firestore_client_TargetGlobal, last_remote_snapshot_version) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_firestore_client_Target_firestore_client_TargetGlobal)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(firestore_client_Target, query) < 256 && pb_membersize(firestore_client_Target, documents) < 256 && pb_membersize(firestore_client_Target, snapshot_version) < 256 && pb_membersize(firestore_client_Target, last_limbo_free_snapshot_version) < 256 && pb_membersize(firestore_client_TargetGlobal, last_remote_snapshot_version) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_firestore_client_Target_firestore_client_TargetGlobal)
#endif
std::string firestore_client_Target::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Target", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("target_id: ",
target_id, indent + 1, false);
tostring_result += PrintMessageField("snapshot_version ",
snapshot_version, indent + 1, false);
tostring_result += PrintPrimitiveField("resume_token: ",
resume_token, indent + 1, false);
tostring_result += PrintPrimitiveField("last_listen_sequence_number: ",
last_listen_sequence_number, indent + 1, false);
switch (which_target_type) {
case firestore_client_Target_query_tag:
tostring_result += PrintMessageField("query ",
query, indent + 1, true);
break;
case firestore_client_Target_documents_tag:
tostring_result += PrintMessageField("documents ",
documents, indent + 1, true);
break;
}
tostring_result += PrintMessageField("last_limbo_free_snapshot_version ",
last_limbo_free_snapshot_version, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string firestore_client_TargetGlobal::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "TargetGlobal", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("highest_target_id: ",
highest_target_id, indent + 1, false);
tostring_result += PrintPrimitiveField("highest_listen_sequence_number: ",
highest_listen_sequence_number, indent + 1, false);
tostring_result += PrintMessageField("last_remote_snapshot_version ",
last_remote_snapshot_version, indent + 1, false);
tostring_result += PrintPrimitiveField("target_count: ",
target_count, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,108 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_FIRESTORE_CLIENT_TARGET_NANOPB_H_INCLUDED
#define PB_FIRESTORE_CLIENT_TARGET_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/firestore/v1/firestore.nanopb.h"
#include "google/protobuf/timestamp.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _firestore_client_Target {
int32_t target_id;
google_protobuf_Timestamp snapshot_version;
pb_bytes_array_t *resume_token;
int64_t last_listen_sequence_number;
pb_size_t which_target_type;
union {
google_firestore_v1_Target_QueryTarget query;
google_firestore_v1_Target_DocumentsTarget documents;
};
google_protobuf_Timestamp last_limbo_free_snapshot_version;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_client_Target) */
} firestore_client_Target;
typedef struct _firestore_client_TargetGlobal {
int32_t highest_target_id;
int64_t highest_listen_sequence_number;
google_protobuf_Timestamp last_remote_snapshot_version;
int32_t target_count;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:firestore_client_TargetGlobal) */
} firestore_client_TargetGlobal;
/* Default values for struct fields */
/* Initializer values for message structs */
#define firestore_client_Target_init_default {0, google_protobuf_Timestamp_init_default, NULL, 0, 0, {google_firestore_v1_Target_QueryTarget_init_default}, google_protobuf_Timestamp_init_default}
#define firestore_client_TargetGlobal_init_default {0, 0, google_protobuf_Timestamp_init_default, 0}
#define firestore_client_Target_init_zero {0, google_protobuf_Timestamp_init_zero, NULL, 0, 0, {google_firestore_v1_Target_QueryTarget_init_zero}, google_protobuf_Timestamp_init_zero}
#define firestore_client_TargetGlobal_init_zero {0, 0, google_protobuf_Timestamp_init_zero, 0}
/* Field tags (for use in manual encoding/decoding) */
#define firestore_client_Target_query_tag 5
#define firestore_client_Target_documents_tag 6
#define firestore_client_Target_target_id_tag 1
#define firestore_client_Target_snapshot_version_tag 2
#define firestore_client_Target_resume_token_tag 3
#define firestore_client_Target_last_listen_sequence_number_tag 4
#define firestore_client_Target_last_limbo_free_snapshot_version_tag 7
#define firestore_client_TargetGlobal_highest_target_id_tag 1
#define firestore_client_TargetGlobal_highest_listen_sequence_number_tag 2
#define firestore_client_TargetGlobal_last_remote_snapshot_version_tag 3
#define firestore_client_TargetGlobal_target_count_tag 4
/* Struct field encoding specification for nanopb */
extern const pb_field_t firestore_client_Target_fields[8];
extern const pb_field_t firestore_client_TargetGlobal_fields[5];
/* Maximum encoded size of messages (where known) */
/* firestore_client_Target_size depends on runtime parameters */
#define firestore_client_TargetGlobal_size 57
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define TARGET_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "annotations.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
#error Field descriptor for google_api_http_struct.http is too large. Define PB_FIELD_32BIT to fix this.
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,46 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_API_ANNOTATIONS_NANOPB_H_INCLUDED
#define PB_GOOGLE_API_ANNOTATIONS_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/api/http.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Extensions */
/* Extension field google_api_http was skipped because only "optional"
type of extension fields is currently supported. */
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,174 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "http.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_api_Http_fields[3] = {
PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_api_Http, rules, rules, &google_api_HttpRule_fields),
PB_FIELD( 2, BOOL , SINGULAR, STATIC , OTHER, google_api_Http, fully_decode_reserved_expansion, rules, 0),
PB_LAST_FIELD
};
const pb_field_t google_api_HttpRule_fields[10] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_api_HttpRule, selector, selector, 0),
PB_ANONYMOUS_ONEOF_FIELD(pattern, 2, BYTES , ONEOF, POINTER , OTHER, google_api_HttpRule, get, selector, 0),
PB_ANONYMOUS_ONEOF_FIELD(pattern, 3, BYTES , ONEOF, POINTER , UNION, google_api_HttpRule, put, selector, 0),
PB_ANONYMOUS_ONEOF_FIELD(pattern, 4, BYTES , ONEOF, POINTER , UNION, google_api_HttpRule, post, selector, 0),
PB_ANONYMOUS_ONEOF_FIELD(pattern, 5, BYTES , ONEOF, POINTER , UNION, google_api_HttpRule, delete_, selector, 0),
PB_ANONYMOUS_ONEOF_FIELD(pattern, 6, BYTES , ONEOF, POINTER , UNION, google_api_HttpRule, patch, selector, 0),
PB_ANONYMOUS_ONEOF_FIELD(pattern, 8, MESSAGE , ONEOF, STATIC , UNION, google_api_HttpRule, custom, selector, &google_api_CustomHttpPattern_fields),
PB_FIELD( 7, BYTES , SINGULAR, POINTER , OTHER, google_api_HttpRule, body, custom, 0),
PB_FIELD( 11, MESSAGE , REPEATED, POINTER , OTHER, google_api_HttpRule, additional_bindings, body, &google_api_HttpRule_fields),
PB_LAST_FIELD
};
const pb_field_t google_api_CustomHttpPattern_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_api_CustomHttpPattern, kind, kind, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_api_CustomHttpPattern, path, kind, 0),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_api_HttpRule, custom) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_api_Http_google_api_HttpRule_google_api_CustomHttpPattern)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_api_HttpRule, custom) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_api_Http_google_api_HttpRule_google_api_CustomHttpPattern)
#endif
std::string google_api_Http::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Http", this);
std::string tostring_result;
for (pb_size_t i = 0; i != rules_count; ++i) {
tostring_result += PrintMessageField("rules ",
rules[i], indent + 1, true);
}
tostring_result += PrintPrimitiveField("fully_decode_reserved_expansion: ",
fully_decode_reserved_expansion, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_api_HttpRule::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "HttpRule", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("selector: ",
selector, indent + 1, false);
switch (which_pattern) {
case google_api_HttpRule_get_tag:
tostring_result += PrintPrimitiveField("get: ", get, indent + 1, true);
break;
case google_api_HttpRule_put_tag:
tostring_result += PrintPrimitiveField("put: ", put, indent + 1, true);
break;
case google_api_HttpRule_post_tag:
tostring_result += PrintPrimitiveField("post: ",
post, indent + 1, true);
break;
case google_api_HttpRule_delete_tag:
tostring_result += PrintPrimitiveField("delete: ",
delete_, indent + 1, true);
break;
case google_api_HttpRule_patch_tag:
tostring_result += PrintPrimitiveField("patch: ",
patch, indent + 1, true);
break;
case google_api_HttpRule_custom_tag:
tostring_result += PrintMessageField("custom ",
custom, indent + 1, true);
break;
}
tostring_result += PrintPrimitiveField("body: ", body, indent + 1, false);
for (pb_size_t i = 0; i != additional_bindings_count; ++i) {
tostring_result += PrintMessageField("additional_bindings ",
additional_bindings[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_api_CustomHttpPattern::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "CustomHttpPattern", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("kind: ", kind, indent + 1, false);
tostring_result += PrintPrimitiveField("path: ", path, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,120 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_API_HTTP_NANOPB_H_INCLUDED
#define PB_GOOGLE_API_HTTP_NANOPB_H_INCLUDED
#include <pb.h>
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_api_CustomHttpPattern {
pb_bytes_array_t *kind;
pb_bytes_array_t *path;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_api_CustomHttpPattern) */
} google_api_CustomHttpPattern;
typedef struct _google_api_Http {
pb_size_t rules_count;
struct _google_api_HttpRule *rules;
bool fully_decode_reserved_expansion;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_api_Http) */
} google_api_Http;
typedef struct _google_api_HttpRule {
pb_bytes_array_t *selector;
pb_size_t which_pattern;
union {
pb_bytes_array_t *get;
pb_bytes_array_t *put;
pb_bytes_array_t *post;
pb_bytes_array_t *delete_;
pb_bytes_array_t *patch;
google_api_CustomHttpPattern custom;
};
pb_bytes_array_t *body;
pb_size_t additional_bindings_count;
struct _google_api_HttpRule *additional_bindings;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_api_HttpRule) */
} google_api_HttpRule;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_api_Http_init_default {0, NULL, 0}
#define google_api_HttpRule_init_default {NULL, 0, {NULL}, NULL, 0, NULL}
#define google_api_CustomHttpPattern_init_default {NULL, NULL}
#define google_api_Http_init_zero {0, NULL, 0}
#define google_api_HttpRule_init_zero {NULL, 0, {NULL}, NULL, 0, NULL}
#define google_api_CustomHttpPattern_init_zero {NULL, NULL}
/* Field tags (for use in manual encoding/decoding) */
#define google_api_CustomHttpPattern_kind_tag 1
#define google_api_CustomHttpPattern_path_tag 2
#define google_api_Http_rules_tag 1
#define google_api_Http_fully_decode_reserved_expansion_tag 2
#define google_api_HttpRule_get_tag 2
#define google_api_HttpRule_put_tag 3
#define google_api_HttpRule_post_tag 4
#define google_api_HttpRule_delete_tag 5
#define google_api_HttpRule_patch_tag 6
#define google_api_HttpRule_custom_tag 8
#define google_api_HttpRule_selector_tag 1
#define google_api_HttpRule_body_tag 7
#define google_api_HttpRule_additional_bindings_tag 11
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_api_Http_fields[3];
extern const pb_field_t google_api_HttpRule_fields[10];
extern const pb_field_t google_api_CustomHttpPattern_fields[3];
/* Maximum encoded size of messages (where known) */
/* google_api_Http_size depends on runtime parameters */
/* google_api_HttpRule_size depends on runtime parameters */
/* google_api_CustomHttpPattern_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define HTTP_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,137 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "resource.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_api_ResourceDescriptor_fields[7] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_api_ResourceDescriptor, type, type, 0),
PB_FIELD( 2, BYTES , REPEATED, POINTER , OTHER, google_api_ResourceDescriptor, pattern, type, 0),
PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_api_ResourceDescriptor, name_field, pattern, 0),
PB_FIELD( 4, UENUM , SINGULAR, STATIC , OTHER, google_api_ResourceDescriptor, history, name_field, 0),
PB_FIELD( 5, BYTES , SINGULAR, POINTER , OTHER, google_api_ResourceDescriptor, plural, history, 0),
PB_FIELD( 6, BYTES , SINGULAR, POINTER , OTHER, google_api_ResourceDescriptor, singular, plural, 0),
PB_LAST_FIELD
};
const pb_field_t google_api_ResourceReference_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_api_ResourceReference, type, type, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_api_ResourceReference, child_type, type, 0),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_api_resource_reference_struct, resource_reference) < 65536 && pb_membersize(google_api_resource_struct, resource) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_api_ResourceDescriptor_google_api_ResourceReference)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
#error Field descriptor for google_api_resource_reference_struct.resource_reference is too large. Define PB_FIELD_16BIT to fix this.
#endif
const char* EnumToString(
google_api_ResourceDescriptor_History value) {
switch (value) {
case google_api_ResourceDescriptor_History_HISTORY_UNSPECIFIED:
return "HISTORY_UNSPECIFIED";
case google_api_ResourceDescriptor_History_ORIGINALLY_SINGLE_PATTERN:
return "ORIGINALLY_SINGLE_PATTERN";
case google_api_ResourceDescriptor_History_FUTURE_MULTI_PATTERN:
return "FUTURE_MULTI_PATTERN";
}
return "<unknown enum value>";
}
std::string google_api_ResourceDescriptor::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ResourceDescriptor", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("type: ", type, indent + 1, false);
for (pb_size_t i = 0; i != pattern_count; ++i) {
tostring_result += PrintPrimitiveField("pattern: ",
pattern[i], indent + 1, true);
}
tostring_result += PrintPrimitiveField("name_field: ",
name_field, indent + 1, false);
tostring_result += PrintEnumField("history: ", history, indent + 1, false);
tostring_result += PrintPrimitiveField("plural: ",
plural, indent + 1, false);
tostring_result += PrintPrimitiveField("singular: ",
singular, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_api_ResourceReference::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ResourceReference", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("type: ", type, indent + 1, false);
tostring_result += PrintPrimitiveField("child_type: ",
child_type, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,118 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_API_RESOURCE_NANOPB_H_INCLUDED
#define PB_GOOGLE_API_RESOURCE_NANOPB_H_INCLUDED
#include <pb.h>
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Enum definitions */
typedef enum _google_api_ResourceDescriptor_History {
google_api_ResourceDescriptor_History_HISTORY_UNSPECIFIED = 0,
google_api_ResourceDescriptor_History_ORIGINALLY_SINGLE_PATTERN = 1,
google_api_ResourceDescriptor_History_FUTURE_MULTI_PATTERN = 2
} google_api_ResourceDescriptor_History;
#define _google_api_ResourceDescriptor_History_MIN google_api_ResourceDescriptor_History_HISTORY_UNSPECIFIED
#define _google_api_ResourceDescriptor_History_MAX google_api_ResourceDescriptor_History_FUTURE_MULTI_PATTERN
#define _google_api_ResourceDescriptor_History_ARRAYSIZE ((google_api_ResourceDescriptor_History)(google_api_ResourceDescriptor_History_FUTURE_MULTI_PATTERN+1))
/* Struct definitions */
typedef struct _google_api_ResourceReference {
pb_bytes_array_t *type;
pb_bytes_array_t *child_type;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_api_ResourceReference) */
} google_api_ResourceReference;
typedef struct _google_api_ResourceDescriptor {
pb_bytes_array_t *type;
pb_size_t pattern_count;
pb_bytes_array_t **pattern;
pb_bytes_array_t *name_field;
google_api_ResourceDescriptor_History history;
pb_bytes_array_t *plural;
pb_bytes_array_t *singular;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_api_ResourceDescriptor) */
} google_api_ResourceDescriptor;
/* Extensions */
/* Extension field google_api_resource_reference was skipped because only "optional"
type of extension fields is currently supported. */
/* Extension field google_api_resource_definition was skipped because only "optional"
type of extension fields is currently supported. */
/* Extension field google_api_resource was skipped because only "optional"
type of extension fields is currently supported. */
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_api_ResourceDescriptor_init_default {NULL, 0, NULL, NULL, _google_api_ResourceDescriptor_History_MIN, NULL, NULL}
#define google_api_ResourceReference_init_default {NULL, NULL}
#define google_api_ResourceDescriptor_init_zero {NULL, 0, NULL, NULL, _google_api_ResourceDescriptor_History_MIN, NULL, NULL}
#define google_api_ResourceReference_init_zero {NULL, NULL}
/* Field tags (for use in manual encoding/decoding) */
#define google_api_ResourceReference_type_tag 1
#define google_api_ResourceReference_child_type_tag 2
#define google_api_ResourceDescriptor_type_tag 1
#define google_api_ResourceDescriptor_pattern_tag 2
#define google_api_ResourceDescriptor_name_field_tag 3
#define google_api_ResourceDescriptor_history_tag 4
#define google_api_ResourceDescriptor_plural_tag 5
#define google_api_ResourceDescriptor_singular_tag 6
#define google_api_resource_reference_tag 1055
#define google_api_resource_definition_tag 1053
#define google_api_resource_tag 1053
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_api_ResourceDescriptor_fields[7];
extern const pb_field_t google_api_ResourceReference_fields[3];
/* Maximum encoded size of messages (where known) */
/* google_api_ResourceDescriptor_size depends on runtime parameters */
/* google_api_ResourceReference_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define RESOURCE_MESSAGES \
#endif
const char* EnumToString(google_api_ResourceDescriptor_History value);
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,162 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "index.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_firestore_admin_v1_Index_fields[5] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_admin_v1_Index, name, name, 0),
PB_FIELD( 2, UENUM , SINGULAR, STATIC , OTHER, google_firestore_admin_v1_Index, query_scope, name, 0),
PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_admin_v1_Index, fields, query_scope, &google_firestore_admin_v1_Index_IndexField_fields),
PB_FIELD( 4, UENUM , SINGULAR, STATIC , OTHER, google_firestore_admin_v1_Index, state, fields, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_admin_v1_Index_IndexField_fields[4] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_admin_v1_Index_IndexField, field_path, field_path, 0),
PB_ANONYMOUS_ONEOF_FIELD(value_mode, 2, UENUM , ONEOF, STATIC , OTHER, google_firestore_admin_v1_Index_IndexField, order, field_path, 0),
PB_ANONYMOUS_ONEOF_FIELD(value_mode, 3, UENUM , ONEOF, STATIC , UNION, google_firestore_admin_v1_Index_IndexField, array_config, field_path, 0),
PB_LAST_FIELD
};
const char* EnumToString(
google_firestore_admin_v1_Index_QueryScope value) {
switch (value) {
case google_firestore_admin_v1_Index_QueryScope_QUERY_SCOPE_UNSPECIFIED:
return "QUERY_SCOPE_UNSPECIFIED";
case google_firestore_admin_v1_Index_QueryScope_COLLECTION:
return "COLLECTION";
case google_firestore_admin_v1_Index_QueryScope_COLLECTION_GROUP:
return "COLLECTION_GROUP";
}
return "<unknown enum value>";
}
const char* EnumToString(
google_firestore_admin_v1_Index_State value) {
switch (value) {
case google_firestore_admin_v1_Index_State_STATE_UNSPECIFIED:
return "STATE_UNSPECIFIED";
case google_firestore_admin_v1_Index_State_CREATING:
return "CREATING";
case google_firestore_admin_v1_Index_State_READY:
return "READY";
case google_firestore_admin_v1_Index_State_NEEDS_REPAIR:
return "NEEDS_REPAIR";
}
return "<unknown enum value>";
}
const char* EnumToString(
google_firestore_admin_v1_Index_IndexField_Order value) {
switch (value) {
case google_firestore_admin_v1_Index_IndexField_Order_ORDER_UNSPECIFIED:
return "ORDER_UNSPECIFIED";
case google_firestore_admin_v1_Index_IndexField_Order_ASCENDING:
return "ASCENDING";
case google_firestore_admin_v1_Index_IndexField_Order_DESCENDING:
return "DESCENDING";
}
return "<unknown enum value>";
}
const char* EnumToString(
google_firestore_admin_v1_Index_IndexField_ArrayConfig value) {
switch (value) {
case google_firestore_admin_v1_Index_IndexField_ArrayConfig_ARRAY_CONFIG_UNSPECIFIED:
return "ARRAY_CONFIG_UNSPECIFIED";
case google_firestore_admin_v1_Index_IndexField_ArrayConfig_CONTAINS:
return "CONTAINS";
}
return "<unknown enum value>";
}
std::string google_firestore_admin_v1_Index::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Index", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("name: ", name, indent + 1, false);
tostring_result += PrintEnumField("query_scope: ",
query_scope, indent + 1, false);
for (pb_size_t i = 0; i != fields_count; ++i) {
tostring_result += PrintMessageField("fields ",
fields[i], indent + 1, true);
}
tostring_result += PrintEnumField("state: ", state, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_admin_v1_Index_IndexField::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "IndexField", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("field_path: ",
field_path, indent + 1, false);
switch (which_value_mode) {
case google_firestore_admin_v1_Index_IndexField_order_tag:
tostring_result += PrintEnumField("order: ", order, indent + 1, true);
break;
case google_firestore_admin_v1_Index_IndexField_array_config_tag:
tostring_result += PrintEnumField("array_config: ",
array_config, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,142 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_FIRESTORE_ADMIN_V1_INDEX_NANOPB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_ADMIN_V1_INDEX_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/api/resource.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Enum definitions */
typedef enum _google_firestore_admin_v1_Index_QueryScope {
google_firestore_admin_v1_Index_QueryScope_QUERY_SCOPE_UNSPECIFIED = 0,
google_firestore_admin_v1_Index_QueryScope_COLLECTION = 1,
google_firestore_admin_v1_Index_QueryScope_COLLECTION_GROUP = 2
} google_firestore_admin_v1_Index_QueryScope;
#define _google_firestore_admin_v1_Index_QueryScope_MIN google_firestore_admin_v1_Index_QueryScope_QUERY_SCOPE_UNSPECIFIED
#define _google_firestore_admin_v1_Index_QueryScope_MAX google_firestore_admin_v1_Index_QueryScope_COLLECTION_GROUP
#define _google_firestore_admin_v1_Index_QueryScope_ARRAYSIZE ((google_firestore_admin_v1_Index_QueryScope)(google_firestore_admin_v1_Index_QueryScope_COLLECTION_GROUP+1))
typedef enum _google_firestore_admin_v1_Index_State {
google_firestore_admin_v1_Index_State_STATE_UNSPECIFIED = 0,
google_firestore_admin_v1_Index_State_CREATING = 1,
google_firestore_admin_v1_Index_State_READY = 2,
google_firestore_admin_v1_Index_State_NEEDS_REPAIR = 3
} google_firestore_admin_v1_Index_State;
#define _google_firestore_admin_v1_Index_State_MIN google_firestore_admin_v1_Index_State_STATE_UNSPECIFIED
#define _google_firestore_admin_v1_Index_State_MAX google_firestore_admin_v1_Index_State_NEEDS_REPAIR
#define _google_firestore_admin_v1_Index_State_ARRAYSIZE ((google_firestore_admin_v1_Index_State)(google_firestore_admin_v1_Index_State_NEEDS_REPAIR+1))
typedef enum _google_firestore_admin_v1_Index_IndexField_Order {
google_firestore_admin_v1_Index_IndexField_Order_ORDER_UNSPECIFIED = 0,
google_firestore_admin_v1_Index_IndexField_Order_ASCENDING = 1,
google_firestore_admin_v1_Index_IndexField_Order_DESCENDING = 2
} google_firestore_admin_v1_Index_IndexField_Order;
#define _google_firestore_admin_v1_Index_IndexField_Order_MIN google_firestore_admin_v1_Index_IndexField_Order_ORDER_UNSPECIFIED
#define _google_firestore_admin_v1_Index_IndexField_Order_MAX google_firestore_admin_v1_Index_IndexField_Order_DESCENDING
#define _google_firestore_admin_v1_Index_IndexField_Order_ARRAYSIZE ((google_firestore_admin_v1_Index_IndexField_Order)(google_firestore_admin_v1_Index_IndexField_Order_DESCENDING+1))
typedef enum _google_firestore_admin_v1_Index_IndexField_ArrayConfig {
google_firestore_admin_v1_Index_IndexField_ArrayConfig_ARRAY_CONFIG_UNSPECIFIED = 0,
google_firestore_admin_v1_Index_IndexField_ArrayConfig_CONTAINS = 1
} google_firestore_admin_v1_Index_IndexField_ArrayConfig;
#define _google_firestore_admin_v1_Index_IndexField_ArrayConfig_MIN google_firestore_admin_v1_Index_IndexField_ArrayConfig_ARRAY_CONFIG_UNSPECIFIED
#define _google_firestore_admin_v1_Index_IndexField_ArrayConfig_MAX google_firestore_admin_v1_Index_IndexField_ArrayConfig_CONTAINS
#define _google_firestore_admin_v1_Index_IndexField_ArrayConfig_ARRAYSIZE ((google_firestore_admin_v1_Index_IndexField_ArrayConfig)(google_firestore_admin_v1_Index_IndexField_ArrayConfig_CONTAINS+1))
/* Struct definitions */
typedef struct _google_firestore_admin_v1_Index {
pb_bytes_array_t *name;
google_firestore_admin_v1_Index_QueryScope query_scope;
pb_size_t fields_count;
struct _google_firestore_admin_v1_Index_IndexField *fields;
google_firestore_admin_v1_Index_State state;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_admin_v1_Index) */
} google_firestore_admin_v1_Index;
typedef struct _google_firestore_admin_v1_Index_IndexField {
pb_bytes_array_t *field_path;
pb_size_t which_value_mode;
union {
google_firestore_admin_v1_Index_IndexField_Order order;
google_firestore_admin_v1_Index_IndexField_ArrayConfig array_config;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_admin_v1_Index_IndexField) */
} google_firestore_admin_v1_Index_IndexField;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_firestore_admin_v1_Index_init_default {NULL, _google_firestore_admin_v1_Index_QueryScope_MIN, 0, NULL, _google_firestore_admin_v1_Index_State_MIN}
#define google_firestore_admin_v1_Index_IndexField_init_default {NULL, 0, {_google_firestore_admin_v1_Index_IndexField_Order_MIN}}
#define google_firestore_admin_v1_Index_init_zero {NULL, _google_firestore_admin_v1_Index_QueryScope_MIN, 0, NULL, _google_firestore_admin_v1_Index_State_MIN}
#define google_firestore_admin_v1_Index_IndexField_init_zero {NULL, 0, {_google_firestore_admin_v1_Index_IndexField_Order_MIN}}
/* Field tags (for use in manual encoding/decoding) */
#define google_firestore_admin_v1_Index_name_tag 1
#define google_firestore_admin_v1_Index_query_scope_tag 2
#define google_firestore_admin_v1_Index_fields_tag 3
#define google_firestore_admin_v1_Index_state_tag 4
#define google_firestore_admin_v1_Index_IndexField_order_tag 2
#define google_firestore_admin_v1_Index_IndexField_array_config_tag 3
#define google_firestore_admin_v1_Index_IndexField_field_path_tag 1
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_firestore_admin_v1_Index_fields[5];
extern const pb_field_t google_firestore_admin_v1_Index_IndexField_fields[4];
/* Maximum encoded size of messages (where known) */
/* google_firestore_admin_v1_Index_size depends on runtime parameters */
/* google_firestore_admin_v1_Index_IndexField_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define INDEX_MESSAGES \
#endif
const char* EnumToString(google_firestore_admin_v1_Index_QueryScope value);
const char* EnumToString(google_firestore_admin_v1_Index_State value);
const char* EnumToString(
google_firestore_admin_v1_Index_IndexField_Order value);
const char* EnumToString(
google_firestore_admin_v1_Index_IndexField_ArrayConfig value);
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,108 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "aggregation_result.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_firestore_v1_AggregationResult_fields[2] = {
PB_FIELD( 2, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_AggregationResult, aggregate_fields, aggregate_fields, &google_firestore_v1_AggregationResult_AggregateFieldsEntry_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_AggregationResult_AggregateFieldsEntry_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_AggregationResult_AggregateFieldsEntry, key, key, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_AggregationResult_AggregateFieldsEntry, value, key, &google_firestore_v1_Value_fields),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_AggregationResult_AggregateFieldsEntry, value) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_AggregationResult_google_firestore_v1_AggregationResult_AggregateFieldsEntry)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_AggregationResult_AggregateFieldsEntry, value) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_AggregationResult_google_firestore_v1_AggregationResult_AggregateFieldsEntry)
#endif
std::string google_firestore_v1_AggregationResult::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "AggregationResult", this);
std::string tostring_result;
for (pb_size_t i = 0; i != aggregate_fields_count; ++i) {
tostring_result += PrintMessageField("aggregate_fields ",
aggregate_fields[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_AggregationResult_AggregateFieldsEntry::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "AggregateFieldsEntry", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("key: ", key, indent + 1, false);
tostring_result += PrintMessageField("value ", value, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,88 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_FIRESTORE_V1_AGGREGATION_RESULT_NANOPB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1_AGGREGATION_RESULT_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/firestore/v1/document.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_firestore_v1_AggregationResult {
pb_size_t aggregate_fields_count;
struct _google_firestore_v1_AggregationResult_AggregateFieldsEntry *aggregate_fields;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_AggregationResult) */
} google_firestore_v1_AggregationResult;
typedef struct _google_firestore_v1_AggregationResult_AggregateFieldsEntry {
pb_bytes_array_t *key;
google_firestore_v1_Value value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_AggregationResult_AggregateFieldsEntry) */
} google_firestore_v1_AggregationResult_AggregateFieldsEntry;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_firestore_v1_AggregationResult_init_default {0, NULL}
#define google_firestore_v1_AggregationResult_AggregateFieldsEntry_init_default {NULL, google_firestore_v1_Value_init_default}
#define google_firestore_v1_AggregationResult_init_zero {0, NULL}
#define google_firestore_v1_AggregationResult_AggregateFieldsEntry_init_zero {NULL, google_firestore_v1_Value_init_zero}
/* Field tags (for use in manual encoding/decoding) */
#define google_firestore_v1_AggregationResult_aggregate_fields_tag 2
#define google_firestore_v1_AggregationResult_AggregateFieldsEntry_key_tag 1
#define google_firestore_v1_AggregationResult_AggregateFieldsEntry_value_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_firestore_v1_AggregationResult_fields[2];
extern const pb_field_t google_firestore_v1_AggregationResult_AggregateFieldsEntry_fields[3];
/* Maximum encoded size of messages (where known) */
/* google_firestore_v1_AggregationResult_size depends on runtime parameters */
/* google_firestore_v1_AggregationResult_AggregateFieldsEntry_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define AGGREGATION_RESULT_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,112 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "bloom_filter.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_firestore_v1_BitSequence_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_BitSequence, bitmap, bitmap, 0),
PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_BitSequence, padding, bitmap, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_BloomFilter_fields[3] = {
PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, google_firestore_v1_BloomFilter, bits, bits, &google_firestore_v1_BitSequence_fields),
PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_BloomFilter, hash_count, bits, 0),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_BloomFilter, bits) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_BitSequence_google_firestore_v1_BloomFilter)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_BloomFilter, bits) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_BitSequence_google_firestore_v1_BloomFilter)
#endif
std::string google_firestore_v1_BitSequence::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BitSequence", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("bitmap: ",
bitmap, indent + 1, false);
tostring_result += PrintPrimitiveField("padding: ",
padding, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_BloomFilter::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BloomFilter", this);
std::string tostring_result;
if (has_bits) {
tostring_result += PrintMessageField("bits ", bits, indent + 1, true);
}
tostring_result += PrintPrimitiveField("hash_count: ",
hash_count, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,88 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_FIRESTORE_V1_BLOOM_FILTER_NANOPB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1_BLOOM_FILTER_NANOPB_H_INCLUDED
#include <pb.h>
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_firestore_v1_BitSequence {
pb_bytes_array_t *bitmap;
int32_t padding;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_BitSequence) */
} google_firestore_v1_BitSequence;
typedef struct _google_firestore_v1_BloomFilter {
bool has_bits;
google_firestore_v1_BitSequence bits;
int32_t hash_count;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_BloomFilter) */
} google_firestore_v1_BloomFilter;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_firestore_v1_BitSequence_init_default {NULL, 0}
#define google_firestore_v1_BloomFilter_init_default {false, google_firestore_v1_BitSequence_init_default, 0}
#define google_firestore_v1_BitSequence_init_zero {NULL, 0}
#define google_firestore_v1_BloomFilter_init_zero {false, google_firestore_v1_BitSequence_init_zero, 0}
/* Field tags (for use in manual encoding/decoding) */
#define google_firestore_v1_BitSequence_bitmap_tag 1
#define google_firestore_v1_BitSequence_padding_tag 2
#define google_firestore_v1_BloomFilter_bits_tag 1
#define google_firestore_v1_BloomFilter_hash_count_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_firestore_v1_BitSequence_fields[3];
extern const pb_field_t google_firestore_v1_BloomFilter_fields[3];
/* Maximum encoded size of messages (where known) */
/* google_firestore_v1_BitSequence_size depends on runtime parameters */
/* google_firestore_v1_BloomFilter_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define BLOOM_FILTER_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,197 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "common.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_firestore_v1_DocumentMask_fields[2] = {
PB_FIELD( 1, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1_DocumentMask, field_paths, field_paths, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_Precondition_fields[3] = {
PB_ANONYMOUS_ONEOF_FIELD(condition_type, 1, BOOL , ONEOF, STATIC , FIRST, google_firestore_v1_Precondition, exists, exists, 0),
PB_ANONYMOUS_ONEOF_FIELD(condition_type, 2, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Precondition, update_time, update_time, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_TransactionOptions_fields[3] = {
PB_ANONYMOUS_ONEOF_FIELD(mode, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_TransactionOptions, read_only, read_only, &google_firestore_v1_TransactionOptions_ReadOnly_fields),
PB_ANONYMOUS_ONEOF_FIELD(mode, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_TransactionOptions, read_write, read_write, &google_firestore_v1_TransactionOptions_ReadWrite_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_TransactionOptions_ReadWrite_fields[2] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_TransactionOptions_ReadWrite, retry_transaction, retry_transaction, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_TransactionOptions_ReadOnly_fields[2] = {
PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_TransactionOptions_ReadOnly, read_time, read_time, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Precondition, update_time) < 65536 && pb_membersize(google_firestore_v1_TransactionOptions, read_only) < 65536 && pb_membersize(google_firestore_v1_TransactionOptions, read_write) < 65536 && pb_membersize(google_firestore_v1_TransactionOptions_ReadOnly, read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_DocumentMask_google_firestore_v1_Precondition_google_firestore_v1_TransactionOptions_google_firestore_v1_TransactionOptions_ReadWrite_google_firestore_v1_TransactionOptions_ReadOnly)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Precondition, update_time) < 256 && pb_membersize(google_firestore_v1_TransactionOptions, read_only) < 256 && pb_membersize(google_firestore_v1_TransactionOptions, read_write) < 256 && pb_membersize(google_firestore_v1_TransactionOptions_ReadOnly, read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_DocumentMask_google_firestore_v1_Precondition_google_firestore_v1_TransactionOptions_google_firestore_v1_TransactionOptions_ReadWrite_google_firestore_v1_TransactionOptions_ReadOnly)
#endif
std::string google_firestore_v1_DocumentMask::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "DocumentMask", this);
std::string tostring_result;
for (pb_size_t i = 0; i != field_paths_count; ++i) {
tostring_result += PrintPrimitiveField("field_paths: ",
field_paths[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_Precondition::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Precondition", this);
std::string tostring_result;
switch (which_condition_type) {
case google_firestore_v1_Precondition_exists_tag:
tostring_result += PrintPrimitiveField("exists: ",
exists, indent + 1, true);
break;
case google_firestore_v1_Precondition_update_time_tag:
tostring_result += PrintMessageField("update_time ",
update_time, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_TransactionOptions::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "TransactionOptions", this);
std::string tostring_result;
switch (which_mode) {
case google_firestore_v1_TransactionOptions_read_only_tag:
tostring_result += PrintMessageField("read_only ",
read_only, indent + 1, true);
break;
case google_firestore_v1_TransactionOptions_read_write_tag:
tostring_result += PrintMessageField("read_write ",
read_write, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_TransactionOptions_ReadWrite::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ReadWrite", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("retry_transaction: ",
retry_transaction, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_TransactionOptions_ReadOnly::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ReadOnly", this);
std::string tostring_result;
switch (which_consistency_selector) {
case google_firestore_v1_TransactionOptions_ReadOnly_read_time_tag:
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,135 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_FIRESTORE_V1_COMMON_NANOPB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1_COMMON_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/protobuf/timestamp.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_firestore_v1_DocumentMask {
pb_size_t field_paths_count;
pb_bytes_array_t **field_paths;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentMask) */
} google_firestore_v1_DocumentMask;
typedef struct _google_firestore_v1_TransactionOptions_ReadWrite {
pb_bytes_array_t *retry_transaction;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_TransactionOptions_ReadWrite) */
} google_firestore_v1_TransactionOptions_ReadWrite;
typedef struct _google_firestore_v1_Precondition {
pb_size_t which_condition_type;
union {
bool exists;
google_protobuf_Timestamp update_time;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_Precondition) */
} google_firestore_v1_Precondition;
typedef struct _google_firestore_v1_TransactionOptions_ReadOnly {
pb_size_t which_consistency_selector;
union {
google_protobuf_Timestamp read_time;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_TransactionOptions_ReadOnly) */
} google_firestore_v1_TransactionOptions_ReadOnly;
typedef struct _google_firestore_v1_TransactionOptions {
pb_size_t which_mode;
union {
google_firestore_v1_TransactionOptions_ReadOnly read_only;
google_firestore_v1_TransactionOptions_ReadWrite read_write;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_TransactionOptions) */
} google_firestore_v1_TransactionOptions;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_firestore_v1_DocumentMask_init_default {0, NULL}
#define google_firestore_v1_Precondition_init_default {0, {0}}
#define google_firestore_v1_TransactionOptions_init_default {0, {google_firestore_v1_TransactionOptions_ReadOnly_init_default}}
#define google_firestore_v1_TransactionOptions_ReadWrite_init_default {NULL}
#define google_firestore_v1_TransactionOptions_ReadOnly_init_default {0, {google_protobuf_Timestamp_init_default}}
#define google_firestore_v1_DocumentMask_init_zero {0, NULL}
#define google_firestore_v1_Precondition_init_zero {0, {0}}
#define google_firestore_v1_TransactionOptions_init_zero {0, {google_firestore_v1_TransactionOptions_ReadOnly_init_zero}}
#define google_firestore_v1_TransactionOptions_ReadWrite_init_zero {NULL}
#define google_firestore_v1_TransactionOptions_ReadOnly_init_zero {0, {google_protobuf_Timestamp_init_zero}}
/* Field tags (for use in manual encoding/decoding) */
#define google_firestore_v1_DocumentMask_field_paths_tag 1
#define google_firestore_v1_TransactionOptions_ReadWrite_retry_transaction_tag 1
#define google_firestore_v1_Precondition_exists_tag 1
#define google_firestore_v1_Precondition_update_time_tag 2
#define google_firestore_v1_TransactionOptions_ReadOnly_read_time_tag 2
#define google_firestore_v1_TransactionOptions_read_only_tag 2
#define google_firestore_v1_TransactionOptions_read_write_tag 3
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_firestore_v1_DocumentMask_fields[2];
extern const pb_field_t google_firestore_v1_Precondition_fields[3];
extern const pb_field_t google_firestore_v1_TransactionOptions_fields[3];
extern const pb_field_t google_firestore_v1_TransactionOptions_ReadWrite_fields[2];
extern const pb_field_t google_firestore_v1_TransactionOptions_ReadOnly_fields[2];
/* Maximum encoded size of messages (where known) */
/* google_firestore_v1_DocumentMask_size depends on runtime parameters */
#define google_firestore_v1_Precondition_size 24
/* google_firestore_v1_TransactionOptions_size depends on runtime parameters */
/* google_firestore_v1_TransactionOptions_ReadWrite_size depends on runtime parameters */
#define google_firestore_v1_TransactionOptions_ReadOnly_size 24
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define COMMON_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,257 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "document.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_firestore_v1_Document_fields[5] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_Document, name, name, 0),
PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_Document, fields, name, &google_firestore_v1_Document_FieldsEntry_fields),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_Document, create_time, fields, &google_protobuf_Timestamp_fields),
PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_firestore_v1_Document, update_time, create_time, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_Document_FieldsEntry_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_Document_FieldsEntry, key, key, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_Document_FieldsEntry, value, key, &google_firestore_v1_Value_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_Value_fields[12] = {
PB_ANONYMOUS_ONEOF_FIELD(value_type, 1, BOOL , ONEOF, STATIC , FIRST, google_firestore_v1_Value, boolean_value, boolean_value, 0),
PB_ANONYMOUS_ONEOF_FIELD(value_type, 2, INT64 , ONEOF, STATIC , UNION, google_firestore_v1_Value, integer_value, integer_value, 0),
PB_ANONYMOUS_ONEOF_FIELD(value_type, 3, DOUBLE , ONEOF, STATIC , UNION, google_firestore_v1_Value, double_value, double_value, 0),
PB_ANONYMOUS_ONEOF_FIELD(value_type, 5, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_Value, reference_value, reference_value, 0),
PB_ANONYMOUS_ONEOF_FIELD(value_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Value, map_value, map_value, &google_firestore_v1_MapValue_fields),
PB_ANONYMOUS_ONEOF_FIELD(value_type, 8, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Value, geo_point_value, geo_point_value, &google_type_LatLng_fields),
PB_ANONYMOUS_ONEOF_FIELD(value_type, 9, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Value, array_value, array_value, &google_firestore_v1_ArrayValue_fields),
PB_ANONYMOUS_ONEOF_FIELD(value_type, 10, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Value, timestamp_value, timestamp_value, &google_protobuf_Timestamp_fields),
PB_ANONYMOUS_ONEOF_FIELD(value_type, 11, UENUM , ONEOF, STATIC , UNION, google_firestore_v1_Value, null_value, null_value, 0),
PB_ANONYMOUS_ONEOF_FIELD(value_type, 17, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_Value, string_value, string_value, 0),
PB_ANONYMOUS_ONEOF_FIELD(value_type, 18, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_Value, bytes_value, bytes_value, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_ArrayValue_fields[2] = {
PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_ArrayValue, values, values, &google_firestore_v1_Value_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_MapValue_fields[2] = {
PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_MapValue, fields, fields, &google_firestore_v1_MapValue_FieldsEntry_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_MapValue_FieldsEntry_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_MapValue_FieldsEntry, key, key, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_MapValue_FieldsEntry, value, key, &google_firestore_v1_Value_fields),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Document, create_time) < 65536 && pb_membersize(google_firestore_v1_Document, update_time) < 65536 && pb_membersize(google_firestore_v1_Document_FieldsEntry, value) < 65536 && pb_membersize(google_firestore_v1_Value, map_value) < 65536 && pb_membersize(google_firestore_v1_Value, geo_point_value) < 65536 && pb_membersize(google_firestore_v1_Value, array_value) < 65536 && pb_membersize(google_firestore_v1_Value, timestamp_value) < 65536 && pb_membersize(google_firestore_v1_MapValue_FieldsEntry, value) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_Document_google_firestore_v1_Document_FieldsEntry_google_firestore_v1_Value_google_firestore_v1_ArrayValue_google_firestore_v1_MapValue_google_firestore_v1_MapValue_FieldsEntry)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Document, create_time) < 256 && pb_membersize(google_firestore_v1_Document, update_time) < 256 && pb_membersize(google_firestore_v1_Document_FieldsEntry, value) < 256 && pb_membersize(google_firestore_v1_Value, map_value) < 256 && pb_membersize(google_firestore_v1_Value, geo_point_value) < 256 && pb_membersize(google_firestore_v1_Value, array_value) < 256 && pb_membersize(google_firestore_v1_Value, timestamp_value) < 256 && pb_membersize(google_firestore_v1_MapValue_FieldsEntry, value) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_Document_google_firestore_v1_Document_FieldsEntry_google_firestore_v1_Value_google_firestore_v1_ArrayValue_google_firestore_v1_MapValue_google_firestore_v1_MapValue_FieldsEntry)
#endif
/* On some platforms (such as AVR), double is really float.
* These are not directly supported by nanopb, but see example_avr_double.
* To get rid of this error, remove any double fields from your .proto.
*/
PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)
std::string google_firestore_v1_Document::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Document", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("name: ", name, indent + 1, false);
for (pb_size_t i = 0; i != fields_count; ++i) {
tostring_result += PrintMessageField("fields ",
fields[i], indent + 1, true);
}
tostring_result += PrintMessageField("create_time ",
create_time, indent + 1, false);
if (has_update_time) {
tostring_result += PrintMessageField("update_time ",
update_time, indent + 1, true);
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_Document_FieldsEntry::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "FieldsEntry", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("key: ", key, indent + 1, false);
tostring_result += PrintMessageField("value ", value, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_Value::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Value", this);
std::string tostring_result;
switch (which_value_type) {
case google_firestore_v1_Value_boolean_value_tag:
tostring_result += PrintPrimitiveField("boolean_value: ",
boolean_value, indent + 1, true);
break;
case google_firestore_v1_Value_integer_value_tag:
tostring_result += PrintPrimitiveField("integer_value: ",
integer_value, indent + 1, true);
break;
case google_firestore_v1_Value_double_value_tag:
tostring_result += PrintPrimitiveField("double_value: ",
double_value, indent + 1, true);
break;
case google_firestore_v1_Value_reference_value_tag:
tostring_result += PrintPrimitiveField("reference_value: ",
reference_value, indent + 1, true);
break;
case google_firestore_v1_Value_map_value_tag:
tostring_result += PrintMessageField("map_value ",
map_value, indent + 1, true);
break;
case google_firestore_v1_Value_geo_point_value_tag:
tostring_result += PrintMessageField("geo_point_value ",
geo_point_value, indent + 1, true);
break;
case google_firestore_v1_Value_array_value_tag:
tostring_result += PrintMessageField("array_value ",
array_value, indent + 1, true);
break;
case google_firestore_v1_Value_timestamp_value_tag:
tostring_result += PrintMessageField("timestamp_value ",
timestamp_value, indent + 1, true);
break;
case google_firestore_v1_Value_null_value_tag:
tostring_result += PrintEnumField("null_value: ",
null_value, indent + 1, true);
break;
case google_firestore_v1_Value_string_value_tag:
tostring_result += PrintPrimitiveField("string_value: ",
string_value, indent + 1, true);
break;
case google_firestore_v1_Value_bytes_value_tag:
tostring_result += PrintPrimitiveField("bytes_value: ",
bytes_value, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_ArrayValue::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ArrayValue", this);
std::string tostring_result;
for (pb_size_t i = 0; i != values_count; ++i) {
tostring_result += PrintMessageField("values ",
values[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_MapValue::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "MapValue", this);
std::string tostring_result;
for (pb_size_t i = 0; i != fields_count; ++i) {
tostring_result += PrintMessageField("fields ",
fields[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_MapValue_FieldsEntry::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "FieldsEntry", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("key: ", key, indent + 1, false);
tostring_result += PrintMessageField("value ", value, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,174 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_FIRESTORE_V1_DOCUMENT_NANOPB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1_DOCUMENT_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/protobuf/struct.nanopb.h"
#include "google/protobuf/timestamp.nanopb.h"
#include "google/type/latlng.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_firestore_v1_ArrayValue {
pb_size_t values_count;
struct _google_firestore_v1_Value *values;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_ArrayValue) */
} google_firestore_v1_ArrayValue;
typedef struct _google_firestore_v1_MapValue {
pb_size_t fields_count;
struct _google_firestore_v1_MapValue_FieldsEntry *fields;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_MapValue) */
} google_firestore_v1_MapValue;
typedef struct _google_firestore_v1_Document {
pb_bytes_array_t *name;
pb_size_t fields_count;
struct _google_firestore_v1_Document_FieldsEntry *fields;
google_protobuf_Timestamp create_time;
bool has_update_time;
google_protobuf_Timestamp update_time;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_Document) */
} google_firestore_v1_Document;
typedef struct _google_firestore_v1_Value {
pb_size_t which_value_type;
union {
bool boolean_value;
int64_t integer_value;
double double_value;
pb_bytes_array_t *reference_value;
google_firestore_v1_MapValue map_value;
google_type_LatLng geo_point_value;
google_firestore_v1_ArrayValue array_value;
google_protobuf_Timestamp timestamp_value;
google_protobuf_NullValue null_value;
pb_bytes_array_t *string_value;
pb_bytes_array_t *bytes_value;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_Value) */
} google_firestore_v1_Value;
typedef struct _google_firestore_v1_Document_FieldsEntry {
pb_bytes_array_t *key;
google_firestore_v1_Value value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_Document_FieldsEntry) */
} google_firestore_v1_Document_FieldsEntry;
typedef struct _google_firestore_v1_MapValue_FieldsEntry {
pb_bytes_array_t *key;
google_firestore_v1_Value value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_MapValue_FieldsEntry) */
} google_firestore_v1_MapValue_FieldsEntry;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_firestore_v1_Document_init_default {NULL, 0, NULL, google_protobuf_Timestamp_init_default, false, google_protobuf_Timestamp_init_default}
#define google_firestore_v1_Document_FieldsEntry_init_default {NULL, google_firestore_v1_Value_init_default}
#define google_firestore_v1_Value_init_default {0, {0}}
#define google_firestore_v1_ArrayValue_init_default {0, NULL}
#define google_firestore_v1_MapValue_init_default {0, NULL}
#define google_firestore_v1_MapValue_FieldsEntry_init_default {NULL, google_firestore_v1_Value_init_default}
#define google_firestore_v1_Document_init_zero {NULL, 0, NULL, google_protobuf_Timestamp_init_zero, false, google_protobuf_Timestamp_init_zero}
#define google_firestore_v1_Document_FieldsEntry_init_zero {NULL, google_firestore_v1_Value_init_zero}
#define google_firestore_v1_Value_init_zero {0, {0}}
#define google_firestore_v1_ArrayValue_init_zero {0, NULL}
#define google_firestore_v1_MapValue_init_zero {0, NULL}
#define google_firestore_v1_MapValue_FieldsEntry_init_zero {NULL, google_firestore_v1_Value_init_zero}
/* Field tags (for use in manual encoding/decoding) */
#define google_firestore_v1_ArrayValue_values_tag 1
#define google_firestore_v1_MapValue_fields_tag 1
#define google_firestore_v1_Document_name_tag 1
#define google_firestore_v1_Document_fields_tag 2
#define google_firestore_v1_Document_create_time_tag 3
#define google_firestore_v1_Document_update_time_tag 4
#define google_firestore_v1_Value_boolean_value_tag 1
#define google_firestore_v1_Value_integer_value_tag 2
#define google_firestore_v1_Value_double_value_tag 3
#define google_firestore_v1_Value_reference_value_tag 5
#define google_firestore_v1_Value_map_value_tag 6
#define google_firestore_v1_Value_geo_point_value_tag 8
#define google_firestore_v1_Value_array_value_tag 9
#define google_firestore_v1_Value_timestamp_value_tag 10
#define google_firestore_v1_Value_null_value_tag 11
#define google_firestore_v1_Value_string_value_tag 17
#define google_firestore_v1_Value_bytes_value_tag 18
#define google_firestore_v1_Document_FieldsEntry_key_tag 1
#define google_firestore_v1_Document_FieldsEntry_value_tag 2
#define google_firestore_v1_MapValue_FieldsEntry_key_tag 1
#define google_firestore_v1_MapValue_FieldsEntry_value_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_firestore_v1_Document_fields[5];
extern const pb_field_t google_firestore_v1_Document_FieldsEntry_fields[3];
extern const pb_field_t google_firestore_v1_Value_fields[12];
extern const pb_field_t google_firestore_v1_ArrayValue_fields[2];
extern const pb_field_t google_firestore_v1_MapValue_fields[2];
extern const pb_field_t google_firestore_v1_MapValue_FieldsEntry_fields[3];
/* Maximum encoded size of messages (where known) */
/* google_firestore_v1_Document_size depends on runtime parameters */
/* google_firestore_v1_Document_FieldsEntry_size depends on runtime parameters */
/* google_firestore_v1_Value_size depends on runtime parameters */
/* google_firestore_v1_ArrayValue_size depends on runtime parameters */
/* google_firestore_v1_MapValue_size depends on runtime parameters */
/* google_firestore_v1_MapValue_FieldsEntry_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define DOCUMENT_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,952 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "firestore.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_firestore_v1_GetDocumentRequest_fields[5] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_GetDocumentRequest, name, name, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_GetDocumentRequest, mask, name, &google_firestore_v1_DocumentMask_fields),
PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 3, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_GetDocumentRequest, transaction, mask, 0),
PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_GetDocumentRequest, read_time, mask, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_ListDocumentsRequest_fields[10] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListDocumentsRequest, parent, parent, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, collection_id, parent, 0),
PB_FIELD( 3, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_ListDocumentsRequest, page_size, collection_id, 0),
PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, page_token, page_size, 0),
PB_FIELD( 6, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, order_by, page_token, 0),
PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_ListDocumentsRequest, mask, order_by, &google_firestore_v1_DocumentMask_fields),
PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 8, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, transaction, mask, 0),
PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 10, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListDocumentsRequest, read_time, mask, &google_protobuf_Timestamp_fields),
PB_FIELD( 12, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1_ListDocumentsRequest, show_missing, read_time, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_ListDocumentsResponse_fields[3] = {
PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_ListDocumentsResponse, documents, documents, &google_firestore_v1_Document_fields),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsResponse, next_page_token, documents, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_CreateDocumentRequest_fields[6] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_CreateDocumentRequest, parent, parent, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_CreateDocumentRequest, collection_id, parent, 0),
PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_CreateDocumentRequest, document_id, collection_id, 0),
PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_CreateDocumentRequest, document, document_id, &google_firestore_v1_Document_fields),
PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_CreateDocumentRequest, mask, document, &google_firestore_v1_DocumentMask_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_UpdateDocumentRequest_fields[5] = {
PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_UpdateDocumentRequest, document, document, &google_firestore_v1_Document_fields),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_UpdateDocumentRequest, update_mask, document, &google_firestore_v1_DocumentMask_fields),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_UpdateDocumentRequest, mask, update_mask, &google_firestore_v1_DocumentMask_fields),
PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_UpdateDocumentRequest, current_document, mask, &google_firestore_v1_Precondition_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_DeleteDocumentRequest_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DeleteDocumentRequest, name, name, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_DeleteDocumentRequest, current_document, name, &google_firestore_v1_Precondition_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_BatchGetDocumentsRequest_fields[7] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_BatchGetDocumentsRequest, database, database, 0),
PB_FIELD( 2, BYTES , REPEATED, POINTER , OTHER, google_firestore_v1_BatchGetDocumentsRequest, documents, database, 0),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_BatchGetDocumentsRequest, mask, documents, &google_firestore_v1_DocumentMask_fields),
PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 4, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_BatchGetDocumentsRequest, transaction, mask, 0),
PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_BatchGetDocumentsRequest, new_transaction, mask, &google_firestore_v1_TransactionOptions_fields),
PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_BatchGetDocumentsRequest, read_time, mask, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_BatchGetDocumentsResponse_fields[5] = {
PB_ANONYMOUS_ONEOF_FIELD(result, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_BatchGetDocumentsResponse, found, found, &google_firestore_v1_Document_fields),
PB_ANONYMOUS_ONEOF_FIELD(result, 2, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_BatchGetDocumentsResponse, missing, missing, 0),
PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_BatchGetDocumentsResponse, transaction, missing, 0),
PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_BatchGetDocumentsResponse, read_time, transaction, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_BeginTransactionRequest_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_BeginTransactionRequest, database, database, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_BeginTransactionRequest, options, database, &google_firestore_v1_TransactionOptions_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_BeginTransactionResponse_fields[2] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_BeginTransactionResponse, transaction, transaction, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_CommitRequest_fields[4] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_CommitRequest, database, database, 0),
PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_CommitRequest, writes, database, &google_firestore_v1_Write_fields),
PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_CommitRequest, transaction, writes, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_CommitResponse_fields[3] = {
PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_CommitResponse, write_results, write_results, &google_firestore_v1_WriteResult_fields),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_CommitResponse, commit_time, write_results, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_RollbackRequest_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_RollbackRequest, database, database, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_RollbackRequest, transaction, database, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_RunQueryRequest_fields[6] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_RunQueryRequest, parent, parent, 0),
PB_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_RunQueryRequest, structured_query, parent, &google_firestore_v1_StructuredQuery_fields),
PB_ONEOF_FIELD(consistency_selector, 5, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_RunQueryRequest, transaction, query_type.structured_query, 0),
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),
PB_ONEOF_FIELD(consistency_selector, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_RunQueryRequest, read_time, query_type.structured_query, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_RunQueryResponse_fields[5] = {
PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_RunQueryResponse, document, document, &google_firestore_v1_Document_fields),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_RunQueryResponse, transaction, document, 0),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_RunQueryResponse, read_time, transaction, &google_protobuf_Timestamp_fields),
PB_FIELD( 4, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_RunQueryResponse, skipped_results, read_time, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_RunAggregationQueryRequest_fields[6] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_RunAggregationQueryRequest, parent, parent, 0),
PB_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_RunAggregationQueryRequest, structured_aggregation_query, parent, &google_firestore_v1_StructuredAggregationQuery_fields),
PB_ONEOF_FIELD(consistency_selector, 4, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_RunAggregationQueryRequest, transaction, query_type.structured_aggregation_query, 0),
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),
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),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_RunAggregationQueryResponse_fields[4] = {
PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_RunAggregationQueryResponse, result, result, &google_firestore_v1_AggregationResult_fields),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_RunAggregationQueryResponse, transaction, result, 0),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_RunAggregationQueryResponse, read_time, transaction, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_WriteRequest_fields[6] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_WriteRequest, database, database, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteRequest, stream_id, database, 0),
PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteRequest, writes, stream_id, &google_firestore_v1_Write_fields),
PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteRequest, stream_token, writes, 0),
PB_FIELD( 5, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteRequest, labels, stream_token, &google_firestore_v1_WriteRequest_LabelsEntry_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_WriteRequest_LabelsEntry_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_WriteRequest_LabelsEntry, key, key, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteRequest_LabelsEntry, value, key, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_WriteResponse_fields[5] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_WriteResponse, stream_id, stream_id, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteResponse, stream_token, stream_id, 0),
PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteResponse, write_results, stream_token, &google_firestore_v1_WriteResult_fields),
PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_WriteResponse, commit_time, write_results, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_ListenRequest_fields[5] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListenRequest, database, database, 0),
PB_ANONYMOUS_ONEOF_FIELD(target_change, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_ListenRequest, add_target, database, &google_firestore_v1_Target_fields),
PB_ANONYMOUS_ONEOF_FIELD(target_change, 3, INT32 , ONEOF, STATIC , UNION, google_firestore_v1_ListenRequest, remove_target, database, 0),
PB_FIELD( 4, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_ListenRequest, labels, remove_target, &google_firestore_v1_ListenRequest_LabelsEntry_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_ListenRequest_LabelsEntry_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListenRequest_LabelsEntry, key, key, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListenRequest_LabelsEntry, value, key, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_ListenResponse_fields[6] = {
PB_ANONYMOUS_ONEOF_FIELD(response_type, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_ListenResponse, target_change, target_change, &google_firestore_v1_TargetChange_fields),
PB_ANONYMOUS_ONEOF_FIELD(response_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, document_change, document_change, &google_firestore_v1_DocumentChange_fields),
PB_ANONYMOUS_ONEOF_FIELD(response_type, 4, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, document_delete, document_delete, &google_firestore_v1_DocumentDelete_fields),
PB_ANONYMOUS_ONEOF_FIELD(response_type, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, filter, filter, &google_firestore_v1_ExistenceFilter_fields),
PB_ANONYMOUS_ONEOF_FIELD(response_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, document_remove, document_remove, &google_firestore_v1_DocumentRemove_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_Target_fields[8] = {
PB_ONEOF_FIELD(target_type, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_Target, query, query, &google_firestore_v1_Target_QueryTarget_fields),
PB_ONEOF_FIELD(target_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Target, documents, documents, &google_firestore_v1_Target_DocumentsTarget_fields),
PB_ONEOF_FIELD(resume_type, 4, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_Target, resume_token, target_type.documents, 0),
PB_ONEOF_FIELD(resume_type, 11, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Target, read_time, target_type.documents, &google_protobuf_Timestamp_fields),
PB_FIELD( 5, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_Target, target_id, resume_type.read_time, 0),
PB_FIELD( 6, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1_Target, once, target_id, 0),
PB_FIELD( 12, MESSAGE , OPTIONAL, STATIC , OTHER, google_firestore_v1_Target, expected_count, once, &google_protobuf_Int32Value_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_Target_DocumentsTarget_fields[2] = {
PB_FIELD( 2, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1_Target_DocumentsTarget, documents, documents, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_Target_QueryTarget_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_Target_QueryTarget, parent, parent, 0),
PB_ANONYMOUS_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_Target_QueryTarget, structured_query, parent, &google_firestore_v1_StructuredQuery_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_TargetChange_fields[6] = {
PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1_TargetChange, target_change_type, target_change_type, 0),
PB_FIELD( 2, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_TargetChange, target_ids, target_change_type, 0),
PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_firestore_v1_TargetChange, cause, target_ids, &google_rpc_Status_fields),
PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_TargetChange, resume_token, cause, 0),
PB_FIELD( 6, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_TargetChange, read_time, resume_token, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_ListCollectionIdsRequest_fields[4] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListCollectionIdsRequest, parent, parent, 0),
PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_ListCollectionIdsRequest, page_size, parent, 0),
PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListCollectionIdsRequest, page_token, page_size, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_ListCollectionIdsResponse_fields[3] = {
PB_FIELD( 1, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1_ListCollectionIdsResponse, collection_ids, collection_ids, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListCollectionIdsResponse, next_page_token, collection_ids, 0),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
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)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
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)
#endif
const char* EnumToString(
google_firestore_v1_TargetChange_TargetChangeType value) {
switch (value) {
case google_firestore_v1_TargetChange_TargetChangeType_NO_CHANGE:
return "NO_CHANGE";
case google_firestore_v1_TargetChange_TargetChangeType_ADD:
return "ADD";
case google_firestore_v1_TargetChange_TargetChangeType_REMOVE:
return "REMOVE";
case google_firestore_v1_TargetChange_TargetChangeType_CURRENT:
return "CURRENT";
case google_firestore_v1_TargetChange_TargetChangeType_RESET:
return "RESET";
}
return "<unknown enum value>";
}
std::string google_firestore_v1_GetDocumentRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "GetDocumentRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("name: ", name, indent + 1, false);
tostring_result += PrintMessageField("mask ", mask, indent + 1, false);
switch (which_consistency_selector) {
case google_firestore_v1_GetDocumentRequest_transaction_tag:
tostring_result += PrintPrimitiveField("transaction: ",
transaction, indent + 1, true);
break;
case google_firestore_v1_GetDocumentRequest_read_time_tag:
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, true);
break;
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_ListDocumentsRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ListDocumentsRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("parent: ",
parent, indent + 1, false);
tostring_result += PrintPrimitiveField("collection_id: ",
collection_id, indent + 1, false);
tostring_result += PrintPrimitiveField("page_size: ",
page_size, indent + 1, false);
tostring_result += PrintPrimitiveField("page_token: ",
page_token, indent + 1, false);
tostring_result += PrintPrimitiveField("order_by: ",
order_by, indent + 1, false);
tostring_result += PrintMessageField("mask ", mask, indent + 1, false);
switch (which_consistency_selector) {
case google_firestore_v1_ListDocumentsRequest_transaction_tag:
tostring_result += PrintPrimitiveField("transaction: ",
transaction, indent + 1, true);
break;
case google_firestore_v1_ListDocumentsRequest_read_time_tag:
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, true);
break;
}
tostring_result += PrintPrimitiveField("show_missing: ",
show_missing, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_ListDocumentsResponse::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ListDocumentsResponse", this);
std::string tostring_result;
for (pb_size_t i = 0; i != documents_count; ++i) {
tostring_result += PrintMessageField("documents ",
documents[i], indent + 1, true);
}
tostring_result += PrintPrimitiveField("next_page_token: ",
next_page_token, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_CreateDocumentRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "CreateDocumentRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("parent: ",
parent, indent + 1, false);
tostring_result += PrintPrimitiveField("collection_id: ",
collection_id, indent + 1, false);
tostring_result += PrintPrimitiveField("document_id: ",
document_id, indent + 1, false);
tostring_result += PrintMessageField("document ",
document, indent + 1, false);
tostring_result += PrintMessageField("mask ", mask, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_UpdateDocumentRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "UpdateDocumentRequest", this);
std::string tostring_result;
tostring_result += PrintMessageField("document ",
document, indent + 1, false);
tostring_result += PrintMessageField("update_mask ",
update_mask, indent + 1, false);
tostring_result += PrintMessageField("mask ", mask, indent + 1, false);
tostring_result += PrintMessageField("current_document ",
current_document, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_DeleteDocumentRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "DeleteDocumentRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("name: ", name, indent + 1, false);
tostring_result += PrintMessageField("current_document ",
current_document, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_BatchGetDocumentsRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BatchGetDocumentsRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("database: ",
database, indent + 1, false);
for (pb_size_t i = 0; i != documents_count; ++i) {
tostring_result += PrintPrimitiveField("documents: ",
documents[i], indent + 1, true);
}
tostring_result += PrintMessageField("mask ", mask, indent + 1, false);
switch (which_consistency_selector) {
case google_firestore_v1_BatchGetDocumentsRequest_transaction_tag:
tostring_result += PrintPrimitiveField("transaction: ",
transaction, indent + 1, true);
break;
case google_firestore_v1_BatchGetDocumentsRequest_new_transaction_tag:
tostring_result += PrintMessageField("new_transaction ",
new_transaction, indent + 1, true);
break;
case google_firestore_v1_BatchGetDocumentsRequest_read_time_tag:
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, true);
break;
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_BatchGetDocumentsResponse::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BatchGetDocumentsResponse", this);
std::string tostring_result;
switch (which_result) {
case google_firestore_v1_BatchGetDocumentsResponse_found_tag:
tostring_result += PrintMessageField("found ",
found, indent + 1, true);
break;
case google_firestore_v1_BatchGetDocumentsResponse_missing_tag:
tostring_result += PrintPrimitiveField("missing: ",
missing, indent + 1, true);
break;
}
tostring_result += PrintPrimitiveField("transaction: ",
transaction, indent + 1, false);
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_BeginTransactionRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BeginTransactionRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("database: ",
database, indent + 1, false);
tostring_result += PrintMessageField("options ",
options, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_BeginTransactionResponse::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BeginTransactionResponse", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("transaction: ",
transaction, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_CommitRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "CommitRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("database: ",
database, indent + 1, false);
for (pb_size_t i = 0; i != writes_count; ++i) {
tostring_result += PrintMessageField("writes ",
writes[i], indent + 1, true);
}
tostring_result += PrintPrimitiveField("transaction: ",
transaction, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_CommitResponse::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "CommitResponse", this);
std::string tostring_result;
for (pb_size_t i = 0; i != write_results_count; ++i) {
tostring_result += PrintMessageField("write_results ",
write_results[i], indent + 1, true);
}
tostring_result += PrintMessageField("commit_time ",
commit_time, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_RollbackRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "RollbackRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("database: ",
database, indent + 1, false);
tostring_result += PrintPrimitiveField("transaction: ",
transaction, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_RunQueryRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "RunQueryRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("parent: ",
parent, indent + 1, false);
switch (which_query_type) {
case google_firestore_v1_RunQueryRequest_structured_query_tag:
tostring_result += PrintMessageField("structured_query ",
query_type.structured_query, indent + 1, true);
break;
}
switch (which_consistency_selector) {
case google_firestore_v1_RunQueryRequest_transaction_tag:
tostring_result += PrintPrimitiveField("transaction: ",
consistency_selector.transaction, indent + 1, true);
break;
case google_firestore_v1_RunQueryRequest_new_transaction_tag:
tostring_result += PrintMessageField("new_transaction ",
consistency_selector.new_transaction, indent + 1, true);
break;
case google_firestore_v1_RunQueryRequest_read_time_tag:
tostring_result += PrintMessageField("read_time ",
consistency_selector.read_time, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_RunQueryResponse::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "RunQueryResponse", this);
std::string tostring_result;
tostring_result += PrintMessageField("document ",
document, indent + 1, false);
tostring_result += PrintPrimitiveField("transaction: ",
transaction, indent + 1, false);
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, false);
tostring_result += PrintPrimitiveField("skipped_results: ",
skipped_results, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_RunAggregationQueryRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "RunAggregationQueryRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("parent: ",
parent, indent + 1, false);
switch (which_query_type) {
case google_firestore_v1_RunAggregationQueryRequest_structured_aggregation_query_tag:
tostring_result += PrintMessageField("structured_aggregation_query ",
query_type.structured_aggregation_query, indent + 1, true);
break;
}
switch (which_consistency_selector) {
case google_firestore_v1_RunAggregationQueryRequest_transaction_tag:
tostring_result += PrintPrimitiveField("transaction: ",
consistency_selector.transaction, indent + 1, true);
break;
case google_firestore_v1_RunAggregationQueryRequest_new_transaction_tag:
tostring_result += PrintMessageField("new_transaction ",
consistency_selector.new_transaction, indent + 1, true);
break;
case google_firestore_v1_RunAggregationQueryRequest_read_time_tag:
tostring_result += PrintMessageField("read_time ",
consistency_selector.read_time, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_RunAggregationQueryResponse::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "RunAggregationQueryResponse", this);
std::string tostring_result;
tostring_result += PrintMessageField("result ", result, indent + 1, false);
tostring_result += PrintPrimitiveField("transaction: ",
transaction, indent + 1, false);
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_WriteRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "WriteRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("database: ",
database, indent + 1, false);
tostring_result += PrintPrimitiveField("stream_id: ",
stream_id, indent + 1, false);
for (pb_size_t i = 0; i != writes_count; ++i) {
tostring_result += PrintMessageField("writes ",
writes[i], indent + 1, true);
}
tostring_result += PrintPrimitiveField("stream_token: ",
stream_token, indent + 1, false);
for (pb_size_t i = 0; i != labels_count; ++i) {
tostring_result += PrintMessageField("labels ",
labels[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_WriteRequest_LabelsEntry::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "LabelsEntry", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("key: ", key, indent + 1, false);
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_WriteResponse::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "WriteResponse", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("stream_id: ",
stream_id, indent + 1, false);
tostring_result += PrintPrimitiveField("stream_token: ",
stream_token, indent + 1, false);
for (pb_size_t i = 0; i != write_results_count; ++i) {
tostring_result += PrintMessageField("write_results ",
write_results[i], indent + 1, true);
}
tostring_result += PrintMessageField("commit_time ",
commit_time, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_ListenRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ListenRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("database: ",
database, indent + 1, false);
switch (which_target_change) {
case google_firestore_v1_ListenRequest_add_target_tag:
tostring_result += PrintMessageField("add_target ",
add_target, indent + 1, true);
break;
case google_firestore_v1_ListenRequest_remove_target_tag:
tostring_result += PrintPrimitiveField("remove_target: ",
remove_target, indent + 1, true);
break;
}
for (pb_size_t i = 0; i != labels_count; ++i) {
tostring_result += PrintMessageField("labels ",
labels[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_ListenRequest_LabelsEntry::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "LabelsEntry", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("key: ", key, indent + 1, false);
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_ListenResponse::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ListenResponse", this);
std::string tostring_result;
switch (which_response_type) {
case google_firestore_v1_ListenResponse_target_change_tag:
tostring_result += PrintMessageField("target_change ",
target_change, indent + 1, true);
break;
case google_firestore_v1_ListenResponse_document_change_tag:
tostring_result += PrintMessageField("document_change ",
document_change, indent + 1, true);
break;
case google_firestore_v1_ListenResponse_document_delete_tag:
tostring_result += PrintMessageField("document_delete ",
document_delete, indent + 1, true);
break;
case google_firestore_v1_ListenResponse_filter_tag:
tostring_result += PrintMessageField("filter ",
filter, indent + 1, true);
break;
case google_firestore_v1_ListenResponse_document_remove_tag:
tostring_result += PrintMessageField("document_remove ",
document_remove, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_Target::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Target", this);
std::string tostring_result;
switch (which_target_type) {
case google_firestore_v1_Target_query_tag:
tostring_result += PrintMessageField("query ",
target_type.query, indent + 1, true);
break;
case google_firestore_v1_Target_documents_tag:
tostring_result += PrintMessageField("documents ",
target_type.documents, indent + 1, true);
break;
}
switch (which_resume_type) {
case google_firestore_v1_Target_resume_token_tag:
tostring_result += PrintPrimitiveField("resume_token: ",
resume_type.resume_token, indent + 1, true);
break;
case google_firestore_v1_Target_read_time_tag:
tostring_result += PrintMessageField("read_time ",
resume_type.read_time, indent + 1, true);
break;
}
tostring_result += PrintPrimitiveField("target_id: ",
target_id, indent + 1, false);
tostring_result += PrintPrimitiveField("once: ", once, indent + 1, false);
if (has_expected_count) {
tostring_result += PrintMessageField("expected_count ",
expected_count, indent + 1, true);
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_Target_DocumentsTarget::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "DocumentsTarget", this);
std::string tostring_result;
for (pb_size_t i = 0; i != documents_count; ++i) {
tostring_result += PrintPrimitiveField("documents: ",
documents[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_Target_QueryTarget::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "QueryTarget", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("parent: ",
parent, indent + 1, false);
switch (which_query_type) {
case google_firestore_v1_Target_QueryTarget_structured_query_tag:
tostring_result += PrintMessageField("structured_query ",
structured_query, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_TargetChange::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "TargetChange", this);
std::string tostring_result;
tostring_result += PrintEnumField("target_change_type: ",
target_change_type, indent + 1, false);
for (pb_size_t i = 0; i != target_ids_count; ++i) {
tostring_result += PrintPrimitiveField("target_ids: ",
target_ids[i], indent + 1, true);
}
if (has_cause) {
tostring_result += PrintMessageField("cause ",
cause, indent + 1, true);
}
tostring_result += PrintPrimitiveField("resume_token: ",
resume_token, indent + 1, false);
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_ListCollectionIdsRequest::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ListCollectionIdsRequest", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("parent: ",
parent, indent + 1, false);
tostring_result += PrintPrimitiveField("page_size: ",
page_size, indent + 1, false);
tostring_result += PrintPrimitiveField("page_token: ",
page_token, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_ListCollectionIdsResponse::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ListCollectionIdsResponse", this);
std::string tostring_result;
for (pb_size_t i = 0; i != collection_ids_count; ++i) {
tostring_result += PrintPrimitiveField("collection_ids: ",
collection_ids[i], indent + 1, true);
}
tostring_result += PrintPrimitiveField("next_page_token: ",
next_page_token, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,645 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_FIRESTORE_V1_FIRESTORE_NANOPB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1_FIRESTORE_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/api/annotations.nanopb.h"
#include "google/firestore/v1/aggregation_result.nanopb.h"
#include "google/firestore/v1/common.nanopb.h"
#include "google/firestore/v1/document.nanopb.h"
#include "google/firestore/v1/query.nanopb.h"
#include "google/firestore/v1/write.nanopb.h"
#include "google/protobuf/empty.nanopb.h"
#include "google/protobuf/timestamp.nanopb.h"
#include "google/protobuf/wrappers.nanopb.h"
#include "google/rpc/status.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Enum definitions */
typedef enum _google_firestore_v1_TargetChange_TargetChangeType {
google_firestore_v1_TargetChange_TargetChangeType_NO_CHANGE = 0,
google_firestore_v1_TargetChange_TargetChangeType_ADD = 1,
google_firestore_v1_TargetChange_TargetChangeType_REMOVE = 2,
google_firestore_v1_TargetChange_TargetChangeType_CURRENT = 3,
google_firestore_v1_TargetChange_TargetChangeType_RESET = 4
} google_firestore_v1_TargetChange_TargetChangeType;
#define _google_firestore_v1_TargetChange_TargetChangeType_MIN google_firestore_v1_TargetChange_TargetChangeType_NO_CHANGE
#define _google_firestore_v1_TargetChange_TargetChangeType_MAX google_firestore_v1_TargetChange_TargetChangeType_RESET
#define _google_firestore_v1_TargetChange_TargetChangeType_ARRAYSIZE ((google_firestore_v1_TargetChange_TargetChangeType)(google_firestore_v1_TargetChange_TargetChangeType_RESET+1))
/* Struct definitions */
typedef struct _google_firestore_v1_BeginTransactionResponse {
pb_bytes_array_t *transaction;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_BeginTransactionResponse) */
} google_firestore_v1_BeginTransactionResponse;
typedef struct _google_firestore_v1_CommitRequest {
pb_bytes_array_t *database;
pb_size_t writes_count;
struct _google_firestore_v1_Write *writes;
pb_bytes_array_t *transaction;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_CommitRequest) */
} google_firestore_v1_CommitRequest;
typedef struct _google_firestore_v1_ListCollectionIdsResponse {
pb_size_t collection_ids_count;
pb_bytes_array_t **collection_ids;
pb_bytes_array_t *next_page_token;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_ListCollectionIdsResponse) */
} google_firestore_v1_ListCollectionIdsResponse;
typedef struct _google_firestore_v1_ListDocumentsResponse {
pb_size_t documents_count;
struct _google_firestore_v1_Document *documents;
pb_bytes_array_t *next_page_token;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_ListDocumentsResponse) */
} google_firestore_v1_ListDocumentsResponse;
typedef struct _google_firestore_v1_ListenRequest_LabelsEntry {
pb_bytes_array_t *key;
pb_bytes_array_t *value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_ListenRequest_LabelsEntry) */
} google_firestore_v1_ListenRequest_LabelsEntry;
typedef struct _google_firestore_v1_RollbackRequest {
pb_bytes_array_t *database;
pb_bytes_array_t *transaction;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_RollbackRequest) */
} google_firestore_v1_RollbackRequest;
typedef struct _google_firestore_v1_Target_DocumentsTarget {
pb_size_t documents_count;
pb_bytes_array_t **documents;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_Target_DocumentsTarget) */
} google_firestore_v1_Target_DocumentsTarget;
typedef struct _google_firestore_v1_WriteRequest {
pb_bytes_array_t *database;
pb_bytes_array_t *stream_id;
pb_size_t writes_count;
struct _google_firestore_v1_Write *writes;
pb_bytes_array_t *stream_token;
pb_size_t labels_count;
struct _google_firestore_v1_WriteRequest_LabelsEntry *labels;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_WriteRequest) */
} google_firestore_v1_WriteRequest;
typedef struct _google_firestore_v1_WriteRequest_LabelsEntry {
pb_bytes_array_t *key;
pb_bytes_array_t *value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_WriteRequest_LabelsEntry) */
} google_firestore_v1_WriteRequest_LabelsEntry;
typedef struct _google_firestore_v1_BatchGetDocumentsRequest {
pb_bytes_array_t *database;
pb_size_t documents_count;
pb_bytes_array_t **documents;
google_firestore_v1_DocumentMask mask;
pb_size_t which_consistency_selector;
union {
pb_bytes_array_t *transaction;
google_firestore_v1_TransactionOptions new_transaction;
google_protobuf_Timestamp read_time;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_BatchGetDocumentsRequest) */
} google_firestore_v1_BatchGetDocumentsRequest;
typedef struct _google_firestore_v1_BatchGetDocumentsResponse {
pb_size_t which_result;
union {
google_firestore_v1_Document found;
pb_bytes_array_t *missing;
};
pb_bytes_array_t *transaction;
google_protobuf_Timestamp read_time;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_BatchGetDocumentsResponse) */
} google_firestore_v1_BatchGetDocumentsResponse;
typedef struct _google_firestore_v1_BeginTransactionRequest {
pb_bytes_array_t *database;
google_firestore_v1_TransactionOptions options;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_BeginTransactionRequest) */
} google_firestore_v1_BeginTransactionRequest;
typedef struct _google_firestore_v1_CommitResponse {
pb_size_t write_results_count;
struct _google_firestore_v1_WriteResult *write_results;
google_protobuf_Timestamp commit_time;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_CommitResponse) */
} google_firestore_v1_CommitResponse;
typedef struct _google_firestore_v1_CreateDocumentRequest {
pb_bytes_array_t *parent;
pb_bytes_array_t *collection_id;
pb_bytes_array_t *document_id;
google_firestore_v1_Document document;
google_firestore_v1_DocumentMask mask;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_CreateDocumentRequest) */
} google_firestore_v1_CreateDocumentRequest;
typedef struct _google_firestore_v1_DeleteDocumentRequest {
pb_bytes_array_t *name;
google_firestore_v1_Precondition current_document;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_DeleteDocumentRequest) */
} google_firestore_v1_DeleteDocumentRequest;
typedef struct _google_firestore_v1_GetDocumentRequest {
pb_bytes_array_t *name;
google_firestore_v1_DocumentMask mask;
pb_size_t which_consistency_selector;
union {
pb_bytes_array_t *transaction;
google_protobuf_Timestamp read_time;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_GetDocumentRequest) */
} google_firestore_v1_GetDocumentRequest;
typedef struct _google_firestore_v1_ListCollectionIdsRequest {
pb_bytes_array_t *parent;
int32_t page_size;
pb_bytes_array_t *page_token;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_ListCollectionIdsRequest) */
} google_firestore_v1_ListCollectionIdsRequest;
typedef struct _google_firestore_v1_ListDocumentsRequest {
pb_bytes_array_t *parent;
pb_bytes_array_t *collection_id;
int32_t page_size;
pb_bytes_array_t *page_token;
pb_bytes_array_t *order_by;
google_firestore_v1_DocumentMask mask;
pb_size_t which_consistency_selector;
union {
pb_bytes_array_t *transaction;
google_protobuf_Timestamp read_time;
};
bool show_missing;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_ListDocumentsRequest) */
} google_firestore_v1_ListDocumentsRequest;
typedef struct _google_firestore_v1_RunAggregationQueryRequest {
pb_bytes_array_t *parent;
pb_size_t which_query_type;
union {
google_firestore_v1_StructuredAggregationQuery structured_aggregation_query;
} query_type;
pb_size_t which_consistency_selector;
union {
pb_bytes_array_t *transaction;
google_firestore_v1_TransactionOptions new_transaction;
google_protobuf_Timestamp read_time;
} consistency_selector;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_RunAggregationQueryRequest) */
} google_firestore_v1_RunAggregationQueryRequest;
typedef struct _google_firestore_v1_RunAggregationQueryResponse {
google_firestore_v1_AggregationResult result;
pb_bytes_array_t *transaction;
google_protobuf_Timestamp read_time;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_RunAggregationQueryResponse) */
} google_firestore_v1_RunAggregationQueryResponse;
typedef struct _google_firestore_v1_RunQueryRequest {
pb_bytes_array_t *parent;
pb_size_t which_query_type;
union {
google_firestore_v1_StructuredQuery structured_query;
} query_type;
pb_size_t which_consistency_selector;
union {
pb_bytes_array_t *transaction;
google_firestore_v1_TransactionOptions new_transaction;
google_protobuf_Timestamp read_time;
} consistency_selector;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_RunQueryRequest) */
} google_firestore_v1_RunQueryRequest;
typedef struct _google_firestore_v1_RunQueryResponse {
google_firestore_v1_Document document;
pb_bytes_array_t *transaction;
google_protobuf_Timestamp read_time;
int32_t skipped_results;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_RunQueryResponse) */
} google_firestore_v1_RunQueryResponse;
typedef struct _google_firestore_v1_TargetChange {
google_firestore_v1_TargetChange_TargetChangeType target_change_type;
pb_size_t target_ids_count;
int32_t *target_ids;
bool has_cause;
google_rpc_Status cause;
pb_bytes_array_t *resume_token;
google_protobuf_Timestamp read_time;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_TargetChange) */
} google_firestore_v1_TargetChange;
typedef struct _google_firestore_v1_Target_QueryTarget {
pb_bytes_array_t *parent;
pb_size_t which_query_type;
union {
google_firestore_v1_StructuredQuery structured_query;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_Target_QueryTarget) */
} google_firestore_v1_Target_QueryTarget;
typedef struct _google_firestore_v1_UpdateDocumentRequest {
google_firestore_v1_Document document;
google_firestore_v1_DocumentMask update_mask;
google_firestore_v1_DocumentMask mask;
google_firestore_v1_Precondition current_document;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_UpdateDocumentRequest) */
} google_firestore_v1_UpdateDocumentRequest;
typedef struct _google_firestore_v1_WriteResponse {
pb_bytes_array_t *stream_id;
pb_bytes_array_t *stream_token;
pb_size_t write_results_count;
struct _google_firestore_v1_WriteResult *write_results;
google_protobuf_Timestamp commit_time;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_WriteResponse) */
} google_firestore_v1_WriteResponse;
typedef struct _google_firestore_v1_ListenResponse {
pb_size_t which_response_type;
union {
google_firestore_v1_TargetChange target_change;
google_firestore_v1_DocumentChange document_change;
google_firestore_v1_DocumentDelete document_delete;
google_firestore_v1_ExistenceFilter filter;
google_firestore_v1_DocumentRemove document_remove;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_ListenResponse) */
} google_firestore_v1_ListenResponse;
typedef struct _google_firestore_v1_Target {
pb_size_t which_target_type;
union {
google_firestore_v1_Target_QueryTarget query;
google_firestore_v1_Target_DocumentsTarget documents;
} target_type;
pb_size_t which_resume_type;
union {
pb_bytes_array_t *resume_token;
google_protobuf_Timestamp read_time;
} resume_type;
int32_t target_id;
bool once;
bool has_expected_count;
google_protobuf_Int32Value expected_count;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_Target) */
} google_firestore_v1_Target;
typedef struct _google_firestore_v1_ListenRequest {
pb_bytes_array_t *database;
pb_size_t which_target_change;
union {
google_firestore_v1_Target add_target;
int32_t remove_target;
};
pb_size_t labels_count;
struct _google_firestore_v1_ListenRequest_LabelsEntry *labels;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_ListenRequest) */
} google_firestore_v1_ListenRequest;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_firestore_v1_GetDocumentRequest_init_default {NULL, google_firestore_v1_DocumentMask_init_default, 0, {NULL}}
#define google_firestore_v1_ListDocumentsRequest_init_default {NULL, NULL, 0, NULL, NULL, google_firestore_v1_DocumentMask_init_default, 0, {NULL}, 0}
#define google_firestore_v1_ListDocumentsResponse_init_default {0, NULL, NULL}
#define google_firestore_v1_CreateDocumentRequest_init_default {NULL, NULL, NULL, google_firestore_v1_Document_init_default, google_firestore_v1_DocumentMask_init_default}
#define google_firestore_v1_UpdateDocumentRequest_init_default {google_firestore_v1_Document_init_default, google_firestore_v1_DocumentMask_init_default, google_firestore_v1_DocumentMask_init_default, google_firestore_v1_Precondition_init_default}
#define google_firestore_v1_DeleteDocumentRequest_init_default {NULL, google_firestore_v1_Precondition_init_default}
#define google_firestore_v1_BatchGetDocumentsRequest_init_default {NULL, 0, NULL, google_firestore_v1_DocumentMask_init_default, 0, {NULL}}
#define google_firestore_v1_BatchGetDocumentsResponse_init_default {0, {google_firestore_v1_Document_init_default}, NULL, google_protobuf_Timestamp_init_default}
#define google_firestore_v1_BeginTransactionRequest_init_default {NULL, google_firestore_v1_TransactionOptions_init_default}
#define google_firestore_v1_BeginTransactionResponse_init_default {NULL}
#define google_firestore_v1_CommitRequest_init_default {NULL, 0, NULL, NULL}
#define google_firestore_v1_CommitResponse_init_default {0, NULL, google_protobuf_Timestamp_init_default}
#define google_firestore_v1_RollbackRequest_init_default {NULL, NULL}
#define google_firestore_v1_RunQueryRequest_init_default {NULL, 0, {google_firestore_v1_StructuredQuery_init_default}, 0, {NULL}}
#define google_firestore_v1_RunQueryResponse_init_default {google_firestore_v1_Document_init_default, NULL, google_protobuf_Timestamp_init_default, 0}
#define google_firestore_v1_RunAggregationQueryRequest_init_default {NULL, 0, {google_firestore_v1_StructuredAggregationQuery_init_default}, 0, {NULL}}
#define google_firestore_v1_RunAggregationQueryResponse_init_default {google_firestore_v1_AggregationResult_init_default, NULL, google_protobuf_Timestamp_init_default}
#define google_firestore_v1_WriteRequest_init_default {NULL, NULL, 0, NULL, NULL, 0, NULL}
#define google_firestore_v1_WriteRequest_LabelsEntry_init_default {NULL, NULL}
#define google_firestore_v1_WriteResponse_init_default {NULL, NULL, 0, NULL, google_protobuf_Timestamp_init_default}
#define google_firestore_v1_ListenRequest_init_default {NULL, 0, {google_firestore_v1_Target_init_default}, 0, NULL}
#define google_firestore_v1_ListenRequest_LabelsEntry_init_default {NULL, NULL}
#define google_firestore_v1_ListenResponse_init_default {0, {google_firestore_v1_TargetChange_init_default}}
#define google_firestore_v1_Target_init_default {0, {google_firestore_v1_Target_QueryTarget_init_default}, 0, {NULL}, 0, 0, false, google_protobuf_Int32Value_init_default}
#define google_firestore_v1_Target_DocumentsTarget_init_default {0, NULL}
#define google_firestore_v1_Target_QueryTarget_init_default {NULL, 0, {google_firestore_v1_StructuredQuery_init_default}}
#define google_firestore_v1_TargetChange_init_default {_google_firestore_v1_TargetChange_TargetChangeType_MIN, 0, NULL, false, google_rpc_Status_init_default, NULL, google_protobuf_Timestamp_init_default}
#define google_firestore_v1_ListCollectionIdsRequest_init_default {NULL, 0, NULL}
#define google_firestore_v1_ListCollectionIdsResponse_init_default {0, NULL, NULL}
#define google_firestore_v1_GetDocumentRequest_init_zero {NULL, google_firestore_v1_DocumentMask_init_zero, 0, {NULL}}
#define google_firestore_v1_ListDocumentsRequest_init_zero {NULL, NULL, 0, NULL, NULL, google_firestore_v1_DocumentMask_init_zero, 0, {NULL}, 0}
#define google_firestore_v1_ListDocumentsResponse_init_zero {0, NULL, NULL}
#define google_firestore_v1_CreateDocumentRequest_init_zero {NULL, NULL, NULL, google_firestore_v1_Document_init_zero, google_firestore_v1_DocumentMask_init_zero}
#define google_firestore_v1_UpdateDocumentRequest_init_zero {google_firestore_v1_Document_init_zero, google_firestore_v1_DocumentMask_init_zero, google_firestore_v1_DocumentMask_init_zero, google_firestore_v1_Precondition_init_zero}
#define google_firestore_v1_DeleteDocumentRequest_init_zero {NULL, google_firestore_v1_Precondition_init_zero}
#define google_firestore_v1_BatchGetDocumentsRequest_init_zero {NULL, 0, NULL, google_firestore_v1_DocumentMask_init_zero, 0, {NULL}}
#define google_firestore_v1_BatchGetDocumentsResponse_init_zero {0, {google_firestore_v1_Document_init_zero}, NULL, google_protobuf_Timestamp_init_zero}
#define google_firestore_v1_BeginTransactionRequest_init_zero {NULL, google_firestore_v1_TransactionOptions_init_zero}
#define google_firestore_v1_BeginTransactionResponse_init_zero {NULL}
#define google_firestore_v1_CommitRequest_init_zero {NULL, 0, NULL, NULL}
#define google_firestore_v1_CommitResponse_init_zero {0, NULL, google_protobuf_Timestamp_init_zero}
#define google_firestore_v1_RollbackRequest_init_zero {NULL, NULL}
#define google_firestore_v1_RunQueryRequest_init_zero {NULL, 0, {google_firestore_v1_StructuredQuery_init_zero}, 0, {NULL}}
#define google_firestore_v1_RunQueryResponse_init_zero {google_firestore_v1_Document_init_zero, NULL, google_protobuf_Timestamp_init_zero, 0}
#define google_firestore_v1_RunAggregationQueryRequest_init_zero {NULL, 0, {google_firestore_v1_StructuredAggregationQuery_init_zero}, 0, {NULL}}
#define google_firestore_v1_RunAggregationQueryResponse_init_zero {google_firestore_v1_AggregationResult_init_zero, NULL, google_protobuf_Timestamp_init_zero}
#define google_firestore_v1_WriteRequest_init_zero {NULL, NULL, 0, NULL, NULL, 0, NULL}
#define google_firestore_v1_WriteRequest_LabelsEntry_init_zero {NULL, NULL}
#define google_firestore_v1_WriteResponse_init_zero {NULL, NULL, 0, NULL, google_protobuf_Timestamp_init_zero}
#define google_firestore_v1_ListenRequest_init_zero {NULL, 0, {google_firestore_v1_Target_init_zero}, 0, NULL}
#define google_firestore_v1_ListenRequest_LabelsEntry_init_zero {NULL, NULL}
#define google_firestore_v1_ListenResponse_init_zero {0, {google_firestore_v1_TargetChange_init_zero}}
#define google_firestore_v1_Target_init_zero {0, {google_firestore_v1_Target_QueryTarget_init_zero}, 0, {NULL}, 0, 0, false, google_protobuf_Int32Value_init_zero}
#define google_firestore_v1_Target_DocumentsTarget_init_zero {0, NULL}
#define google_firestore_v1_Target_QueryTarget_init_zero {NULL, 0, {google_firestore_v1_StructuredQuery_init_zero}}
#define google_firestore_v1_TargetChange_init_zero {_google_firestore_v1_TargetChange_TargetChangeType_MIN, 0, NULL, false, google_rpc_Status_init_zero, NULL, google_protobuf_Timestamp_init_zero}
#define google_firestore_v1_ListCollectionIdsRequest_init_zero {NULL, 0, NULL}
#define google_firestore_v1_ListCollectionIdsResponse_init_zero {0, NULL, NULL}
/* Field tags (for use in manual encoding/decoding) */
#define google_firestore_v1_BeginTransactionResponse_transaction_tag 1
#define google_firestore_v1_CommitRequest_database_tag 1
#define google_firestore_v1_CommitRequest_writes_tag 2
#define google_firestore_v1_CommitRequest_transaction_tag 3
#define google_firestore_v1_ListCollectionIdsResponse_collection_ids_tag 1
#define google_firestore_v1_ListCollectionIdsResponse_next_page_token_tag 2
#define google_firestore_v1_ListDocumentsResponse_documents_tag 1
#define google_firestore_v1_ListDocumentsResponse_next_page_token_tag 2
#define google_firestore_v1_ListenRequest_LabelsEntry_key_tag 1
#define google_firestore_v1_ListenRequest_LabelsEntry_value_tag 2
#define google_firestore_v1_RollbackRequest_database_tag 1
#define google_firestore_v1_RollbackRequest_transaction_tag 2
#define google_firestore_v1_Target_DocumentsTarget_documents_tag 2
#define google_firestore_v1_WriteRequest_database_tag 1
#define google_firestore_v1_WriteRequest_stream_id_tag 2
#define google_firestore_v1_WriteRequest_writes_tag 3
#define google_firestore_v1_WriteRequest_stream_token_tag 4
#define google_firestore_v1_WriteRequest_labels_tag 5
#define google_firestore_v1_WriteRequest_LabelsEntry_key_tag 1
#define google_firestore_v1_WriteRequest_LabelsEntry_value_tag 2
#define google_firestore_v1_BatchGetDocumentsRequest_transaction_tag 4
#define google_firestore_v1_BatchGetDocumentsRequest_new_transaction_tag 5
#define google_firestore_v1_BatchGetDocumentsRequest_read_time_tag 7
#define google_firestore_v1_BatchGetDocumentsRequest_database_tag 1
#define google_firestore_v1_BatchGetDocumentsRequest_documents_tag 2
#define google_firestore_v1_BatchGetDocumentsRequest_mask_tag 3
#define google_firestore_v1_BatchGetDocumentsResponse_found_tag 1
#define google_firestore_v1_BatchGetDocumentsResponse_missing_tag 2
#define google_firestore_v1_BatchGetDocumentsResponse_transaction_tag 3
#define google_firestore_v1_BatchGetDocumentsResponse_read_time_tag 4
#define google_firestore_v1_BeginTransactionRequest_database_tag 1
#define google_firestore_v1_BeginTransactionRequest_options_tag 2
#define google_firestore_v1_CommitResponse_write_results_tag 1
#define google_firestore_v1_CommitResponse_commit_time_tag 2
#define google_firestore_v1_CreateDocumentRequest_parent_tag 1
#define google_firestore_v1_CreateDocumentRequest_collection_id_tag 2
#define google_firestore_v1_CreateDocumentRequest_document_id_tag 3
#define google_firestore_v1_CreateDocumentRequest_document_tag 4
#define google_firestore_v1_CreateDocumentRequest_mask_tag 5
#define google_firestore_v1_DeleteDocumentRequest_name_tag 1
#define google_firestore_v1_DeleteDocumentRequest_current_document_tag 2
#define google_firestore_v1_GetDocumentRequest_transaction_tag 3
#define google_firestore_v1_GetDocumentRequest_read_time_tag 5
#define google_firestore_v1_GetDocumentRequest_name_tag 1
#define google_firestore_v1_GetDocumentRequest_mask_tag 2
#define google_firestore_v1_ListCollectionIdsRequest_parent_tag 1
#define google_firestore_v1_ListCollectionIdsRequest_page_size_tag 2
#define google_firestore_v1_ListCollectionIdsRequest_page_token_tag 3
#define google_firestore_v1_ListDocumentsRequest_transaction_tag 8
#define google_firestore_v1_ListDocumentsRequest_read_time_tag 10
#define google_firestore_v1_ListDocumentsRequest_parent_tag 1
#define google_firestore_v1_ListDocumentsRequest_collection_id_tag 2
#define google_firestore_v1_ListDocumentsRequest_page_size_tag 3
#define google_firestore_v1_ListDocumentsRequest_page_token_tag 4
#define google_firestore_v1_ListDocumentsRequest_order_by_tag 6
#define google_firestore_v1_ListDocumentsRequest_mask_tag 7
#define google_firestore_v1_ListDocumentsRequest_show_missing_tag 12
#define google_firestore_v1_RunAggregationQueryRequest_structured_aggregation_query_tag 2
#define google_firestore_v1_RunAggregationQueryRequest_transaction_tag 4
#define google_firestore_v1_RunAggregationQueryRequest_new_transaction_tag 5
#define google_firestore_v1_RunAggregationQueryRequest_read_time_tag 6
#define google_firestore_v1_RunAggregationQueryRequest_parent_tag 1
#define google_firestore_v1_RunAggregationQueryResponse_result_tag 1
#define google_firestore_v1_RunAggregationQueryResponse_transaction_tag 2
#define google_firestore_v1_RunAggregationQueryResponse_read_time_tag 3
#define google_firestore_v1_RunQueryRequest_structured_query_tag 2
#define google_firestore_v1_RunQueryRequest_transaction_tag 5
#define google_firestore_v1_RunQueryRequest_new_transaction_tag 6
#define google_firestore_v1_RunQueryRequest_read_time_tag 7
#define google_firestore_v1_RunQueryRequest_parent_tag 1
#define google_firestore_v1_RunQueryResponse_transaction_tag 2
#define google_firestore_v1_RunQueryResponse_document_tag 1
#define google_firestore_v1_RunQueryResponse_read_time_tag 3
#define google_firestore_v1_RunQueryResponse_skipped_results_tag 4
#define google_firestore_v1_TargetChange_target_change_type_tag 1
#define google_firestore_v1_TargetChange_target_ids_tag 2
#define google_firestore_v1_TargetChange_cause_tag 3
#define google_firestore_v1_TargetChange_resume_token_tag 4
#define google_firestore_v1_TargetChange_read_time_tag 6
#define google_firestore_v1_Target_QueryTarget_structured_query_tag 2
#define google_firestore_v1_Target_QueryTarget_parent_tag 1
#define google_firestore_v1_UpdateDocumentRequest_document_tag 1
#define google_firestore_v1_UpdateDocumentRequest_update_mask_tag 2
#define google_firestore_v1_UpdateDocumentRequest_mask_tag 3
#define google_firestore_v1_UpdateDocumentRequest_current_document_tag 4
#define google_firestore_v1_WriteResponse_stream_id_tag 1
#define google_firestore_v1_WriteResponse_stream_token_tag 2
#define google_firestore_v1_WriteResponse_write_results_tag 3
#define google_firestore_v1_WriteResponse_commit_time_tag 4
#define google_firestore_v1_ListenResponse_target_change_tag 2
#define google_firestore_v1_ListenResponse_document_change_tag 3
#define google_firestore_v1_ListenResponse_document_delete_tag 4
#define google_firestore_v1_ListenResponse_filter_tag 5
#define google_firestore_v1_ListenResponse_document_remove_tag 6
#define google_firestore_v1_Target_query_tag 2
#define google_firestore_v1_Target_documents_tag 3
#define google_firestore_v1_Target_resume_token_tag 4
#define google_firestore_v1_Target_read_time_tag 11
#define google_firestore_v1_Target_target_id_tag 5
#define google_firestore_v1_Target_once_tag 6
#define google_firestore_v1_Target_expected_count_tag 12
#define google_firestore_v1_ListenRequest_add_target_tag 2
#define google_firestore_v1_ListenRequest_remove_target_tag 3
#define google_firestore_v1_ListenRequest_database_tag 1
#define google_firestore_v1_ListenRequest_labels_tag 4
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_firestore_v1_GetDocumentRequest_fields[5];
extern const pb_field_t google_firestore_v1_ListDocumentsRequest_fields[10];
extern const pb_field_t google_firestore_v1_ListDocumentsResponse_fields[3];
extern const pb_field_t google_firestore_v1_CreateDocumentRequest_fields[6];
extern const pb_field_t google_firestore_v1_UpdateDocumentRequest_fields[5];
extern const pb_field_t google_firestore_v1_DeleteDocumentRequest_fields[3];
extern const pb_field_t google_firestore_v1_BatchGetDocumentsRequest_fields[7];
extern const pb_field_t google_firestore_v1_BatchGetDocumentsResponse_fields[5];
extern const pb_field_t google_firestore_v1_BeginTransactionRequest_fields[3];
extern const pb_field_t google_firestore_v1_BeginTransactionResponse_fields[2];
extern const pb_field_t google_firestore_v1_CommitRequest_fields[4];
extern const pb_field_t google_firestore_v1_CommitResponse_fields[3];
extern const pb_field_t google_firestore_v1_RollbackRequest_fields[3];
extern const pb_field_t google_firestore_v1_RunQueryRequest_fields[6];
extern const pb_field_t google_firestore_v1_RunQueryResponse_fields[5];
extern const pb_field_t google_firestore_v1_RunAggregationQueryRequest_fields[6];
extern const pb_field_t google_firestore_v1_RunAggregationQueryResponse_fields[4];
extern const pb_field_t google_firestore_v1_WriteRequest_fields[6];
extern const pb_field_t google_firestore_v1_WriteRequest_LabelsEntry_fields[3];
extern const pb_field_t google_firestore_v1_WriteResponse_fields[5];
extern const pb_field_t google_firestore_v1_ListenRequest_fields[5];
extern const pb_field_t google_firestore_v1_ListenRequest_LabelsEntry_fields[3];
extern const pb_field_t google_firestore_v1_ListenResponse_fields[6];
extern const pb_field_t google_firestore_v1_Target_fields[8];
extern const pb_field_t google_firestore_v1_Target_DocumentsTarget_fields[2];
extern const pb_field_t google_firestore_v1_Target_QueryTarget_fields[3];
extern const pb_field_t google_firestore_v1_TargetChange_fields[6];
extern const pb_field_t google_firestore_v1_ListCollectionIdsRequest_fields[4];
extern const pb_field_t google_firestore_v1_ListCollectionIdsResponse_fields[3];
/* Maximum encoded size of messages (where known) */
/* google_firestore_v1_GetDocumentRequest_size depends on runtime parameters */
/* google_firestore_v1_ListDocumentsRequest_size depends on runtime parameters */
/* google_firestore_v1_ListDocumentsResponse_size depends on runtime parameters */
/* google_firestore_v1_CreateDocumentRequest_size depends on runtime parameters */
#define google_firestore_v1_UpdateDocumentRequest_size (44 + google_firestore_v1_Document_size + google_firestore_v1_DocumentMask_size + google_firestore_v1_DocumentMask_size)
/* google_firestore_v1_DeleteDocumentRequest_size depends on runtime parameters */
/* google_firestore_v1_BatchGetDocumentsRequest_size depends on runtime parameters */
/* google_firestore_v1_BatchGetDocumentsResponse_size depends on runtime parameters */
/* google_firestore_v1_BeginTransactionRequest_size depends on runtime parameters */
/* google_firestore_v1_BeginTransactionResponse_size depends on runtime parameters */
/* google_firestore_v1_CommitRequest_size depends on runtime parameters */
/* google_firestore_v1_CommitResponse_size depends on runtime parameters */
/* google_firestore_v1_RollbackRequest_size depends on runtime parameters */
/* google_firestore_v1_RunQueryRequest_size depends on runtime parameters */
/* google_firestore_v1_RunQueryResponse_size depends on runtime parameters */
/* google_firestore_v1_RunAggregationQueryRequest_size depends on runtime parameters */
/* google_firestore_v1_RunAggregationQueryResponse_size depends on runtime parameters */
/* google_firestore_v1_WriteRequest_size depends on runtime parameters */
/* google_firestore_v1_WriteRequest_LabelsEntry_size depends on runtime parameters */
/* google_firestore_v1_WriteResponse_size depends on runtime parameters */
/* google_firestore_v1_ListenRequest_size depends on runtime parameters */
/* google_firestore_v1_ListenRequest_LabelsEntry_size depends on runtime parameters */
/* google_firestore_v1_ListenResponse_size depends on runtime parameters */
/* google_firestore_v1_Target_size depends on runtime parameters */
/* google_firestore_v1_Target_DocumentsTarget_size depends on runtime parameters */
/* google_firestore_v1_Target_QueryTarget_size depends on runtime parameters */
/* google_firestore_v1_TargetChange_size depends on runtime parameters */
/* google_firestore_v1_ListCollectionIdsRequest_size depends on runtime parameters */
/* google_firestore_v1_ListCollectionIdsResponse_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define FIRESTORE_MESSAGES \
#endif
const char* EnumToString(
google_firestore_v1_TargetChange_TargetChangeType value);
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,513 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "query.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_firestore_v1_StructuredQuery_fields[9] = {
PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredQuery, select, select, &google_firestore_v1_StructuredQuery_Projection_fields),
PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_StructuredQuery, from, select, &google_firestore_v1_StructuredQuery_CollectionSelector_fields),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery, where, from, &google_firestore_v1_StructuredQuery_Filter_fields),
PB_FIELD( 4, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_StructuredQuery, order_by, where, &google_firestore_v1_StructuredQuery_Order_fields),
PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, google_firestore_v1_StructuredQuery, limit, order_by, &google_protobuf_Int32Value_fields),
PB_FIELD( 6, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery, offset, limit, 0),
PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery, start_at, offset, &google_firestore_v1_Cursor_fields),
PB_FIELD( 8, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery, end_at, start_at, &google_firestore_v1_Cursor_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredQuery_CollectionSelector_fields[3] = {
PB_FIELD( 2, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_StructuredQuery_CollectionSelector, collection_id, collection_id, 0),
PB_FIELD( 3, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery_CollectionSelector, all_descendants, collection_id, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredQuery_Filter_fields[4] = {
PB_ANONYMOUS_ONEOF_FIELD(filter_type, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_StructuredQuery_Filter, composite_filter, composite_filter, &google_firestore_v1_StructuredQuery_CompositeFilter_fields),
PB_ANONYMOUS_ONEOF_FIELD(filter_type, 2, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_StructuredQuery_Filter, field_filter, field_filter, &google_firestore_v1_StructuredQuery_FieldFilter_fields),
PB_ANONYMOUS_ONEOF_FIELD(filter_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_StructuredQuery_Filter, unary_filter, unary_filter, &google_firestore_v1_StructuredQuery_UnaryFilter_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredQuery_CompositeFilter_fields[3] = {
PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredQuery_CompositeFilter, op, op, 0),
PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_StructuredQuery_CompositeFilter, filters, op, &google_firestore_v1_StructuredQuery_Filter_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredQuery_FieldFilter_fields[4] = {
PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredQuery_FieldFilter, field, field, &google_firestore_v1_StructuredQuery_FieldReference_fields),
PB_FIELD( 2, UENUM , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery_FieldFilter, op, field, 0),
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery_FieldFilter, value, op, &google_firestore_v1_Value_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredQuery_UnaryFilter_fields[3] = {
PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredQuery_UnaryFilter, op, op, 0),
PB_ANONYMOUS_ONEOF_FIELD(operand_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_StructuredQuery_UnaryFilter, field, op, &google_firestore_v1_StructuredQuery_FieldReference_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredQuery_Order_fields[3] = {
PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredQuery_Order, field, field, &google_firestore_v1_StructuredQuery_FieldReference_fields),
PB_FIELD( 2, UENUM , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery_Order, direction, field, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredQuery_FieldReference_fields[2] = {
PB_FIELD( 2, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_StructuredQuery_FieldReference, field_path, field_path, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredQuery_Projection_fields[2] = {
PB_FIELD( 2, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_StructuredQuery_Projection, fields, fields, &google_firestore_v1_StructuredQuery_FieldReference_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredAggregationQuery_fields[3] = {
PB_ANONYMOUS_ONEOF_FIELD(query_type, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_StructuredAggregationQuery, structured_query, structured_query, &google_firestore_v1_StructuredQuery_fields),
PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_StructuredAggregationQuery, aggregations, structured_query, &google_firestore_v1_StructuredAggregationQuery_Aggregation_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredAggregationQuery_Aggregation_fields[5] = {
PB_ANONYMOUS_ONEOF_FIELD(operator, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_StructuredAggregationQuery_Aggregation, count, count, &google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_fields),
PB_ANONYMOUS_ONEOF_FIELD(operator, 2, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_StructuredAggregationQuery_Aggregation, sum, sum, &google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum_fields),
PB_ANONYMOUS_ONEOF_FIELD(operator, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_StructuredAggregationQuery_Aggregation, avg, avg, &google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg_fields),
PB_FIELD( 7, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_StructuredAggregationQuery_Aggregation, alias, avg, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_fields[2] = {
PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredAggregationQuery_Aggregation_Count, up_to, up_to, &google_protobuf_Int64Value_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum_fields[2] = {
PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum, field, field, &google_firestore_v1_StructuredQuery_FieldReference_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg_fields[2] = {
PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg, field, field, &google_firestore_v1_StructuredQuery_FieldReference_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_Cursor_fields[3] = {
PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_Cursor, values, values, &google_firestore_v1_Value_fields),
PB_FIELD( 2, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1_Cursor, before, values, 0),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_StructuredQuery, select) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery, where) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery, start_at) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery, end_at) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery, limit) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, composite_filter) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, field_filter) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, unary_filter) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_FieldFilter, field) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_FieldFilter, value) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_UnaryFilter, field) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_Order, field) < 65536 && pb_membersize(google_firestore_v1_StructuredAggregationQuery, structured_query) < 65536 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation, count) < 65536 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation, sum) < 65536 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation, avg) < 65536 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation_Count, up_to) < 65536 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum, field) < 65536 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg, field) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_StructuredQuery_google_firestore_v1_StructuredQuery_CollectionSelector_google_firestore_v1_StructuredQuery_Filter_google_firestore_v1_StructuredQuery_CompositeFilter_google_firestore_v1_StructuredQuery_FieldFilter_google_firestore_v1_StructuredQuery_UnaryFilter_google_firestore_v1_StructuredQuery_Order_google_firestore_v1_StructuredQuery_FieldReference_google_firestore_v1_StructuredQuery_Projection_google_firestore_v1_StructuredAggregationQuery_google_firestore_v1_StructuredAggregationQuery_Aggregation_google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum_google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg_google_firestore_v1_Cursor)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_StructuredQuery, select) < 256 && pb_membersize(google_firestore_v1_StructuredQuery, where) < 256 && pb_membersize(google_firestore_v1_StructuredQuery, start_at) < 256 && pb_membersize(google_firestore_v1_StructuredQuery, end_at) < 256 && pb_membersize(google_firestore_v1_StructuredQuery, limit) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, composite_filter) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, field_filter) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, unary_filter) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_FieldFilter, field) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_FieldFilter, value) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_UnaryFilter, field) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_Order, field) < 256 && pb_membersize(google_firestore_v1_StructuredAggregationQuery, structured_query) < 256 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation, count) < 256 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation, sum) < 256 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation, avg) < 256 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation_Count, up_to) < 256 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum, field) < 256 && pb_membersize(google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg, field) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_StructuredQuery_google_firestore_v1_StructuredQuery_CollectionSelector_google_firestore_v1_StructuredQuery_Filter_google_firestore_v1_StructuredQuery_CompositeFilter_google_firestore_v1_StructuredQuery_FieldFilter_google_firestore_v1_StructuredQuery_UnaryFilter_google_firestore_v1_StructuredQuery_Order_google_firestore_v1_StructuredQuery_FieldReference_google_firestore_v1_StructuredQuery_Projection_google_firestore_v1_StructuredAggregationQuery_google_firestore_v1_StructuredAggregationQuery_Aggregation_google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum_google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg_google_firestore_v1_Cursor)
#endif
const char* EnumToString(
google_firestore_v1_StructuredQuery_Direction value) {
switch (value) {
case google_firestore_v1_StructuredQuery_Direction_DIRECTION_UNSPECIFIED:
return "DIRECTION_UNSPECIFIED";
case google_firestore_v1_StructuredQuery_Direction_ASCENDING:
return "ASCENDING";
case google_firestore_v1_StructuredQuery_Direction_DESCENDING:
return "DESCENDING";
}
return "<unknown enum value>";
}
const char* EnumToString(
google_firestore_v1_StructuredQuery_CompositeFilter_Operator value) {
switch (value) {
case google_firestore_v1_StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED:
return "OPERATOR_UNSPECIFIED";
case google_firestore_v1_StructuredQuery_CompositeFilter_Operator_AND:
return "AND";
case google_firestore_v1_StructuredQuery_CompositeFilter_Operator_OR:
return "OR";
}
return "<unknown enum value>";
}
const char* EnumToString(
google_firestore_v1_StructuredQuery_FieldFilter_Operator value) {
switch (value) {
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED:
return "OPERATOR_UNSPECIFIED";
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_LESS_THAN:
return "LESS_THAN";
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_LESS_THAN_OR_EQUAL:
return "LESS_THAN_OR_EQUAL";
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_GREATER_THAN:
return "GREATER_THAN";
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_GREATER_THAN_OR_EQUAL:
return "GREATER_THAN_OR_EQUAL";
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_EQUAL:
return "EQUAL";
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_NOT_EQUAL:
return "NOT_EQUAL";
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS:
return "ARRAY_CONTAINS";
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_IN:
return "IN";
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS_ANY:
return "ARRAY_CONTAINS_ANY";
case google_firestore_v1_StructuredQuery_FieldFilter_Operator_NOT_IN:
return "NOT_IN";
}
return "<unknown enum value>";
}
const char* EnumToString(
google_firestore_v1_StructuredQuery_UnaryFilter_Operator value) {
switch (value) {
case google_firestore_v1_StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED:
return "OPERATOR_UNSPECIFIED";
case google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NAN:
return "IS_NAN";
case google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NULL:
return "IS_NULL";
case google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NOT_NAN:
return "IS_NOT_NAN";
case google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NOT_NULL:
return "IS_NOT_NULL";
}
return "<unknown enum value>";
}
std::string google_firestore_v1_StructuredQuery::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "StructuredQuery", this);
std::string tostring_result;
tostring_result += PrintMessageField("select ", select, indent + 1, false);
for (pb_size_t i = 0; i != from_count; ++i) {
tostring_result += PrintMessageField("from ",
from[i], indent + 1, true);
}
tostring_result += PrintMessageField("where ", where, indent + 1, false);
for (pb_size_t i = 0; i != order_by_count; ++i) {
tostring_result += PrintMessageField("order_by ",
order_by[i], indent + 1, true);
}
if (has_limit) {
tostring_result += PrintMessageField("limit ",
limit, indent + 1, true);
}
tostring_result += PrintPrimitiveField("offset: ",
offset, indent + 1, false);
tostring_result += PrintMessageField("start_at ",
start_at, indent + 1, false);
tostring_result += PrintMessageField("end_at ", end_at, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_StructuredQuery_CollectionSelector::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "CollectionSelector", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("collection_id: ",
collection_id, indent + 1, false);
tostring_result += PrintPrimitiveField("all_descendants: ",
all_descendants, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_StructuredQuery_Filter::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Filter", this);
std::string tostring_result;
switch (which_filter_type) {
case google_firestore_v1_StructuredQuery_Filter_composite_filter_tag:
tostring_result += PrintMessageField("composite_filter ",
composite_filter, indent + 1, true);
break;
case google_firestore_v1_StructuredQuery_Filter_field_filter_tag:
tostring_result += PrintMessageField("field_filter ",
field_filter, indent + 1, true);
break;
case google_firestore_v1_StructuredQuery_Filter_unary_filter_tag:
tostring_result += PrintMessageField("unary_filter ",
unary_filter, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_StructuredQuery_CompositeFilter::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "CompositeFilter", this);
std::string tostring_result;
tostring_result += PrintEnumField("op: ", op, indent + 1, false);
for (pb_size_t i = 0; i != filters_count; ++i) {
tostring_result += PrintMessageField("filters ",
filters[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_StructuredQuery_FieldFilter::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "FieldFilter", this);
std::string tostring_result;
tostring_result += PrintMessageField("field ", field, indent + 1, false);
tostring_result += PrintEnumField("op: ", op, indent + 1, false);
tostring_result += PrintMessageField("value ", value, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_StructuredQuery_UnaryFilter::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "UnaryFilter", this);
std::string tostring_result;
tostring_result += PrintEnumField("op: ", op, indent + 1, false);
switch (which_operand_type) {
case google_firestore_v1_StructuredQuery_UnaryFilter_field_tag:
tostring_result += PrintMessageField("field ",
field, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_StructuredQuery_Order::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Order", this);
std::string tostring_result;
tostring_result += PrintMessageField("field ", field, indent + 1, false);
tostring_result += PrintEnumField("direction: ",
direction, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_StructuredQuery_FieldReference::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "FieldReference", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("field_path: ",
field_path, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_StructuredQuery_Projection::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Projection", this);
std::string tostring_result;
for (pb_size_t i = 0; i != fields_count; ++i) {
tostring_result += PrintMessageField("fields ",
fields[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_StructuredAggregationQuery::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "StructuredAggregationQuery", this);
std::string tostring_result;
switch (which_query_type) {
case google_firestore_v1_StructuredAggregationQuery_structured_query_tag:
tostring_result += PrintMessageField("structured_query ",
structured_query, indent + 1, true);
break;
}
for (pb_size_t i = 0; i != aggregations_count; ++i) {
tostring_result += PrintMessageField("aggregations ",
aggregations[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_StructuredAggregationQuery_Aggregation::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Aggregation", this);
std::string tostring_result;
switch (which_operator) {
case google_firestore_v1_StructuredAggregationQuery_Aggregation_count_tag:
tostring_result += PrintMessageField("count ",
count, indent + 1, true);
break;
case google_firestore_v1_StructuredAggregationQuery_Aggregation_sum_tag:
tostring_result += PrintMessageField("sum ", sum, indent + 1, true);
break;
case google_firestore_v1_StructuredAggregationQuery_Aggregation_avg_tag:
tostring_result += PrintMessageField("avg ", avg, indent + 1, true);
break;
}
tostring_result += PrintPrimitiveField("alias: ",
alias, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_StructuredAggregationQuery_Aggregation_Count::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Count", this);
std::string tostring_result;
tostring_result += PrintMessageField("up_to ", up_to, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Sum", this);
std::string tostring_result;
tostring_result += PrintMessageField("field ", field, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Avg", this);
std::string tostring_result;
tostring_result += PrintMessageField("field ", field, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_Cursor::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Cursor", this);
std::string tostring_result;
for (pb_size_t i = 0; i != values_count; ++i) {
tostring_result += PrintMessageField("values ",
values[i], indent + 1, true);
}
tostring_result += PrintPrimitiveField("before: ",
before, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,356 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_FIRESTORE_V1_QUERY_NANOPB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1_QUERY_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/firestore/v1/document.nanopb.h"
#include "google/protobuf/wrappers.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Enum definitions */
typedef enum _google_firestore_v1_StructuredQuery_Direction {
google_firestore_v1_StructuredQuery_Direction_DIRECTION_UNSPECIFIED = 0,
google_firestore_v1_StructuredQuery_Direction_ASCENDING = 1,
google_firestore_v1_StructuredQuery_Direction_DESCENDING = 2
} google_firestore_v1_StructuredQuery_Direction;
#define _google_firestore_v1_StructuredQuery_Direction_MIN google_firestore_v1_StructuredQuery_Direction_DIRECTION_UNSPECIFIED
#define _google_firestore_v1_StructuredQuery_Direction_MAX google_firestore_v1_StructuredQuery_Direction_DESCENDING
#define _google_firestore_v1_StructuredQuery_Direction_ARRAYSIZE ((google_firestore_v1_StructuredQuery_Direction)(google_firestore_v1_StructuredQuery_Direction_DESCENDING+1))
typedef enum _google_firestore_v1_StructuredQuery_CompositeFilter_Operator {
google_firestore_v1_StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED = 0,
google_firestore_v1_StructuredQuery_CompositeFilter_Operator_AND = 1,
google_firestore_v1_StructuredQuery_CompositeFilter_Operator_OR = 2
} google_firestore_v1_StructuredQuery_CompositeFilter_Operator;
#define _google_firestore_v1_StructuredQuery_CompositeFilter_Operator_MIN google_firestore_v1_StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED
#define _google_firestore_v1_StructuredQuery_CompositeFilter_Operator_MAX google_firestore_v1_StructuredQuery_CompositeFilter_Operator_OR
#define _google_firestore_v1_StructuredQuery_CompositeFilter_Operator_ARRAYSIZE ((google_firestore_v1_StructuredQuery_CompositeFilter_Operator)(google_firestore_v1_StructuredQuery_CompositeFilter_Operator_OR+1))
typedef enum _google_firestore_v1_StructuredQuery_FieldFilter_Operator {
google_firestore_v1_StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED = 0,
google_firestore_v1_StructuredQuery_FieldFilter_Operator_LESS_THAN = 1,
google_firestore_v1_StructuredQuery_FieldFilter_Operator_LESS_THAN_OR_EQUAL = 2,
google_firestore_v1_StructuredQuery_FieldFilter_Operator_GREATER_THAN = 3,
google_firestore_v1_StructuredQuery_FieldFilter_Operator_GREATER_THAN_OR_EQUAL = 4,
google_firestore_v1_StructuredQuery_FieldFilter_Operator_EQUAL = 5,
google_firestore_v1_StructuredQuery_FieldFilter_Operator_NOT_EQUAL = 6,
google_firestore_v1_StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS = 7,
google_firestore_v1_StructuredQuery_FieldFilter_Operator_IN = 8,
google_firestore_v1_StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS_ANY = 9,
google_firestore_v1_StructuredQuery_FieldFilter_Operator_NOT_IN = 10
} google_firestore_v1_StructuredQuery_FieldFilter_Operator;
#define _google_firestore_v1_StructuredQuery_FieldFilter_Operator_MIN google_firestore_v1_StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED
#define _google_firestore_v1_StructuredQuery_FieldFilter_Operator_MAX google_firestore_v1_StructuredQuery_FieldFilter_Operator_NOT_IN
#define _google_firestore_v1_StructuredQuery_FieldFilter_Operator_ARRAYSIZE ((google_firestore_v1_StructuredQuery_FieldFilter_Operator)(google_firestore_v1_StructuredQuery_FieldFilter_Operator_NOT_IN+1))
typedef enum _google_firestore_v1_StructuredQuery_UnaryFilter_Operator {
google_firestore_v1_StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED = 0,
google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NAN = 2,
google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NULL = 3,
google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NOT_NAN = 4,
google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NOT_NULL = 5
} google_firestore_v1_StructuredQuery_UnaryFilter_Operator;
#define _google_firestore_v1_StructuredQuery_UnaryFilter_Operator_MIN google_firestore_v1_StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED
#define _google_firestore_v1_StructuredQuery_UnaryFilter_Operator_MAX google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NOT_NULL
#define _google_firestore_v1_StructuredQuery_UnaryFilter_Operator_ARRAYSIZE ((google_firestore_v1_StructuredQuery_UnaryFilter_Operator)(google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NOT_NULL+1))
/* Struct definitions */
typedef struct _google_firestore_v1_StructuredQuery_FieldReference {
pb_bytes_array_t *field_path;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_FieldReference) */
} google_firestore_v1_StructuredQuery_FieldReference;
typedef struct _google_firestore_v1_StructuredQuery_Projection {
pb_size_t fields_count;
struct _google_firestore_v1_StructuredQuery_FieldReference *fields;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_Projection) */
} google_firestore_v1_StructuredQuery_Projection;
typedef struct _google_firestore_v1_Cursor {
pb_size_t values_count;
struct _google_firestore_v1_Value *values;
bool before;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_Cursor) */
} google_firestore_v1_Cursor;
typedef struct _google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg {
google_firestore_v1_StructuredQuery_FieldReference field;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg) */
} google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg;
typedef struct _google_firestore_v1_StructuredAggregationQuery_Aggregation_Count {
google_protobuf_Int64Value up_to;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredAggregationQuery_Aggregation_Count) */
} google_firestore_v1_StructuredAggregationQuery_Aggregation_Count;
typedef struct _google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum {
google_firestore_v1_StructuredQuery_FieldReference field;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum) */
} google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum;
typedef struct _google_firestore_v1_StructuredQuery_CollectionSelector {
pb_bytes_array_t *collection_id;
bool all_descendants;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_CollectionSelector) */
} google_firestore_v1_StructuredQuery_CollectionSelector;
typedef struct _google_firestore_v1_StructuredQuery_CompositeFilter {
google_firestore_v1_StructuredQuery_CompositeFilter_Operator op;
pb_size_t filters_count;
struct _google_firestore_v1_StructuredQuery_Filter *filters;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_CompositeFilter) */
} google_firestore_v1_StructuredQuery_CompositeFilter;
typedef struct _google_firestore_v1_StructuredQuery_FieldFilter {
google_firestore_v1_StructuredQuery_FieldReference field;
google_firestore_v1_StructuredQuery_FieldFilter_Operator op;
google_firestore_v1_Value value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_FieldFilter) */
} google_firestore_v1_StructuredQuery_FieldFilter;
typedef struct _google_firestore_v1_StructuredQuery_Order {
google_firestore_v1_StructuredQuery_FieldReference field;
google_firestore_v1_StructuredQuery_Direction direction;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_Order) */
} google_firestore_v1_StructuredQuery_Order;
typedef struct _google_firestore_v1_StructuredQuery_UnaryFilter {
google_firestore_v1_StructuredQuery_UnaryFilter_Operator op;
pb_size_t which_operand_type;
union {
google_firestore_v1_StructuredQuery_FieldReference field;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_UnaryFilter) */
} google_firestore_v1_StructuredQuery_UnaryFilter;
typedef struct _google_firestore_v1_StructuredAggregationQuery_Aggregation {
pb_size_t which_operator;
union {
google_firestore_v1_StructuredAggregationQuery_Aggregation_Count count;
google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum sum;
google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg avg;
};
pb_bytes_array_t *alias;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredAggregationQuery_Aggregation) */
} google_firestore_v1_StructuredAggregationQuery_Aggregation;
typedef struct _google_firestore_v1_StructuredQuery_Filter {
pb_size_t which_filter_type;
union {
google_firestore_v1_StructuredQuery_CompositeFilter composite_filter;
google_firestore_v1_StructuredQuery_FieldFilter field_filter;
google_firestore_v1_StructuredQuery_UnaryFilter unary_filter;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_Filter) */
} google_firestore_v1_StructuredQuery_Filter;
typedef struct _google_firestore_v1_StructuredQuery {
google_firestore_v1_StructuredQuery_Projection select;
pb_size_t from_count;
struct _google_firestore_v1_StructuredQuery_CollectionSelector *from;
google_firestore_v1_StructuredQuery_Filter where;
pb_size_t order_by_count;
struct _google_firestore_v1_StructuredQuery_Order *order_by;
bool has_limit;
google_protobuf_Int32Value limit;
int32_t offset;
google_firestore_v1_Cursor start_at;
google_firestore_v1_Cursor end_at;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery) */
} google_firestore_v1_StructuredQuery;
typedef struct _google_firestore_v1_StructuredAggregationQuery {
pb_size_t which_query_type;
union {
google_firestore_v1_StructuredQuery structured_query;
};
pb_size_t aggregations_count;
struct _google_firestore_v1_StructuredAggregationQuery_Aggregation *aggregations;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredAggregationQuery) */
} google_firestore_v1_StructuredAggregationQuery;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_firestore_v1_StructuredQuery_init_default {google_firestore_v1_StructuredQuery_Projection_init_default, 0, NULL, google_firestore_v1_StructuredQuery_Filter_init_default, 0, NULL, false, google_protobuf_Int32Value_init_default, 0, google_firestore_v1_Cursor_init_default, google_firestore_v1_Cursor_init_default}
#define google_firestore_v1_StructuredQuery_CollectionSelector_init_default {NULL, 0}
#define google_firestore_v1_StructuredQuery_Filter_init_default {0, {google_firestore_v1_StructuredQuery_CompositeFilter_init_default}}
#define google_firestore_v1_StructuredQuery_CompositeFilter_init_default {_google_firestore_v1_StructuredQuery_CompositeFilter_Operator_MIN, 0, NULL}
#define google_firestore_v1_StructuredQuery_FieldFilter_init_default {google_firestore_v1_StructuredQuery_FieldReference_init_default, _google_firestore_v1_StructuredQuery_FieldFilter_Operator_MIN, google_firestore_v1_Value_init_default}
#define google_firestore_v1_StructuredQuery_UnaryFilter_init_default {_google_firestore_v1_StructuredQuery_UnaryFilter_Operator_MIN, 0, {google_firestore_v1_StructuredQuery_FieldReference_init_default}}
#define google_firestore_v1_StructuredQuery_Order_init_default {google_firestore_v1_StructuredQuery_FieldReference_init_default, _google_firestore_v1_StructuredQuery_Direction_MIN}
#define google_firestore_v1_StructuredQuery_FieldReference_init_default {NULL}
#define google_firestore_v1_StructuredQuery_Projection_init_default {0, NULL}
#define google_firestore_v1_StructuredAggregationQuery_init_default {0, {google_firestore_v1_StructuredQuery_init_default}, 0, NULL}
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_init_default {0, {google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_init_default}, NULL}
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_init_default {google_protobuf_Int64Value_init_default}
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum_init_default {google_firestore_v1_StructuredQuery_FieldReference_init_default}
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg_init_default {google_firestore_v1_StructuredQuery_FieldReference_init_default}
#define google_firestore_v1_Cursor_init_default {0, NULL, 0}
#define google_firestore_v1_StructuredQuery_init_zero {google_firestore_v1_StructuredQuery_Projection_init_zero, 0, NULL, google_firestore_v1_StructuredQuery_Filter_init_zero, 0, NULL, false, google_protobuf_Int32Value_init_zero, 0, google_firestore_v1_Cursor_init_zero, google_firestore_v1_Cursor_init_zero}
#define google_firestore_v1_StructuredQuery_CollectionSelector_init_zero {NULL, 0}
#define google_firestore_v1_StructuredQuery_Filter_init_zero {0, {google_firestore_v1_StructuredQuery_CompositeFilter_init_zero}}
#define google_firestore_v1_StructuredQuery_CompositeFilter_init_zero {_google_firestore_v1_StructuredQuery_CompositeFilter_Operator_MIN, 0, NULL}
#define google_firestore_v1_StructuredQuery_FieldFilter_init_zero {google_firestore_v1_StructuredQuery_FieldReference_init_zero, _google_firestore_v1_StructuredQuery_FieldFilter_Operator_MIN, google_firestore_v1_Value_init_zero}
#define google_firestore_v1_StructuredQuery_UnaryFilter_init_zero {_google_firestore_v1_StructuredQuery_UnaryFilter_Operator_MIN, 0, {google_firestore_v1_StructuredQuery_FieldReference_init_zero}}
#define google_firestore_v1_StructuredQuery_Order_init_zero {google_firestore_v1_StructuredQuery_FieldReference_init_zero, _google_firestore_v1_StructuredQuery_Direction_MIN}
#define google_firestore_v1_StructuredQuery_FieldReference_init_zero {NULL}
#define google_firestore_v1_StructuredQuery_Projection_init_zero {0, NULL}
#define google_firestore_v1_StructuredAggregationQuery_init_zero {0, {google_firestore_v1_StructuredQuery_init_zero}, 0, NULL}
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_init_zero {0, {google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_init_zero}, NULL}
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_init_zero {google_protobuf_Int64Value_init_zero}
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum_init_zero {google_firestore_v1_StructuredQuery_FieldReference_init_zero}
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg_init_zero {google_firestore_v1_StructuredQuery_FieldReference_init_zero}
#define google_firestore_v1_Cursor_init_zero {0, NULL, 0}
/* Field tags (for use in manual encoding/decoding) */
#define google_firestore_v1_StructuredQuery_FieldReference_field_path_tag 2
#define google_firestore_v1_StructuredQuery_Projection_fields_tag 2
#define google_firestore_v1_Cursor_values_tag 1
#define google_firestore_v1_Cursor_before_tag 2
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg_field_tag 1
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_up_to_tag 1
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum_field_tag 1
#define google_firestore_v1_StructuredQuery_CollectionSelector_collection_id_tag 2
#define google_firestore_v1_StructuredQuery_CollectionSelector_all_descendants_tag 3
#define google_firestore_v1_StructuredQuery_CompositeFilter_op_tag 1
#define google_firestore_v1_StructuredQuery_CompositeFilter_filters_tag 2
#define google_firestore_v1_StructuredQuery_FieldFilter_field_tag 1
#define google_firestore_v1_StructuredQuery_FieldFilter_op_tag 2
#define google_firestore_v1_StructuredQuery_FieldFilter_value_tag 3
#define google_firestore_v1_StructuredQuery_Order_field_tag 1
#define google_firestore_v1_StructuredQuery_Order_direction_tag 2
#define google_firestore_v1_StructuredQuery_UnaryFilter_field_tag 2
#define google_firestore_v1_StructuredQuery_UnaryFilter_op_tag 1
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_count_tag 1
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_sum_tag 2
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_avg_tag 3
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_alias_tag 7
#define google_firestore_v1_StructuredQuery_Filter_composite_filter_tag 1
#define google_firestore_v1_StructuredQuery_Filter_field_filter_tag 2
#define google_firestore_v1_StructuredQuery_Filter_unary_filter_tag 3
#define google_firestore_v1_StructuredQuery_select_tag 1
#define google_firestore_v1_StructuredQuery_from_tag 2
#define google_firestore_v1_StructuredQuery_where_tag 3
#define google_firestore_v1_StructuredQuery_order_by_tag 4
#define google_firestore_v1_StructuredQuery_start_at_tag 7
#define google_firestore_v1_StructuredQuery_end_at_tag 8
#define google_firestore_v1_StructuredQuery_offset_tag 6
#define google_firestore_v1_StructuredQuery_limit_tag 5
#define google_firestore_v1_StructuredAggregationQuery_structured_query_tag 1
#define google_firestore_v1_StructuredAggregationQuery_aggregations_tag 3
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_firestore_v1_StructuredQuery_fields[9];
extern const pb_field_t google_firestore_v1_StructuredQuery_CollectionSelector_fields[3];
extern const pb_field_t google_firestore_v1_StructuredQuery_Filter_fields[4];
extern const pb_field_t google_firestore_v1_StructuredQuery_CompositeFilter_fields[3];
extern const pb_field_t google_firestore_v1_StructuredQuery_FieldFilter_fields[4];
extern const pb_field_t google_firestore_v1_StructuredQuery_UnaryFilter_fields[3];
extern const pb_field_t google_firestore_v1_StructuredQuery_Order_fields[3];
extern const pb_field_t google_firestore_v1_StructuredQuery_FieldReference_fields[2];
extern const pb_field_t google_firestore_v1_StructuredQuery_Projection_fields[2];
extern const pb_field_t google_firestore_v1_StructuredAggregationQuery_fields[3];
extern const pb_field_t google_firestore_v1_StructuredAggregationQuery_Aggregation_fields[5];
extern const pb_field_t google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_fields[2];
extern const pb_field_t google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum_fields[2];
extern const pb_field_t google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg_fields[2];
extern const pb_field_t google_firestore_v1_Cursor_fields[3];
/* Maximum encoded size of messages (where known) */
/* google_firestore_v1_StructuredQuery_size depends on runtime parameters */
/* google_firestore_v1_StructuredQuery_CollectionSelector_size depends on runtime parameters */
/* google_firestore_v1_StructuredQuery_Filter_size depends on runtime parameters */
/* google_firestore_v1_StructuredQuery_CompositeFilter_size depends on runtime parameters */
/* google_firestore_v1_StructuredQuery_FieldFilter_size depends on runtime parameters */
/* google_firestore_v1_StructuredQuery_UnaryFilter_size depends on runtime parameters */
/* google_firestore_v1_StructuredQuery_Order_size depends on runtime parameters */
/* google_firestore_v1_StructuredQuery_FieldReference_size depends on runtime parameters */
/* google_firestore_v1_StructuredQuery_Projection_size depends on runtime parameters */
/* google_firestore_v1_StructuredAggregationQuery_size depends on runtime parameters */
/* google_firestore_v1_StructuredAggregationQuery_Aggregation_size depends on runtime parameters */
#define google_firestore_v1_StructuredAggregationQuery_Aggregation_Count_size 13
/* google_firestore_v1_StructuredAggregationQuery_Aggregation_Sum_size depends on runtime parameters */
/* google_firestore_v1_StructuredAggregationQuery_Aggregation_Avg_size depends on runtime parameters */
/* google_firestore_v1_Cursor_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define QUERY_MESSAGES \
#endif
const char* EnumToString(google_firestore_v1_StructuredQuery_Direction value);
const char* EnumToString(
google_firestore_v1_StructuredQuery_CompositeFilter_Operator value);
const char* EnumToString(
google_firestore_v1_StructuredQuery_FieldFilter_Operator value);
const char* EnumToString(
google_firestore_v1_StructuredQuery_UnaryFilter_Operator value);
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,332 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "write.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_firestore_v1_Write_fields[8] = {
PB_ANONYMOUS_ONEOF_FIELD(operation, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_Write, update, update, &google_firestore_v1_Document_fields),
PB_ANONYMOUS_ONEOF_FIELD(operation, 2, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_Write, delete_, delete_, 0),
PB_ANONYMOUS_ONEOF_FIELD(operation, 5, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_Write, verify, verify, 0),
PB_ANONYMOUS_ONEOF_FIELD(operation, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Write, transform, transform, &google_firestore_v1_DocumentTransform_fields),
PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_firestore_v1_Write, update_mask, transform, &google_firestore_v1_DocumentMask_fields),
PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_firestore_v1_Write, current_document, update_mask, &google_firestore_v1_Precondition_fields),
PB_FIELD( 7, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_Write, update_transforms, current_document, &google_firestore_v1_DocumentTransform_FieldTransform_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_DocumentTransform_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DocumentTransform, document, document, 0),
PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_DocumentTransform, field_transforms, document, &google_firestore_v1_DocumentTransform_FieldTransform_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_DocumentTransform_FieldTransform_fields[8] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DocumentTransform_FieldTransform, field_path, field_path, 0),
PB_ANONYMOUS_ONEOF_FIELD(transform_type, 2, UENUM , ONEOF, STATIC , OTHER, google_firestore_v1_DocumentTransform_FieldTransform, set_to_server_value, field_path, 0),
PB_ANONYMOUS_ONEOF_FIELD(transform_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_DocumentTransform_FieldTransform, increment, field_path, &google_firestore_v1_Value_fields),
PB_ANONYMOUS_ONEOF_FIELD(transform_type, 4, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_DocumentTransform_FieldTransform, maximum, field_path, &google_firestore_v1_Value_fields),
PB_ANONYMOUS_ONEOF_FIELD(transform_type, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_DocumentTransform_FieldTransform, minimum, field_path, &google_firestore_v1_Value_fields),
PB_ANONYMOUS_ONEOF_FIELD(transform_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_DocumentTransform_FieldTransform, append_missing_elements, field_path, &google_firestore_v1_ArrayValue_fields),
PB_ANONYMOUS_ONEOF_FIELD(transform_type, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_DocumentTransform_FieldTransform, remove_all_from_array, field_path, &google_firestore_v1_ArrayValue_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_WriteResult_fields[3] = {
PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, google_firestore_v1_WriteResult, update_time, update_time, &google_protobuf_Timestamp_fields),
PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteResult, transform_results, update_time, &google_firestore_v1_Value_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_DocumentChange_fields[4] = {
PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_DocumentChange, document, document, &google_firestore_v1_Document_fields),
PB_FIELD( 5, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_DocumentChange, target_ids, document, 0),
PB_FIELD( 6, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_DocumentChange, removed_target_ids, target_ids, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_DocumentDelete_fields[4] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DocumentDelete, document, document, 0),
PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_firestore_v1_DocumentDelete, read_time, document, &google_protobuf_Timestamp_fields),
PB_FIELD( 6, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_DocumentDelete, removed_target_ids, read_time, 0),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_DocumentRemove_fields[4] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DocumentRemove, document, document, 0),
PB_FIELD( 2, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_DocumentRemove, removed_target_ids, document, 0),
PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_DocumentRemove, read_time, removed_target_ids, &google_protobuf_Timestamp_fields),
PB_LAST_FIELD
};
const pb_field_t google_firestore_v1_ExistenceFilter_fields[4] = {
PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, google_firestore_v1_ExistenceFilter, target_id, target_id, 0),
PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_ExistenceFilter, count, target_id, 0),
PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_firestore_v1_ExistenceFilter, unchanged_names, count, &google_firestore_v1_BloomFilter_fields),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Write, update) < 65536 && pb_membersize(google_firestore_v1_Write, transform) < 65536 && pb_membersize(google_firestore_v1_Write, update_mask) < 65536 && pb_membersize(google_firestore_v1_Write, current_document) < 65536 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, increment) < 65536 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, maximum) < 65536 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, minimum) < 65536 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, append_missing_elements) < 65536 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, remove_all_from_array) < 65536 && pb_membersize(google_firestore_v1_WriteResult, update_time) < 65536 && pb_membersize(google_firestore_v1_DocumentChange, document) < 65536 && pb_membersize(google_firestore_v1_DocumentDelete, read_time) < 65536 && pb_membersize(google_firestore_v1_DocumentRemove, read_time) < 65536 && pb_membersize(google_firestore_v1_ExistenceFilter, unchanged_names) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_Write_google_firestore_v1_DocumentTransform_google_firestore_v1_DocumentTransform_FieldTransform_google_firestore_v1_WriteResult_google_firestore_v1_DocumentChange_google_firestore_v1_DocumentDelete_google_firestore_v1_DocumentRemove_google_firestore_v1_ExistenceFilter)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Write, update) < 256 && pb_membersize(google_firestore_v1_Write, transform) < 256 && pb_membersize(google_firestore_v1_Write, update_mask) < 256 && pb_membersize(google_firestore_v1_Write, current_document) < 256 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, increment) < 256 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, maximum) < 256 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, minimum) < 256 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, append_missing_elements) < 256 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, remove_all_from_array) < 256 && pb_membersize(google_firestore_v1_WriteResult, update_time) < 256 && pb_membersize(google_firestore_v1_DocumentChange, document) < 256 && pb_membersize(google_firestore_v1_DocumentDelete, read_time) < 256 && pb_membersize(google_firestore_v1_DocumentRemove, read_time) < 256 && pb_membersize(google_firestore_v1_ExistenceFilter, unchanged_names) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_Write_google_firestore_v1_DocumentTransform_google_firestore_v1_DocumentTransform_FieldTransform_google_firestore_v1_WriteResult_google_firestore_v1_DocumentChange_google_firestore_v1_DocumentDelete_google_firestore_v1_DocumentRemove_google_firestore_v1_ExistenceFilter)
#endif
const char* EnumToString(
google_firestore_v1_DocumentTransform_FieldTransform_ServerValue value) {
switch (value) {
case google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_SERVER_VALUE_UNSPECIFIED:
return "SERVER_VALUE_UNSPECIFIED";
case google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME:
return "REQUEST_TIME";
}
return "<unknown enum value>";
}
std::string google_firestore_v1_Write::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Write", this);
std::string tostring_result;
switch (which_operation) {
case google_firestore_v1_Write_update_tag:
tostring_result += PrintMessageField("update ",
update, indent + 1, true);
break;
case google_firestore_v1_Write_delete_tag:
tostring_result += PrintPrimitiveField("delete: ",
delete_, indent + 1, true);
break;
case google_firestore_v1_Write_verify_tag:
tostring_result += PrintPrimitiveField("verify: ",
verify, indent + 1, true);
break;
case google_firestore_v1_Write_transform_tag:
tostring_result += PrintMessageField("transform ",
transform, indent + 1, true);
break;
}
if (has_update_mask) {
tostring_result += PrintMessageField("update_mask ",
update_mask, indent + 1, true);
}
if (has_current_document) {
tostring_result += PrintMessageField("current_document ",
current_document, indent + 1, true);
}
for (pb_size_t i = 0; i != update_transforms_count; ++i) {
tostring_result += PrintMessageField("update_transforms ",
update_transforms[i], indent + 1, true);
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_DocumentTransform::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "DocumentTransform", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("document: ",
document, indent + 1, false);
for (pb_size_t i = 0; i != field_transforms_count; ++i) {
tostring_result += PrintMessageField("field_transforms ",
field_transforms[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_DocumentTransform_FieldTransform::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "FieldTransform", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("field_path: ",
field_path, indent + 1, false);
switch (which_transform_type) {
case google_firestore_v1_DocumentTransform_FieldTransform_set_to_server_value_tag:
tostring_result += PrintEnumField("set_to_server_value: ",
set_to_server_value, indent + 1, true);
break;
case google_firestore_v1_DocumentTransform_FieldTransform_increment_tag:
tostring_result += PrintMessageField("increment ",
increment, indent + 1, true);
break;
case google_firestore_v1_DocumentTransform_FieldTransform_maximum_tag:
tostring_result += PrintMessageField("maximum ",
maximum, indent + 1, true);
break;
case google_firestore_v1_DocumentTransform_FieldTransform_minimum_tag:
tostring_result += PrintMessageField("minimum ",
minimum, indent + 1, true);
break;
case google_firestore_v1_DocumentTransform_FieldTransform_append_missing_elements_tag:
tostring_result += PrintMessageField("append_missing_elements ",
append_missing_elements, indent + 1, true);
break;
case google_firestore_v1_DocumentTransform_FieldTransform_remove_all_from_array_tag:
tostring_result += PrintMessageField("remove_all_from_array ",
remove_all_from_array, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_firestore_v1_WriteResult::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "WriteResult", this);
std::string tostring_result;
if (has_update_time) {
tostring_result += PrintMessageField("update_time ",
update_time, indent + 1, true);
}
for (pb_size_t i = 0; i != transform_results_count; ++i) {
tostring_result += PrintMessageField("transform_results ",
transform_results[i], indent + 1, true);
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_DocumentChange::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "DocumentChange", this);
std::string tostring_result;
tostring_result += PrintMessageField("document ",
document, indent + 1, false);
for (pb_size_t i = 0; i != target_ids_count; ++i) {
tostring_result += PrintPrimitiveField("target_ids: ",
target_ids[i], indent + 1, true);
}
for (pb_size_t i = 0; i != removed_target_ids_count; ++i) {
tostring_result += PrintPrimitiveField("removed_target_ids: ",
removed_target_ids[i], indent + 1, true);
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_DocumentDelete::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "DocumentDelete", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("document: ",
document, indent + 1, false);
if (has_read_time) {
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, true);
}
for (pb_size_t i = 0; i != removed_target_ids_count; ++i) {
tostring_result += PrintPrimitiveField("removed_target_ids: ",
removed_target_ids[i], indent + 1, true);
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_DocumentRemove::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "DocumentRemove", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("document: ",
document, indent + 1, false);
for (pb_size_t i = 0; i != removed_target_ids_count; ++i) {
tostring_result += PrintPrimitiveField("removed_target_ids: ",
removed_target_ids[i], indent + 1, true);
}
tostring_result += PrintMessageField("read_time ",
read_time, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_firestore_v1_ExistenceFilter::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ExistenceFilter", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("target_id: ",
target_id, indent + 1, false);
tostring_result += PrintPrimitiveField("count: ",
count, indent + 1, false);
if (has_unchanged_names) {
tostring_result += PrintMessageField("unchanged_names ",
unchanged_names, indent + 1, true);
}
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,236 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_FIRESTORE_V1_WRITE_NANOPB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1_WRITE_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/firestore/v1/bloom_filter.nanopb.h"
#include "google/firestore/v1/common.nanopb.h"
#include "google/firestore/v1/document.nanopb.h"
#include "google/protobuf/timestamp.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Enum definitions */
typedef enum _google_firestore_v1_DocumentTransform_FieldTransform_ServerValue {
google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_SERVER_VALUE_UNSPECIFIED = 0,
google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME = 1
} google_firestore_v1_DocumentTransform_FieldTransform_ServerValue;
#define _google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_MIN google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_SERVER_VALUE_UNSPECIFIED
#define _google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_MAX google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME
#define _google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_ARRAYSIZE ((google_firestore_v1_DocumentTransform_FieldTransform_ServerValue)(google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME+1))
/* Struct definitions */
typedef struct _google_firestore_v1_DocumentTransform {
pb_bytes_array_t *document;
pb_size_t field_transforms_count;
struct _google_firestore_v1_DocumentTransform_FieldTransform *field_transforms;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentTransform) */
} google_firestore_v1_DocumentTransform;
typedef struct _google_firestore_v1_DocumentChange {
google_firestore_v1_Document document;
pb_size_t target_ids_count;
int32_t *target_ids;
pb_size_t removed_target_ids_count;
int32_t *removed_target_ids;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentChange) */
} google_firestore_v1_DocumentChange;
typedef struct _google_firestore_v1_DocumentDelete {
pb_bytes_array_t *document;
bool has_read_time;
google_protobuf_Timestamp read_time;
pb_size_t removed_target_ids_count;
int32_t *removed_target_ids;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentDelete) */
} google_firestore_v1_DocumentDelete;
typedef struct _google_firestore_v1_DocumentRemove {
pb_bytes_array_t *document;
pb_size_t removed_target_ids_count;
int32_t *removed_target_ids;
google_protobuf_Timestamp read_time;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentRemove) */
} google_firestore_v1_DocumentRemove;
typedef struct _google_firestore_v1_DocumentTransform_FieldTransform {
pb_bytes_array_t *field_path;
pb_size_t which_transform_type;
union {
google_firestore_v1_DocumentTransform_FieldTransform_ServerValue set_to_server_value;
google_firestore_v1_Value increment;
google_firestore_v1_Value maximum;
google_firestore_v1_Value minimum;
google_firestore_v1_ArrayValue append_missing_elements;
google_firestore_v1_ArrayValue remove_all_from_array;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentTransform_FieldTransform) */
} google_firestore_v1_DocumentTransform_FieldTransform;
typedef struct _google_firestore_v1_ExistenceFilter {
int32_t target_id;
int32_t count;
bool has_unchanged_names;
google_firestore_v1_BloomFilter unchanged_names;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_ExistenceFilter) */
} google_firestore_v1_ExistenceFilter;
typedef struct _google_firestore_v1_Write {
pb_size_t which_operation;
union {
google_firestore_v1_Document update;
pb_bytes_array_t *delete_;
pb_bytes_array_t *verify;
google_firestore_v1_DocumentTransform transform;
};
bool has_update_mask;
google_firestore_v1_DocumentMask update_mask;
bool has_current_document;
google_firestore_v1_Precondition current_document;
pb_size_t update_transforms_count;
struct _google_firestore_v1_DocumentTransform_FieldTransform *update_transforms;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_Write) */
} google_firestore_v1_Write;
typedef struct _google_firestore_v1_WriteResult {
bool has_update_time;
google_protobuf_Timestamp update_time;
pb_size_t transform_results_count;
struct _google_firestore_v1_Value *transform_results;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_firestore_v1_WriteResult) */
} google_firestore_v1_WriteResult;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_firestore_v1_Write_init_default {0, {google_firestore_v1_Document_init_default}, false, google_firestore_v1_DocumentMask_init_default, false, google_firestore_v1_Precondition_init_default, 0, NULL}
#define google_firestore_v1_DocumentTransform_init_default {NULL, 0, NULL}
#define google_firestore_v1_DocumentTransform_FieldTransform_init_default {NULL, 0, {_google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_MIN}}
#define google_firestore_v1_WriteResult_init_default {false, google_protobuf_Timestamp_init_default, 0, NULL}
#define google_firestore_v1_DocumentChange_init_default {google_firestore_v1_Document_init_default, 0, NULL, 0, NULL}
#define google_firestore_v1_DocumentDelete_init_default {NULL, false, google_protobuf_Timestamp_init_default, 0, NULL}
#define google_firestore_v1_DocumentRemove_init_default {NULL, 0, NULL, google_protobuf_Timestamp_init_default}
#define google_firestore_v1_ExistenceFilter_init_default {0, 0, false, google_firestore_v1_BloomFilter_init_default}
#define google_firestore_v1_Write_init_zero {0, {google_firestore_v1_Document_init_zero}, false, google_firestore_v1_DocumentMask_init_zero, false, google_firestore_v1_Precondition_init_zero, 0, NULL}
#define google_firestore_v1_DocumentTransform_init_zero {NULL, 0, NULL}
#define google_firestore_v1_DocumentTransform_FieldTransform_init_zero {NULL, 0, {_google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_MIN}}
#define google_firestore_v1_WriteResult_init_zero {false, google_protobuf_Timestamp_init_zero, 0, NULL}
#define google_firestore_v1_DocumentChange_init_zero {google_firestore_v1_Document_init_zero, 0, NULL, 0, NULL}
#define google_firestore_v1_DocumentDelete_init_zero {NULL, false, google_protobuf_Timestamp_init_zero, 0, NULL}
#define google_firestore_v1_DocumentRemove_init_zero {NULL, 0, NULL, google_protobuf_Timestamp_init_zero}
#define google_firestore_v1_ExistenceFilter_init_zero {0, 0, false, google_firestore_v1_BloomFilter_init_zero}
/* Field tags (for use in manual encoding/decoding) */
#define google_firestore_v1_DocumentTransform_document_tag 1
#define google_firestore_v1_DocumentTransform_field_transforms_tag 2
#define google_firestore_v1_DocumentChange_document_tag 1
#define google_firestore_v1_DocumentChange_target_ids_tag 5
#define google_firestore_v1_DocumentChange_removed_target_ids_tag 6
#define google_firestore_v1_DocumentDelete_document_tag 1
#define google_firestore_v1_DocumentDelete_removed_target_ids_tag 6
#define google_firestore_v1_DocumentDelete_read_time_tag 4
#define google_firestore_v1_DocumentRemove_document_tag 1
#define google_firestore_v1_DocumentRemove_removed_target_ids_tag 2
#define google_firestore_v1_DocumentRemove_read_time_tag 4
#define google_firestore_v1_DocumentTransform_FieldTransform_set_to_server_value_tag 2
#define google_firestore_v1_DocumentTransform_FieldTransform_increment_tag 3
#define google_firestore_v1_DocumentTransform_FieldTransform_maximum_tag 4
#define google_firestore_v1_DocumentTransform_FieldTransform_minimum_tag 5
#define google_firestore_v1_DocumentTransform_FieldTransform_append_missing_elements_tag 6
#define google_firestore_v1_DocumentTransform_FieldTransform_remove_all_from_array_tag 7
#define google_firestore_v1_DocumentTransform_FieldTransform_field_path_tag 1
#define google_firestore_v1_ExistenceFilter_target_id_tag 1
#define google_firestore_v1_ExistenceFilter_count_tag 2
#define google_firestore_v1_ExistenceFilter_unchanged_names_tag 3
#define google_firestore_v1_Write_update_tag 1
#define google_firestore_v1_Write_delete_tag 2
#define google_firestore_v1_Write_verify_tag 5
#define google_firestore_v1_Write_transform_tag 6
#define google_firestore_v1_Write_update_mask_tag 3
#define google_firestore_v1_Write_update_transforms_tag 7
#define google_firestore_v1_Write_current_document_tag 4
#define google_firestore_v1_WriteResult_update_time_tag 1
#define google_firestore_v1_WriteResult_transform_results_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_firestore_v1_Write_fields[8];
extern const pb_field_t google_firestore_v1_DocumentTransform_fields[3];
extern const pb_field_t google_firestore_v1_DocumentTransform_FieldTransform_fields[8];
extern const pb_field_t google_firestore_v1_WriteResult_fields[3];
extern const pb_field_t google_firestore_v1_DocumentChange_fields[4];
extern const pb_field_t google_firestore_v1_DocumentDelete_fields[4];
extern const pb_field_t google_firestore_v1_DocumentRemove_fields[4];
extern const pb_field_t google_firestore_v1_ExistenceFilter_fields[4];
/* Maximum encoded size of messages (where known) */
/* google_firestore_v1_Write_size depends on runtime parameters */
/* google_firestore_v1_DocumentTransform_size depends on runtime parameters */
/* google_firestore_v1_DocumentTransform_FieldTransform_size depends on runtime parameters */
/* google_firestore_v1_WriteResult_size depends on runtime parameters */
/* google_firestore_v1_DocumentChange_size depends on runtime parameters */
/* google_firestore_v1_DocumentDelete_size depends on runtime parameters */
/* google_firestore_v1_DocumentRemove_size depends on runtime parameters */
#define google_firestore_v1_ExistenceFilter_size (28 + google_firestore_v1_BloomFilter_size)
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define WRITE_MESSAGES \
#endif
const char* EnumToString(
google_firestore_v1_DocumentTransform_FieldTransform_ServerValue value);
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,68 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "any.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_protobuf_Any_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_protobuf_Any, type_url, type_url, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_protobuf_Any, value, type_url, 0),
PB_LAST_FIELD
};
std::string google_protobuf_Any::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Any", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("type_url: ",
type_url, indent + 1, false);
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_PROTOBUF_ANY_NANOPB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_ANY_NANOPB_H_INCLUDED
#include <pb.h>
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_protobuf_Any {
pb_bytes_array_t *type_url;
pb_bytes_array_t *value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_Any) */
} google_protobuf_Any;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_protobuf_Any_init_default {NULL, NULL}
#define google_protobuf_Any_init_zero {NULL, NULL}
/* Field tags (for use in manual encoding/decoding) */
#define google_protobuf_Any_type_url_tag 1
#define google_protobuf_Any_value_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_protobuf_Any_fields[3];
/* Maximum encoded size of messages (where known) */
/* google_protobuf_Any_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define ANY_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "empty.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_protobuf_Empty_fields[1] = {
PB_LAST_FIELD
};
std::string google_protobuf_Empty::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Empty", this);
std::string tostring_result;
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,70 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_PROTOBUF_EMPTY_NANOPB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_EMPTY_NANOPB_H_INCLUDED
#include <pb.h>
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_protobuf_Empty {
char dummy_field;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_Empty) */
} google_protobuf_Empty;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_protobuf_Empty_init_default {0}
#define google_protobuf_Empty_init_zero {0}
/* Field tags (for use in manual encoding/decoding) */
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_protobuf_Empty_fields[1];
/* Maximum encoded size of messages (where known) */
#define google_protobuf_Empty_size 0
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define EMPTY_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,197 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "struct.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_protobuf_Struct_fields[2] = {
PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_protobuf_Struct, fields, fields, &google_protobuf_Struct_FieldsEntry_fields),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_Struct_FieldsEntry_fields[3] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_protobuf_Struct_FieldsEntry, key, key, 0),
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_protobuf_Struct_FieldsEntry, value, key, &google_protobuf_Value_fields),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_Value_fields[7] = {
PB_ANONYMOUS_ONEOF_FIELD(kind, 1, UENUM , ONEOF, STATIC , FIRST, google_protobuf_Value, null_value, null_value, 0),
PB_ANONYMOUS_ONEOF_FIELD(kind, 2, DOUBLE , ONEOF, STATIC , UNION, google_protobuf_Value, number_value, number_value, 0),
PB_ANONYMOUS_ONEOF_FIELD(kind, 3, BYTES , ONEOF, POINTER , UNION, google_protobuf_Value, string_value, string_value, 0),
PB_ANONYMOUS_ONEOF_FIELD(kind, 4, BOOL , ONEOF, STATIC , UNION, google_protobuf_Value, bool_value, bool_value, 0),
PB_ANONYMOUS_ONEOF_FIELD(kind, 5, MESSAGE , ONEOF, STATIC , UNION, google_protobuf_Value, struct_value, struct_value, &google_protobuf_Struct_fields),
PB_ANONYMOUS_ONEOF_FIELD(kind, 6, MESSAGE , ONEOF, STATIC , UNION, google_protobuf_Value, list_value, list_value, &google_protobuf_ListValue_fields),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_ListValue_fields[2] = {
PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_protobuf_ListValue, values, values, &google_protobuf_Value_fields),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_protobuf_Struct_FieldsEntry, value) < 65536 && pb_membersize(google_protobuf_Value, struct_value) < 65536 && pb_membersize(google_protobuf_Value, list_value) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_protobuf_Struct_google_protobuf_Struct_FieldsEntry_google_protobuf_Value_google_protobuf_ListValue)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_protobuf_Struct_FieldsEntry, value) < 256 && pb_membersize(google_protobuf_Value, struct_value) < 256 && pb_membersize(google_protobuf_Value, list_value) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_protobuf_Struct_google_protobuf_Struct_FieldsEntry_google_protobuf_Value_google_protobuf_ListValue)
#endif
/* On some platforms (such as AVR), double is really float.
* These are not directly supported by nanopb, but see example_avr_double.
* To get rid of this error, remove any double fields from your .proto.
*/
PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)
const char* EnumToString(
google_protobuf_NullValue value) {
switch (value) {
case google_protobuf_NullValue_NULL_VALUE:
return "NULL_VALUE";
}
return "<unknown enum value>";
}
std::string google_protobuf_Struct::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Struct", this);
std::string tostring_result;
for (pb_size_t i = 0; i != fields_count; ++i) {
tostring_result += PrintMessageField("fields ",
fields[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_protobuf_Struct_FieldsEntry::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "FieldsEntry", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("key: ", key, indent + 1, false);
tostring_result += PrintMessageField("value ", value, indent + 1, false);
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
}
std::string google_protobuf_Value::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Value", this);
std::string tostring_result;
switch (which_kind) {
case google_protobuf_Value_null_value_tag:
tostring_result += PrintEnumField("null_value: ",
null_value, indent + 1, true);
break;
case google_protobuf_Value_number_value_tag:
tostring_result += PrintPrimitiveField("number_value: ",
number_value, indent + 1, true);
break;
case google_protobuf_Value_string_value_tag:
tostring_result += PrintPrimitiveField("string_value: ",
string_value, indent + 1, true);
break;
case google_protobuf_Value_bool_value_tag:
tostring_result += PrintPrimitiveField("bool_value: ",
bool_value, indent + 1, true);
break;
case google_protobuf_Value_struct_value_tag:
tostring_result += PrintMessageField("struct_value ",
struct_value, indent + 1, true);
break;
case google_protobuf_Value_list_value_tag:
tostring_result += PrintMessageField("list_value ",
list_value, indent + 1, true);
break;
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_protobuf_ListValue::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "ListValue", this);
std::string tostring_result;
for (pb_size_t i = 0; i != values_count; ++i) {
tostring_result += PrintMessageField("values ",
values[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,133 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_PROTOBUF_STRUCT_NANOPB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_STRUCT_NANOPB_H_INCLUDED
#include <pb.h>
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Enum definitions */
typedef enum _google_protobuf_NullValue {
google_protobuf_NullValue_NULL_VALUE = 0
} google_protobuf_NullValue;
#define _google_protobuf_NullValue_MIN google_protobuf_NullValue_NULL_VALUE
#define _google_protobuf_NullValue_MAX google_protobuf_NullValue_NULL_VALUE
#define _google_protobuf_NullValue_ARRAYSIZE ((google_protobuf_NullValue)(google_protobuf_NullValue_NULL_VALUE+1))
/* Struct definitions */
typedef struct _google_protobuf_ListValue {
pb_size_t values_count;
struct _google_protobuf_Value *values;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_ListValue) */
} google_protobuf_ListValue;
typedef struct _google_protobuf_Struct {
pb_size_t fields_count;
struct _google_protobuf_Struct_FieldsEntry *fields;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_Struct) */
} google_protobuf_Struct;
typedef struct _google_protobuf_Value {
pb_size_t which_kind;
union {
google_protobuf_NullValue null_value;
double number_value;
pb_bytes_array_t *string_value;
bool bool_value;
google_protobuf_Struct struct_value;
google_protobuf_ListValue list_value;
};
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_Value) */
} google_protobuf_Value;
typedef struct _google_protobuf_Struct_FieldsEntry {
pb_bytes_array_t *key;
google_protobuf_Value value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_Struct_FieldsEntry) */
} google_protobuf_Struct_FieldsEntry;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_protobuf_Struct_init_default {0, NULL}
#define google_protobuf_Struct_FieldsEntry_init_default {NULL, google_protobuf_Value_init_default}
#define google_protobuf_Value_init_default {0, {_google_protobuf_NullValue_MIN}}
#define google_protobuf_ListValue_init_default {0, NULL}
#define google_protobuf_Struct_init_zero {0, NULL}
#define google_protobuf_Struct_FieldsEntry_init_zero {NULL, google_protobuf_Value_init_zero}
#define google_protobuf_Value_init_zero {0, {_google_protobuf_NullValue_MIN}}
#define google_protobuf_ListValue_init_zero {0, NULL}
/* Field tags (for use in manual encoding/decoding) */
#define google_protobuf_ListValue_values_tag 1
#define google_protobuf_Struct_fields_tag 1
#define google_protobuf_Value_null_value_tag 1
#define google_protobuf_Value_number_value_tag 2
#define google_protobuf_Value_string_value_tag 3
#define google_protobuf_Value_bool_value_tag 4
#define google_protobuf_Value_struct_value_tag 5
#define google_protobuf_Value_list_value_tag 6
#define google_protobuf_Struct_FieldsEntry_key_tag 1
#define google_protobuf_Struct_FieldsEntry_value_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_protobuf_Struct_fields[2];
extern const pb_field_t google_protobuf_Struct_FieldsEntry_fields[3];
extern const pb_field_t google_protobuf_Value_fields[7];
extern const pb_field_t google_protobuf_ListValue_fields[2];
/* Maximum encoded size of messages (where known) */
/* google_protobuf_Struct_size depends on runtime parameters */
/* google_protobuf_Struct_FieldsEntry_size depends on runtime parameters */
/* google_protobuf_Value_size depends on runtime parameters */
/* google_protobuf_ListValue_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define STRUCT_MESSAGES \
#endif
const char* EnumToString(google_protobuf_NullValue value);
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,68 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "timestamp.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_protobuf_Timestamp_fields[3] = {
PB_FIELD( 1, INT64 , SINGULAR, STATIC , FIRST, google_protobuf_Timestamp, seconds, seconds, 0),
PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_protobuf_Timestamp, nanos, seconds, 0),
PB_LAST_FIELD
};
std::string google_protobuf_Timestamp::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Timestamp", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("seconds: ",
seconds, indent + 1, false);
tostring_result += PrintPrimitiveField("nanos: ",
nanos, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_PROTOBUF_TIMESTAMP_NANOPB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_TIMESTAMP_NANOPB_H_INCLUDED
#include <pb.h>
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_protobuf_Timestamp {
int64_t seconds;
int32_t nanos;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_Timestamp) */
} google_protobuf_Timestamp;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_protobuf_Timestamp_init_default {0, 0}
#define google_protobuf_Timestamp_init_zero {0, 0}
/* Field tags (for use in manual encoding/decoding) */
#define google_protobuf_Timestamp_seconds_tag 1
#define google_protobuf_Timestamp_nanos_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_protobuf_Timestamp_fields[3];
/* Maximum encoded size of messages (where known) */
#define google_protobuf_Timestamp_size 22
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define TIMESTAMP_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,239 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "wrappers.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_protobuf_DoubleValue_fields[2] = {
PB_FIELD( 1, DOUBLE , SINGULAR, STATIC , FIRST, google_protobuf_DoubleValue, value, value, 0),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_FloatValue_fields[2] = {
PB_FIELD( 1, FLOAT , SINGULAR, STATIC , FIRST, google_protobuf_FloatValue, value, value, 0),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_Int64Value_fields[2] = {
PB_FIELD( 1, INT64 , SINGULAR, STATIC , FIRST, google_protobuf_Int64Value, value, value, 0),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_UInt64Value_fields[2] = {
PB_FIELD( 1, UINT64 , SINGULAR, STATIC , FIRST, google_protobuf_UInt64Value, value, value, 0),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_Int32Value_fields[2] = {
PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, google_protobuf_Int32Value, value, value, 0),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_UInt32Value_fields[2] = {
PB_FIELD( 1, UINT32 , SINGULAR, STATIC , FIRST, google_protobuf_UInt32Value, value, value, 0),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_BoolValue_fields[2] = {
PB_FIELD( 1, BOOL , SINGULAR, STATIC , FIRST, google_protobuf_BoolValue, value, value, 0),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_StringValue_fields[2] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_protobuf_StringValue, value, value, 0),
PB_LAST_FIELD
};
const pb_field_t google_protobuf_BytesValue_fields[2] = {
PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_protobuf_BytesValue, value, value, 0),
PB_LAST_FIELD
};
/* On some platforms (such as AVR), double is really float.
* These are not directly supported by nanopb, but see example_avr_double.
* To get rid of this error, remove any double fields from your .proto.
*/
PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)
std::string google_protobuf_DoubleValue::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "DoubleValue", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_protobuf_FloatValue::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "FloatValue", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_protobuf_Int64Value::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Int64Value", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_protobuf_UInt64Value::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "UInt64Value", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_protobuf_Int32Value::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Int32Value", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_protobuf_UInt32Value::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "UInt32Value", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_protobuf_BoolValue::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BoolValue", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_protobuf_StringValue::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "StringValue", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
std::string google_protobuf_BytesValue::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "BytesValue", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("value: ",
value, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,167 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_PROTOBUF_WRAPPERS_NANOPB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_WRAPPERS_NANOPB_H_INCLUDED
#include <pb.h>
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_protobuf_BytesValue {
pb_bytes_array_t *value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_BytesValue) */
} google_protobuf_BytesValue;
typedef struct _google_protobuf_StringValue {
pb_bytes_array_t *value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_StringValue) */
} google_protobuf_StringValue;
typedef struct _google_protobuf_BoolValue {
bool value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_BoolValue) */
} google_protobuf_BoolValue;
typedef struct _google_protobuf_DoubleValue {
double value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_DoubleValue) */
} google_protobuf_DoubleValue;
typedef struct _google_protobuf_FloatValue {
float value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_FloatValue) */
} google_protobuf_FloatValue;
typedef struct _google_protobuf_Int32Value {
int32_t value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_Int32Value) */
} google_protobuf_Int32Value;
typedef struct _google_protobuf_Int64Value {
int64_t value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_Int64Value) */
} google_protobuf_Int64Value;
typedef struct _google_protobuf_UInt32Value {
uint32_t value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_UInt32Value) */
} google_protobuf_UInt32Value;
typedef struct _google_protobuf_UInt64Value {
uint64_t value;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_protobuf_UInt64Value) */
} google_protobuf_UInt64Value;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_protobuf_DoubleValue_init_default {0}
#define google_protobuf_FloatValue_init_default {0}
#define google_protobuf_Int64Value_init_default {0}
#define google_protobuf_UInt64Value_init_default {0}
#define google_protobuf_Int32Value_init_default {0}
#define google_protobuf_UInt32Value_init_default {0}
#define google_protobuf_BoolValue_init_default {0}
#define google_protobuf_StringValue_init_default {NULL}
#define google_protobuf_BytesValue_init_default {NULL}
#define google_protobuf_DoubleValue_init_zero {0}
#define google_protobuf_FloatValue_init_zero {0}
#define google_protobuf_Int64Value_init_zero {0}
#define google_protobuf_UInt64Value_init_zero {0}
#define google_protobuf_Int32Value_init_zero {0}
#define google_protobuf_UInt32Value_init_zero {0}
#define google_protobuf_BoolValue_init_zero {0}
#define google_protobuf_StringValue_init_zero {NULL}
#define google_protobuf_BytesValue_init_zero {NULL}
/* Field tags (for use in manual encoding/decoding) */
#define google_protobuf_BytesValue_value_tag 1
#define google_protobuf_StringValue_value_tag 1
#define google_protobuf_BoolValue_value_tag 1
#define google_protobuf_DoubleValue_value_tag 1
#define google_protobuf_FloatValue_value_tag 1
#define google_protobuf_Int32Value_value_tag 1
#define google_protobuf_Int64Value_value_tag 1
#define google_protobuf_UInt32Value_value_tag 1
#define google_protobuf_UInt64Value_value_tag 1
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_protobuf_DoubleValue_fields[2];
extern const pb_field_t google_protobuf_FloatValue_fields[2];
extern const pb_field_t google_protobuf_Int64Value_fields[2];
extern const pb_field_t google_protobuf_UInt64Value_fields[2];
extern const pb_field_t google_protobuf_Int32Value_fields[2];
extern const pb_field_t google_protobuf_UInt32Value_fields[2];
extern const pb_field_t google_protobuf_BoolValue_fields[2];
extern const pb_field_t google_protobuf_StringValue_fields[2];
extern const pb_field_t google_protobuf_BytesValue_fields[2];
/* Maximum encoded size of messages (where known) */
#define google_protobuf_DoubleValue_size 9
#define google_protobuf_FloatValue_size 5
#define google_protobuf_Int64Value_size 11
#define google_protobuf_UInt64Value_size 11
#define google_protobuf_Int32Value_size 11
#define google_protobuf_UInt32Value_size 6
#define google_protobuf_BoolValue_size 2
/* google_protobuf_StringValue_size depends on runtime parameters */
/* google_protobuf_BytesValue_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define WRAPPERS_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "status.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_rpc_Status_fields[4] = {
PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, google_rpc_Status, code, code, 0),
PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_rpc_Status, message, code, 0),
PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_rpc_Status, details, message, &google_protobuf_Any_fields),
PB_LAST_FIELD
};
std::string google_rpc_Status::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "Status", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("code: ", code, indent + 1, false);
tostring_result += PrintPrimitiveField("message: ",
message, indent + 1, false);
for (pb_size_t i = 0; i != details_count; ++i) {
tostring_result += PrintMessageField("details ",
details[i], indent + 1, true);
}
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,78 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_RPC_STATUS_NANOPB_H_INCLUDED
#define PB_GOOGLE_RPC_STATUS_NANOPB_H_INCLUDED
#include <pb.h>
#include "google/protobuf/any.nanopb.h"
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_rpc_Status {
int32_t code;
pb_bytes_array_t *message;
pb_size_t details_count;
struct _google_protobuf_Any *details;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_rpc_Status) */
} google_rpc_Status;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_rpc_Status_init_default {0, NULL, 0, NULL}
#define google_rpc_Status_init_zero {0, NULL, 0, NULL}
/* Field tags (for use in manual encoding/decoding) */
#define google_rpc_Status_code_tag 1
#define google_rpc_Status_message_tag 2
#define google_rpc_Status_details_tag 3
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_rpc_Status_fields[4];
/* Maximum encoded size of messages (where known) */
/* google_rpc_Status_size depends on runtime parameters */
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define STATUS_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif

View File

@@ -0,0 +1,74 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.8 */
#include "latlng.nanopb.h"
#include "Firestore/core/src/nanopb/pretty_printing.h"
namespace firebase {
namespace firestore {
using nanopb::PrintEnumField;
using nanopb::PrintHeader;
using nanopb::PrintMessageField;
using nanopb::PrintPrimitiveField;
using nanopb::PrintTail;
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_type_LatLng_fields[3] = {
PB_FIELD( 1, DOUBLE , SINGULAR, STATIC , FIRST, google_type_LatLng, latitude, latitude, 0),
PB_FIELD( 2, DOUBLE , SINGULAR, STATIC , OTHER, google_type_LatLng, longitude, latitude, 0),
PB_LAST_FIELD
};
/* On some platforms (such as AVR), double is really float.
* These are not directly supported by nanopb, but see example_avr_double.
* To get rid of this error, remove any double fields from your .proto.
*/
PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)
std::string google_type_LatLng::ToString(int indent) const {
std::string tostring_header = PrintHeader(indent, "LatLng", this);
std::string tostring_result;
tostring_result += PrintPrimitiveField("latitude: ",
latitude, indent + 1, false);
tostring_result += PrintPrimitiveField("longitude: ",
longitude, indent + 1, false);
bool is_root = indent == 0;
if (!tostring_result.empty() || is_root) {
std::string tostring_tail = PrintTail(indent);
return tostring_header + tostring_result + tostring_tail;
} else {
return "";
}
}
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.8 */
#ifndef PB_GOOGLE_TYPE_LATLNG_NANOPB_H_INCLUDED
#define PB_GOOGLE_TYPE_LATLNG_NANOPB_H_INCLUDED
#include <pb.h>
#include <string>
namespace firebase {
namespace firestore {
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _google_type_LatLng {
double latitude;
double longitude;
std::string ToString(int indent = 0) const;
/* @@protoc_insertion_point(struct:google_type_LatLng) */
} google_type_LatLng;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_type_LatLng_init_default {0, 0}
#define google_type_LatLng_init_zero {0, 0}
/* Field tags (for use in manual encoding/decoding) */
#define google_type_LatLng_latitude_tag 1
#define google_type_LatLng_longitude_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_type_LatLng_fields[3];
/* Maximum encoded size of messages (where known) */
#define google_type_LatLng_size 18
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define LATLNG_MESSAGES \
#endif
} // namespace firestore
} // namespace firebase
/* @@protoc_insertion_point(eof) */
#endif