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/stubs/common.h>
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/descriptor.h>
13 #include <google/protobuf/generated_message_reflection.h>
14 #include <google/protobuf/reflection_ops.h>
15 #include <google/protobuf/wire_format.h>
16 // @@protoc_insertion_point(includes)
17 #include <google/protobuf/port_def.inc>
18 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fstruct_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto;
19 PROTOBUF_NAMESPACE_OPEN
20 class Struct_FieldsEntry_DoNotUseDefaultTypeInternal {
21 public:
22 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Struct_FieldsEntry_DoNotUse> _instance;
23 } _Struct_FieldsEntry_DoNotUse_default_instance_;
24 class StructDefaultTypeInternal {
25 public:
26 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Struct> _instance;
27 } _Struct_default_instance_;
28 class ValueDefaultTypeInternal {
29 public:
30 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Value> _instance;
31 int null_value_;
32 double number_value_;
33 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_;
34 bool bool_value_;
35 const PROTOBUF_NAMESPACE_ID::Struct* struct_value_;
36 const PROTOBUF_NAMESPACE_ID::ListValue* list_value_;
37 } _Value_default_instance_;
38 class ListValueDefaultTypeInternal {
39 public:
40 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListValue> _instance;
41 } _ListValue_default_instance_;
42 PROTOBUF_NAMESPACE_CLOSE
InitDefaultsscc_info_ListValue_google_2fprotobuf_2fstruct_2eproto()43 static void InitDefaultsscc_info_ListValue_google_2fprotobuf_2fstruct_2eproto() {
44 GOOGLE_PROTOBUF_VERIFY_VERSION;
45
46 {
47 void* ptr = &PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_;
48 new (ptr) PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse();
49 }
50 {
51 void* ptr = &PROTOBUF_NAMESPACE_ID::_Struct_default_instance_;
52 new (ptr) PROTOBUF_NAMESPACE_ID::Struct();
53 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
54 }
55 {
56 void* ptr = &PROTOBUF_NAMESPACE_ID::_Value_default_instance_;
57 new (ptr) PROTOBUF_NAMESPACE_ID::Value();
58 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
59 }
60 {
61 void* ptr = &PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_;
62 new (ptr) PROTOBUF_NAMESPACE_ID::ListValue();
63 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
64 }
65 PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse::InitAsDefaultInstance();
66 PROTOBUF_NAMESPACE_ID::Struct::InitAsDefaultInstance();
67 PROTOBUF_NAMESPACE_ID::Value::InitAsDefaultInstance();
68 PROTOBUF_NAMESPACE_ID::ListValue::InitAsDefaultInstance();
69 }
70
71 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto =
72 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ListValue_google_2fprotobuf_2fstruct_2eproto}, {}};
73
74 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fstruct_2eproto[4];
75 static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[1];
76 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto = nullptr;
77
78 const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
79 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _has_bits_),
80 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _internal_metadata_),
81 ~0u, // no _extensions_
82 ~0u, // no _oneof_case_
83 ~0u, // no _weak_field_map_
84 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, key_),
85 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, value_),
86 0,
87 1,
88 ~0u, // no _has_bits_
89 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, _internal_metadata_),
90 ~0u, // no _extensions_
91 ~0u, // no _oneof_case_
92 ~0u, // no _weak_field_map_
93 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, fields_),
94 ~0u, // no _has_bits_
95 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _internal_metadata_),
96 ~0u, // no _extensions_
97 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _oneof_case_[0]),
98 ~0u, // no _weak_field_map_
99 offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, null_value_),
100 offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, number_value_),
101 offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, string_value_),
102 offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, bool_value_),
103 offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, struct_value_),
104 offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, list_value_),
105 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, kind_),
106 ~0u, // no _has_bits_
107 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, _internal_metadata_),
108 ~0u, // no _extensions_
109 ~0u, // no _oneof_case_
110 ~0u, // no _weak_field_map_
111 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, values_),
112 };
113 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
114 { 0, 7, sizeof(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse)},
115 { 9, -1, sizeof(PROTOBUF_NAMESPACE_ID::Struct)},
116 { 15, -1, sizeof(PROTOBUF_NAMESPACE_ID::Value)},
117 { 27, -1, sizeof(PROTOBUF_NAMESPACE_ID::ListValue)},
118 };
119
120 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
121 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_),
122 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Struct_default_instance_),
123 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Value_default_instance_),
124 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_),
125 };
126
127 const char descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
128 "\n\034google/protobuf/struct.proto\022\017google.p"
129 "rotobuf\"\204\001\n\006Struct\0223\n\006fields\030\001 \003(\0132#.goo"
130 "gle.protobuf.Struct.FieldsEntry\032E\n\013Field"
131 "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo"
132 "gle.protobuf.Value:\0028\001\"\352\001\n\005Value\0220\n\nnull"
133 "_value\030\001 \001(\0162\032.google.protobuf.NullValue"
134 "H\000\022\026\n\014number_value\030\002 \001(\001H\000\022\026\n\014string_val"
135 "ue\030\003 \001(\tH\000\022\024\n\nbool_value\030\004 \001(\010H\000\022/\n\014stru"
136 "ct_value\030\005 \001(\0132\027.google.protobuf.StructH"
137 "\000\0220\n\nlist_value\030\006 \001(\0132\032.google.protobuf."
138 "ListValueH\000B\006\n\004kind\"3\n\tListValue\022&\n\006valu"
139 "es\030\001 \003(\0132\026.google.protobuf.Value*\033\n\tNull"
140 "Value\022\016\n\nNULL_VALUE\020\000B\201\001\n\023com.google.pro"
141 "tobufB\013StructProtoP\001Z1github.com/golang/"
142 "protobuf/ptypes/struct;structpb\370\001\001\242\002\003GPB"
143 "\252\002\036Google.Protobuf.WellKnownTypesb\006proto"
144 "3"
145 ;
146 static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2fstruct_2eproto_deps[1] = {
147 };
148 static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2fprotobuf_2fstruct_2eproto_sccs[1] = {
149 &scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base,
150 };
151 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fstruct_2eproto_once;
152 static bool descriptor_table_google_2fprotobuf_2fstruct_2eproto_initialized = false;
153 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto = {
154 &descriptor_table_google_2fprotobuf_2fstruct_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto, "google/protobuf/struct.proto", 641,
155 &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once, descriptor_table_google_2fprotobuf_2fstruct_2eproto_sccs, descriptor_table_google_2fprotobuf_2fstruct_2eproto_deps, 1, 0,
156 schemas, file_default_instances, TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets,
157 file_level_metadata_google_2fprotobuf_2fstruct_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto, file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto,
158 };
159
160 // Force running AddDescriptors() at dynamic initialization time.
161 static bool dynamic_init_dummy_google_2fprotobuf_2fstruct_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto), true);
162 PROTOBUF_NAMESPACE_OPEN
NullValue_descriptor()163 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NullValue_descriptor() {
164 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto);
165 return file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[0];
166 }
NullValue_IsValid(int value)167 bool NullValue_IsValid(int value) {
168 switch (value) {
169 case 0:
170 return true;
171 default:
172 return false;
173 }
174 }
175
176
177 // ===================================================================
178
Struct_FieldsEntry_DoNotUse()179 Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() {}
Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)180 Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
181 : SuperType(arena) {}
MergeFrom(const Struct_FieldsEntry_DoNotUse & other)182 void Struct_FieldsEntry_DoNotUse::MergeFrom(const Struct_FieldsEntry_DoNotUse& other) {
183 MergeFromInternal(other);
184 }
GetMetadata() const185 ::PROTOBUF_NAMESPACE_ID::Metadata Struct_FieldsEntry_DoNotUse::GetMetadata() const {
186 return GetMetadataStatic();
187 }
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & other)188 void Struct_FieldsEntry_DoNotUse::MergeFrom(
189 const ::PROTOBUF_NAMESPACE_ID::Message& other) {
190 ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other);
191 }
192
193
194 // ===================================================================
195
InitAsDefaultInstance()196 void Struct::InitAsDefaultInstance() {
197 }
198 class Struct::_Internal {
199 public:
200 };
201
Struct()202 Struct::Struct()
203 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
204 SharedCtor();
205 // @@protoc_insertion_point(constructor:google.protobuf.Struct)
206 }
Struct(::PROTOBUF_NAMESPACE_ID::Arena * arena)207 Struct::Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena)
208 : ::PROTOBUF_NAMESPACE_ID::Message(),
209 _internal_metadata_(arena),
210 fields_(arena) {
211 SharedCtor();
212 RegisterArenaDtor(arena);
213 // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct)
214 }
Struct(const Struct & from)215 Struct::Struct(const Struct& from)
216 : ::PROTOBUF_NAMESPACE_ID::Message(),
217 _internal_metadata_(nullptr) {
218 _internal_metadata_.MergeFrom(from._internal_metadata_);
219 fields_.MergeFrom(from.fields_);
220 // @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
221 }
222
SharedCtor()223 void Struct::SharedCtor() {
224 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base);
225 }
226
~Struct()227 Struct::~Struct() {
228 // @@protoc_insertion_point(destructor:google.protobuf.Struct)
229 SharedDtor();
230 }
231
SharedDtor()232 void Struct::SharedDtor() {
233 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
234 }
235
ArenaDtor(void * object)236 void Struct::ArenaDtor(void* object) {
237 Struct* _this = reinterpret_cast< Struct* >(object);
238 (void)_this;
239 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)240 void Struct::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
241 }
SetCachedSize(int size) const242 void Struct::SetCachedSize(int size) const {
243 _cached_size_.Set(size);
244 }
default_instance()245 const Struct& Struct::default_instance() {
246 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base);
247 return *internal_default_instance();
248 }
249
250
Clear()251 void Struct::Clear() {
252 // @@protoc_insertion_point(message_clear_start:google.protobuf.Struct)
253 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
254 // Prevent compiler warnings about cached_has_bits being unused
255 (void) cached_has_bits;
256
257 fields_.Clear();
258 _internal_metadata_.Clear();
259 }
260
261 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)262 const char* Struct::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
263 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
264 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
265 while (!ctx->Done(&ptr)) {
266 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
267 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
268 CHK_(ptr);
269 switch (tag >> 3) {
270 // map<string, .google.protobuf.Value> fields = 1;
271 case 1:
272 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
273 ptr -= 1;
274 do {
275 ptr += 1;
276 ptr = ctx->ParseMessage(&fields_, ptr);
277 CHK_(ptr);
278 if (!ctx->DataAvailable(ptr)) break;
279 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
280 } else goto handle_unusual;
281 continue;
282 default: {
283 handle_unusual:
284 if ((tag & 7) == 4 || tag == 0) {
285 ctx->SetLastTag(tag);
286 goto success;
287 }
288 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
289 CHK_(ptr != nullptr);
290 continue;
291 }
292 } // switch
293 } // while
294 success:
295 return ptr;
296 failure:
297 ptr = nullptr;
298 goto success;
299 #undef CHK_
300 }
301 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)302 bool Struct::MergePartialFromCodedStream(
303 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
304 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
305 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
306 // @@protoc_insertion_point(parse_start:google.protobuf.Struct)
307 for (;;) {
308 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
309 tag = p.first;
310 if (!p.second) goto handle_unusual;
311 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
312 // map<string, .google.protobuf.Value> fields = 1;
313 case 1: {
314 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
315 Struct_FieldsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField<
316 Struct_FieldsEntry_DoNotUse,
317 std::string, PROTOBUF_NAMESPACE_ID::Value,
318 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
319 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE,
320 0 >,
321 ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value > > parser(&fields_);
322 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual(
323 input, &parser));
324 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
325 parser.key().data(), static_cast<int>(parser.key().length()),
326 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
327 "google.protobuf.Struct.FieldsEntry.key"));
328 } else {
329 goto handle_unusual;
330 }
331 break;
332 }
333
334 default: {
335 handle_unusual:
336 if (tag == 0) {
337 goto success;
338 }
339 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
340 input, tag, _internal_metadata_.mutable_unknown_fields()));
341 break;
342 }
343 }
344 }
345 success:
346 // @@protoc_insertion_point(parse_success:google.protobuf.Struct)
347 return true;
348 failure:
349 // @@protoc_insertion_point(parse_failure:google.protobuf.Struct)
350 return false;
351 #undef DO_
352 }
353 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
354
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const355 void Struct::SerializeWithCachedSizes(
356 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
357 // @@protoc_insertion_point(serialize_start:google.protobuf.Struct)
358 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
359 (void) cached_has_bits;
360
361 // map<string, .google.protobuf.Value> fields = 1;
362 if (!this->fields().empty()) {
363 typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_pointer
364 ConstPtr;
365 typedef ConstPtr SortItem;
366 typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
367 struct Utf8Check {
368 static void Check(ConstPtr p) {
369 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
370 p->first.data(), static_cast<int>(p->first.length()),
371 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
372 "google.protobuf.Struct.FieldsEntry.key");
373 }
374 };
375
376 if (output->IsSerializationDeterministic() &&
377 this->fields().size() > 1) {
378 ::std::unique_ptr<SortItem[]> items(
379 new SortItem[this->fields().size()]);
380 typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::size_type size_type;
381 size_type n = 0;
382 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
383 it = this->fields().begin();
384 it != this->fields().end(); ++it, ++n) {
385 items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
386 }
387 ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
388 for (size_type i = 0; i < n; i++) {
389 Struct_FieldsEntry_DoNotUse::Funcs::SerializeToCodedStream(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output);
390 Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
391 }
392 } else {
393 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
394 it = this->fields().begin();
395 it != this->fields().end(); ++it) {
396 Struct_FieldsEntry_DoNotUse::Funcs::SerializeToCodedStream(1, it->first, it->second, output);
397 Utf8Check::Check(&(*it));
398 }
399 }
400 }
401
402 if (_internal_metadata_.have_unknown_fields()) {
403 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
404 _internal_metadata_.unknown_fields(), output);
405 }
406 // @@protoc_insertion_point(serialize_end:google.protobuf.Struct)
407 }
408
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const409 ::PROTOBUF_NAMESPACE_ID::uint8* Struct::InternalSerializeWithCachedSizesToArray(
410 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
411 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct)
412 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
413 (void) cached_has_bits;
414
415 // map<string, .google.protobuf.Value> fields = 1;
416 if (!this->fields().empty()) {
417 typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_pointer
418 ConstPtr;
419 typedef ConstPtr SortItem;
420 typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
421 struct Utf8Check {
422 static void Check(ConstPtr p) {
423 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
424 p->first.data(), static_cast<int>(p->first.length()),
425 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
426 "google.protobuf.Struct.FieldsEntry.key");
427 }
428 };
429
430 if (false &&
431 this->fields().size() > 1) {
432 ::std::unique_ptr<SortItem[]> items(
433 new SortItem[this->fields().size()]);
434 typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::size_type size_type;
435 size_type n = 0;
436 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
437 it = this->fields().begin();
438 it != this->fields().end(); ++it, ++n) {
439 items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
440 }
441 ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
442 for (size_type i = 0; i < n; i++) {
443 target = Struct_FieldsEntry_DoNotUse::Funcs::SerializeToArray(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target);
444 Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
445 }
446 } else {
447 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
448 it = this->fields().begin();
449 it != this->fields().end(); ++it) {
450 target = Struct_FieldsEntry_DoNotUse::Funcs::SerializeToArray(1, it->first, it->second, target);
451 Utf8Check::Check(&(*it));
452 }
453 }
454 }
455
456 if (_internal_metadata_.have_unknown_fields()) {
457 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
458 _internal_metadata_.unknown_fields(), target);
459 }
460 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct)
461 return target;
462 }
463
ByteSizeLong() const464 size_t Struct::ByteSizeLong() const {
465 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct)
466 size_t total_size = 0;
467
468 if (_internal_metadata_.have_unknown_fields()) {
469 total_size +=
470 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
471 _internal_metadata_.unknown_fields());
472 }
473 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
474 // Prevent compiler warnings about cached_has_bits being unused
475 (void) cached_has_bits;
476
477 // map<string, .google.protobuf.Value> fields = 1;
478 total_size += 1 *
479 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->fields_size());
480 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
481 it = this->fields().begin();
482 it != this->fields().end(); ++it) {
483 total_size += Struct_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
484 }
485
486 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
487 SetCachedSize(cached_size);
488 return total_size;
489 }
490
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)491 void Struct::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
492 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Struct)
493 GOOGLE_DCHECK_NE(&from, this);
494 const Struct* source =
495 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Struct>(
496 &from);
497 if (source == nullptr) {
498 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Struct)
499 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
500 } else {
501 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Struct)
502 MergeFrom(*source);
503 }
504 }
505
MergeFrom(const Struct & from)506 void Struct::MergeFrom(const Struct& from) {
507 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct)
508 GOOGLE_DCHECK_NE(&from, this);
509 _internal_metadata_.MergeFrom(from._internal_metadata_);
510 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
511 (void) cached_has_bits;
512
513 fields_.MergeFrom(from.fields_);
514 }
515
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)516 void Struct::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
517 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Struct)
518 if (&from == this) return;
519 Clear();
520 MergeFrom(from);
521 }
522
CopyFrom(const Struct & from)523 void Struct::CopyFrom(const Struct& from) {
524 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Struct)
525 if (&from == this) return;
526 Clear();
527 MergeFrom(from);
528 }
529
IsInitialized() const530 bool Struct::IsInitialized() const {
531 return true;
532 }
533
InternalSwap(Struct * other)534 void Struct::InternalSwap(Struct* other) {
535 using std::swap;
536 _internal_metadata_.Swap(&other->_internal_metadata_);
537 fields_.Swap(&other->fields_);
538 }
539
GetMetadata() const540 ::PROTOBUF_NAMESPACE_ID::Metadata Struct::GetMetadata() const {
541 return GetMetadataStatic();
542 }
543
544
545 // ===================================================================
546
InitAsDefaultInstance()547 void Value::InitAsDefaultInstance() {
548 PROTOBUF_NAMESPACE_ID::_Value_default_instance_.null_value_ = 0;
549 PROTOBUF_NAMESPACE_ID::_Value_default_instance_.number_value_ = 0;
550 PROTOBUF_NAMESPACE_ID::_Value_default_instance_.string_value_.UnsafeSetDefault(
551 &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
552 PROTOBUF_NAMESPACE_ID::_Value_default_instance_.bool_value_ = false;
553 PROTOBUF_NAMESPACE_ID::_Value_default_instance_.struct_value_ = const_cast< PROTOBUF_NAMESPACE_ID::Struct*>(
554 PROTOBUF_NAMESPACE_ID::Struct::internal_default_instance());
555 PROTOBUF_NAMESPACE_ID::_Value_default_instance_.list_value_ = const_cast< PROTOBUF_NAMESPACE_ID::ListValue*>(
556 PROTOBUF_NAMESPACE_ID::ListValue::internal_default_instance());
557 }
558 class Value::_Internal {
559 public:
560 static const PROTOBUF_NAMESPACE_ID::Struct& struct_value(const Value* msg);
561 static const PROTOBUF_NAMESPACE_ID::ListValue& list_value(const Value* msg);
562 };
563
564 const PROTOBUF_NAMESPACE_ID::Struct&
struct_value(const Value * msg)565 Value::_Internal::struct_value(const Value* msg) {
566 return *msg->kind_.struct_value_;
567 }
568 const PROTOBUF_NAMESPACE_ID::ListValue&
list_value(const Value * msg)569 Value::_Internal::list_value(const Value* msg) {
570 return *msg->kind_.list_value_;
571 }
set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct * struct_value)572 void Value::set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value) {
573 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
574 clear_kind();
575 if (struct_value) {
576 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
577 ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(struct_value);
578 if (message_arena != submessage_arena) {
579 struct_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
580 message_arena, struct_value, submessage_arena);
581 }
582 set_has_struct_value();
583 kind_.struct_value_ = struct_value;
584 }
585 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
586 }
set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue * list_value)587 void Value::set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value) {
588 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
589 clear_kind();
590 if (list_value) {
591 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
592 ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(list_value);
593 if (message_arena != submessage_arena) {
594 list_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
595 message_arena, list_value, submessage_arena);
596 }
597 set_has_list_value();
598 kind_.list_value_ = list_value;
599 }
600 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value)
601 }
Value()602 Value::Value()
603 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
604 SharedCtor();
605 // @@protoc_insertion_point(constructor:google.protobuf.Value)
606 }
Value(::PROTOBUF_NAMESPACE_ID::Arena * arena)607 Value::Value(::PROTOBUF_NAMESPACE_ID::Arena* arena)
608 : ::PROTOBUF_NAMESPACE_ID::Message(),
609 _internal_metadata_(arena) {
610 SharedCtor();
611 RegisterArenaDtor(arena);
612 // @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
613 }
Value(const Value & from)614 Value::Value(const Value& from)
615 : ::PROTOBUF_NAMESPACE_ID::Message(),
616 _internal_metadata_(nullptr) {
617 _internal_metadata_.MergeFrom(from._internal_metadata_);
618 clear_has_kind();
619 switch (from.kind_case()) {
620 case kNullValue: {
621 set_null_value(from.null_value());
622 break;
623 }
624 case kNumberValue: {
625 set_number_value(from.number_value());
626 break;
627 }
628 case kStringValue: {
629 set_string_value(from.string_value());
630 break;
631 }
632 case kBoolValue: {
633 set_bool_value(from.bool_value());
634 break;
635 }
636 case kStructValue: {
637 mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from.struct_value());
638 break;
639 }
640 case kListValue: {
641 mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from.list_value());
642 break;
643 }
644 case KIND_NOT_SET: {
645 break;
646 }
647 }
648 // @@protoc_insertion_point(copy_constructor:google.protobuf.Value)
649 }
650
SharedCtor()651 void Value::SharedCtor() {
652 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base);
653 clear_has_kind();
654 }
655
~Value()656 Value::~Value() {
657 // @@protoc_insertion_point(destructor:google.protobuf.Value)
658 SharedDtor();
659 }
660
SharedDtor()661 void Value::SharedDtor() {
662 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
663 if (has_kind()) {
664 clear_kind();
665 }
666 }
667
ArenaDtor(void * object)668 void Value::ArenaDtor(void* object) {
669 Value* _this = reinterpret_cast< Value* >(object);
670 (void)_this;
671 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)672 void Value::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
673 }
SetCachedSize(int size) const674 void Value::SetCachedSize(int size) const {
675 _cached_size_.Set(size);
676 }
default_instance()677 const Value& Value::default_instance() {
678 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base);
679 return *internal_default_instance();
680 }
681
682
clear_kind()683 void Value::clear_kind() {
684 // @@protoc_insertion_point(one_of_clear_start:google.protobuf.Value)
685 switch (kind_case()) {
686 case kNullValue: {
687 // No need to clear
688 break;
689 }
690 case kNumberValue: {
691 // No need to clear
692 break;
693 }
694 case kStringValue: {
695 kind_.string_value_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
696 GetArenaNoVirtual());
697 break;
698 }
699 case kBoolValue: {
700 // No need to clear
701 break;
702 }
703 case kStructValue: {
704 if (GetArenaNoVirtual() == nullptr) {
705 delete kind_.struct_value_;
706 }
707 break;
708 }
709 case kListValue: {
710 if (GetArenaNoVirtual() == nullptr) {
711 delete kind_.list_value_;
712 }
713 break;
714 }
715 case KIND_NOT_SET: {
716 break;
717 }
718 }
719 _oneof_case_[0] = KIND_NOT_SET;
720 }
721
722
Clear()723 void Value::Clear() {
724 // @@protoc_insertion_point(message_clear_start:google.protobuf.Value)
725 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
726 // Prevent compiler warnings about cached_has_bits being unused
727 (void) cached_has_bits;
728
729 clear_kind();
730 _internal_metadata_.Clear();
731 }
732
733 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)734 const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
735 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
736 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
737 while (!ctx->Done(&ptr)) {
738 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
739 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
740 CHK_(ptr);
741 switch (tag >> 3) {
742 // .google.protobuf.NullValue null_value = 1;
743 case 1:
744 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
745 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
746 CHK_(ptr);
747 set_null_value(static_cast<PROTOBUF_NAMESPACE_ID::NullValue>(val));
748 } else goto handle_unusual;
749 continue;
750 // double number_value = 2;
751 case 2:
752 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) {
753 set_number_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
754 ptr += sizeof(double);
755 } else goto handle_unusual;
756 continue;
757 // string string_value = 3;
758 case 3:
759 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
760 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_string_value(), ptr, ctx, "google.protobuf.Value.string_value");
761 CHK_(ptr);
762 } else goto handle_unusual;
763 continue;
764 // bool bool_value = 4;
765 case 4:
766 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
767 set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
768 CHK_(ptr);
769 } else goto handle_unusual;
770 continue;
771 // .google.protobuf.Struct struct_value = 5;
772 case 5:
773 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
774 ptr = ctx->ParseMessage(mutable_struct_value(), ptr);
775 CHK_(ptr);
776 } else goto handle_unusual;
777 continue;
778 // .google.protobuf.ListValue list_value = 6;
779 case 6:
780 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
781 ptr = ctx->ParseMessage(mutable_list_value(), ptr);
782 CHK_(ptr);
783 } else goto handle_unusual;
784 continue;
785 default: {
786 handle_unusual:
787 if ((tag & 7) == 4 || tag == 0) {
788 ctx->SetLastTag(tag);
789 goto success;
790 }
791 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
792 CHK_(ptr != nullptr);
793 continue;
794 }
795 } // switch
796 } // while
797 success:
798 return ptr;
799 failure:
800 ptr = nullptr;
801 goto success;
802 #undef CHK_
803 }
804 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)805 bool Value::MergePartialFromCodedStream(
806 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
807 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
808 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
809 // @@protoc_insertion_point(parse_start:google.protobuf.Value)
810 for (;;) {
811 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
812 tag = p.first;
813 if (!p.second) goto handle_unusual;
814 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
815 // .google.protobuf.NullValue null_value = 1;
816 case 1: {
817 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
818 int value = 0;
819 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
820 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
821 input, &value)));
822 set_null_value(static_cast< PROTOBUF_NAMESPACE_ID::NullValue >(value));
823 } else {
824 goto handle_unusual;
825 }
826 break;
827 }
828
829 // double number_value = 2;
830 case 2: {
831 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (17 & 0xFF)) {
832 clear_kind();
833 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
834 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
835 input, &kind_.number_value_)));
836 set_has_number_value();
837 } else {
838 goto handle_unusual;
839 }
840 break;
841 }
842
843 // string string_value = 3;
844 case 3: {
845 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
846 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
847 input, this->mutable_string_value()));
848 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
849 this->string_value().data(), static_cast<int>(this->string_value().length()),
850 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
851 "google.protobuf.Value.string_value"));
852 } else {
853 goto handle_unusual;
854 }
855 break;
856 }
857
858 // bool bool_value = 4;
859 case 4: {
860 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
861 clear_kind();
862 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
863 bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
864 input, &kind_.bool_value_)));
865 set_has_bool_value();
866 } else {
867 goto handle_unusual;
868 }
869 break;
870 }
871
872 // .google.protobuf.Struct struct_value = 5;
873 case 5: {
874 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
875 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
876 input, mutable_struct_value()));
877 } else {
878 goto handle_unusual;
879 }
880 break;
881 }
882
883 // .google.protobuf.ListValue list_value = 6;
884 case 6: {
885 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
886 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
887 input, mutable_list_value()));
888 } else {
889 goto handle_unusual;
890 }
891 break;
892 }
893
894 default: {
895 handle_unusual:
896 if (tag == 0) {
897 goto success;
898 }
899 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
900 input, tag, _internal_metadata_.mutable_unknown_fields()));
901 break;
902 }
903 }
904 }
905 success:
906 // @@protoc_insertion_point(parse_success:google.protobuf.Value)
907 return true;
908 failure:
909 // @@protoc_insertion_point(parse_failure:google.protobuf.Value)
910 return false;
911 #undef DO_
912 }
913 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
914
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const915 void Value::SerializeWithCachedSizes(
916 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
917 // @@protoc_insertion_point(serialize_start:google.protobuf.Value)
918 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
919 (void) cached_has_bits;
920
921 // .google.protobuf.NullValue null_value = 1;
922 if (has_null_value()) {
923 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
924 1, this->null_value(), output);
925 }
926
927 // double number_value = 2;
928 if (has_number_value()) {
929 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(2, this->number_value(), output);
930 }
931
932 // string string_value = 3;
933 if (has_string_value()) {
934 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
935 this->string_value().data(), static_cast<int>(this->string_value().length()),
936 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
937 "google.protobuf.Value.string_value");
938 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
939 3, this->string_value(), output);
940 }
941
942 // bool bool_value = 4;
943 if (has_bool_value()) {
944 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->bool_value(), output);
945 }
946
947 // .google.protobuf.Struct struct_value = 5;
948 if (has_struct_value()) {
949 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
950 5, _Internal::struct_value(this), output);
951 }
952
953 // .google.protobuf.ListValue list_value = 6;
954 if (has_list_value()) {
955 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
956 6, _Internal::list_value(this), output);
957 }
958
959 if (_internal_metadata_.have_unknown_fields()) {
960 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
961 _internal_metadata_.unknown_fields(), output);
962 }
963 // @@protoc_insertion_point(serialize_end:google.protobuf.Value)
964 }
965
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const966 ::PROTOBUF_NAMESPACE_ID::uint8* Value::InternalSerializeWithCachedSizesToArray(
967 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
968 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value)
969 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
970 (void) cached_has_bits;
971
972 // .google.protobuf.NullValue null_value = 1;
973 if (has_null_value()) {
974 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
975 1, this->null_value(), target);
976 }
977
978 // double number_value = 2;
979 if (has_number_value()) {
980 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->number_value(), target);
981 }
982
983 // string string_value = 3;
984 if (has_string_value()) {
985 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
986 this->string_value().data(), static_cast<int>(this->string_value().length()),
987 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
988 "google.protobuf.Value.string_value");
989 target =
990 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
991 3, this->string_value(), target);
992 }
993
994 // bool bool_value = 4;
995 if (has_bool_value()) {
996 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->bool_value(), target);
997 }
998
999 // .google.protobuf.Struct struct_value = 5;
1000 if (has_struct_value()) {
1001 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1002 InternalWriteMessageToArray(
1003 5, _Internal::struct_value(this), target);
1004 }
1005
1006 // .google.protobuf.ListValue list_value = 6;
1007 if (has_list_value()) {
1008 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1009 InternalWriteMessageToArray(
1010 6, _Internal::list_value(this), target);
1011 }
1012
1013 if (_internal_metadata_.have_unknown_fields()) {
1014 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
1015 _internal_metadata_.unknown_fields(), target);
1016 }
1017 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value)
1018 return target;
1019 }
1020
ByteSizeLong() const1021 size_t Value::ByteSizeLong() const {
1022 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value)
1023 size_t total_size = 0;
1024
1025 if (_internal_metadata_.have_unknown_fields()) {
1026 total_size +=
1027 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
1028 _internal_metadata_.unknown_fields());
1029 }
1030 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1031 // Prevent compiler warnings about cached_has_bits being unused
1032 (void) cached_has_bits;
1033
1034 switch (kind_case()) {
1035 // .google.protobuf.NullValue null_value = 1;
1036 case kNullValue: {
1037 total_size += 1 +
1038 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->null_value());
1039 break;
1040 }
1041 // double number_value = 2;
1042 case kNumberValue: {
1043 total_size += 1 + 8;
1044 break;
1045 }
1046 // string string_value = 3;
1047 case kStringValue: {
1048 total_size += 1 +
1049 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1050 this->string_value());
1051 break;
1052 }
1053 // bool bool_value = 4;
1054 case kBoolValue: {
1055 total_size += 1 + 1;
1056 break;
1057 }
1058 // .google.protobuf.Struct struct_value = 5;
1059 case kStructValue: {
1060 total_size += 1 +
1061 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1062 *kind_.struct_value_);
1063 break;
1064 }
1065 // .google.protobuf.ListValue list_value = 6;
1066 case kListValue: {
1067 total_size += 1 +
1068 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1069 *kind_.list_value_);
1070 break;
1071 }
1072 case KIND_NOT_SET: {
1073 break;
1074 }
1075 }
1076 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1077 SetCachedSize(cached_size);
1078 return total_size;
1079 }
1080
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1081 void Value::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1082 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Value)
1083 GOOGLE_DCHECK_NE(&from, this);
1084 const Value* source =
1085 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Value>(
1086 &from);
1087 if (source == nullptr) {
1088 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Value)
1089 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1090 } else {
1091 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Value)
1092 MergeFrom(*source);
1093 }
1094 }
1095
MergeFrom(const Value & from)1096 void Value::MergeFrom(const Value& from) {
1097 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value)
1098 GOOGLE_DCHECK_NE(&from, this);
1099 _internal_metadata_.MergeFrom(from._internal_metadata_);
1100 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1101 (void) cached_has_bits;
1102
1103 switch (from.kind_case()) {
1104 case kNullValue: {
1105 set_null_value(from.null_value());
1106 break;
1107 }
1108 case kNumberValue: {
1109 set_number_value(from.number_value());
1110 break;
1111 }
1112 case kStringValue: {
1113 set_string_value(from.string_value());
1114 break;
1115 }
1116 case kBoolValue: {
1117 set_bool_value(from.bool_value());
1118 break;
1119 }
1120 case kStructValue: {
1121 mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from.struct_value());
1122 break;
1123 }
1124 case kListValue: {
1125 mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from.list_value());
1126 break;
1127 }
1128 case KIND_NOT_SET: {
1129 break;
1130 }
1131 }
1132 }
1133
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1134 void Value::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1135 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Value)
1136 if (&from == this) return;
1137 Clear();
1138 MergeFrom(from);
1139 }
1140
CopyFrom(const Value & from)1141 void Value::CopyFrom(const Value& from) {
1142 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Value)
1143 if (&from == this) return;
1144 Clear();
1145 MergeFrom(from);
1146 }
1147
IsInitialized() const1148 bool Value::IsInitialized() const {
1149 return true;
1150 }
1151
InternalSwap(Value * other)1152 void Value::InternalSwap(Value* other) {
1153 using std::swap;
1154 _internal_metadata_.Swap(&other->_internal_metadata_);
1155 swap(kind_, other->kind_);
1156 swap(_oneof_case_[0], other->_oneof_case_[0]);
1157 }
1158
GetMetadata() const1159 ::PROTOBUF_NAMESPACE_ID::Metadata Value::GetMetadata() const {
1160 return GetMetadataStatic();
1161 }
1162
1163
1164 // ===================================================================
1165
InitAsDefaultInstance()1166 void ListValue::InitAsDefaultInstance() {
1167 }
1168 class ListValue::_Internal {
1169 public:
1170 };
1171
ListValue()1172 ListValue::ListValue()
1173 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
1174 SharedCtor();
1175 // @@protoc_insertion_point(constructor:google.protobuf.ListValue)
1176 }
ListValue(::PROTOBUF_NAMESPACE_ID::Arena * arena)1177 ListValue::ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1178 : ::PROTOBUF_NAMESPACE_ID::Message(),
1179 _internal_metadata_(arena),
1180 values_(arena) {
1181 SharedCtor();
1182 RegisterArenaDtor(arena);
1183 // @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
1184 }
ListValue(const ListValue & from)1185 ListValue::ListValue(const ListValue& from)
1186 : ::PROTOBUF_NAMESPACE_ID::Message(),
1187 _internal_metadata_(nullptr),
1188 values_(from.values_) {
1189 _internal_metadata_.MergeFrom(from._internal_metadata_);
1190 // @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue)
1191 }
1192
SharedCtor()1193 void ListValue::SharedCtor() {
1194 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base);
1195 }
1196
~ListValue()1197 ListValue::~ListValue() {
1198 // @@protoc_insertion_point(destructor:google.protobuf.ListValue)
1199 SharedDtor();
1200 }
1201
SharedDtor()1202 void ListValue::SharedDtor() {
1203 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
1204 }
1205
ArenaDtor(void * object)1206 void ListValue::ArenaDtor(void* object) {
1207 ListValue* _this = reinterpret_cast< ListValue* >(object);
1208 (void)_this;
1209 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)1210 void ListValue::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1211 }
SetCachedSize(int size) const1212 void ListValue::SetCachedSize(int size) const {
1213 _cached_size_.Set(size);
1214 }
default_instance()1215 const ListValue& ListValue::default_instance() {
1216 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base);
1217 return *internal_default_instance();
1218 }
1219
1220
Clear()1221 void ListValue::Clear() {
1222 // @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue)
1223 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1224 // Prevent compiler warnings about cached_has_bits being unused
1225 (void) cached_has_bits;
1226
1227 values_.Clear();
1228 _internal_metadata_.Clear();
1229 }
1230
1231 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)1232 const char* ListValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1233 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1234 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
1235 while (!ctx->Done(&ptr)) {
1236 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1237 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1238 CHK_(ptr);
1239 switch (tag >> 3) {
1240 // repeated .google.protobuf.Value values = 1;
1241 case 1:
1242 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1243 ptr -= 1;
1244 do {
1245 ptr += 1;
1246 ptr = ctx->ParseMessage(add_values(), ptr);
1247 CHK_(ptr);
1248 if (!ctx->DataAvailable(ptr)) break;
1249 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
1250 } else goto handle_unusual;
1251 continue;
1252 default: {
1253 handle_unusual:
1254 if ((tag & 7) == 4 || tag == 0) {
1255 ctx->SetLastTag(tag);
1256 goto success;
1257 }
1258 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1259 CHK_(ptr != nullptr);
1260 continue;
1261 }
1262 } // switch
1263 } // while
1264 success:
1265 return ptr;
1266 failure:
1267 ptr = nullptr;
1268 goto success;
1269 #undef CHK_
1270 }
1271 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)1272 bool ListValue::MergePartialFromCodedStream(
1273 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1274 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1275 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1276 // @@protoc_insertion_point(parse_start:google.protobuf.ListValue)
1277 for (;;) {
1278 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1279 tag = p.first;
1280 if (!p.second) goto handle_unusual;
1281 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1282 // repeated .google.protobuf.Value values = 1;
1283 case 1: {
1284 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
1285 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
1286 input, add_values()));
1287 } else {
1288 goto handle_unusual;
1289 }
1290 break;
1291 }
1292
1293 default: {
1294 handle_unusual:
1295 if (tag == 0) {
1296 goto success;
1297 }
1298 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
1299 input, tag, _internal_metadata_.mutable_unknown_fields()));
1300 break;
1301 }
1302 }
1303 }
1304 success:
1305 // @@protoc_insertion_point(parse_success:google.protobuf.ListValue)
1306 return true;
1307 failure:
1308 // @@protoc_insertion_point(parse_failure:google.protobuf.ListValue)
1309 return false;
1310 #undef DO_
1311 }
1312 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1313
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const1314 void ListValue::SerializeWithCachedSizes(
1315 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
1316 // @@protoc_insertion_point(serialize_start:google.protobuf.ListValue)
1317 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1318 (void) cached_has_bits;
1319
1320 // repeated .google.protobuf.Value values = 1;
1321 for (unsigned int i = 0,
1322 n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
1323 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1324 1,
1325 this->values(static_cast<int>(i)),
1326 output);
1327 }
1328
1329 if (_internal_metadata_.have_unknown_fields()) {
1330 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
1331 _internal_metadata_.unknown_fields(), output);
1332 }
1333 // @@protoc_insertion_point(serialize_end:google.protobuf.ListValue)
1334 }
1335
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const1336 ::PROTOBUF_NAMESPACE_ID::uint8* ListValue::InternalSerializeWithCachedSizesToArray(
1337 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
1338 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue)
1339 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1340 (void) cached_has_bits;
1341
1342 // repeated .google.protobuf.Value values = 1;
1343 for (unsigned int i = 0,
1344 n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
1345 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1346 InternalWriteMessageToArray(
1347 1, this->values(static_cast<int>(i)), target);
1348 }
1349
1350 if (_internal_metadata_.have_unknown_fields()) {
1351 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
1352 _internal_metadata_.unknown_fields(), target);
1353 }
1354 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue)
1355 return target;
1356 }
1357
ByteSizeLong() const1358 size_t ListValue::ByteSizeLong() const {
1359 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue)
1360 size_t total_size = 0;
1361
1362 if (_internal_metadata_.have_unknown_fields()) {
1363 total_size +=
1364 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
1365 _internal_metadata_.unknown_fields());
1366 }
1367 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1368 // Prevent compiler warnings about cached_has_bits being unused
1369 (void) cached_has_bits;
1370
1371 // repeated .google.protobuf.Value values = 1;
1372 {
1373 unsigned int count = static_cast<unsigned int>(this->values_size());
1374 total_size += 1UL * count;
1375 for (unsigned int i = 0; i < count; i++) {
1376 total_size +=
1377 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1378 this->values(static_cast<int>(i)));
1379 }
1380 }
1381
1382 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1383 SetCachedSize(cached_size);
1384 return total_size;
1385 }
1386
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1387 void ListValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1388 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.ListValue)
1389 GOOGLE_DCHECK_NE(&from, this);
1390 const ListValue* source =
1391 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListValue>(
1392 &from);
1393 if (source == nullptr) {
1394 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.ListValue)
1395 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1396 } else {
1397 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.ListValue)
1398 MergeFrom(*source);
1399 }
1400 }
1401
MergeFrom(const ListValue & from)1402 void ListValue::MergeFrom(const ListValue& from) {
1403 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue)
1404 GOOGLE_DCHECK_NE(&from, this);
1405 _internal_metadata_.MergeFrom(from._internal_metadata_);
1406 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1407 (void) cached_has_bits;
1408
1409 values_.MergeFrom(from.values_);
1410 }
1411
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1412 void ListValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1413 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.ListValue)
1414 if (&from == this) return;
1415 Clear();
1416 MergeFrom(from);
1417 }
1418
CopyFrom(const ListValue & from)1419 void ListValue::CopyFrom(const ListValue& from) {
1420 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ListValue)
1421 if (&from == this) return;
1422 Clear();
1423 MergeFrom(from);
1424 }
1425
IsInitialized() const1426 bool ListValue::IsInitialized() const {
1427 return true;
1428 }
1429
InternalSwap(ListValue * other)1430 void ListValue::InternalSwap(ListValue* other) {
1431 using std::swap;
1432 _internal_metadata_.Swap(&other->_internal_metadata_);
1433 CastToBase(&values_)->InternalSwap(CastToBase(&other->values_));
1434 }
1435
GetMetadata() const1436 ::PROTOBUF_NAMESPACE_ID::Metadata ListValue::GetMetadata() const {
1437 return GetMetadataStatic();
1438 }
1439
1440
1441 // @@protoc_insertion_point(namespace_scope)
1442 PROTOBUF_NAMESPACE_CLOSE
1443 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)1444 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(Arena* arena) {
1445 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(arena);
1446 }
CreateMaybeMessage(Arena * arena)1447 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Struct* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct >(Arena* arena) {
1448 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Struct >(arena);
1449 }
CreateMaybeMessage(Arena * arena)1450 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Value >(Arena* arena) {
1451 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Value >(arena);
1452 }
CreateMaybeMessage(Arena * arena)1453 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::ListValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ListValue >(Arena* arena) {
1454 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::ListValue >(arena);
1455 }
1456 PROTOBUF_NAMESPACE_CLOSE
1457
1458 // @@protoc_insertion_point(global_scope)
1459 #include <google/protobuf/port_undef.inc>
1460