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