1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/struct.proto
3
4 #include <google/protobuf/struct.pb.h>
5
6 #include <algorithm>
7
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/descriptor.h>
12 #include <google/protobuf/generated_message_reflection.h>
13 #include <google/protobuf/reflection_ops.h>
14 #include <google/protobuf/wire_format.h>
15 // @@protoc_insertion_point(includes)
16 #include <google/protobuf/port_def.inc>
17
18 PROTOBUF_PRAGMA_INIT_SEG
19 PROTOBUF_NAMESPACE_OPEN
Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)20 constexpr Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(
21 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
22 struct Struct_FieldsEntry_DoNotUseDefaultTypeInternal {
Struct_FieldsEntry_DoNotUseDefaultTypeInternalStruct_FieldsEntry_DoNotUseDefaultTypeInternal23 constexpr Struct_FieldsEntry_DoNotUseDefaultTypeInternal()
24 : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~Struct_FieldsEntry_DoNotUseDefaultTypeInternalStruct_FieldsEntry_DoNotUseDefaultTypeInternal25 ~Struct_FieldsEntry_DoNotUseDefaultTypeInternal() {}
26 union {
27 Struct_FieldsEntry_DoNotUse _instance;
28 };
29 };
30 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_;
Struct(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)31 constexpr Struct::Struct(
32 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
33 : fields_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}){}
34 struct StructDefaultTypeInternal {
StructDefaultTypeInternalStructDefaultTypeInternal35 constexpr StructDefaultTypeInternal()
36 : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~StructDefaultTypeInternalStructDefaultTypeInternal37 ~StructDefaultTypeInternal() {}
38 union {
39 Struct _instance;
40 };
41 };
42 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT StructDefaultTypeInternal _Struct_default_instance_;
Value(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)43 constexpr Value::Value(
44 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
45 : _oneof_case_{}{}
46 struct ValueDefaultTypeInternal {
ValueDefaultTypeInternalValueDefaultTypeInternal47 constexpr ValueDefaultTypeInternal()
48 : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ValueDefaultTypeInternalValueDefaultTypeInternal49 ~ValueDefaultTypeInternal() {}
50 union {
51 Value _instance;
52 };
53 };
54 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ValueDefaultTypeInternal _Value_default_instance_;
ListValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)55 constexpr ListValue::ListValue(
56 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
57 : values_(){}
58 struct ListValueDefaultTypeInternal {
ListValueDefaultTypeInternalListValueDefaultTypeInternal59 constexpr ListValueDefaultTypeInternal()
60 : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ListValueDefaultTypeInternalListValueDefaultTypeInternal61 ~ListValueDefaultTypeInternal() {}
62 union {
63 ListValue _instance;
64 };
65 };
66 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ListValueDefaultTypeInternal _ListValue_default_instance_;
67 PROTOBUF_NAMESPACE_CLOSE
68 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fstruct_2eproto[4];
69 static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[1];
70 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto = nullptr;
71
72 const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
73 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _has_bits_),
74 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _internal_metadata_),
75 ~0u, // no _extensions_
76 ~0u, // no _oneof_case_
77 ~0u, // no _weak_field_map_
78 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, key_),
79 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, value_),
80 0,
81 1,
82 ~0u, // no _has_bits_
83 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, _internal_metadata_),
84 ~0u, // no _extensions_
85 ~0u, // no _oneof_case_
86 ~0u, // no _weak_field_map_
87 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, fields_),
88 ~0u, // no _has_bits_
89 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _internal_metadata_),
90 ~0u, // no _extensions_
91 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _oneof_case_[0]),
92 ~0u, // no _weak_field_map_
93 ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
94 ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
95 ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
96 ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
97 ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
98 ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
99 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, kind_),
100 ~0u, // no _has_bits_
101 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, _internal_metadata_),
102 ~0u, // no _extensions_
103 ~0u, // no _oneof_case_
104 ~0u, // no _weak_field_map_
105 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, values_),
106 };
107 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
108 { 0, 7, sizeof(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse)},
109 { 9, -1, sizeof(PROTOBUF_NAMESPACE_ID::Struct)},
110 { 15, -1, sizeof(PROTOBUF_NAMESPACE_ID::Value)},
111 { 27, -1, sizeof(PROTOBUF_NAMESPACE_ID::ListValue)},
112 };
113
114 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
115 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_),
116 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Struct_default_instance_),
117 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Value_default_instance_),
118 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_),
119 };
120
121 const char descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
122 "\n\034google/protobuf/struct.proto\022\017google.p"
123 "rotobuf\"\204\001\n\006Struct\0223\n\006fields\030\001 \003(\0132#.goo"
124 "gle.protobuf.Struct.FieldsEntry\032E\n\013Field"
125 "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo"
126 "gle.protobuf.Value:\0028\001\"\352\001\n\005Value\0220\n\nnull"
127 "_value\030\001 \001(\0162\032.google.protobuf.NullValue"
128 "H\000\022\026\n\014number_value\030\002 \001(\001H\000\022\026\n\014string_val"
129 "ue\030\003 \001(\tH\000\022\024\n\nbool_value\030\004 \001(\010H\000\022/\n\014stru"
130 "ct_value\030\005 \001(\0132\027.google.protobuf.StructH"
131 "\000\0220\n\nlist_value\030\006 \001(\0132\032.google.protobuf."
132 "ListValueH\000B\006\n\004kind\"3\n\tListValue\022&\n\006valu"
133 "es\030\001 \003(\0132\026.google.protobuf.Value*\033\n\tNull"
134 "Value\022\016\n\nNULL_VALUE\020\000B\177\n\023com.google.prot"
135 "obufB\013StructProtoP\001Z/google.golang.org/p"
136 "rotobuf/types/known/structpb\370\001\001\242\002\003GPB\252\002\036"
137 "Google.Protobuf.WellKnownTypesb\006proto3"
138 ;
139 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fstruct_2eproto_once;
140 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto = {
141 false, false, 638, descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto, "google/protobuf/struct.proto",
142 &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once, nullptr, 0, 4,
143 schemas, file_default_instances, TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets,
144 file_level_metadata_google_2fprotobuf_2fstruct_2eproto, file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto, file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto,
145 };
descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter()146 PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter() {
147 return &descriptor_table_google_2fprotobuf_2fstruct_2eproto;
148 }
149
150 // Force running AddDescriptors() at dynamic initialization time.
151 PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fstruct_2eproto(&descriptor_table_google_2fprotobuf_2fstruct_2eproto);
152 PROTOBUF_NAMESPACE_OPEN
NullValue_descriptor()153 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NullValue_descriptor() {
154 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto);
155 return file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[0];
156 }
NullValue_IsValid(int value)157 bool NullValue_IsValid(int value) {
158 switch (value) {
159 case 0:
160 return true;
161 default:
162 return false;
163 }
164 }
165
166
167 // ===================================================================
168
Struct_FieldsEntry_DoNotUse()169 Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() {}
Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)170 Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
171 : SuperType(arena) {}
MergeFrom(const Struct_FieldsEntry_DoNotUse & other)172 void Struct_FieldsEntry_DoNotUse::MergeFrom(const Struct_FieldsEntry_DoNotUse& other) {
173 MergeFromInternal(other);
174 }
GetMetadata() const175 ::PROTOBUF_NAMESPACE_ID::Metadata Struct_FieldsEntry_DoNotUse::GetMetadata() const {
176 return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
177 &descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter, &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once,
178 file_level_metadata_google_2fprotobuf_2fstruct_2eproto[0]);
179 }
180
181 // ===================================================================
182
183 class Struct::_Internal {
184 public:
185 };
186
Struct(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)187 Struct::Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena,
188 bool is_message_owned)
189 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
190 fields_(arena) {
191 SharedCtor();
192 if (!is_message_owned) {
193 RegisterArenaDtor(arena);
194 }
195 // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct)
196 }
Struct(const Struct & from)197 Struct::Struct(const Struct& from)
198 : ::PROTOBUF_NAMESPACE_ID::Message() {
199 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
200 fields_.MergeFrom(from.fields_);
201 // @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
202 }
203
SharedCtor()204 inline void Struct::SharedCtor() {
205 }
206
~Struct()207 Struct::~Struct() {
208 // @@protoc_insertion_point(destructor:google.protobuf.Struct)
209 if (GetArenaForAllocation() != nullptr) return;
210 SharedDtor();
211 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
212 }
213
SharedDtor()214 inline void Struct::SharedDtor() {
215 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
216 }
217
ArenaDtor(void * object)218 void Struct::ArenaDtor(void* object) {
219 Struct* _this = reinterpret_cast< Struct* >(object);
220 (void)_this;
221 _this->fields_. ~MapField();
222 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena * arena)223 inline void Struct::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) {
224 if (arena != nullptr) {
225 arena->OwnCustomDestructor(this, &Struct::ArenaDtor);
226 }
227 }
SetCachedSize(int size) const228 void Struct::SetCachedSize(int size) const {
229 _cached_size_.Set(size);
230 }
231
Clear()232 void Struct::Clear() {
233 // @@protoc_insertion_point(message_clear_start:google.protobuf.Struct)
234 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
235 // Prevent compiler warnings about cached_has_bits being unused
236 (void) cached_has_bits;
237
238 fields_.Clear();
239 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
240 }
241
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)242 const char* Struct::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
243 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
244 while (!ctx->Done(&ptr)) {
245 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
246 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
247 switch (tag >> 3) {
248 // map<string, .google.protobuf.Value> fields = 1;
249 case 1:
250 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
251 ptr -= 1;
252 do {
253 ptr += 1;
254 ptr = ctx->ParseMessage(&fields_, ptr);
255 CHK_(ptr);
256 if (!ctx->DataAvailable(ptr)) break;
257 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
258 } else goto handle_unusual;
259 continue;
260 default: {
261 handle_unusual:
262 if ((tag == 0) || ((tag & 7) == 4)) {
263 CHK_(ptr);
264 ctx->SetLastTag(tag);
265 goto success;
266 }
267 ptr = UnknownFieldParse(tag,
268 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
269 ptr, ctx);
270 CHK_(ptr != nullptr);
271 continue;
272 }
273 } // switch
274 } // while
275 success:
276 return ptr;
277 failure:
278 ptr = nullptr;
279 goto success;
280 #undef CHK_
281 }
282
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const283 ::PROTOBUF_NAMESPACE_ID::uint8* Struct::_InternalSerialize(
284 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
285 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct)
286 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
287 (void) cached_has_bits;
288
289 // map<string, .google.protobuf.Value> fields = 1;
290 if (!this->_internal_fields().empty()) {
291 typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_pointer
292 ConstPtr;
293 typedef ConstPtr SortItem;
294 typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
295 struct Utf8Check {
296 static void Check(ConstPtr p) {
297 (void)p;
298 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
299 p->first.data(), static_cast<int>(p->first.length()),
300 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
301 "google.protobuf.Struct.FieldsEntry.key");
302 }
303 };
304
305 if (stream->IsSerializationDeterministic() &&
306 this->_internal_fields().size() > 1) {
307 ::std::unique_ptr<SortItem[]> items(
308 new SortItem[this->_internal_fields().size()]);
309 typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::size_type size_type;
310 size_type n = 0;
311 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
312 it = this->_internal_fields().begin();
313 it != this->_internal_fields().end(); ++it, ++n) {
314 items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
315 }
316 ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
317 for (size_type i = 0; i < n; i++) {
318 target = Struct_FieldsEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
319 Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
320 }
321 } else {
322 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
323 it = this->_internal_fields().begin();
324 it != this->_internal_fields().end(); ++it) {
325 target = Struct_FieldsEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream);
326 Utf8Check::Check(&(*it));
327 }
328 }
329 }
330
331 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
332 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
333 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
334 }
335 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct)
336 return target;
337 }
338
ByteSizeLong() const339 size_t Struct::ByteSizeLong() const {
340 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct)
341 size_t total_size = 0;
342
343 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
344 // Prevent compiler warnings about cached_has_bits being unused
345 (void) cached_has_bits;
346
347 // map<string, .google.protobuf.Value> fields = 1;
348 total_size += 1 *
349 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_fields_size());
350 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
351 it = this->_internal_fields().begin();
352 it != this->_internal_fields().end(); ++it) {
353 total_size += Struct_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
354 }
355
356 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
357 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
358 _internal_metadata_, total_size, &_cached_size_);
359 }
360 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
361 SetCachedSize(cached_size);
362 return total_size;
363 }
364
365 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Struct::_class_data_ = {
366 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
367 Struct::MergeImpl
368 };
GetClassData() const369 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Struct::GetClassData() const { return &_class_data_; }
370
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)371 void Struct::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
372 const ::PROTOBUF_NAMESPACE_ID::Message&from) {
373 static_cast<Struct *>(to)->MergeFrom(
374 static_cast<const Struct &>(from));
375 }
376
377
MergeFrom(const Struct & from)378 void Struct::MergeFrom(const Struct& from) {
379 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct)
380 GOOGLE_DCHECK_NE(&from, this);
381 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
382 (void) cached_has_bits;
383
384 fields_.MergeFrom(from.fields_);
385 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
386 }
387
CopyFrom(const Struct & from)388 void Struct::CopyFrom(const Struct& from) {
389 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Struct)
390 if (&from == this) return;
391 Clear();
392 MergeFrom(from);
393 }
394
IsInitialized() const395 bool Struct::IsInitialized() const {
396 return true;
397 }
398
InternalSwap(Struct * other)399 void Struct::InternalSwap(Struct* other) {
400 using std::swap;
401 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
402 fields_.InternalSwap(&other->fields_);
403 }
404
GetMetadata() const405 ::PROTOBUF_NAMESPACE_ID::Metadata Struct::GetMetadata() const {
406 return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
407 &descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter, &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once,
408 file_level_metadata_google_2fprotobuf_2fstruct_2eproto[1]);
409 }
410
411 // ===================================================================
412
413 class Value::_Internal {
414 public:
415 static const PROTOBUF_NAMESPACE_ID::Struct& struct_value(const Value* msg);
416 static const PROTOBUF_NAMESPACE_ID::ListValue& list_value(const Value* msg);
417 };
418
419 const PROTOBUF_NAMESPACE_ID::Struct&
struct_value(const Value * msg)420 Value::_Internal::struct_value(const Value* msg) {
421 return *msg->kind_.struct_value_;
422 }
423 const PROTOBUF_NAMESPACE_ID::ListValue&
list_value(const Value * msg)424 Value::_Internal::list_value(const Value* msg) {
425 return *msg->kind_.list_value_;
426 }
set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct * struct_value)427 void Value::set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value) {
428 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
429 clear_kind();
430 if (struct_value) {
431 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
432 ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<PROTOBUF_NAMESPACE_ID::Struct>::GetOwningArena(struct_value);
433 if (message_arena != submessage_arena) {
434 struct_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
435 message_arena, struct_value, submessage_arena);
436 }
437 set_has_struct_value();
438 kind_.struct_value_ = struct_value;
439 }
440 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
441 }
set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue * list_value)442 void Value::set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value) {
443 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
444 clear_kind();
445 if (list_value) {
446 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
447 ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<PROTOBUF_NAMESPACE_ID::ListValue>::GetOwningArena(list_value);
448 if (message_arena != submessage_arena) {
449 list_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
450 message_arena, list_value, submessage_arena);
451 }
452 set_has_list_value();
453 kind_.list_value_ = list_value;
454 }
455 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value)
456 }
Value(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)457 Value::Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
458 bool is_message_owned)
459 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
460 SharedCtor();
461 if (!is_message_owned) {
462 RegisterArenaDtor(arena);
463 }
464 // @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
465 }
Value(const Value & from)466 Value::Value(const Value& from)
467 : ::PROTOBUF_NAMESPACE_ID::Message() {
468 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
469 clear_has_kind();
470 switch (from.kind_case()) {
471 case kNullValue: {
472 _internal_set_null_value(from._internal_null_value());
473 break;
474 }
475 case kNumberValue: {
476 _internal_set_number_value(from._internal_number_value());
477 break;
478 }
479 case kStringValue: {
480 _internal_set_string_value(from._internal_string_value());
481 break;
482 }
483 case kBoolValue: {
484 _internal_set_bool_value(from._internal_bool_value());
485 break;
486 }
487 case kStructValue: {
488 _internal_mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value());
489 break;
490 }
491 case kListValue: {
492 _internal_mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value());
493 break;
494 }
495 case KIND_NOT_SET: {
496 break;
497 }
498 }
499 // @@protoc_insertion_point(copy_constructor:google.protobuf.Value)
500 }
501
SharedCtor()502 inline void Value::SharedCtor() {
503 clear_has_kind();
504 }
505
~Value()506 Value::~Value() {
507 // @@protoc_insertion_point(destructor:google.protobuf.Value)
508 if (GetArenaForAllocation() != nullptr) return;
509 SharedDtor();
510 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
511 }
512
SharedDtor()513 inline void Value::SharedDtor() {
514 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
515 if (has_kind()) {
516 clear_kind();
517 }
518 }
519
ArenaDtor(void * object)520 void Value::ArenaDtor(void* object) {
521 Value* _this = reinterpret_cast< Value* >(object);
522 (void)_this;
523 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)524 void Value::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
525 }
SetCachedSize(int size) const526 void Value::SetCachedSize(int size) const {
527 _cached_size_.Set(size);
528 }
529
clear_kind()530 void Value::clear_kind() {
531 // @@protoc_insertion_point(one_of_clear_start:google.protobuf.Value)
532 switch (kind_case()) {
533 case kNullValue: {
534 // No need to clear
535 break;
536 }
537 case kNumberValue: {
538 // No need to clear
539 break;
540 }
541 case kStringValue: {
542 kind_.string_value_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
543 break;
544 }
545 case kBoolValue: {
546 // No need to clear
547 break;
548 }
549 case kStructValue: {
550 if (GetArenaForAllocation() == nullptr) {
551 delete kind_.struct_value_;
552 }
553 break;
554 }
555 case kListValue: {
556 if (GetArenaForAllocation() == nullptr) {
557 delete kind_.list_value_;
558 }
559 break;
560 }
561 case KIND_NOT_SET: {
562 break;
563 }
564 }
565 _oneof_case_[0] = KIND_NOT_SET;
566 }
567
568
Clear()569 void Value::Clear() {
570 // @@protoc_insertion_point(message_clear_start:google.protobuf.Value)
571 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
572 // Prevent compiler warnings about cached_has_bits being unused
573 (void) cached_has_bits;
574
575 clear_kind();
576 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
577 }
578
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)579 const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
580 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
581 while (!ctx->Done(&ptr)) {
582 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
583 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
584 switch (tag >> 3) {
585 // .google.protobuf.NullValue null_value = 1;
586 case 1:
587 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
588 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
589 CHK_(ptr);
590 _internal_set_null_value(static_cast<PROTOBUF_NAMESPACE_ID::NullValue>(val));
591 } else goto handle_unusual;
592 continue;
593 // double number_value = 2;
594 case 2:
595 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) {
596 _internal_set_number_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
597 ptr += sizeof(double);
598 } else goto handle_unusual;
599 continue;
600 // string string_value = 3;
601 case 3:
602 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
603 auto str = _internal_mutable_string_value();
604 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
605 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Value.string_value"));
606 CHK_(ptr);
607 } else goto handle_unusual;
608 continue;
609 // bool bool_value = 4;
610 case 4:
611 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
612 _internal_set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
613 CHK_(ptr);
614 } else goto handle_unusual;
615 continue;
616 // .google.protobuf.Struct struct_value = 5;
617 case 5:
618 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
619 ptr = ctx->ParseMessage(_internal_mutable_struct_value(), ptr);
620 CHK_(ptr);
621 } else goto handle_unusual;
622 continue;
623 // .google.protobuf.ListValue list_value = 6;
624 case 6:
625 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
626 ptr = ctx->ParseMessage(_internal_mutable_list_value(), ptr);
627 CHK_(ptr);
628 } else goto handle_unusual;
629 continue;
630 default: {
631 handle_unusual:
632 if ((tag == 0) || ((tag & 7) == 4)) {
633 CHK_(ptr);
634 ctx->SetLastTag(tag);
635 goto success;
636 }
637 ptr = UnknownFieldParse(tag,
638 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
639 ptr, ctx);
640 CHK_(ptr != nullptr);
641 continue;
642 }
643 } // switch
644 } // while
645 success:
646 return ptr;
647 failure:
648 ptr = nullptr;
649 goto success;
650 #undef CHK_
651 }
652
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const653 ::PROTOBUF_NAMESPACE_ID::uint8* Value::_InternalSerialize(
654 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
655 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value)
656 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
657 (void) cached_has_bits;
658
659 // .google.protobuf.NullValue null_value = 1;
660 if (_internal_has_null_value()) {
661 target = stream->EnsureSpace(target);
662 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
663 1, this->_internal_null_value(), target);
664 }
665
666 // double number_value = 2;
667 if (_internal_has_number_value()) {
668 target = stream->EnsureSpace(target);
669 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->_internal_number_value(), target);
670 }
671
672 // string string_value = 3;
673 if (_internal_has_string_value()) {
674 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
675 this->_internal_string_value().data(), static_cast<int>(this->_internal_string_value().length()),
676 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
677 "google.protobuf.Value.string_value");
678 target = stream->WriteStringMaybeAliased(
679 3, this->_internal_string_value(), target);
680 }
681
682 // bool bool_value = 4;
683 if (_internal_has_bool_value()) {
684 target = stream->EnsureSpace(target);
685 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_bool_value(), target);
686 }
687
688 // .google.protobuf.Struct struct_value = 5;
689 if (_internal_has_struct_value()) {
690 target = stream->EnsureSpace(target);
691 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
692 InternalWriteMessage(
693 5, _Internal::struct_value(this), target, stream);
694 }
695
696 // .google.protobuf.ListValue list_value = 6;
697 if (_internal_has_list_value()) {
698 target = stream->EnsureSpace(target);
699 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
700 InternalWriteMessage(
701 6, _Internal::list_value(this), target, stream);
702 }
703
704 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
705 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
706 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
707 }
708 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value)
709 return target;
710 }
711
ByteSizeLong() const712 size_t Value::ByteSizeLong() const {
713 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value)
714 size_t total_size = 0;
715
716 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
717 // Prevent compiler warnings about cached_has_bits being unused
718 (void) cached_has_bits;
719
720 switch (kind_case()) {
721 // .google.protobuf.NullValue null_value = 1;
722 case kNullValue: {
723 total_size += 1 +
724 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_null_value());
725 break;
726 }
727 // double number_value = 2;
728 case kNumberValue: {
729 total_size += 1 + 8;
730 break;
731 }
732 // string string_value = 3;
733 case kStringValue: {
734 total_size += 1 +
735 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
736 this->_internal_string_value());
737 break;
738 }
739 // bool bool_value = 4;
740 case kBoolValue: {
741 total_size += 1 + 1;
742 break;
743 }
744 // .google.protobuf.Struct struct_value = 5;
745 case kStructValue: {
746 total_size += 1 +
747 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
748 *kind_.struct_value_);
749 break;
750 }
751 // .google.protobuf.ListValue list_value = 6;
752 case kListValue: {
753 total_size += 1 +
754 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
755 *kind_.list_value_);
756 break;
757 }
758 case KIND_NOT_SET: {
759 break;
760 }
761 }
762 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
763 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
764 _internal_metadata_, total_size, &_cached_size_);
765 }
766 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
767 SetCachedSize(cached_size);
768 return total_size;
769 }
770
771 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Value::_class_data_ = {
772 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
773 Value::MergeImpl
774 };
GetClassData() const775 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Value::GetClassData() const { return &_class_data_; }
776
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)777 void Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
778 const ::PROTOBUF_NAMESPACE_ID::Message&from) {
779 static_cast<Value *>(to)->MergeFrom(
780 static_cast<const Value &>(from));
781 }
782
783
MergeFrom(const Value & from)784 void Value::MergeFrom(const Value& from) {
785 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value)
786 GOOGLE_DCHECK_NE(&from, this);
787 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
788 (void) cached_has_bits;
789
790 switch (from.kind_case()) {
791 case kNullValue: {
792 _internal_set_null_value(from._internal_null_value());
793 break;
794 }
795 case kNumberValue: {
796 _internal_set_number_value(from._internal_number_value());
797 break;
798 }
799 case kStringValue: {
800 _internal_set_string_value(from._internal_string_value());
801 break;
802 }
803 case kBoolValue: {
804 _internal_set_bool_value(from._internal_bool_value());
805 break;
806 }
807 case kStructValue: {
808 _internal_mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value());
809 break;
810 }
811 case kListValue: {
812 _internal_mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value());
813 break;
814 }
815 case KIND_NOT_SET: {
816 break;
817 }
818 }
819 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
820 }
821
CopyFrom(const Value & from)822 void Value::CopyFrom(const Value& from) {
823 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Value)
824 if (&from == this) return;
825 Clear();
826 MergeFrom(from);
827 }
828
IsInitialized() const829 bool Value::IsInitialized() const {
830 return true;
831 }
832
InternalSwap(Value * other)833 void Value::InternalSwap(Value* other) {
834 using std::swap;
835 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
836 swap(kind_, other->kind_);
837 swap(_oneof_case_[0], other->_oneof_case_[0]);
838 }
839
GetMetadata() const840 ::PROTOBUF_NAMESPACE_ID::Metadata Value::GetMetadata() const {
841 return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
842 &descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter, &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once,
843 file_level_metadata_google_2fprotobuf_2fstruct_2eproto[2]);
844 }
845
846 // ===================================================================
847
848 class ListValue::_Internal {
849 public:
850 };
851
ListValue(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)852 ListValue::ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
853 bool is_message_owned)
854 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
855 values_(arena) {
856 SharedCtor();
857 if (!is_message_owned) {
858 RegisterArenaDtor(arena);
859 }
860 // @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
861 }
ListValue(const ListValue & from)862 ListValue::ListValue(const ListValue& from)
863 : ::PROTOBUF_NAMESPACE_ID::Message(),
864 values_(from.values_) {
865 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
866 // @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue)
867 }
868
SharedCtor()869 inline void ListValue::SharedCtor() {
870 }
871
~ListValue()872 ListValue::~ListValue() {
873 // @@protoc_insertion_point(destructor:google.protobuf.ListValue)
874 if (GetArenaForAllocation() != nullptr) return;
875 SharedDtor();
876 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
877 }
878
SharedDtor()879 inline void ListValue::SharedDtor() {
880 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
881 }
882
ArenaDtor(void * object)883 void ListValue::ArenaDtor(void* object) {
884 ListValue* _this = reinterpret_cast< ListValue* >(object);
885 (void)_this;
886 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)887 void ListValue::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
888 }
SetCachedSize(int size) const889 void ListValue::SetCachedSize(int size) const {
890 _cached_size_.Set(size);
891 }
892
Clear()893 void ListValue::Clear() {
894 // @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue)
895 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
896 // Prevent compiler warnings about cached_has_bits being unused
897 (void) cached_has_bits;
898
899 values_.Clear();
900 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
901 }
902
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)903 const char* ListValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
904 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
905 while (!ctx->Done(&ptr)) {
906 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
907 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
908 switch (tag >> 3) {
909 // repeated .google.protobuf.Value values = 1;
910 case 1:
911 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
912 ptr -= 1;
913 do {
914 ptr += 1;
915 ptr = ctx->ParseMessage(_internal_add_values(), ptr);
916 CHK_(ptr);
917 if (!ctx->DataAvailable(ptr)) break;
918 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
919 } else goto handle_unusual;
920 continue;
921 default: {
922 handle_unusual:
923 if ((tag == 0) || ((tag & 7) == 4)) {
924 CHK_(ptr);
925 ctx->SetLastTag(tag);
926 goto success;
927 }
928 ptr = UnknownFieldParse(tag,
929 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
930 ptr, ctx);
931 CHK_(ptr != nullptr);
932 continue;
933 }
934 } // switch
935 } // while
936 success:
937 return ptr;
938 failure:
939 ptr = nullptr;
940 goto success;
941 #undef CHK_
942 }
943
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const944 ::PROTOBUF_NAMESPACE_ID::uint8* ListValue::_InternalSerialize(
945 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
946 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue)
947 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
948 (void) cached_has_bits;
949
950 // repeated .google.protobuf.Value values = 1;
951 for (unsigned int i = 0,
952 n = static_cast<unsigned int>(this->_internal_values_size()); i < n; i++) {
953 target = stream->EnsureSpace(target);
954 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
955 InternalWriteMessage(1, this->_internal_values(i), target, stream);
956 }
957
958 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
959 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
960 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
961 }
962 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue)
963 return target;
964 }
965
ByteSizeLong() const966 size_t ListValue::ByteSizeLong() const {
967 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue)
968 size_t total_size = 0;
969
970 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
971 // Prevent compiler warnings about cached_has_bits being unused
972 (void) cached_has_bits;
973
974 // repeated .google.protobuf.Value values = 1;
975 total_size += 1UL * this->_internal_values_size();
976 for (const auto& msg : this->values_) {
977 total_size +=
978 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
979 }
980
981 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
982 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
983 _internal_metadata_, total_size, &_cached_size_);
984 }
985 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
986 SetCachedSize(cached_size);
987 return total_size;
988 }
989
990 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ListValue::_class_data_ = {
991 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
992 ListValue::MergeImpl
993 };
GetClassData() const994 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ListValue::GetClassData() const { return &_class_data_; }
995
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)996 void ListValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
997 const ::PROTOBUF_NAMESPACE_ID::Message&from) {
998 static_cast<ListValue *>(to)->MergeFrom(
999 static_cast<const ListValue &>(from));
1000 }
1001
1002
MergeFrom(const ListValue & from)1003 void ListValue::MergeFrom(const ListValue& from) {
1004 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue)
1005 GOOGLE_DCHECK_NE(&from, this);
1006 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1007 (void) cached_has_bits;
1008
1009 values_.MergeFrom(from.values_);
1010 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1011 }
1012
CopyFrom(const ListValue & from)1013 void ListValue::CopyFrom(const ListValue& from) {
1014 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ListValue)
1015 if (&from == this) return;
1016 Clear();
1017 MergeFrom(from);
1018 }
1019
IsInitialized() const1020 bool ListValue::IsInitialized() const {
1021 return true;
1022 }
1023
InternalSwap(ListValue * other)1024 void ListValue::InternalSwap(ListValue* other) {
1025 using std::swap;
1026 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1027 values_.InternalSwap(&other->values_);
1028 }
1029
GetMetadata() const1030 ::PROTOBUF_NAMESPACE_ID::Metadata ListValue::GetMetadata() const {
1031 return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
1032 &descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter, &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once,
1033 file_level_metadata_google_2fprotobuf_2fstruct_2eproto[3]);
1034 }
1035
1036 // @@protoc_insertion_point(namespace_scope)
1037 PROTOBUF_NAMESPACE_CLOSE
1038 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)1039 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(Arena* arena) {
1040 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(arena);
1041 }
CreateMaybeMessage(Arena * arena)1042 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Struct* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct >(Arena* arena) {
1043 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Struct >(arena);
1044 }
CreateMaybeMessage(Arena * arena)1045 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Value >(Arena* arena) {
1046 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Value >(arena);
1047 }
CreateMaybeMessage(Arena * arena)1048 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::ListValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ListValue >(Arena* arena) {
1049 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::ListValue >(arena);
1050 }
1051 PROTOBUF_NAMESPACE_CLOSE
1052
1053 // @@protoc_insertion_point(global_scope)
1054 #include <google/protobuf/port_undef.inc>
1055