Skip to content

[realppl 1] Add pipeline listen proto changes #14826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: cheryllin/ppl
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 80 additions & 19 deletions Firestore/Protos/cpp/firestore/local/target.pb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const ::uint32_t TableStruct_firestore_2flocal_2ftarget_2eproto::offsets[] PROTO
PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_.last_listen_sequence_number_),
::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_.last_limbo_free_snapshot_version_),
PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_.target_type_),
~0u,
Expand All @@ -118,6 +119,7 @@ const ::uint32_t TableStruct_firestore_2flocal_2ftarget_2eproto::offsets[] PROTO
~0u,
~0u,
~0u,
~0u,
1,
PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, _internal_metadata_),
Expand All @@ -139,8 +141,8 @@ const ::uint32_t TableStruct_firestore_2flocal_2ftarget_2eproto::offsets[] PROTO

static const ::_pbi::MigrationSchema
schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{0, 16, -1, sizeof(::firestore::client::Target)},
{23, 35, -1, sizeof(::firestore::client::TargetGlobal)},
{0, 17, -1, sizeof(::firestore::client::Target)},
{25, 37, -1, sizeof(::firestore::client::TargetGlobal)},
};

static const ::_pb::Message* const file_default_instances[] = {
Expand All @@ -150,22 +152,24 @@ static const ::_pb::Message* const file_default_instances[] = {
const char descriptor_table_protodef_firestore_2flocal_2ftarget_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
"\n\034firestore/local/target.proto\022\020firestor"
"e.client\032#google/firestore/v1/firestore."
"proto\032\037google/protobuf/timestamp.proto\"\335"
"\002\n\006Target\022\021\n\ttarget_id\030\001 \001(\005\0224\n\020snapshot"
"proto\032\037google/protobuf/timestamp.proto\"\250"
"\003\n\006Target\022\021\n\ttarget_id\030\001 \001(\005\0224\n\020snapshot"
"_version\030\002 \001(\0132\032.google.protobuf.Timesta"
"mp\022\024\n\014resume_token\030\003 \001(\014\022#\n\033last_listen_"
"sequence_number\030\004 \001(\003\0228\n\005query\030\005 \001(\0132\'.g"
"oogle.firestore.v1.Target.QueryTargetH\000\022"
"@\n\tdocuments\030\006 \001(\0132+.google.firestore.v1"
".Target.DocumentsTargetH\000\022D\n last_limbo_"
"free_snapshot_version\030\007 \001(\0132\032.google.pro"
"tobuf.TimestampB\r\n\013target_type\"\251\001\n\014Targe"
"tGlobal\022\031\n\021highest_target_id\030\001 \001(\005\022&\n\036hi"
"ghest_listen_sequence_number\030\002 \001(\003\022@\n\034la"
"st_remote_snapshot_version\030\003 \001(\0132\032.googl"
"e.protobuf.Timestamp\022\024\n\014target_count\030\004 \001"
"(\005B/\n#com.google.firebase.firestore.prot"
"oP\001\242\002\005FSTPBb\006proto3"
".Target.DocumentsTargetH\000\022I\n\016pipeline_qu"
"ery\030\r \001(\0132/.google.firestore.v1.Target.P"
"ipelineQueryTargetH\000\022D\n last_limbo_free_"
"snapshot_version\030\007 \001(\0132\032.google.protobuf"
".TimestampB\r\n\013target_type\"\251\001\n\014TargetGlob"
"al\022\031\n\021highest_target_id\030\001 \001(\005\022&\n\036highest"
"_listen_sequence_number\030\002 \001(\003\022@\n\034last_re"
"mote_snapshot_version\030\003 \001(\0132\032.google.pro"
"tobuf.Timestamp\022\024\n\014target_count\030\004 \001(\005B/\n"
"#com.google.firebase.firestore.protoP\001\242\002"
"\005FSTPBb\006proto3"
};
static const ::_pbi::DescriptorTable* const descriptor_table_firestore_2flocal_2ftarget_2eproto_deps[2] =
{
Expand All @@ -176,7 +180,7 @@ static ::absl::once_flag descriptor_table_firestore_2flocal_2ftarget_2eproto_onc
const ::_pbi::DescriptorTable descriptor_table_firestore_2flocal_2ftarget_2eproto = {
false,
false,
699,
774,
descriptor_table_protodef_firestore_2flocal_2ftarget_2eproto,
"firestore/local/target.proto",
&descriptor_table_firestore_2flocal_2ftarget_2eproto_once,
Expand Down Expand Up @@ -225,6 +229,7 @@ class Target::_Internal {
}
static const ::google::firestore::v1::Target_QueryTarget& query(const Target* msg);
static const ::google::firestore::v1::Target_DocumentsTarget& documents(const Target* msg);
static const ::google::firestore::v1::Target_PipelineQueryTarget& pipeline_query(const Target* msg);
static const ::google::protobuf::Timestamp& last_limbo_free_snapshot_version(const Target* msg);
static void set_has_last_limbo_free_snapshot_version(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
Expand All @@ -240,6 +245,9 @@ const ::google::firestore::v1::Target_QueryTarget& Target::_Internal::query(cons
const ::google::firestore::v1::Target_DocumentsTarget& Target::_Internal::documents(const Target* msg) {
return *msg->_impl_.target_type_.documents_;
}
const ::google::firestore::v1::Target_PipelineQueryTarget& Target::_Internal::pipeline_query(const Target* msg) {
return *msg->_impl_.target_type_.pipeline_query_;
}
const ::google::protobuf::Timestamp& Target::_Internal::last_limbo_free_snapshot_version(const Target* msg) {
return *msg->_impl_.last_limbo_free_snapshot_version_;
}
Expand Down Expand Up @@ -292,6 +300,28 @@ void Target::clear_documents() {
clear_has_target_type();
}
}
void Target::set_allocated_pipeline_query(::google::firestore::v1::Target_PipelineQueryTarget* pipeline_query) {
::google::protobuf::Arena* message_arena = GetArena();
clear_target_type();
if (pipeline_query) {
::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(pipeline_query)->GetArena();
if (message_arena != submessage_arena) {
pipeline_query = ::google::protobuf::internal::GetOwnedMessage(message_arena, pipeline_query, submessage_arena);
}
set_has_pipeline_query();
_impl_.target_type_.pipeline_query_ = pipeline_query;
}
// @@protoc_insertion_point(field_set_allocated:firestore.client.Target.pipeline_query)
}
void Target::clear_pipeline_query() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
if (target_type_case() == kPipelineQuery) {
if (GetArena() == nullptr) {
delete _impl_.target_type_.pipeline_query_;
}
clear_has_target_type();
}
}
void Target::clear_last_limbo_free_snapshot_version() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
if (_impl_.last_limbo_free_snapshot_version_ != nullptr) _impl_.last_limbo_free_snapshot_version_->Clear();
Expand Down Expand Up @@ -343,6 +373,9 @@ Target::Target(
case kDocuments:
_impl_.target_type_.documents_ = CreateMaybeMessage<::google::firestore::v1::Target_DocumentsTarget>(arena, *from._impl_.target_type_.documents_);
break;
case kPipelineQuery:
_impl_.target_type_.pipeline_query_ = CreateMaybeMessage<::google::firestore::v1::Target_PipelineQueryTarget>(arena, *from._impl_.target_type_.pipeline_query_);
break;
}

// @@protoc_insertion_point(copy_constructor:firestore.client.Target)
Expand Down Expand Up @@ -396,6 +429,12 @@ void Target::clear_target_type() {
}
break;
}
case kPipelineQuery: {
if (GetArena() == nullptr) {
delete _impl_.target_type_.pipeline_query_;
}
break;
}
case TARGET_TYPE_NOT_SET: {
break;
}
Expand Down Expand Up @@ -439,16 +478,16 @@ const char* Target::_InternalParse(


PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<3, 7, 4, 0, 2> Target::_table_ = {
const ::_pbi::TcParseTable<3, 8, 5, 0, 2> Target::_table_ = {
{
PROTOBUF_FIELD_OFFSET(Target, _impl_._has_bits_),
0, // no _extensions_
7, 56, // max_field_number, fast_idx_mask
13, 56, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967168, // skipmap
4294963072, // skipmap
offsetof(decltype(_table_), field_entries),
7, // num_field_entries
4, // num_aux_entries
8, // num_field_entries
5, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_Target_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
Expand Down Expand Up @@ -495,11 +534,15 @@ const ::_pbi::TcParseTable<3, 7, 4, 0, 2> Target::_table_ = {
// .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
{PROTOBUF_FIELD_OFFSET(Target, _impl_.last_limbo_free_snapshot_version_), _Internal::kHasBitsOffset + 1, 3,
(0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
// .google.firestore.v1.Target.PipelineQueryTarget pipeline_query = 13;
{PROTOBUF_FIELD_OFFSET(Target, _impl_.target_type_.pipeline_query_), _Internal::kOneofCaseOffset + 0, 4,
(0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
}}, {{
{::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
{::_pbi::TcParser::GetTable<::google::firestore::v1::Target_QueryTarget>()},
{::_pbi::TcParser::GetTable<::google::firestore::v1::Target_DocumentsTarget>()},
{::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
{::_pbi::TcParser::GetTable<::google::firestore::v1::Target_PipelineQueryTarget>()},
}}, {{
}},
};
Expand Down Expand Up @@ -562,6 +605,13 @@ ::uint8_t* Target::_InternalSerialize(
_Internal::last_limbo_free_snapshot_version(this).GetCachedSize(), target, stream);
}

// .google.firestore.v1.Target.PipelineQueryTarget pipeline_query = 13;
if (target_type_case() == kPipelineQuery) {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
13, _Internal::pipeline_query(this),
_Internal::pipeline_query(this).GetCachedSize(), target, stream);
}

if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
Expand Down Expand Up @@ -625,6 +675,12 @@ ::size_t Target::ByteSizeLong() const {
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.target_type_.documents_);
break;
}
// .google.firestore.v1.Target.PipelineQueryTarget pipeline_query = 13;
case kPipelineQuery: {
total_size +=
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.target_type_.pipeline_query_);
break;
}
case TARGET_TYPE_NOT_SET: {
break;
}
Expand Down Expand Up @@ -679,6 +735,11 @@ void Target::MergeImpl(::google::protobuf::Message& to_msg, const ::google::prot
from._internal_documents());
break;
}
case kPipelineQuery: {
_this->_internal_mutable_pipeline_query()->::google::firestore::v1::Target_PipelineQueryTarget::MergeFrom(
from._internal_pipeline_query());
break;
}
case TARGET_TYPE_NOT_SET: {
break;
}
Expand Down
92 changes: 91 additions & 1 deletion Firestore/Protos/cpp/firestore/local/target.pb.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ class Target final :
enum TargetTypeCase {
kQuery = 5,
kDocuments = 6,
kPipelineQuery = 13,
TARGET_TYPE_NOT_SET = 0,
};

Expand Down Expand Up @@ -458,6 +459,7 @@ class Target final :
kTargetIdFieldNumber = 1,
kQueryFieldNumber = 5,
kDocumentsFieldNumber = 6,
kPipelineQueryFieldNumber = 13,
};
// bytes resume_token = 3;
void clear_resume_token() ;
Expand Down Expand Up @@ -562,6 +564,25 @@ class Target final :
const ::google::firestore::v1::Target_DocumentsTarget& _internal_documents() const;
::google::firestore::v1::Target_DocumentsTarget* _internal_mutable_documents();

public:
// .google.firestore.v1.Target.PipelineQueryTarget pipeline_query = 13;
bool has_pipeline_query() const;
private:
bool _internal_has_pipeline_query() const;

public:
void clear_pipeline_query() ;
const ::google::firestore::v1::Target_PipelineQueryTarget& pipeline_query() const;
PROTOBUF_NODISCARD ::google::firestore::v1::Target_PipelineQueryTarget* release_pipeline_query();
::google::firestore::v1::Target_PipelineQueryTarget* mutable_pipeline_query();
void set_allocated_pipeline_query(::google::firestore::v1::Target_PipelineQueryTarget* value);
void unsafe_arena_set_allocated_pipeline_query(::google::firestore::v1::Target_PipelineQueryTarget* value);
::google::firestore::v1::Target_PipelineQueryTarget* unsafe_arena_release_pipeline_query();

private:
const ::google::firestore::v1::Target_PipelineQueryTarget& _internal_pipeline_query() const;
::google::firestore::v1::Target_PipelineQueryTarget* _internal_mutable_pipeline_query();

public:
void clear_target_type();
TargetTypeCase target_type_case() const;
Expand All @@ -570,13 +591,14 @@ class Target final :
class _Internal;
void set_has_query();
void set_has_documents();
void set_has_pipeline_query();

inline bool has_target_type() const;
inline void clear_has_target_type();

friend class ::google::protobuf::internal::TcParser;
static const ::google::protobuf::internal::TcParseTable<
3, 7, 4,
3, 8, 5,
0, 2>
_table_;
friend class ::google::protobuf::MessageLite;
Expand Down Expand Up @@ -605,6 +627,7 @@ class Target final :
::google::protobuf::internal::ConstantInitialized _constinit_;
::google::firestore::v1::Target_QueryTarget* query_;
::google::firestore::v1::Target_DocumentsTarget* documents_;
::google::firestore::v1::Target_PipelineQueryTarget* pipeline_query_;
} target_type_;
::uint32_t _oneof_case_[1];

Expand Down Expand Up @@ -954,6 +977,73 @@ inline ::google::firestore::v1::Target_DocumentsTarget* Target::mutable_document
return _msg;
}

// .google.firestore.v1.Target.PipelineQueryTarget pipeline_query = 13;
inline bool Target::has_pipeline_query() const {
return target_type_case() == kPipelineQuery;
}
inline bool Target::_internal_has_pipeline_query() const {
return target_type_case() == kPipelineQuery;
}
inline void Target::set_has_pipeline_query() {
_impl_._oneof_case_[0] = kPipelineQuery;
}
inline ::google::firestore::v1::Target_PipelineQueryTarget* Target::release_pipeline_query() {
// @@protoc_insertion_point(field_release:firestore.client.Target.pipeline_query)
if (target_type_case() == kPipelineQuery) {
clear_has_target_type();
auto* temp = _impl_.target_type_.pipeline_query_;
if (GetArena() != nullptr) {
temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
}
_impl_.target_type_.pipeline_query_ = nullptr;
return temp;
} else {
return nullptr;
}
}
inline const ::google::firestore::v1::Target_PipelineQueryTarget& Target::_internal_pipeline_query() const {
return target_type_case() == kPipelineQuery ? *_impl_.target_type_.pipeline_query_ : reinterpret_cast<::google::firestore::v1::Target_PipelineQueryTarget&>(::google::firestore::v1::_Target_PipelineQueryTarget_default_instance_);
}
inline const ::google::firestore::v1::Target_PipelineQueryTarget& Target::pipeline_query() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
// @@protoc_insertion_point(field_get:firestore.client.Target.pipeline_query)
return _internal_pipeline_query();
}
inline ::google::firestore::v1::Target_PipelineQueryTarget* Target::unsafe_arena_release_pipeline_query() {
// @@protoc_insertion_point(field_unsafe_arena_release:firestore.client.Target.pipeline_query)
if (target_type_case() == kPipelineQuery) {
clear_has_target_type();
auto* temp = _impl_.target_type_.pipeline_query_;
_impl_.target_type_.pipeline_query_ = nullptr;
return temp;
} else {
return nullptr;
}
}
inline void Target::unsafe_arena_set_allocated_pipeline_query(::google::firestore::v1::Target_PipelineQueryTarget* value) {
// We rely on the oneof clear method to free the earlier contents
// of this oneof. We can directly use the pointer we're given to
// set the new value.
clear_target_type();
if (value) {
set_has_pipeline_query();
_impl_.target_type_.pipeline_query_ = value;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:firestore.client.Target.pipeline_query)
}
inline ::google::firestore::v1::Target_PipelineQueryTarget* Target::_internal_mutable_pipeline_query() {
if (target_type_case() != kPipelineQuery) {
clear_target_type();
set_has_pipeline_query();
_impl_.target_type_.pipeline_query_ = CreateMaybeMessage<::google::firestore::v1::Target_PipelineQueryTarget>(GetArena());
}
return _impl_.target_type_.pipeline_query_;
}
inline ::google::firestore::v1::Target_PipelineQueryTarget* Target::mutable_pipeline_query() ABSL_ATTRIBUTE_LIFETIME_BOUND {
::google::firestore::v1::Target_PipelineQueryTarget* _msg = _internal_mutable_pipeline_query();
// @@protoc_insertion_point(field_mutable:firestore.client.Target.pipeline_query)
return _msg;
}

// .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
inline bool Target::has_last_limbo_free_snapshot_version() const {
bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
Expand Down
Loading
Loading