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