1// Generated by the protocol buffer compiler. DO NOT EDIT! 2// source: google/protobuf/struct.proto 3 4#ifndef PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED 5#define PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED 6 7#include <string> 8 9#include <google/protobuf/stubs/common.h> 10 11#if GOOGLE_PROTOBUF_VERSION < 3000000 12#error This file was generated by a newer version of protoc which is 13#error incompatible with your Protocol Buffer headers. Please update 14#error your headers. 15#endif 16#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 17#error This file was generated by an older version of protoc which is 18#error incompatible with your Protocol Buffer headers. Please 19#error regenerate this file with a newer version of protoc. 20#endif 21 22#include <google/protobuf/arena.h> 23#include <google/protobuf/arenastring.h> 24#include <google/protobuf/generated_message_util.h> 25#include <google/protobuf/metadata.h> 26#include <google/protobuf/message.h> 27#include <google/protobuf/repeated_field.h> 28#include <google/protobuf/extension_set.h> 29#include <google/protobuf/map.h> 30#include <google/protobuf/map_field_inl.h> 31#include <google/protobuf/generated_enum_reflection.h> 32#include <google/protobuf/unknown_field_set.h> 33// @@protoc_insertion_point(includes) 34 35namespace google { 36namespace protobuf { 37 38// Internal implementation detail -- do not call these. 39void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto(); 40void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto(); 41void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto(); 42 43class ListValue; 44class Struct; 45class Value; 46 47enum NullValue { 48 NULL_VALUE = 0, 49 NullValue_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, 50 NullValue_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max 51}; 52LIBPROTOBUF_EXPORT bool NullValue_IsValid(int value); 53const NullValue NullValue_MIN = NULL_VALUE; 54const NullValue NullValue_MAX = NULL_VALUE; 55const int NullValue_ARRAYSIZE = NullValue_MAX + 1; 56 57LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* NullValue_descriptor(); 58inline const ::std::string& NullValue_Name(NullValue value) { 59 return ::google::protobuf::internal::NameOfEnum( 60 NullValue_descriptor(), value); 61} 62inline bool NullValue_Parse( 63 const ::std::string& name, NullValue* value) { 64 return ::google::protobuf::internal::ParseNamedEnum<NullValue>( 65 NullValue_descriptor(), name, value); 66} 67// =================================================================== 68 69class LIBPROTOBUF_EXPORT Struct : public ::google::protobuf::Message { 70 public: 71 Struct(); 72 virtual ~Struct(); 73 74 Struct(const Struct& from); 75 76 inline Struct& operator=(const Struct& from) { 77 CopyFrom(from); 78 return *this; 79 } 80 81 static const ::google::protobuf::Descriptor* descriptor(); 82 static const Struct& default_instance(); 83 84 void Swap(Struct* other); 85 86 // implements Message ---------------------------------------------- 87 88 inline Struct* New() const { return New(NULL); } 89 90 Struct* New(::google::protobuf::Arena* arena) const; 91 void CopyFrom(const ::google::protobuf::Message& from); 92 void MergeFrom(const ::google::protobuf::Message& from); 93 void CopyFrom(const Struct& from); 94 void MergeFrom(const Struct& from); 95 void Clear(); 96 bool IsInitialized() const; 97 98 int ByteSize() const; 99 bool MergePartialFromCodedStream( 100 ::google::protobuf::io::CodedInputStream* input); 101 void SerializeWithCachedSizes( 102 ::google::protobuf::io::CodedOutputStream* output) const; 103 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; 104 int GetCachedSize() const { return _cached_size_; } 105 private: 106 void SharedCtor(); 107 void SharedDtor(); 108 void SetCachedSize(int size) const; 109 void InternalSwap(Struct* other); 110 private: 111 inline ::google::protobuf::Arena* GetArenaNoVirtual() const { 112 return _internal_metadata_.arena(); 113 } 114 inline void* MaybeArenaPtr() const { 115 return _internal_metadata_.raw_arena_ptr(); 116 } 117 public: 118 119 ::google::protobuf::Metadata GetMetadata() const; 120 121 // nested types ---------------------------------------------------- 122 123 124 // accessors ------------------------------------------------------- 125 126 // map<string, .google.protobuf.Value> fields = 1; 127 int fields_size() const; 128 void clear_fields(); 129 static const int kFieldsFieldNumber = 1; 130 const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >& 131 fields() const; 132 ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >* 133 mutable_fields(); 134 135 // @@protoc_insertion_point(class_scope:google.protobuf.Struct) 136 private: 137 138 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; 139 bool _is_default_instance_; 140 typedef ::google::protobuf::internal::MapEntryLite< 141 ::std::string, ::google::protobuf::Value, 142 ::google::protobuf::internal::WireFormatLite::TYPE_STRING, 143 ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 144 0 > 145 Struct_FieldsEntry; 146 ::google::protobuf::internal::MapField< 147 ::std::string, ::google::protobuf::Value, 148 ::google::protobuf::internal::WireFormatLite::TYPE_STRING, 149 ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 150 0 > fields_; 151 mutable int _cached_size_; 152 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto(); 153 friend void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto(); 154 friend void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto(); 155 156 void InitAsDefaultInstance(); 157 static Struct* default_instance_; 158}; 159// ------------------------------------------------------------------- 160 161class LIBPROTOBUF_EXPORT Value : public ::google::protobuf::Message { 162 public: 163 Value(); 164 virtual ~Value(); 165 166 Value(const Value& from); 167 168 inline Value& operator=(const Value& from) { 169 CopyFrom(from); 170 return *this; 171 } 172 173 static const ::google::protobuf::Descriptor* descriptor(); 174 static const Value& default_instance(); 175 176 enum KindCase { 177 kNullValue = 1, 178 kNumberValue = 2, 179 kStringValue = 3, 180 kBoolValue = 4, 181 kStructValue = 5, 182 kListValue = 6, 183 KIND_NOT_SET = 0, 184 }; 185 186 void Swap(Value* other); 187 188 // implements Message ---------------------------------------------- 189 190 inline Value* New() const { return New(NULL); } 191 192 Value* New(::google::protobuf::Arena* arena) const; 193 void CopyFrom(const ::google::protobuf::Message& from); 194 void MergeFrom(const ::google::protobuf::Message& from); 195 void CopyFrom(const Value& from); 196 void MergeFrom(const Value& from); 197 void Clear(); 198 bool IsInitialized() const; 199 200 int ByteSize() const; 201 bool MergePartialFromCodedStream( 202 ::google::protobuf::io::CodedInputStream* input); 203 void SerializeWithCachedSizes( 204 ::google::protobuf::io::CodedOutputStream* output) const; 205 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; 206 int GetCachedSize() const { return _cached_size_; } 207 private: 208 void SharedCtor(); 209 void SharedDtor(); 210 void SetCachedSize(int size) const; 211 void InternalSwap(Value* other); 212 private: 213 inline ::google::protobuf::Arena* GetArenaNoVirtual() const { 214 return _internal_metadata_.arena(); 215 } 216 inline void* MaybeArenaPtr() const { 217 return _internal_metadata_.raw_arena_ptr(); 218 } 219 public: 220 221 ::google::protobuf::Metadata GetMetadata() const; 222 223 // nested types ---------------------------------------------------- 224 225 // accessors ------------------------------------------------------- 226 227 // optional .google.protobuf.NullValue null_value = 1; 228 private: 229 bool has_null_value() const; 230 public: 231 void clear_null_value(); 232 static const int kNullValueFieldNumber = 1; 233 ::google::protobuf::NullValue null_value() const; 234 void set_null_value(::google::protobuf::NullValue value); 235 236 // optional double number_value = 2; 237 private: 238 bool has_number_value() const; 239 public: 240 void clear_number_value(); 241 static const int kNumberValueFieldNumber = 2; 242 double number_value() const; 243 void set_number_value(double value); 244 245 // optional string string_value = 3; 246 private: 247 bool has_string_value() const; 248 public: 249 void clear_string_value(); 250 static const int kStringValueFieldNumber = 3; 251 const ::std::string& string_value() const; 252 void set_string_value(const ::std::string& value); 253 void set_string_value(const char* value); 254 void set_string_value(const char* value, size_t size); 255 ::std::string* mutable_string_value(); 256 ::std::string* release_string_value(); 257 void set_allocated_string_value(::std::string* string_value); 258 259 // optional bool bool_value = 4; 260 private: 261 bool has_bool_value() const; 262 public: 263 void clear_bool_value(); 264 static const int kBoolValueFieldNumber = 4; 265 bool bool_value() const; 266 void set_bool_value(bool value); 267 268 // optional .google.protobuf.Struct struct_value = 5; 269 bool has_struct_value() const; 270 void clear_struct_value(); 271 static const int kStructValueFieldNumber = 5; 272 const ::google::protobuf::Struct& struct_value() const; 273 ::google::protobuf::Struct* mutable_struct_value(); 274 ::google::protobuf::Struct* release_struct_value(); 275 void set_allocated_struct_value(::google::protobuf::Struct* struct_value); 276 277 // optional .google.protobuf.ListValue list_value = 6; 278 bool has_list_value() const; 279 void clear_list_value(); 280 static const int kListValueFieldNumber = 6; 281 const ::google::protobuf::ListValue& list_value() const; 282 ::google::protobuf::ListValue* mutable_list_value(); 283 ::google::protobuf::ListValue* release_list_value(); 284 void set_allocated_list_value(::google::protobuf::ListValue* list_value); 285 286 KindCase kind_case() const; 287 // @@protoc_insertion_point(class_scope:google.protobuf.Value) 288 private: 289 inline void set_has_null_value(); 290 inline void set_has_number_value(); 291 inline void set_has_string_value(); 292 inline void set_has_bool_value(); 293 inline void set_has_struct_value(); 294 inline void set_has_list_value(); 295 296 inline bool has_kind() const; 297 void clear_kind(); 298 inline void clear_has_kind(); 299 300 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; 301 bool _is_default_instance_; 302 union KindUnion { 303 KindUnion() {} 304 int null_value_; 305 double number_value_; 306 ::google::protobuf::internal::ArenaStringPtr string_value_; 307 bool bool_value_; 308 ::google::protobuf::Struct* struct_value_; 309 ::google::protobuf::ListValue* list_value_; 310 } kind_; 311 mutable int _cached_size_; 312 ::google::protobuf::uint32 _oneof_case_[1]; 313 314 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto(); 315 friend void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto(); 316 friend void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto(); 317 318 void InitAsDefaultInstance(); 319 static Value* default_instance_; 320}; 321// ------------------------------------------------------------------- 322 323class LIBPROTOBUF_EXPORT ListValue : public ::google::protobuf::Message { 324 public: 325 ListValue(); 326 virtual ~ListValue(); 327 328 ListValue(const ListValue& from); 329 330 inline ListValue& operator=(const ListValue& from) { 331 CopyFrom(from); 332 return *this; 333 } 334 335 static const ::google::protobuf::Descriptor* descriptor(); 336 static const ListValue& default_instance(); 337 338 void Swap(ListValue* other); 339 340 // implements Message ---------------------------------------------- 341 342 inline ListValue* New() const { return New(NULL); } 343 344 ListValue* New(::google::protobuf::Arena* arena) const; 345 void CopyFrom(const ::google::protobuf::Message& from); 346 void MergeFrom(const ::google::protobuf::Message& from); 347 void CopyFrom(const ListValue& from); 348 void MergeFrom(const ListValue& from); 349 void Clear(); 350 bool IsInitialized() const; 351 352 int ByteSize() const; 353 bool MergePartialFromCodedStream( 354 ::google::protobuf::io::CodedInputStream* input); 355 void SerializeWithCachedSizes( 356 ::google::protobuf::io::CodedOutputStream* output) const; 357 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; 358 int GetCachedSize() const { return _cached_size_; } 359 private: 360 void SharedCtor(); 361 void SharedDtor(); 362 void SetCachedSize(int size) const; 363 void InternalSwap(ListValue* other); 364 private: 365 inline ::google::protobuf::Arena* GetArenaNoVirtual() const { 366 return _internal_metadata_.arena(); 367 } 368 inline void* MaybeArenaPtr() const { 369 return _internal_metadata_.raw_arena_ptr(); 370 } 371 public: 372 373 ::google::protobuf::Metadata GetMetadata() const; 374 375 // nested types ---------------------------------------------------- 376 377 // accessors ------------------------------------------------------- 378 379 // repeated .google.protobuf.Value values = 1; 380 int values_size() const; 381 void clear_values(); 382 static const int kValuesFieldNumber = 1; 383 const ::google::protobuf::Value& values(int index) const; 384 ::google::protobuf::Value* mutable_values(int index); 385 ::google::protobuf::Value* add_values(); 386 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* 387 mutable_values(); 388 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& 389 values() const; 390 391 // @@protoc_insertion_point(class_scope:google.protobuf.ListValue) 392 private: 393 394 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; 395 bool _is_default_instance_; 396 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value > values_; 397 mutable int _cached_size_; 398 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto(); 399 friend void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto(); 400 friend void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto(); 401 402 void InitAsDefaultInstance(); 403 static ListValue* default_instance_; 404}; 405// =================================================================== 406 407 408// =================================================================== 409 410#if !PROTOBUF_INLINE_NOT_IN_HEADERS 411// Struct 412 413// map<string, .google.protobuf.Value> fields = 1; 414inline int Struct::fields_size() const { 415 return fields_.size(); 416} 417inline void Struct::clear_fields() { 418 fields_.Clear(); 419} 420inline const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >& 421Struct::fields() const { 422 // @@protoc_insertion_point(field_map:google.protobuf.Struct.fields) 423 return fields_.GetMap(); 424} 425inline ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >* 426Struct::mutable_fields() { 427 // @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields) 428 return fields_.MutableMap(); 429} 430 431// ------------------------------------------------------------------- 432 433// Value 434 435// optional .google.protobuf.NullValue null_value = 1; 436inline bool Value::has_null_value() const { 437 return kind_case() == kNullValue; 438} 439inline void Value::set_has_null_value() { 440 _oneof_case_[0] = kNullValue; 441} 442inline void Value::clear_null_value() { 443 if (has_null_value()) { 444 kind_.null_value_ = 0; 445 clear_has_kind(); 446 } 447} 448inline ::google::protobuf::NullValue Value::null_value() const { 449 // @@protoc_insertion_point(field_get:google.protobuf.Value.null_value) 450 if (has_null_value()) { 451 return static_cast< ::google::protobuf::NullValue >(kind_.null_value_); 452 } 453 return static_cast< ::google::protobuf::NullValue >(0); 454} 455inline void Value::set_null_value(::google::protobuf::NullValue value) { 456 if (!has_null_value()) { 457 clear_kind(); 458 set_has_null_value(); 459 } 460 kind_.null_value_ = value; 461 // @@protoc_insertion_point(field_set:google.protobuf.Value.null_value) 462} 463 464// optional double number_value = 2; 465inline bool Value::has_number_value() const { 466 return kind_case() == kNumberValue; 467} 468inline void Value::set_has_number_value() { 469 _oneof_case_[0] = kNumberValue; 470} 471inline void Value::clear_number_value() { 472 if (has_number_value()) { 473 kind_.number_value_ = 0; 474 clear_has_kind(); 475 } 476} 477inline double Value::number_value() const { 478 // @@protoc_insertion_point(field_get:google.protobuf.Value.number_value) 479 if (has_number_value()) { 480 return kind_.number_value_; 481 } 482 return 0; 483} 484inline void Value::set_number_value(double value) { 485 if (!has_number_value()) { 486 clear_kind(); 487 set_has_number_value(); 488 } 489 kind_.number_value_ = value; 490 // @@protoc_insertion_point(field_set:google.protobuf.Value.number_value) 491} 492 493// optional string string_value = 3; 494inline bool Value::has_string_value() const { 495 return kind_case() == kStringValue; 496} 497inline void Value::set_has_string_value() { 498 _oneof_case_[0] = kStringValue; 499} 500inline void Value::clear_string_value() { 501 if (has_string_value()) { 502 kind_.string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 503 clear_has_kind(); 504 } 505} 506inline const ::std::string& Value::string_value() const { 507 // @@protoc_insertion_point(field_get:google.protobuf.Value.string_value) 508 if (has_string_value()) { 509 return kind_.string_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 510 } 511 return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); 512} 513inline void Value::set_string_value(const ::std::string& value) { 514 // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value) 515 if (!has_string_value()) { 516 clear_kind(); 517 set_has_string_value(); 518 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 519 } 520 kind_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); 521 // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value) 522} 523inline void Value::set_string_value(const char* value) { 524 if (!has_string_value()) { 525 clear_kind(); 526 set_has_string_value(); 527 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 528 } 529 kind_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), 530 ::std::string(value)); 531 // @@protoc_insertion_point(field_set_char:google.protobuf.Value.string_value) 532} 533inline void Value::set_string_value(const char* value, size_t size) { 534 if (!has_string_value()) { 535 clear_kind(); 536 set_has_string_value(); 537 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 538 } 539 kind_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( 540 reinterpret_cast<const char*>(value), size)); 541 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Value.string_value) 542} 543inline ::std::string* Value::mutable_string_value() { 544 if (!has_string_value()) { 545 clear_kind(); 546 set_has_string_value(); 547 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 548 } 549 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value) 550 return kind_.string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 551} 552inline ::std::string* Value::release_string_value() { 553 // @@protoc_insertion_point(field_release:google.protobuf.Value.string_value) 554 if (has_string_value()) { 555 clear_has_kind(); 556 return kind_.string_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 557 } else { 558 return NULL; 559 } 560} 561inline void Value::set_allocated_string_value(::std::string* string_value) { 562 if (!has_string_value()) { 563 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 564 } 565 clear_kind(); 566 if (string_value != NULL) { 567 set_has_string_value(); 568 kind_.string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), 569 string_value); 570 } 571 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.string_value) 572} 573 574// optional bool bool_value = 4; 575inline bool Value::has_bool_value() const { 576 return kind_case() == kBoolValue; 577} 578inline void Value::set_has_bool_value() { 579 _oneof_case_[0] = kBoolValue; 580} 581inline void Value::clear_bool_value() { 582 if (has_bool_value()) { 583 kind_.bool_value_ = false; 584 clear_has_kind(); 585 } 586} 587inline bool Value::bool_value() const { 588 // @@protoc_insertion_point(field_get:google.protobuf.Value.bool_value) 589 if (has_bool_value()) { 590 return kind_.bool_value_; 591 } 592 return false; 593} 594inline void Value::set_bool_value(bool value) { 595 if (!has_bool_value()) { 596 clear_kind(); 597 set_has_bool_value(); 598 } 599 kind_.bool_value_ = value; 600 // @@protoc_insertion_point(field_set:google.protobuf.Value.bool_value) 601} 602 603// optional .google.protobuf.Struct struct_value = 5; 604inline bool Value::has_struct_value() const { 605 return kind_case() == kStructValue; 606} 607inline void Value::set_has_struct_value() { 608 _oneof_case_[0] = kStructValue; 609} 610inline void Value::clear_struct_value() { 611 if (has_struct_value()) { 612 delete kind_.struct_value_; 613 clear_has_kind(); 614 } 615} 616inline const ::google::protobuf::Struct& Value::struct_value() const { 617 // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value) 618 return has_struct_value() 619 ? *kind_.struct_value_ 620 : ::google::protobuf::Struct::default_instance(); 621} 622inline ::google::protobuf::Struct* Value::mutable_struct_value() { 623 if (!has_struct_value()) { 624 clear_kind(); 625 set_has_struct_value(); 626 kind_.struct_value_ = new ::google::protobuf::Struct; 627 } 628 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value) 629 return kind_.struct_value_; 630} 631inline ::google::protobuf::Struct* Value::release_struct_value() { 632 // @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value) 633 if (has_struct_value()) { 634 clear_has_kind(); 635 ::google::protobuf::Struct* temp = kind_.struct_value_; 636 kind_.struct_value_ = NULL; 637 return temp; 638 } else { 639 return NULL; 640 } 641} 642inline void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) { 643 clear_kind(); 644 if (struct_value) { 645 set_has_struct_value(); 646 kind_.struct_value_ = struct_value; 647 } 648 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value) 649} 650 651// optional .google.protobuf.ListValue list_value = 6; 652inline bool Value::has_list_value() const { 653 return kind_case() == kListValue; 654} 655inline void Value::set_has_list_value() { 656 _oneof_case_[0] = kListValue; 657} 658inline void Value::clear_list_value() { 659 if (has_list_value()) { 660 delete kind_.list_value_; 661 clear_has_kind(); 662 } 663} 664inline const ::google::protobuf::ListValue& Value::list_value() const { 665 // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value) 666 return has_list_value() 667 ? *kind_.list_value_ 668 : ::google::protobuf::ListValue::default_instance(); 669} 670inline ::google::protobuf::ListValue* Value::mutable_list_value() { 671 if (!has_list_value()) { 672 clear_kind(); 673 set_has_list_value(); 674 kind_.list_value_ = new ::google::protobuf::ListValue; 675 } 676 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value) 677 return kind_.list_value_; 678} 679inline ::google::protobuf::ListValue* Value::release_list_value() { 680 // @@protoc_insertion_point(field_release:google.protobuf.Value.list_value) 681 if (has_list_value()) { 682 clear_has_kind(); 683 ::google::protobuf::ListValue* temp = kind_.list_value_; 684 kind_.list_value_ = NULL; 685 return temp; 686 } else { 687 return NULL; 688 } 689} 690inline void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) { 691 clear_kind(); 692 if (list_value) { 693 set_has_list_value(); 694 kind_.list_value_ = list_value; 695 } 696 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value) 697} 698 699inline bool Value::has_kind() const { 700 return kind_case() != KIND_NOT_SET; 701} 702inline void Value::clear_has_kind() { 703 _oneof_case_[0] = KIND_NOT_SET; 704} 705inline Value::KindCase Value::kind_case() const { 706 return Value::KindCase(_oneof_case_[0]); 707} 708// ------------------------------------------------------------------- 709 710// ListValue 711 712// repeated .google.protobuf.Value values = 1; 713inline int ListValue::values_size() const { 714 return values_.size(); 715} 716inline void ListValue::clear_values() { 717 values_.Clear(); 718} 719inline const ::google::protobuf::Value& ListValue::values(int index) const { 720 // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values) 721 return values_.Get(index); 722} 723inline ::google::protobuf::Value* ListValue::mutable_values(int index) { 724 // @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values) 725 return values_.Mutable(index); 726} 727inline ::google::protobuf::Value* ListValue::add_values() { 728 // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values) 729 return values_.Add(); 730} 731inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* 732ListValue::mutable_values() { 733 // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values) 734 return &values_; 735} 736inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& 737ListValue::values() const { 738 // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values) 739 return values_; 740} 741 742#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS 743// ------------------------------------------------------------------- 744 745// ------------------------------------------------------------------- 746 747 748// @@protoc_insertion_point(namespace_scope) 749 750} // namespace protobuf 751} // namespace google 752 753#ifndef SWIG 754namespace google { 755namespace protobuf { 756 757template <> struct is_proto_enum< ::google::protobuf::NullValue> : ::google::protobuf::internal::true_type {}; 758template <> 759inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::NullValue>() { 760 return ::google::protobuf::NullValue_descriptor(); 761} 762 763} // namespace protobuf 764} // namespace google 765#endif // SWIG 766 767// @@protoc_insertion_point(global_scope) 768 769#endif // PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED 770