// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/protobuf/util/internal/testdata/struct.proto

#include <google/protobuf/util/internal/testdata/struct.pb.h>

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)

namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue;
}  // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ListValueWrapper;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_ListvalueMapEntry_DoNotUse;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_StructMapEntry_DoNotUse;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_ValueMapEntry_DoNotUse;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_RepeatedListValueWrapper;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_RepeatedValueWrapper;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_StructWrapper;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ValueWrapper;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<3> scc_info_MapOfStruct;
}  // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto
namespace google {
namespace protobuf {
namespace testing {
class StructTestCasesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<StructTestCases>
      _instance;
} _StructTestCases_default_instance_;
class StructWrapperDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<StructWrapper>
      _instance;
} _StructWrapper_default_instance_;
class ValueWrapperDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ValueWrapper>
      _instance;
} _ValueWrapper_default_instance_;
class RepeatedValueWrapperDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<RepeatedValueWrapper>
      _instance;
} _RepeatedValueWrapper_default_instance_;
class ListValueWrapperDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ListValueWrapper>
      _instance;
} _ListValueWrapper_default_instance_;
class RepeatedListValueWrapperDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<RepeatedListValueWrapper>
      _instance;
} _RepeatedListValueWrapper_default_instance_;
class MapOfStruct_StructMapEntry_DoNotUseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<MapOfStruct_StructMapEntry_DoNotUse>
      _instance;
} _MapOfStruct_StructMapEntry_DoNotUse_default_instance_;
class MapOfStruct_ValueMapEntry_DoNotUseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<MapOfStruct_ValueMapEntry_DoNotUse>
      _instance;
} _MapOfStruct_ValueMapEntry_DoNotUse_default_instance_;
class MapOfStruct_ListvalueMapEntry_DoNotUseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<MapOfStruct_ListvalueMapEntry_DoNotUse>
      _instance;
} _MapOfStruct_ListvalueMapEntry_DoNotUse_default_instance_;
class MapOfStructDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<MapOfStruct>
      _instance;
} _MapOfStruct_default_instance_;
class DummyDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Dummy>
      _instance;
} _Dummy_default_instance_;
class StructTypeDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<StructType>
      _instance;
} _StructType_default_instance_;
}  // namespace testing
}  // namespace protobuf
}  // namespace google
namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto {
static void InitDefaultsStructTestCases() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_StructTestCases_default_instance_;
    new (ptr) ::google::protobuf::testing::StructTestCases();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::protobuf::testing::StructTestCases::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<7> scc_info_StructTestCases =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 7, InitDefaultsStructTestCases}, {
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructWrapper.base,
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ValueWrapper.base,
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ListValueWrapper.base,
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedValueWrapper.base,
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedListValueWrapper.base,
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct.base,}};

static void InitDefaultsStructWrapper() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_StructWrapper_default_instance_;
    new (ptr) ::google::protobuf::testing::StructWrapper();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::protobuf::testing::StructWrapper::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_StructWrapper =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStructWrapper}, {
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};

static void InitDefaultsValueWrapper() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_ValueWrapper_default_instance_;
    new (ptr) ::google::protobuf::testing::ValueWrapper();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::protobuf::testing::ValueWrapper::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_ValueWrapper =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsValueWrapper}, {
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};

static void InitDefaultsRepeatedValueWrapper() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_RepeatedValueWrapper_default_instance_;
    new (ptr) ::google::protobuf::testing::RepeatedValueWrapper();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::protobuf::testing::RepeatedValueWrapper::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_RepeatedValueWrapper =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRepeatedValueWrapper}, {
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};

static void InitDefaultsListValueWrapper() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_ListValueWrapper_default_instance_;
    new (ptr) ::google::protobuf::testing::ListValueWrapper();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::protobuf::testing::ListValueWrapper::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_ListValueWrapper =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsListValueWrapper}, {
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};

static void InitDefaultsRepeatedListValueWrapper() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_RepeatedListValueWrapper_default_instance_;
    new (ptr) ::google::protobuf::testing::RepeatedListValueWrapper();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::protobuf::testing::RepeatedListValueWrapper::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_RepeatedListValueWrapper =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRepeatedListValueWrapper}, {
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};

static void InitDefaultsMapOfStruct_StructMapEntry_DoNotUse() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_MapOfStruct_StructMapEntry_DoNotUse_default_instance_;
    new (ptr) ::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse();
  }
  ::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_StructMapEntry_DoNotUse =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOfStruct_StructMapEntry_DoNotUse}, {
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};

static void InitDefaultsMapOfStruct_ValueMapEntry_DoNotUse() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_MapOfStruct_ValueMapEntry_DoNotUse_default_instance_;
    new (ptr) ::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse();
  }
  ::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_ValueMapEntry_DoNotUse =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOfStruct_ValueMapEntry_DoNotUse}, {
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};

static void InitDefaultsMapOfStruct_ListvalueMapEntry_DoNotUse() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_MapOfStruct_ListvalueMapEntry_DoNotUse_default_instance_;
    new (ptr) ::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse();
  }
  ::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_ListvalueMapEntry_DoNotUse =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOfStruct_ListvalueMapEntry_DoNotUse}, {
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};

static void InitDefaultsMapOfStruct() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_MapOfStruct_default_instance_;
    new (ptr) ::google::protobuf::testing::MapOfStruct();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::protobuf::testing::MapOfStruct::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<3> scc_info_MapOfStruct =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsMapOfStruct}, {
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct_StructMapEntry_DoNotUse.base,
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct_ValueMapEntry_DoNotUse.base,
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct_ListvalueMapEntry_DoNotUse.base,}};

static void InitDefaultsDummy() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_Dummy_default_instance_;
    new (ptr) ::google::protobuf::testing::Dummy();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::protobuf::testing::Dummy::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<0> scc_info_Dummy =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDummy}, {}};

static void InitDefaultsStructType() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::protobuf::testing::_StructType_default_instance_;
    new (ptr) ::google::protobuf::testing::StructType();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::protobuf::testing::StructType::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_StructType =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStructType}, {
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};

void InitDefaults() {
  ::google::protobuf::internal::InitSCC(&scc_info_StructTestCases.base);
  ::google::protobuf::internal::InitSCC(&scc_info_StructWrapper.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ValueWrapper.base);
  ::google::protobuf::internal::InitSCC(&scc_info_RepeatedValueWrapper.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ListValueWrapper.base);
  ::google::protobuf::internal::InitSCC(&scc_info_RepeatedListValueWrapper.base);
  ::google::protobuf::internal::InitSCC(&scc_info_MapOfStruct_StructMapEntry_DoNotUse.base);
  ::google::protobuf::internal::InitSCC(&scc_info_MapOfStruct_ValueMapEntry_DoNotUse.base);
  ::google::protobuf::internal::InitSCC(&scc_info_MapOfStruct_ListvalueMapEntry_DoNotUse.base);
  ::google::protobuf::internal::InitSCC(&scc_info_MapOfStruct.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Dummy.base);
  ::google::protobuf::internal::InitSCC(&scc_info_StructType.base);
}

::google::protobuf::Metadata file_level_metadata[12];

const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, empty_value_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, empty_value2_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, null_value_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, simple_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, longer_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_nested_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_nested_list_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_list_of_nulls_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_list_of_lists_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_list_of_structs_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_empty_list_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_list_with_empty_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_struct_with_empty_list_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_struct_with_list_with_empty_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, value_wrapper_simple_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, value_wrapper_with_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, value_wrapper_with_list_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, value_wrapper_with_empty_list_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, value_wrapper_with_list_with_empty_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, list_value_wrapper_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, list_value_wrapper_with_empty_list_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, list_value_wrapper_with_list_with_empty_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_value_simple_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_value_with_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_value_with_list_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_value_with_empty_list_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_value_with_list_with_empty_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_listvalue_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_empty_listvalue_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_listvalue_with_empty_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, repeated_value_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, repeated_value_nested_list_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, repeated_value_nested_list2_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, repeated_value_nested_list3_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, repeated_listvalue_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, map_of_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, map_of_struct_value_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, map_of_listvalue_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructWrapper, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructWrapper, struct__),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ValueWrapper, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ValueWrapper, value_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::RepeatedValueWrapper, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::RepeatedValueWrapper, values_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ListValueWrapper, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ListValueWrapper, shopping_list_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::RepeatedListValueWrapper, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::RepeatedListValueWrapper, dimensions_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse, key_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse, value_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse, key_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse, value_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse, key_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct, struct_map_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct, value_map_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct, listvalue_map_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Dummy, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Dummy, text_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructType, object_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, sizeof(::google::protobuf::testing::StructTestCases)},
  { 44, -1, sizeof(::google::protobuf::testing::StructWrapper)},
  { 50, -1, sizeof(::google::protobuf::testing::ValueWrapper)},
  { 56, -1, sizeof(::google::protobuf::testing::RepeatedValueWrapper)},
  { 62, -1, sizeof(::google::protobuf::testing::ListValueWrapper)},
  { 68, -1, sizeof(::google::protobuf::testing::RepeatedListValueWrapper)},
  { 74, 81, sizeof(::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse)},
  { 83, 90, sizeof(::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse)},
  { 92, 99, sizeof(::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse)},
  { 101, -1, sizeof(::google::protobuf::testing::MapOfStruct)},
  { 109, -1, sizeof(::google::protobuf::testing::Dummy)},
  { 115, -1, sizeof(::google::protobuf::testing::StructType)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StructTestCases_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StructWrapper_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_ValueWrapper_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_RepeatedValueWrapper_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_ListValueWrapper_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_RepeatedListValueWrapper_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfStruct_StructMapEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfStruct_ValueMapEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfStruct_ListvalueMapEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfStruct_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Dummy_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StructType_default_instance_),
};

void protobuf_AssignDescriptors() {
  AddDescriptors();
  AssignDescriptors(
      "google/protobuf/util/internal/testdata/struct.proto", schemas, file_default_instances, TableStruct::offsets,
      file_level_metadata, NULL, NULL);
}

void protobuf_AssignDescriptorsOnce() {
  static ::google::protobuf::internal::once_flag once;
  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
}

void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 12);
}

void AddDescriptorsImpl() {
  InitDefaults();
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
      "\n3google/protobuf/util/internal/testdata"
      "/struct.proto\022\027google.protobuf.testing\032\034"
      "google/protobuf/struct.proto\"\360\025\n\017StructT"
      "estCases\022;\n\013empty_value\030\001 \001(\0132&.google.p"
      "rotobuf.testing.StructWrapper\022<\n\014empty_v"
      "alue2\030\002 \001(\0132&.google.protobuf.testing.St"
      "ructWrapper\022:\n\nnull_value\030\003 \001(\0132&.google"
      ".protobuf.testing.StructWrapper\022=\n\rsimpl"
      "e_struct\030\004 \001(\0132&.google.protobuf.testing"
      ".StructWrapper\022=\n\rlonger_struct\030\005 \001(\0132&."
      "google.protobuf.testing.StructWrapper\022I\n"
      "\031struct_with_nested_struct\030\006 \001(\0132&.googl"
      "e.protobuf.testing.StructWrapper\022G\n\027stru"
      "ct_with_nested_list\030\007 \001(\0132&.google.proto"
      "buf.testing.StructWrapper\022I\n\031struct_with"
      "_list_of_nulls\030\010 \001(\0132&.google.protobuf.t"
      "esting.StructWrapper\022I\n\031struct_with_list"
      "_of_lists\030\t \001(\0132&.google.protobuf.testin"
      "g.StructWrapper\022K\n\033struct_with_list_of_s"
      "tructs\030\n \001(\0132&.google.protobuf.testing.S"
      "tructWrapper\022F\n\026struct_with_empty_list\030\013"
      " \001(\0132&.google.protobuf.testing.StructWra"
      "pper\022R\n\"struct_with_list_with_empty_stru"
      "ct\030\014 \001(\0132&.google.protobuf.testing.Struc"
      "tWrapper\0221\n\020top_level_struct\030\r \001(\0132\027.goo"
      "gle.protobuf.Struct\022A\n top_level_struct_"
      "with_empty_list\030\016 \001(\0132\027.google.protobuf."
      "Struct\022M\n,top_level_struct_with_list_wit"
      "h_empty_struct\030\017 \001(\0132\027.google.protobuf.S"
      "truct\022C\n\024value_wrapper_simple\030\020 \001(\0132%.go"
      "ogle.protobuf.testing.ValueWrapper\022H\n\031va"
      "lue_wrapper_with_struct\030\021 \001(\0132%.google.p"
      "rotobuf.testing.ValueWrapper\022F\n\027value_wr"
      "apper_with_list\030\022 \001(\0132%.google.protobuf."
      "testing.ValueWrapper\022L\n\035value_wrapper_wi"
      "th_empty_list\030\023 \001(\0132%.google.protobuf.te"
      "sting.ValueWrapper\022X\n)value_wrapper_with"
      "_list_with_empty_struct\030\024 \001(\0132%.google.p"
      "rotobuf.testing.ValueWrapper\022E\n\022list_val"
      "ue_wrapper\030\025 \001(\0132).google.protobuf.testi"
      "ng.ListValueWrapper\022U\n\"list_value_wrappe"
      "r_with_empty_list\030\026 \001(\0132).google.protobu"
      "f.testing.ListValueWrapper\022a\n.list_value"
      "_wrapper_with_list_with_empty_struct\030\027 \001"
      "(\0132).google.protobuf.testing.ListValueWr"
      "apper\0226\n\026top_level_value_simple\030\030 \001(\0132\026."
      "google.protobuf.Value\022;\n\033top_level_value"
      "_with_struct\030\031 \001(\0132\026.google.protobuf.Val"
      "ue\0229\n\031top_level_value_with_list\030\032 \001(\0132\026."
      "google.protobuf.Value\022\?\n\037top_level_value"
      "_with_empty_list\030\033 \001(\0132\026.google.protobuf"
      ".Value\022K\n+top_level_value_with_list_with"
      "_empty_struct\030\034 \001(\0132\026.google.protobuf.Va"
      "lue\0227\n\023top_level_listvalue\030\035 \001(\0132\032.googl"
      "e.protobuf.ListValue\022=\n\031top_level_empty_"
      "listvalue\030\036 \001(\0132\032.google.protobuf.ListVa"
      "lue\022I\n%top_level_listvalue_with_empty_st"
      "ruct\030\037 \001(\0132\032.google.protobuf.ListValue\022E"
      "\n\016repeated_value\030  \001(\0132-.google.protobuf"
      ".testing.RepeatedValueWrapper\022Q\n\032repeate"
      "d_value_nested_list\030! \001(\0132-.google.proto"
      "buf.testing.RepeatedValueWrapper\022R\n\033repe"
      "ated_value_nested_list2\030\" \001(\0132-.google.p"
      "rotobuf.testing.RepeatedValueWrapper\022R\n\033"
      "repeated_value_nested_list3\030# \001(\0132-.goog"
      "le.protobuf.testing.RepeatedValueWrapper"
      "\022M\n\022repeated_listvalue\030$ \001(\01321.google.pr"
      "otobuf.testing.RepeatedListValueWrapper\022"
      ";\n\rmap_of_struct\030% \001(\0132$.google.protobuf"
      ".testing.MapOfStruct\022A\n\023map_of_struct_va"
      "lue\030& \001(\0132$.google.protobuf.testing.MapO"
      "fStruct\022>\n\020map_of_listvalue\030\' \001(\0132$.goog"
      "le.protobuf.testing.MapOfStruct\"8\n\rStruc"
      "tWrapper\022\'\n\006struct\030\001 \001(\0132\027.google.protob"
      "uf.Struct\"5\n\014ValueWrapper\022%\n\005value\030\001 \001(\013"
      "2\026.google.protobuf.Value\">\n\024RepeatedValu"
      "eWrapper\022&\n\006values\030\001 \003(\0132\026.google.protob"
      "uf.Value\"E\n\020ListValueWrapper\0221\n\rshopping"
      "_list\030\001 \001(\0132\032.google.protobuf.ListValue\""
      "J\n\030RepeatedListValueWrapper\022.\n\ndimension"
      "s\030\001 \003(\0132\032.google.protobuf.ListValue\"\321\003\n\013"
      "MapOfStruct\022G\n\nstruct_map\030\001 \003(\01323.google"
      ".protobuf.testing.MapOfStruct.StructMapE"
      "ntry\022E\n\tvalue_map\030\002 \003(\01322.google.protobu"
      "f.testing.MapOfStruct.ValueMapEntry\022M\n\rl"
      "istvalue_map\030\003 \003(\01326.google.protobuf.tes"
      "ting.MapOfStruct.ListvalueMapEntry\032I\n\016St"
      "ructMapEntry\022\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\013"
      "2\027.google.protobuf.Struct:\0028\001\032G\n\rValueMa"
      "pEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo"
      "gle.protobuf.Value:\0028\001\032O\n\021ListvalueMapEn"
      "try\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.google"
      ".protobuf.ListValue:\0028\001\"\025\n\005Dummy\022\014\n\004text"
      "\030\001 \001(\t\"5\n\nStructType\022\'\n\006object\030\001 \001(\0132\027.g"
      "oogle.protobuf.Struct2e\n\021StructTestServi"
      "ce\022P\n\004Call\022\036.google.protobuf.testing.Dum"
      "my\032(.google.protobuf.testing.StructTestC"
      "asesb\006proto3"
  };
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
      descriptor, 3892);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "google/protobuf/util/internal/testdata/struct.proto", &protobuf_RegisterTypes);
  ::protobuf_google_2fprotobuf_2fstruct_2eproto::AddDescriptors();
}

void AddDescriptors() {
  static ::google::protobuf::internal::once_flag once;
  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
  StaticDescriptorInitializer() {
    AddDescriptors();
  }
} static_descriptor_initializer;
}  // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto
namespace google {
namespace protobuf {
namespace testing {

// ===================================================================

void StructTestCases::InitAsDefaultInstance() {
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->empty_value_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->empty_value2_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->null_value_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->simple_struct_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->longer_struct_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_nested_struct_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_nested_list_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_list_of_nulls_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_list_of_lists_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_list_of_structs_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_empty_list_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_list_with_empty_struct_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
      ::google::protobuf::testing::StructWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_struct_ = const_cast< ::google::protobuf::Struct*>(
      ::google::protobuf::Struct::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_struct_with_empty_list_ = const_cast< ::google::protobuf::Struct*>(
      ::google::protobuf::Struct::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_struct_with_list_with_empty_struct_ = const_cast< ::google::protobuf::Struct*>(
      ::google::protobuf::Struct::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->value_wrapper_simple_ = const_cast< ::google::protobuf::testing::ValueWrapper*>(
      ::google::protobuf::testing::ValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->value_wrapper_with_struct_ = const_cast< ::google::protobuf::testing::ValueWrapper*>(
      ::google::protobuf::testing::ValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->value_wrapper_with_list_ = const_cast< ::google::protobuf::testing::ValueWrapper*>(
      ::google::protobuf::testing::ValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->value_wrapper_with_empty_list_ = const_cast< ::google::protobuf::testing::ValueWrapper*>(
      ::google::protobuf::testing::ValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->value_wrapper_with_list_with_empty_struct_ = const_cast< ::google::protobuf::testing::ValueWrapper*>(
      ::google::protobuf::testing::ValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->list_value_wrapper_ = const_cast< ::google::protobuf::testing::ListValueWrapper*>(
      ::google::protobuf::testing::ListValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->list_value_wrapper_with_empty_list_ = const_cast< ::google::protobuf::testing::ListValueWrapper*>(
      ::google::protobuf::testing::ListValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->list_value_wrapper_with_list_with_empty_struct_ = const_cast< ::google::protobuf::testing::ListValueWrapper*>(
      ::google::protobuf::testing::ListValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_value_simple_ = const_cast< ::google::protobuf::Value*>(
      ::google::protobuf::Value::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_value_with_struct_ = const_cast< ::google::protobuf::Value*>(
      ::google::protobuf::Value::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_value_with_list_ = const_cast< ::google::protobuf::Value*>(
      ::google::protobuf::Value::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_value_with_empty_list_ = const_cast< ::google::protobuf::Value*>(
      ::google::protobuf::Value::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_value_with_list_with_empty_struct_ = const_cast< ::google::protobuf::Value*>(
      ::google::protobuf::Value::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_listvalue_ = const_cast< ::google::protobuf::ListValue*>(
      ::google::protobuf::ListValue::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_empty_listvalue_ = const_cast< ::google::protobuf::ListValue*>(
      ::google::protobuf::ListValue::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_listvalue_with_empty_struct_ = const_cast< ::google::protobuf::ListValue*>(
      ::google::protobuf::ListValue::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->repeated_value_ = const_cast< ::google::protobuf::testing::RepeatedValueWrapper*>(
      ::google::protobuf::testing::RepeatedValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->repeated_value_nested_list_ = const_cast< ::google::protobuf::testing::RepeatedValueWrapper*>(
      ::google::protobuf::testing::RepeatedValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->repeated_value_nested_list2_ = const_cast< ::google::protobuf::testing::RepeatedValueWrapper*>(
      ::google::protobuf::testing::RepeatedValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->repeated_value_nested_list3_ = const_cast< ::google::protobuf::testing::RepeatedValueWrapper*>(
      ::google::protobuf::testing::RepeatedValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->repeated_listvalue_ = const_cast< ::google::protobuf::testing::RepeatedListValueWrapper*>(
      ::google::protobuf::testing::RepeatedListValueWrapper::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->map_of_struct_ = const_cast< ::google::protobuf::testing::MapOfStruct*>(
      ::google::protobuf::testing::MapOfStruct::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->map_of_struct_value_ = const_cast< ::google::protobuf::testing::MapOfStruct*>(
      ::google::protobuf::testing::MapOfStruct::internal_default_instance());
  ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->map_of_listvalue_ = const_cast< ::google::protobuf::testing::MapOfStruct*>(
      ::google::protobuf::testing::MapOfStruct::internal_default_instance());
}
void StructTestCases::clear_top_level_struct() {
  if (GetArenaNoVirtual() == NULL && top_level_struct_ != NULL) {
    delete top_level_struct_;
  }
  top_level_struct_ = NULL;
}
void StructTestCases::clear_top_level_struct_with_empty_list() {
  if (GetArenaNoVirtual() == NULL && top_level_struct_with_empty_list_ != NULL) {
    delete top_level_struct_with_empty_list_;
  }
  top_level_struct_with_empty_list_ = NULL;
}
void StructTestCases::clear_top_level_struct_with_list_with_empty_struct() {
  if (GetArenaNoVirtual() == NULL && top_level_struct_with_list_with_empty_struct_ != NULL) {
    delete top_level_struct_with_list_with_empty_struct_;
  }
  top_level_struct_with_list_with_empty_struct_ = NULL;
}
void StructTestCases::clear_top_level_value_simple() {
  if (GetArenaNoVirtual() == NULL && top_level_value_simple_ != NULL) {
    delete top_level_value_simple_;
  }
  top_level_value_simple_ = NULL;
}
void StructTestCases::clear_top_level_value_with_struct() {
  if (GetArenaNoVirtual() == NULL && top_level_value_with_struct_ != NULL) {
    delete top_level_value_with_struct_;
  }
  top_level_value_with_struct_ = NULL;
}
void StructTestCases::clear_top_level_value_with_list() {
  if (GetArenaNoVirtual() == NULL && top_level_value_with_list_ != NULL) {
    delete top_level_value_with_list_;
  }
  top_level_value_with_list_ = NULL;
}
void StructTestCases::clear_top_level_value_with_empty_list() {
  if (GetArenaNoVirtual() == NULL && top_level_value_with_empty_list_ != NULL) {
    delete top_level_value_with_empty_list_;
  }
  top_level_value_with_empty_list_ = NULL;
}
void StructTestCases::clear_top_level_value_with_list_with_empty_struct() {
  if (GetArenaNoVirtual() == NULL && top_level_value_with_list_with_empty_struct_ != NULL) {
    delete top_level_value_with_list_with_empty_struct_;
  }
  top_level_value_with_list_with_empty_struct_ = NULL;
}
void StructTestCases::clear_top_level_listvalue() {
  if (GetArenaNoVirtual() == NULL && top_level_listvalue_ != NULL) {
    delete top_level_listvalue_;
  }
  top_level_listvalue_ = NULL;
}
void StructTestCases::clear_top_level_empty_listvalue() {
  if (GetArenaNoVirtual() == NULL && top_level_empty_listvalue_ != NULL) {
    delete top_level_empty_listvalue_;
  }
  top_level_empty_listvalue_ = NULL;
}
void StructTestCases::clear_top_level_listvalue_with_empty_struct() {
  if (GetArenaNoVirtual() == NULL && top_level_listvalue_with_empty_struct_ != NULL) {
    delete top_level_listvalue_with_empty_struct_;
  }
  top_level_listvalue_with_empty_struct_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int StructTestCases::kEmptyValueFieldNumber;
const int StructTestCases::kEmptyValue2FieldNumber;
const int StructTestCases::kNullValueFieldNumber;
const int StructTestCases::kSimpleStructFieldNumber;
const int StructTestCases::kLongerStructFieldNumber;
const int StructTestCases::kStructWithNestedStructFieldNumber;
const int StructTestCases::kStructWithNestedListFieldNumber;
const int StructTestCases::kStructWithListOfNullsFieldNumber;
const int StructTestCases::kStructWithListOfListsFieldNumber;
const int StructTestCases::kStructWithListOfStructsFieldNumber;
const int StructTestCases::kStructWithEmptyListFieldNumber;
const int StructTestCases::kStructWithListWithEmptyStructFieldNumber;
const int StructTestCases::kTopLevelStructFieldNumber;
const int StructTestCases::kTopLevelStructWithEmptyListFieldNumber;
const int StructTestCases::kTopLevelStructWithListWithEmptyStructFieldNumber;
const int StructTestCases::kValueWrapperSimpleFieldNumber;
const int StructTestCases::kValueWrapperWithStructFieldNumber;
const int StructTestCases::kValueWrapperWithListFieldNumber;
const int StructTestCases::kValueWrapperWithEmptyListFieldNumber;
const int StructTestCases::kValueWrapperWithListWithEmptyStructFieldNumber;
const int StructTestCases::kListValueWrapperFieldNumber;
const int StructTestCases::kListValueWrapperWithEmptyListFieldNumber;
const int StructTestCases::kListValueWrapperWithListWithEmptyStructFieldNumber;
const int StructTestCases::kTopLevelValueSimpleFieldNumber;
const int StructTestCases::kTopLevelValueWithStructFieldNumber;
const int StructTestCases::kTopLevelValueWithListFieldNumber;
const int StructTestCases::kTopLevelValueWithEmptyListFieldNumber;
const int StructTestCases::kTopLevelValueWithListWithEmptyStructFieldNumber;
const int StructTestCases::kTopLevelListvalueFieldNumber;
const int StructTestCases::kTopLevelEmptyListvalueFieldNumber;
const int StructTestCases::kTopLevelListvalueWithEmptyStructFieldNumber;
const int StructTestCases::kRepeatedValueFieldNumber;
const int StructTestCases::kRepeatedValueNestedListFieldNumber;
const int StructTestCases::kRepeatedValueNestedList2FieldNumber;
const int StructTestCases::kRepeatedValueNestedList3FieldNumber;
const int StructTestCases::kRepeatedListvalueFieldNumber;
const int StructTestCases::kMapOfStructFieldNumber;
const int StructTestCases::kMapOfStructValueFieldNumber;
const int StructTestCases::kMapOfListvalueFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

StructTestCases::StructTestCases()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructTestCases.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.StructTestCases)
}
StructTestCases::StructTestCases(const StructTestCases& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_empty_value()) {
    empty_value_ = new ::google::protobuf::testing::StructWrapper(*from.empty_value_);
  } else {
    empty_value_ = NULL;
  }
  if (from.has_empty_value2()) {
    empty_value2_ = new ::google::protobuf::testing::StructWrapper(*from.empty_value2_);
  } else {
    empty_value2_ = NULL;
  }
  if (from.has_null_value()) {
    null_value_ = new ::google::protobuf::testing::StructWrapper(*from.null_value_);
  } else {
    null_value_ = NULL;
  }
  if (from.has_simple_struct()) {
    simple_struct_ = new ::google::protobuf::testing::StructWrapper(*from.simple_struct_);
  } else {
    simple_struct_ = NULL;
  }
  if (from.has_longer_struct()) {
    longer_struct_ = new ::google::protobuf::testing::StructWrapper(*from.longer_struct_);
  } else {
    longer_struct_ = NULL;
  }
  if (from.has_struct_with_nested_struct()) {
    struct_with_nested_struct_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_nested_struct_);
  } else {
    struct_with_nested_struct_ = NULL;
  }
  if (from.has_struct_with_nested_list()) {
    struct_with_nested_list_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_nested_list_);
  } else {
    struct_with_nested_list_ = NULL;
  }
  if (from.has_struct_with_list_of_nulls()) {
    struct_with_list_of_nulls_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_list_of_nulls_);
  } else {
    struct_with_list_of_nulls_ = NULL;
  }
  if (from.has_struct_with_list_of_lists()) {
    struct_with_list_of_lists_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_list_of_lists_);
  } else {
    struct_with_list_of_lists_ = NULL;
  }
  if (from.has_struct_with_list_of_structs()) {
    struct_with_list_of_structs_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_list_of_structs_);
  } else {
    struct_with_list_of_structs_ = NULL;
  }
  if (from.has_struct_with_empty_list()) {
    struct_with_empty_list_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_empty_list_);
  } else {
    struct_with_empty_list_ = NULL;
  }
  if (from.has_struct_with_list_with_empty_struct()) {
    struct_with_list_with_empty_struct_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_list_with_empty_struct_);
  } else {
    struct_with_list_with_empty_struct_ = NULL;
  }
  if (from.has_top_level_struct()) {
    top_level_struct_ = new ::google::protobuf::Struct(*from.top_level_struct_);
  } else {
    top_level_struct_ = NULL;
  }
  if (from.has_top_level_struct_with_empty_list()) {
    top_level_struct_with_empty_list_ = new ::google::protobuf::Struct(*from.top_level_struct_with_empty_list_);
  } else {
    top_level_struct_with_empty_list_ = NULL;
  }
  if (from.has_top_level_struct_with_list_with_empty_struct()) {
    top_level_struct_with_list_with_empty_struct_ = new ::google::protobuf::Struct(*from.top_level_struct_with_list_with_empty_struct_);
  } else {
    top_level_struct_with_list_with_empty_struct_ = NULL;
  }
  if (from.has_value_wrapper_simple()) {
    value_wrapper_simple_ = new ::google::protobuf::testing::ValueWrapper(*from.value_wrapper_simple_);
  } else {
    value_wrapper_simple_ = NULL;
  }
  if (from.has_value_wrapper_with_struct()) {
    value_wrapper_with_struct_ = new ::google::protobuf::testing::ValueWrapper(*from.value_wrapper_with_struct_);
  } else {
    value_wrapper_with_struct_ = NULL;
  }
  if (from.has_value_wrapper_with_list()) {
    value_wrapper_with_list_ = new ::google::protobuf::testing::ValueWrapper(*from.value_wrapper_with_list_);
  } else {
    value_wrapper_with_list_ = NULL;
  }
  if (from.has_value_wrapper_with_empty_list()) {
    value_wrapper_with_empty_list_ = new ::google::protobuf::testing::ValueWrapper(*from.value_wrapper_with_empty_list_);
  } else {
    value_wrapper_with_empty_list_ = NULL;
  }
  if (from.has_value_wrapper_with_list_with_empty_struct()) {
    value_wrapper_with_list_with_empty_struct_ = new ::google::protobuf::testing::ValueWrapper(*from.value_wrapper_with_list_with_empty_struct_);
  } else {
    value_wrapper_with_list_with_empty_struct_ = NULL;
  }
  if (from.has_list_value_wrapper()) {
    list_value_wrapper_ = new ::google::protobuf::testing::ListValueWrapper(*from.list_value_wrapper_);
  } else {
    list_value_wrapper_ = NULL;
  }
  if (from.has_list_value_wrapper_with_empty_list()) {
    list_value_wrapper_with_empty_list_ = new ::google::protobuf::testing::ListValueWrapper(*from.list_value_wrapper_with_empty_list_);
  } else {
    list_value_wrapper_with_empty_list_ = NULL;
  }
  if (from.has_list_value_wrapper_with_list_with_empty_struct()) {
    list_value_wrapper_with_list_with_empty_struct_ = new ::google::protobuf::testing::ListValueWrapper(*from.list_value_wrapper_with_list_with_empty_struct_);
  } else {
    list_value_wrapper_with_list_with_empty_struct_ = NULL;
  }
  if (from.has_top_level_value_simple()) {
    top_level_value_simple_ = new ::google::protobuf::Value(*from.top_level_value_simple_);
  } else {
    top_level_value_simple_ = NULL;
  }
  if (from.has_top_level_value_with_struct()) {
    top_level_value_with_struct_ = new ::google::protobuf::Value(*from.top_level_value_with_struct_);
  } else {
    top_level_value_with_struct_ = NULL;
  }
  if (from.has_top_level_value_with_list()) {
    top_level_value_with_list_ = new ::google::protobuf::Value(*from.top_level_value_with_list_);
  } else {
    top_level_value_with_list_ = NULL;
  }
  if (from.has_top_level_value_with_empty_list()) {
    top_level_value_with_empty_list_ = new ::google::protobuf::Value(*from.top_level_value_with_empty_list_);
  } else {
    top_level_value_with_empty_list_ = NULL;
  }
  if (from.has_top_level_value_with_list_with_empty_struct()) {
    top_level_value_with_list_with_empty_struct_ = new ::google::protobuf::Value(*from.top_level_value_with_list_with_empty_struct_);
  } else {
    top_level_value_with_list_with_empty_struct_ = NULL;
  }
  if (from.has_top_level_listvalue()) {
    top_level_listvalue_ = new ::google::protobuf::ListValue(*from.top_level_listvalue_);
  } else {
    top_level_listvalue_ = NULL;
  }
  if (from.has_top_level_empty_listvalue()) {
    top_level_empty_listvalue_ = new ::google::protobuf::ListValue(*from.top_level_empty_listvalue_);
  } else {
    top_level_empty_listvalue_ = NULL;
  }
  if (from.has_top_level_listvalue_with_empty_struct()) {
    top_level_listvalue_with_empty_struct_ = new ::google::protobuf::ListValue(*from.top_level_listvalue_with_empty_struct_);
  } else {
    top_level_listvalue_with_empty_struct_ = NULL;
  }
  if (from.has_repeated_value()) {
    repeated_value_ = new ::google::protobuf::testing::RepeatedValueWrapper(*from.repeated_value_);
  } else {
    repeated_value_ = NULL;
  }
  if (from.has_repeated_value_nested_list()) {
    repeated_value_nested_list_ = new ::google::protobuf::testing::RepeatedValueWrapper(*from.repeated_value_nested_list_);
  } else {
    repeated_value_nested_list_ = NULL;
  }
  if (from.has_repeated_value_nested_list2()) {
    repeated_value_nested_list2_ = new ::google::protobuf::testing::RepeatedValueWrapper(*from.repeated_value_nested_list2_);
  } else {
    repeated_value_nested_list2_ = NULL;
  }
  if (from.has_repeated_value_nested_list3()) {
    repeated_value_nested_list3_ = new ::google::protobuf::testing::RepeatedValueWrapper(*from.repeated_value_nested_list3_);
  } else {
    repeated_value_nested_list3_ = NULL;
  }
  if (from.has_repeated_listvalue()) {
    repeated_listvalue_ = new ::google::protobuf::testing::RepeatedListValueWrapper(*from.repeated_listvalue_);
  } else {
    repeated_listvalue_ = NULL;
  }
  if (from.has_map_of_struct()) {
    map_of_struct_ = new ::google::protobuf::testing::MapOfStruct(*from.map_of_struct_);
  } else {
    map_of_struct_ = NULL;
  }
  if (from.has_map_of_struct_value()) {
    map_of_struct_value_ = new ::google::protobuf::testing::MapOfStruct(*from.map_of_struct_value_);
  } else {
    map_of_struct_value_ = NULL;
  }
  if (from.has_map_of_listvalue()) {
    map_of_listvalue_ = new ::google::protobuf::testing::MapOfStruct(*from.map_of_listvalue_);
  } else {
    map_of_listvalue_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.StructTestCases)
}

void StructTestCases::SharedCtor() {
  ::memset(&empty_value_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&map_of_listvalue_) -
      reinterpret_cast<char*>(&empty_value_)) + sizeof(map_of_listvalue_));
}

StructTestCases::~StructTestCases() {
  // @@protoc_insertion_point(destructor:google.protobuf.testing.StructTestCases)
  SharedDtor();
}

void StructTestCases::SharedDtor() {
  if (this != internal_default_instance()) delete empty_value_;
  if (this != internal_default_instance()) delete empty_value2_;
  if (this != internal_default_instance()) delete null_value_;
  if (this != internal_default_instance()) delete simple_struct_;
  if (this != internal_default_instance()) delete longer_struct_;
  if (this != internal_default_instance()) delete struct_with_nested_struct_;
  if (this != internal_default_instance()) delete struct_with_nested_list_;
  if (this != internal_default_instance()) delete struct_with_list_of_nulls_;
  if (this != internal_default_instance()) delete struct_with_list_of_lists_;
  if (this != internal_default_instance()) delete struct_with_list_of_structs_;
  if (this != internal_default_instance()) delete struct_with_empty_list_;
  if (this != internal_default_instance()) delete struct_with_list_with_empty_struct_;
  if (this != internal_default_instance()) delete top_level_struct_;
  if (this != internal_default_instance()) delete top_level_struct_with_empty_list_;
  if (this != internal_default_instance()) delete top_level_struct_with_list_with_empty_struct_;
  if (this != internal_default_instance()) delete value_wrapper_simple_;
  if (this != internal_default_instance()) delete value_wrapper_with_struct_;
  if (this != internal_default_instance()) delete value_wrapper_with_list_;
  if (this != internal_default_instance()) delete value_wrapper_with_empty_list_;
  if (this != internal_default_instance()) delete value_wrapper_with_list_with_empty_struct_;
  if (this != internal_default_instance()) delete list_value_wrapper_;
  if (this != internal_default_instance()) delete list_value_wrapper_with_empty_list_;
  if (this != internal_default_instance()) delete list_value_wrapper_with_list_with_empty_struct_;
  if (this != internal_default_instance()) delete top_level_value_simple_;
  if (this != internal_default_instance()) delete top_level_value_with_struct_;
  if (this != internal_default_instance()) delete top_level_value_with_list_;
  if (this != internal_default_instance()) delete top_level_value_with_empty_list_;
  if (this != internal_default_instance()) delete top_level_value_with_list_with_empty_struct_;
  if (this != internal_default_instance()) delete top_level_listvalue_;
  if (this != internal_default_instance()) delete top_level_empty_listvalue_;
  if (this != internal_default_instance()) delete top_level_listvalue_with_empty_struct_;
  if (this != internal_default_instance()) delete repeated_value_;
  if (this != internal_default_instance()) delete repeated_value_nested_list_;
  if (this != internal_default_instance()) delete repeated_value_nested_list2_;
  if (this != internal_default_instance()) delete repeated_value_nested_list3_;
  if (this != internal_default_instance()) delete repeated_listvalue_;
  if (this != internal_default_instance()) delete map_of_struct_;
  if (this != internal_default_instance()) delete map_of_struct_value_;
  if (this != internal_default_instance()) delete map_of_listvalue_;
}

void StructTestCases::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* StructTestCases::descriptor() {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const StructTestCases& StructTestCases::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructTestCases.base);
  return *internal_default_instance();
}


void StructTestCases::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.testing.StructTestCases)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaNoVirtual() == NULL && empty_value_ != NULL) {
    delete empty_value_;
  }
  empty_value_ = NULL;
  if (GetArenaNoVirtual() == NULL && empty_value2_ != NULL) {
    delete empty_value2_;
  }
  empty_value2_ = NULL;
  if (GetArenaNoVirtual() == NULL && null_value_ != NULL) {
    delete null_value_;
  }
  null_value_ = NULL;
  if (GetArenaNoVirtual() == NULL && simple_struct_ != NULL) {
    delete simple_struct_;
  }
  simple_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && longer_struct_ != NULL) {
    delete longer_struct_;
  }
  longer_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && struct_with_nested_struct_ != NULL) {
    delete struct_with_nested_struct_;
  }
  struct_with_nested_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && struct_with_nested_list_ != NULL) {
    delete struct_with_nested_list_;
  }
  struct_with_nested_list_ = NULL;
  if (GetArenaNoVirtual() == NULL && struct_with_list_of_nulls_ != NULL) {
    delete struct_with_list_of_nulls_;
  }
  struct_with_list_of_nulls_ = NULL;
  if (GetArenaNoVirtual() == NULL && struct_with_list_of_lists_ != NULL) {
    delete struct_with_list_of_lists_;
  }
  struct_with_list_of_lists_ = NULL;
  if (GetArenaNoVirtual() == NULL && struct_with_list_of_structs_ != NULL) {
    delete struct_with_list_of_structs_;
  }
  struct_with_list_of_structs_ = NULL;
  if (GetArenaNoVirtual() == NULL && struct_with_empty_list_ != NULL) {
    delete struct_with_empty_list_;
  }
  struct_with_empty_list_ = NULL;
  if (GetArenaNoVirtual() == NULL && struct_with_list_with_empty_struct_ != NULL) {
    delete struct_with_list_with_empty_struct_;
  }
  struct_with_list_with_empty_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_struct_ != NULL) {
    delete top_level_struct_;
  }
  top_level_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_struct_with_empty_list_ != NULL) {
    delete top_level_struct_with_empty_list_;
  }
  top_level_struct_with_empty_list_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_struct_with_list_with_empty_struct_ != NULL) {
    delete top_level_struct_with_list_with_empty_struct_;
  }
  top_level_struct_with_list_with_empty_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && value_wrapper_simple_ != NULL) {
    delete value_wrapper_simple_;
  }
  value_wrapper_simple_ = NULL;
  if (GetArenaNoVirtual() == NULL && value_wrapper_with_struct_ != NULL) {
    delete value_wrapper_with_struct_;
  }
  value_wrapper_with_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && value_wrapper_with_list_ != NULL) {
    delete value_wrapper_with_list_;
  }
  value_wrapper_with_list_ = NULL;
  if (GetArenaNoVirtual() == NULL && value_wrapper_with_empty_list_ != NULL) {
    delete value_wrapper_with_empty_list_;
  }
  value_wrapper_with_empty_list_ = NULL;
  if (GetArenaNoVirtual() == NULL && value_wrapper_with_list_with_empty_struct_ != NULL) {
    delete value_wrapper_with_list_with_empty_struct_;
  }
  value_wrapper_with_list_with_empty_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && list_value_wrapper_ != NULL) {
    delete list_value_wrapper_;
  }
  list_value_wrapper_ = NULL;
  if (GetArenaNoVirtual() == NULL && list_value_wrapper_with_empty_list_ != NULL) {
    delete list_value_wrapper_with_empty_list_;
  }
  list_value_wrapper_with_empty_list_ = NULL;
  if (GetArenaNoVirtual() == NULL && list_value_wrapper_with_list_with_empty_struct_ != NULL) {
    delete list_value_wrapper_with_list_with_empty_struct_;
  }
  list_value_wrapper_with_list_with_empty_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_value_simple_ != NULL) {
    delete top_level_value_simple_;
  }
  top_level_value_simple_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_value_with_struct_ != NULL) {
    delete top_level_value_with_struct_;
  }
  top_level_value_with_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_value_with_list_ != NULL) {
    delete top_level_value_with_list_;
  }
  top_level_value_with_list_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_value_with_empty_list_ != NULL) {
    delete top_level_value_with_empty_list_;
  }
  top_level_value_with_empty_list_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_value_with_list_with_empty_struct_ != NULL) {
    delete top_level_value_with_list_with_empty_struct_;
  }
  top_level_value_with_list_with_empty_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_listvalue_ != NULL) {
    delete top_level_listvalue_;
  }
  top_level_listvalue_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_empty_listvalue_ != NULL) {
    delete top_level_empty_listvalue_;
  }
  top_level_empty_listvalue_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_listvalue_with_empty_struct_ != NULL) {
    delete top_level_listvalue_with_empty_struct_;
  }
  top_level_listvalue_with_empty_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && repeated_value_ != NULL) {
    delete repeated_value_;
  }
  repeated_value_ = NULL;
  if (GetArenaNoVirtual() == NULL && repeated_value_nested_list_ != NULL) {
    delete repeated_value_nested_list_;
  }
  repeated_value_nested_list_ = NULL;
  if (GetArenaNoVirtual() == NULL && repeated_value_nested_list2_ != NULL) {
    delete repeated_value_nested_list2_;
  }
  repeated_value_nested_list2_ = NULL;
  if (GetArenaNoVirtual() == NULL && repeated_value_nested_list3_ != NULL) {
    delete repeated_value_nested_list3_;
  }
  repeated_value_nested_list3_ = NULL;
  if (GetArenaNoVirtual() == NULL && repeated_listvalue_ != NULL) {
    delete repeated_listvalue_;
  }
  repeated_listvalue_ = NULL;
  if (GetArenaNoVirtual() == NULL && map_of_struct_ != NULL) {
    delete map_of_struct_;
  }
  map_of_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && map_of_struct_value_ != NULL) {
    delete map_of_struct_value_;
  }
  map_of_struct_value_ = NULL;
  if (GetArenaNoVirtual() == NULL && map_of_listvalue_ != NULL) {
    delete map_of_listvalue_;
  }
  map_of_listvalue_ = NULL;
  _internal_metadata_.Clear();
}

bool StructTestCases::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.protobuf.testing.StructTestCases)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.protobuf.testing.StructWrapper empty_value = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_empty_value()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper empty_value2 = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_empty_value2()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper null_value = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_null_value()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper simple_struct = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_simple_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper longer_struct = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_longer_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper struct_with_nested_struct = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_struct_with_nested_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper struct_with_nested_list = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_struct_with_nested_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper struct_with_list_of_nulls = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_struct_with_list_of_nulls()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper struct_with_list_of_lists = 9;
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_struct_with_list_of_lists()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper struct_with_list_of_structs = 10;
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_struct_with_list_of_structs()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper struct_with_empty_list = 11;
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_struct_with_empty_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.StructWrapper struct_with_list_with_empty_struct = 12;
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_struct_with_list_with_empty_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Struct top_level_struct = 13;
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Struct top_level_struct_with_empty_list = 14;
      case 14: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_struct_with_empty_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Struct top_level_struct_with_list_with_empty_struct = 15;
      case 15: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_struct_with_list_with_empty_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.ValueWrapper value_wrapper_simple = 16;
      case 16: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(130u /* 130 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_value_wrapper_simple()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.ValueWrapper value_wrapper_with_struct = 17;
      case 17: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(138u /* 138 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_value_wrapper_with_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.ValueWrapper value_wrapper_with_list = 18;
      case 18: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_value_wrapper_with_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.ValueWrapper value_wrapper_with_empty_list = 19;
      case 19: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_value_wrapper_with_empty_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.ValueWrapper value_wrapper_with_list_with_empty_struct = 20;
      case 20: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_value_wrapper_with_list_with_empty_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.ListValueWrapper list_value_wrapper = 21;
      case 21: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_list_value_wrapper()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_empty_list = 22;
      case 22: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(178u /* 178 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_list_value_wrapper_with_empty_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_list_with_empty_struct = 23;
      case 23: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(186u /* 186 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_list_value_wrapper_with_list_with_empty_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Value top_level_value_simple = 24;
      case 24: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(194u /* 194 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_value_simple()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Value top_level_value_with_struct = 25;
      case 25: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_value_with_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Value top_level_value_with_list = 26;
      case 26: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(210u /* 210 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_value_with_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Value top_level_value_with_empty_list = 27;
      case 27: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(218u /* 218 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_value_with_empty_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Value top_level_value_with_list_with_empty_struct = 28;
      case 28: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(226u /* 226 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_value_with_list_with_empty_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.ListValue top_level_listvalue = 29;
      case 29: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(234u /* 234 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_listvalue()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.ListValue top_level_empty_listvalue = 30;
      case 30: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(242u /* 242 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_empty_listvalue()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.ListValue top_level_listvalue_with_empty_struct = 31;
      case 31: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(250u /* 250 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_listvalue_with_empty_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.RepeatedValueWrapper repeated_value = 32;
      case 32: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(2u /* 258 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_repeated_value()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list = 33;
      case 33: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 266 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_repeated_value_nested_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list2 = 34;
      case 34: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 274 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_repeated_value_nested_list2()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list3 = 35;
      case 35: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 282 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_repeated_value_nested_list3()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.RepeatedListValueWrapper repeated_listvalue = 36;
      case 36: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 290 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_repeated_listvalue()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.MapOfStruct map_of_struct = 37;
      case 37: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 298 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_map_of_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.MapOfStruct map_of_struct_value = 38;
      case 38: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 306 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_map_of_struct_value()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.MapOfStruct map_of_listvalue = 39;
      case 39: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 314 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_map_of_listvalue()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.protobuf.testing.StructTestCases)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.StructTestCases)
  return false;
#undef DO_
}

void StructTestCases::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.protobuf.testing.StructTestCases)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.testing.StructWrapper empty_value = 1;
  if (this->has_empty_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_empty_value(), output);
  }

  // .google.protobuf.testing.StructWrapper empty_value2 = 2;
  if (this->has_empty_value2()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->_internal_empty_value2(), output);
  }

  // .google.protobuf.testing.StructWrapper null_value = 3;
  if (this->has_null_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->_internal_null_value(), output);
  }

  // .google.protobuf.testing.StructWrapper simple_struct = 4;
  if (this->has_simple_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, this->_internal_simple_struct(), output);
  }

  // .google.protobuf.testing.StructWrapper longer_struct = 5;
  if (this->has_longer_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, this->_internal_longer_struct(), output);
  }

  // .google.protobuf.testing.StructWrapper struct_with_nested_struct = 6;
  if (this->has_struct_with_nested_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, this->_internal_struct_with_nested_struct(), output);
  }

  // .google.protobuf.testing.StructWrapper struct_with_nested_list = 7;
  if (this->has_struct_with_nested_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, this->_internal_struct_with_nested_list(), output);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_of_nulls = 8;
  if (this->has_struct_with_list_of_nulls()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      8, this->_internal_struct_with_list_of_nulls(), output);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_of_lists = 9;
  if (this->has_struct_with_list_of_lists()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      9, this->_internal_struct_with_list_of_lists(), output);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_of_structs = 10;
  if (this->has_struct_with_list_of_structs()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      10, this->_internal_struct_with_list_of_structs(), output);
  }

  // .google.protobuf.testing.StructWrapper struct_with_empty_list = 11;
  if (this->has_struct_with_empty_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      11, this->_internal_struct_with_empty_list(), output);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_with_empty_struct = 12;
  if (this->has_struct_with_list_with_empty_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      12, this->_internal_struct_with_list_with_empty_struct(), output);
  }

  // .google.protobuf.Struct top_level_struct = 13;
  if (this->has_top_level_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      13, this->_internal_top_level_struct(), output);
  }

  // .google.protobuf.Struct top_level_struct_with_empty_list = 14;
  if (this->has_top_level_struct_with_empty_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      14, this->_internal_top_level_struct_with_empty_list(), output);
  }

  // .google.protobuf.Struct top_level_struct_with_list_with_empty_struct = 15;
  if (this->has_top_level_struct_with_list_with_empty_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      15, this->_internal_top_level_struct_with_list_with_empty_struct(), output);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_simple = 16;
  if (this->has_value_wrapper_simple()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      16, this->_internal_value_wrapper_simple(), output);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_struct = 17;
  if (this->has_value_wrapper_with_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      17, this->_internal_value_wrapper_with_struct(), output);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_list = 18;
  if (this->has_value_wrapper_with_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      18, this->_internal_value_wrapper_with_list(), output);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_empty_list = 19;
  if (this->has_value_wrapper_with_empty_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      19, this->_internal_value_wrapper_with_empty_list(), output);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_list_with_empty_struct = 20;
  if (this->has_value_wrapper_with_list_with_empty_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      20, this->_internal_value_wrapper_with_list_with_empty_struct(), output);
  }

  // .google.protobuf.testing.ListValueWrapper list_value_wrapper = 21;
  if (this->has_list_value_wrapper()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      21, this->_internal_list_value_wrapper(), output);
  }

  // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_empty_list = 22;
  if (this->has_list_value_wrapper_with_empty_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      22, this->_internal_list_value_wrapper_with_empty_list(), output);
  }

  // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_list_with_empty_struct = 23;
  if (this->has_list_value_wrapper_with_list_with_empty_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      23, this->_internal_list_value_wrapper_with_list_with_empty_struct(), output);
  }

  // .google.protobuf.Value top_level_value_simple = 24;
  if (this->has_top_level_value_simple()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      24, this->_internal_top_level_value_simple(), output);
  }

  // .google.protobuf.Value top_level_value_with_struct = 25;
  if (this->has_top_level_value_with_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      25, this->_internal_top_level_value_with_struct(), output);
  }

  // .google.protobuf.Value top_level_value_with_list = 26;
  if (this->has_top_level_value_with_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      26, this->_internal_top_level_value_with_list(), output);
  }

  // .google.protobuf.Value top_level_value_with_empty_list = 27;
  if (this->has_top_level_value_with_empty_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      27, this->_internal_top_level_value_with_empty_list(), output);
  }

  // .google.protobuf.Value top_level_value_with_list_with_empty_struct = 28;
  if (this->has_top_level_value_with_list_with_empty_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      28, this->_internal_top_level_value_with_list_with_empty_struct(), output);
  }

  // .google.protobuf.ListValue top_level_listvalue = 29;
  if (this->has_top_level_listvalue()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      29, this->_internal_top_level_listvalue(), output);
  }

  // .google.protobuf.ListValue top_level_empty_listvalue = 30;
  if (this->has_top_level_empty_listvalue()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      30, this->_internal_top_level_empty_listvalue(), output);
  }

  // .google.protobuf.ListValue top_level_listvalue_with_empty_struct = 31;
  if (this->has_top_level_listvalue_with_empty_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      31, this->_internal_top_level_listvalue_with_empty_struct(), output);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value = 32;
  if (this->has_repeated_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      32, this->_internal_repeated_value(), output);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list = 33;
  if (this->has_repeated_value_nested_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      33, this->_internal_repeated_value_nested_list(), output);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list2 = 34;
  if (this->has_repeated_value_nested_list2()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      34, this->_internal_repeated_value_nested_list2(), output);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list3 = 35;
  if (this->has_repeated_value_nested_list3()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      35, this->_internal_repeated_value_nested_list3(), output);
  }

  // .google.protobuf.testing.RepeatedListValueWrapper repeated_listvalue = 36;
  if (this->has_repeated_listvalue()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      36, this->_internal_repeated_listvalue(), output);
  }

  // .google.protobuf.testing.MapOfStruct map_of_struct = 37;
  if (this->has_map_of_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      37, this->_internal_map_of_struct(), output);
  }

  // .google.protobuf.testing.MapOfStruct map_of_struct_value = 38;
  if (this->has_map_of_struct_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      38, this->_internal_map_of_struct_value(), output);
  }

  // .google.protobuf.testing.MapOfStruct map_of_listvalue = 39;
  if (this->has_map_of_listvalue()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      39, this->_internal_map_of_listvalue(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.protobuf.testing.StructTestCases)
}

::google::protobuf::uint8* StructTestCases::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.StructTestCases)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.testing.StructWrapper empty_value = 1;
  if (this->has_empty_value()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_empty_value(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper empty_value2 = 2;
  if (this->has_empty_value2()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->_internal_empty_value2(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper null_value = 3;
  if (this->has_null_value()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->_internal_null_value(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper simple_struct = 4;
  if (this->has_simple_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, this->_internal_simple_struct(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper longer_struct = 5;
  if (this->has_longer_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, this->_internal_longer_struct(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper struct_with_nested_struct = 6;
  if (this->has_struct_with_nested_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, this->_internal_struct_with_nested_struct(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper struct_with_nested_list = 7;
  if (this->has_struct_with_nested_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        7, this->_internal_struct_with_nested_list(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_of_nulls = 8;
  if (this->has_struct_with_list_of_nulls()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        8, this->_internal_struct_with_list_of_nulls(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_of_lists = 9;
  if (this->has_struct_with_list_of_lists()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        9, this->_internal_struct_with_list_of_lists(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_of_structs = 10;
  if (this->has_struct_with_list_of_structs()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        10, this->_internal_struct_with_list_of_structs(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper struct_with_empty_list = 11;
  if (this->has_struct_with_empty_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        11, this->_internal_struct_with_empty_list(), deterministic, target);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_with_empty_struct = 12;
  if (this->has_struct_with_list_with_empty_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        12, this->_internal_struct_with_list_with_empty_struct(), deterministic, target);
  }

  // .google.protobuf.Struct top_level_struct = 13;
  if (this->has_top_level_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        13, this->_internal_top_level_struct(), deterministic, target);
  }

  // .google.protobuf.Struct top_level_struct_with_empty_list = 14;
  if (this->has_top_level_struct_with_empty_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        14, this->_internal_top_level_struct_with_empty_list(), deterministic, target);
  }

  // .google.protobuf.Struct top_level_struct_with_list_with_empty_struct = 15;
  if (this->has_top_level_struct_with_list_with_empty_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        15, this->_internal_top_level_struct_with_list_with_empty_struct(), deterministic, target);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_simple = 16;
  if (this->has_value_wrapper_simple()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        16, this->_internal_value_wrapper_simple(), deterministic, target);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_struct = 17;
  if (this->has_value_wrapper_with_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        17, this->_internal_value_wrapper_with_struct(), deterministic, target);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_list = 18;
  if (this->has_value_wrapper_with_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        18, this->_internal_value_wrapper_with_list(), deterministic, target);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_empty_list = 19;
  if (this->has_value_wrapper_with_empty_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        19, this->_internal_value_wrapper_with_empty_list(), deterministic, target);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_list_with_empty_struct = 20;
  if (this->has_value_wrapper_with_list_with_empty_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        20, this->_internal_value_wrapper_with_list_with_empty_struct(), deterministic, target);
  }

  // .google.protobuf.testing.ListValueWrapper list_value_wrapper = 21;
  if (this->has_list_value_wrapper()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        21, this->_internal_list_value_wrapper(), deterministic, target);
  }

  // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_empty_list = 22;
  if (this->has_list_value_wrapper_with_empty_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        22, this->_internal_list_value_wrapper_with_empty_list(), deterministic, target);
  }

  // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_list_with_empty_struct = 23;
  if (this->has_list_value_wrapper_with_list_with_empty_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        23, this->_internal_list_value_wrapper_with_list_with_empty_struct(), deterministic, target);
  }

  // .google.protobuf.Value top_level_value_simple = 24;
  if (this->has_top_level_value_simple()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        24, this->_internal_top_level_value_simple(), deterministic, target);
  }

  // .google.protobuf.Value top_level_value_with_struct = 25;
  if (this->has_top_level_value_with_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        25, this->_internal_top_level_value_with_struct(), deterministic, target);
  }

  // .google.protobuf.Value top_level_value_with_list = 26;
  if (this->has_top_level_value_with_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        26, this->_internal_top_level_value_with_list(), deterministic, target);
  }

  // .google.protobuf.Value top_level_value_with_empty_list = 27;
  if (this->has_top_level_value_with_empty_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        27, this->_internal_top_level_value_with_empty_list(), deterministic, target);
  }

  // .google.protobuf.Value top_level_value_with_list_with_empty_struct = 28;
  if (this->has_top_level_value_with_list_with_empty_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        28, this->_internal_top_level_value_with_list_with_empty_struct(), deterministic, target);
  }

  // .google.protobuf.ListValue top_level_listvalue = 29;
  if (this->has_top_level_listvalue()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        29, this->_internal_top_level_listvalue(), deterministic, target);
  }

  // .google.protobuf.ListValue top_level_empty_listvalue = 30;
  if (this->has_top_level_empty_listvalue()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        30, this->_internal_top_level_empty_listvalue(), deterministic, target);
  }

  // .google.protobuf.ListValue top_level_listvalue_with_empty_struct = 31;
  if (this->has_top_level_listvalue_with_empty_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        31, this->_internal_top_level_listvalue_with_empty_struct(), deterministic, target);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value = 32;
  if (this->has_repeated_value()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        32, this->_internal_repeated_value(), deterministic, target);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list = 33;
  if (this->has_repeated_value_nested_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        33, this->_internal_repeated_value_nested_list(), deterministic, target);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list2 = 34;
  if (this->has_repeated_value_nested_list2()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        34, this->_internal_repeated_value_nested_list2(), deterministic, target);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list3 = 35;
  if (this->has_repeated_value_nested_list3()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        35, this->_internal_repeated_value_nested_list3(), deterministic, target);
  }

  // .google.protobuf.testing.RepeatedListValueWrapper repeated_listvalue = 36;
  if (this->has_repeated_listvalue()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        36, this->_internal_repeated_listvalue(), deterministic, target);
  }

  // .google.protobuf.testing.MapOfStruct map_of_struct = 37;
  if (this->has_map_of_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        37, this->_internal_map_of_struct(), deterministic, target);
  }

  // .google.protobuf.testing.MapOfStruct map_of_struct_value = 38;
  if (this->has_map_of_struct_value()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        38, this->_internal_map_of_struct_value(), deterministic, target);
  }

  // .google.protobuf.testing.MapOfStruct map_of_listvalue = 39;
  if (this->has_map_of_listvalue()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        39, this->_internal_map_of_listvalue(), deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.StructTestCases)
  return target;
}

size_t StructTestCases::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.StructTestCases)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // .google.protobuf.testing.StructWrapper empty_value = 1;
  if (this->has_empty_value()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *empty_value_);
  }

  // .google.protobuf.testing.StructWrapper empty_value2 = 2;
  if (this->has_empty_value2()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *empty_value2_);
  }

  // .google.protobuf.testing.StructWrapper null_value = 3;
  if (this->has_null_value()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *null_value_);
  }

  // .google.protobuf.testing.StructWrapper simple_struct = 4;
  if (this->has_simple_struct()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *simple_struct_);
  }

  // .google.protobuf.testing.StructWrapper longer_struct = 5;
  if (this->has_longer_struct()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *longer_struct_);
  }

  // .google.protobuf.testing.StructWrapper struct_with_nested_struct = 6;
  if (this->has_struct_with_nested_struct()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *struct_with_nested_struct_);
  }

  // .google.protobuf.testing.StructWrapper struct_with_nested_list = 7;
  if (this->has_struct_with_nested_list()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *struct_with_nested_list_);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_of_nulls = 8;
  if (this->has_struct_with_list_of_nulls()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *struct_with_list_of_nulls_);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_of_lists = 9;
  if (this->has_struct_with_list_of_lists()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *struct_with_list_of_lists_);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_of_structs = 10;
  if (this->has_struct_with_list_of_structs()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *struct_with_list_of_structs_);
  }

  // .google.protobuf.testing.StructWrapper struct_with_empty_list = 11;
  if (this->has_struct_with_empty_list()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *struct_with_empty_list_);
  }

  // .google.protobuf.testing.StructWrapper struct_with_list_with_empty_struct = 12;
  if (this->has_struct_with_list_with_empty_struct()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *struct_with_list_with_empty_struct_);
  }

  // .google.protobuf.Struct top_level_struct = 13;
  if (this->has_top_level_struct()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_struct_);
  }

  // .google.protobuf.Struct top_level_struct_with_empty_list = 14;
  if (this->has_top_level_struct_with_empty_list()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_struct_with_empty_list_);
  }

  // .google.protobuf.Struct top_level_struct_with_list_with_empty_struct = 15;
  if (this->has_top_level_struct_with_list_with_empty_struct()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_struct_with_list_with_empty_struct_);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_simple = 16;
  if (this->has_value_wrapper_simple()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *value_wrapper_simple_);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_struct = 17;
  if (this->has_value_wrapper_with_struct()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *value_wrapper_with_struct_);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_list = 18;
  if (this->has_value_wrapper_with_list()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *value_wrapper_with_list_);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_empty_list = 19;
  if (this->has_value_wrapper_with_empty_list()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *value_wrapper_with_empty_list_);
  }

  // .google.protobuf.testing.ValueWrapper value_wrapper_with_list_with_empty_struct = 20;
  if (this->has_value_wrapper_with_list_with_empty_struct()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *value_wrapper_with_list_with_empty_struct_);
  }

  // .google.protobuf.testing.ListValueWrapper list_value_wrapper = 21;
  if (this->has_list_value_wrapper()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *list_value_wrapper_);
  }

  // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_empty_list = 22;
  if (this->has_list_value_wrapper_with_empty_list()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *list_value_wrapper_with_empty_list_);
  }

  // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_list_with_empty_struct = 23;
  if (this->has_list_value_wrapper_with_list_with_empty_struct()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *list_value_wrapper_with_list_with_empty_struct_);
  }

  // .google.protobuf.Value top_level_value_simple = 24;
  if (this->has_top_level_value_simple()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_value_simple_);
  }

  // .google.protobuf.Value top_level_value_with_struct = 25;
  if (this->has_top_level_value_with_struct()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_value_with_struct_);
  }

  // .google.protobuf.Value top_level_value_with_list = 26;
  if (this->has_top_level_value_with_list()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_value_with_list_);
  }

  // .google.protobuf.Value top_level_value_with_empty_list = 27;
  if (this->has_top_level_value_with_empty_list()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_value_with_empty_list_);
  }

  // .google.protobuf.Value top_level_value_with_list_with_empty_struct = 28;
  if (this->has_top_level_value_with_list_with_empty_struct()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_value_with_list_with_empty_struct_);
  }

  // .google.protobuf.ListValue top_level_listvalue = 29;
  if (this->has_top_level_listvalue()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_listvalue_);
  }

  // .google.protobuf.ListValue top_level_empty_listvalue = 30;
  if (this->has_top_level_empty_listvalue()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_empty_listvalue_);
  }

  // .google.protobuf.ListValue top_level_listvalue_with_empty_struct = 31;
  if (this->has_top_level_listvalue_with_empty_struct()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_listvalue_with_empty_struct_);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value = 32;
  if (this->has_repeated_value()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *repeated_value_);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list = 33;
  if (this->has_repeated_value_nested_list()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *repeated_value_nested_list_);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list2 = 34;
  if (this->has_repeated_value_nested_list2()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *repeated_value_nested_list2_);
  }

  // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list3 = 35;
  if (this->has_repeated_value_nested_list3()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *repeated_value_nested_list3_);
  }

  // .google.protobuf.testing.RepeatedListValueWrapper repeated_listvalue = 36;
  if (this->has_repeated_listvalue()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *repeated_listvalue_);
  }

  // .google.protobuf.testing.MapOfStruct map_of_struct = 37;
  if (this->has_map_of_struct()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *map_of_struct_);
  }

  // .google.protobuf.testing.MapOfStruct map_of_struct_value = 38;
  if (this->has_map_of_struct_value()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *map_of_struct_value_);
  }

  // .google.protobuf.testing.MapOfStruct map_of_listvalue = 39;
  if (this->has_map_of_listvalue()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *map_of_listvalue_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void StructTestCases::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.StructTestCases)
  GOOGLE_DCHECK_NE(&from, this);
  const StructTestCases* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const StructTestCases>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.StructTestCases)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.StructTestCases)
    MergeFrom(*source);
  }
}

void StructTestCases::MergeFrom(const StructTestCases& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.StructTestCases)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_empty_value()) {
    mutable_empty_value()->::google::protobuf::testing::StructWrapper::MergeFrom(from.empty_value());
  }
  if (from.has_empty_value2()) {
    mutable_empty_value2()->::google::protobuf::testing::StructWrapper::MergeFrom(from.empty_value2());
  }
  if (from.has_null_value()) {
    mutable_null_value()->::google::protobuf::testing::StructWrapper::MergeFrom(from.null_value());
  }
  if (from.has_simple_struct()) {
    mutable_simple_struct()->::google::protobuf::testing::StructWrapper::MergeFrom(from.simple_struct());
  }
  if (from.has_longer_struct()) {
    mutable_longer_struct()->::google::protobuf::testing::StructWrapper::MergeFrom(from.longer_struct());
  }
  if (from.has_struct_with_nested_struct()) {
    mutable_struct_with_nested_struct()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_nested_struct());
  }
  if (from.has_struct_with_nested_list()) {
    mutable_struct_with_nested_list()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_nested_list());
  }
  if (from.has_struct_with_list_of_nulls()) {
    mutable_struct_with_list_of_nulls()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_list_of_nulls());
  }
  if (from.has_struct_with_list_of_lists()) {
    mutable_struct_with_list_of_lists()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_list_of_lists());
  }
  if (from.has_struct_with_list_of_structs()) {
    mutable_struct_with_list_of_structs()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_list_of_structs());
  }
  if (from.has_struct_with_empty_list()) {
    mutable_struct_with_empty_list()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_empty_list());
  }
  if (from.has_struct_with_list_with_empty_struct()) {
    mutable_struct_with_list_with_empty_struct()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_list_with_empty_struct());
  }
  if (from.has_top_level_struct()) {
    mutable_top_level_struct()->::google::protobuf::Struct::MergeFrom(from.top_level_struct());
  }
  if (from.has_top_level_struct_with_empty_list()) {
    mutable_top_level_struct_with_empty_list()->::google::protobuf::Struct::MergeFrom(from.top_level_struct_with_empty_list());
  }
  if (from.has_top_level_struct_with_list_with_empty_struct()) {
    mutable_top_level_struct_with_list_with_empty_struct()->::google::protobuf::Struct::MergeFrom(from.top_level_struct_with_list_with_empty_struct());
  }
  if (from.has_value_wrapper_simple()) {
    mutable_value_wrapper_simple()->::google::protobuf::testing::ValueWrapper::MergeFrom(from.value_wrapper_simple());
  }
  if (from.has_value_wrapper_with_struct()) {
    mutable_value_wrapper_with_struct()->::google::protobuf::testing::ValueWrapper::MergeFrom(from.value_wrapper_with_struct());
  }
  if (from.has_value_wrapper_with_list()) {
    mutable_value_wrapper_with_list()->::google::protobuf::testing::ValueWrapper::MergeFrom(from.value_wrapper_with_list());
  }
  if (from.has_value_wrapper_with_empty_list()) {
    mutable_value_wrapper_with_empty_list()->::google::protobuf::testing::ValueWrapper::MergeFrom(from.value_wrapper_with_empty_list());
  }
  if (from.has_value_wrapper_with_list_with_empty_struct()) {
    mutable_value_wrapper_with_list_with_empty_struct()->::google::protobuf::testing::ValueWrapper::MergeFrom(from.value_wrapper_with_list_with_empty_struct());
  }
  if (from.has_list_value_wrapper()) {
    mutable_list_value_wrapper()->::google::protobuf::testing::ListValueWrapper::MergeFrom(from.list_value_wrapper());
  }
  if (from.has_list_value_wrapper_with_empty_list()) {
    mutable_list_value_wrapper_with_empty_list()->::google::protobuf::testing::ListValueWrapper::MergeFrom(from.list_value_wrapper_with_empty_list());
  }
  if (from.has_list_value_wrapper_with_list_with_empty_struct()) {
    mutable_list_value_wrapper_with_list_with_empty_struct()->::google::protobuf::testing::ListValueWrapper::MergeFrom(from.list_value_wrapper_with_list_with_empty_struct());
  }
  if (from.has_top_level_value_simple()) {
    mutable_top_level_value_simple()->::google::protobuf::Value::MergeFrom(from.top_level_value_simple());
  }
  if (from.has_top_level_value_with_struct()) {
    mutable_top_level_value_with_struct()->::google::protobuf::Value::MergeFrom(from.top_level_value_with_struct());
  }
  if (from.has_top_level_value_with_list()) {
    mutable_top_level_value_with_list()->::google::protobuf::Value::MergeFrom(from.top_level_value_with_list());
  }
  if (from.has_top_level_value_with_empty_list()) {
    mutable_top_level_value_with_empty_list()->::google::protobuf::Value::MergeFrom(from.top_level_value_with_empty_list());
  }
  if (from.has_top_level_value_with_list_with_empty_struct()) {
    mutable_top_level_value_with_list_with_empty_struct()->::google::protobuf::Value::MergeFrom(from.top_level_value_with_list_with_empty_struct());
  }
  if (from.has_top_level_listvalue()) {
    mutable_top_level_listvalue()->::google::protobuf::ListValue::MergeFrom(from.top_level_listvalue());
  }
  if (from.has_top_level_empty_listvalue()) {
    mutable_top_level_empty_listvalue()->::google::protobuf::ListValue::MergeFrom(from.top_level_empty_listvalue());
  }
  if (from.has_top_level_listvalue_with_empty_struct()) {
    mutable_top_level_listvalue_with_empty_struct()->::google::protobuf::ListValue::MergeFrom(from.top_level_listvalue_with_empty_struct());
  }
  if (from.has_repeated_value()) {
    mutable_repeated_value()->::google::protobuf::testing::RepeatedValueWrapper::MergeFrom(from.repeated_value());
  }
  if (from.has_repeated_value_nested_list()) {
    mutable_repeated_value_nested_list()->::google::protobuf::testing::RepeatedValueWrapper::MergeFrom(from.repeated_value_nested_list());
  }
  if (from.has_repeated_value_nested_list2()) {
    mutable_repeated_value_nested_list2()->::google::protobuf::testing::RepeatedValueWrapper::MergeFrom(from.repeated_value_nested_list2());
  }
  if (from.has_repeated_value_nested_list3()) {
    mutable_repeated_value_nested_list3()->::google::protobuf::testing::RepeatedValueWrapper::MergeFrom(from.repeated_value_nested_list3());
  }
  if (from.has_repeated_listvalue()) {
    mutable_repeated_listvalue()->::google::protobuf::testing::RepeatedListValueWrapper::MergeFrom(from.repeated_listvalue());
  }
  if (from.has_map_of_struct()) {
    mutable_map_of_struct()->::google::protobuf::testing::MapOfStruct::MergeFrom(from.map_of_struct());
  }
  if (from.has_map_of_struct_value()) {
    mutable_map_of_struct_value()->::google::protobuf::testing::MapOfStruct::MergeFrom(from.map_of_struct_value());
  }
  if (from.has_map_of_listvalue()) {
    mutable_map_of_listvalue()->::google::protobuf::testing::MapOfStruct::MergeFrom(from.map_of_listvalue());
  }
}

void StructTestCases::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.StructTestCases)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void StructTestCases::CopyFrom(const StructTestCases& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.StructTestCases)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool StructTestCases::IsInitialized() const {
  return true;
}

void StructTestCases::Swap(StructTestCases* other) {
  if (other == this) return;
  InternalSwap(other);
}
void StructTestCases::InternalSwap(StructTestCases* other) {
  using std::swap;
  swap(empty_value_, other->empty_value_);
  swap(empty_value2_, other->empty_value2_);
  swap(null_value_, other->null_value_);
  swap(simple_struct_, other->simple_struct_);
  swap(longer_struct_, other->longer_struct_);
  swap(struct_with_nested_struct_, other->struct_with_nested_struct_);
  swap(struct_with_nested_list_, other->struct_with_nested_list_);
  swap(struct_with_list_of_nulls_, other->struct_with_list_of_nulls_);
  swap(struct_with_list_of_lists_, other->struct_with_list_of_lists_);
  swap(struct_with_list_of_structs_, other->struct_with_list_of_structs_);
  swap(struct_with_empty_list_, other->struct_with_empty_list_);
  swap(struct_with_list_with_empty_struct_, other->struct_with_list_with_empty_struct_);
  swap(top_level_struct_, other->top_level_struct_);
  swap(top_level_struct_with_empty_list_, other->top_level_struct_with_empty_list_);
  swap(top_level_struct_with_list_with_empty_struct_, other->top_level_struct_with_list_with_empty_struct_);
  swap(value_wrapper_simple_, other->value_wrapper_simple_);
  swap(value_wrapper_with_struct_, other->value_wrapper_with_struct_);
  swap(value_wrapper_with_list_, other->value_wrapper_with_list_);
  swap(value_wrapper_with_empty_list_, other->value_wrapper_with_empty_list_);
  swap(value_wrapper_with_list_with_empty_struct_, other->value_wrapper_with_list_with_empty_struct_);
  swap(list_value_wrapper_, other->list_value_wrapper_);
  swap(list_value_wrapper_with_empty_list_, other->list_value_wrapper_with_empty_list_);
  swap(list_value_wrapper_with_list_with_empty_struct_, other->list_value_wrapper_with_list_with_empty_struct_);
  swap(top_level_value_simple_, other->top_level_value_simple_);
  swap(top_level_value_with_struct_, other->top_level_value_with_struct_);
  swap(top_level_value_with_list_, other->top_level_value_with_list_);
  swap(top_level_value_with_empty_list_, other->top_level_value_with_empty_list_);
  swap(top_level_value_with_list_with_empty_struct_, other->top_level_value_with_list_with_empty_struct_);
  swap(top_level_listvalue_, other->top_level_listvalue_);
  swap(top_level_empty_listvalue_, other->top_level_empty_listvalue_);
  swap(top_level_listvalue_with_empty_struct_, other->top_level_listvalue_with_empty_struct_);
  swap(repeated_value_, other->repeated_value_);
  swap(repeated_value_nested_list_, other->repeated_value_nested_list_);
  swap(repeated_value_nested_list2_, other->repeated_value_nested_list2_);
  swap(repeated_value_nested_list3_, other->repeated_value_nested_list3_);
  swap(repeated_listvalue_, other->repeated_listvalue_);
  swap(map_of_struct_, other->map_of_struct_);
  swap(map_of_struct_value_, other->map_of_struct_value_);
  swap(map_of_listvalue_, other->map_of_listvalue_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata StructTestCases::GetMetadata() const {
  protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void StructWrapper::InitAsDefaultInstance() {
  ::google::protobuf::testing::_StructWrapper_default_instance_._instance.get_mutable()->struct__ = const_cast< ::google::protobuf::Struct*>(
      ::google::protobuf::Struct::internal_default_instance());
}
void StructWrapper::clear_struct_() {
  if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
    delete struct__;
  }
  struct__ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int StructWrapper::kStructFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

StructWrapper::StructWrapper()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructWrapper.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.StructWrapper)
}
StructWrapper::StructWrapper(const StructWrapper& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_struct_()) {
    struct__ = new ::google::protobuf::Struct(*from.struct__);
  } else {
    struct__ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.StructWrapper)
}

void StructWrapper::SharedCtor() {
  struct__ = NULL;
}

StructWrapper::~StructWrapper() {
  // @@protoc_insertion_point(destructor:google.protobuf.testing.StructWrapper)
  SharedDtor();
}

void StructWrapper::SharedDtor() {
  if (this != internal_default_instance()) delete struct__;
}

void StructWrapper::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* StructWrapper::descriptor() {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const StructWrapper& StructWrapper::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructWrapper.base);
  return *internal_default_instance();
}


void StructWrapper::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.testing.StructWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
    delete struct__;
  }
  struct__ = NULL;
  _internal_metadata_.Clear();
}

bool StructWrapper::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.protobuf.testing.StructWrapper)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.protobuf.Struct struct = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_struct_()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.protobuf.testing.StructWrapper)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.StructWrapper)
  return false;
#undef DO_
}

void StructWrapper::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.protobuf.testing.StructWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.Struct struct = 1;
  if (this->has_struct_()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_struct_(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.protobuf.testing.StructWrapper)
}

::google::protobuf::uint8* StructWrapper::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.StructWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.Struct struct = 1;
  if (this->has_struct_()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_struct_(), deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.StructWrapper)
  return target;
}

size_t StructWrapper::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.StructWrapper)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // .google.protobuf.Struct struct = 1;
  if (this->has_struct_()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *struct__);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void StructWrapper::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.StructWrapper)
  GOOGLE_DCHECK_NE(&from, this);
  const StructWrapper* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const StructWrapper>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.StructWrapper)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.StructWrapper)
    MergeFrom(*source);
  }
}

void StructWrapper::MergeFrom(const StructWrapper& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.StructWrapper)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_struct_()) {
    mutable_struct_()->::google::protobuf::Struct::MergeFrom(from.struct_());
  }
}

void StructWrapper::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.StructWrapper)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void StructWrapper::CopyFrom(const StructWrapper& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.StructWrapper)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool StructWrapper::IsInitialized() const {
  return true;
}

void StructWrapper::Swap(StructWrapper* other) {
  if (other == this) return;
  InternalSwap(other);
}
void StructWrapper::InternalSwap(StructWrapper* other) {
  using std::swap;
  swap(struct__, other->struct__);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata StructWrapper::GetMetadata() const {
  protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void ValueWrapper::InitAsDefaultInstance() {
  ::google::protobuf::testing::_ValueWrapper_default_instance_._instance.get_mutable()->value_ = const_cast< ::google::protobuf::Value*>(
      ::google::protobuf::Value::internal_default_instance());
}
void ValueWrapper::clear_value() {
  if (GetArenaNoVirtual() == NULL && value_ != NULL) {
    delete value_;
  }
  value_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ValueWrapper::kValueFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ValueWrapper::ValueWrapper()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ValueWrapper.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.ValueWrapper)
}
ValueWrapper::ValueWrapper(const ValueWrapper& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_value()) {
    value_ = new ::google::protobuf::Value(*from.value_);
  } else {
    value_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.ValueWrapper)
}

void ValueWrapper::SharedCtor() {
  value_ = NULL;
}

ValueWrapper::~ValueWrapper() {
  // @@protoc_insertion_point(destructor:google.protobuf.testing.ValueWrapper)
  SharedDtor();
}

void ValueWrapper::SharedDtor() {
  if (this != internal_default_instance()) delete value_;
}

void ValueWrapper::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* ValueWrapper::descriptor() {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ValueWrapper& ValueWrapper::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ValueWrapper.base);
  return *internal_default_instance();
}


void ValueWrapper::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.testing.ValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaNoVirtual() == NULL && value_ != NULL) {
    delete value_;
  }
  value_ = NULL;
  _internal_metadata_.Clear();
}

bool ValueWrapper::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.protobuf.testing.ValueWrapper)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.protobuf.Value value = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_value()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.protobuf.testing.ValueWrapper)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.ValueWrapper)
  return false;
#undef DO_
}

void ValueWrapper::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.protobuf.testing.ValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.Value value = 1;
  if (this->has_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_value(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.protobuf.testing.ValueWrapper)
}

::google::protobuf::uint8* ValueWrapper::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.ValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.Value value = 1;
  if (this->has_value()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_value(), deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.ValueWrapper)
  return target;
}

size_t ValueWrapper::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.ValueWrapper)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // .google.protobuf.Value value = 1;
  if (this->has_value()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *value_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ValueWrapper::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.ValueWrapper)
  GOOGLE_DCHECK_NE(&from, this);
  const ValueWrapper* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ValueWrapper>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.ValueWrapper)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.ValueWrapper)
    MergeFrom(*source);
  }
}

void ValueWrapper::MergeFrom(const ValueWrapper& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.ValueWrapper)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_value()) {
    mutable_value()->::google::protobuf::Value::MergeFrom(from.value());
  }
}

void ValueWrapper::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.ValueWrapper)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ValueWrapper::CopyFrom(const ValueWrapper& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.ValueWrapper)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ValueWrapper::IsInitialized() const {
  return true;
}

void ValueWrapper::Swap(ValueWrapper* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ValueWrapper::InternalSwap(ValueWrapper* other) {
  using std::swap;
  swap(value_, other->value_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata ValueWrapper::GetMetadata() const {
  protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void RepeatedValueWrapper::InitAsDefaultInstance() {
}
void RepeatedValueWrapper::clear_values() {
  values_.Clear();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int RepeatedValueWrapper::kValuesFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

RepeatedValueWrapper::RepeatedValueWrapper()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedValueWrapper.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.RepeatedValueWrapper)
}
RepeatedValueWrapper::RepeatedValueWrapper(const RepeatedValueWrapper& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      values_(from.values_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.RepeatedValueWrapper)
}

void RepeatedValueWrapper::SharedCtor() {
}

RepeatedValueWrapper::~RepeatedValueWrapper() {
  // @@protoc_insertion_point(destructor:google.protobuf.testing.RepeatedValueWrapper)
  SharedDtor();
}

void RepeatedValueWrapper::SharedDtor() {
}

void RepeatedValueWrapper::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* RepeatedValueWrapper::descriptor() {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const RepeatedValueWrapper& RepeatedValueWrapper::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedValueWrapper.base);
  return *internal_default_instance();
}


void RepeatedValueWrapper::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.testing.RepeatedValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  values_.Clear();
  _internal_metadata_.Clear();
}

bool RepeatedValueWrapper::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.protobuf.testing.RepeatedValueWrapper)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .google.protobuf.Value values = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_values()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.protobuf.testing.RepeatedValueWrapper)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.RepeatedValueWrapper)
  return false;
#undef DO_
}

void RepeatedValueWrapper::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.protobuf.testing.RepeatedValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .google.protobuf.Value values = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1,
      this->values(static_cast<int>(i)),
      output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.protobuf.testing.RepeatedValueWrapper)
}

::google::protobuf::uint8* RepeatedValueWrapper::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.RepeatedValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .google.protobuf.Value values = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->values(static_cast<int>(i)), deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.RepeatedValueWrapper)
  return target;
}

size_t RepeatedValueWrapper::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.RepeatedValueWrapper)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated .google.protobuf.Value values = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->values_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->values(static_cast<int>(i)));
    }
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RepeatedValueWrapper::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.RepeatedValueWrapper)
  GOOGLE_DCHECK_NE(&from, this);
  const RepeatedValueWrapper* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedValueWrapper>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.RepeatedValueWrapper)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.RepeatedValueWrapper)
    MergeFrom(*source);
  }
}

void RepeatedValueWrapper::MergeFrom(const RepeatedValueWrapper& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.RepeatedValueWrapper)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  values_.MergeFrom(from.values_);
}

void RepeatedValueWrapper::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.RepeatedValueWrapper)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RepeatedValueWrapper::CopyFrom(const RepeatedValueWrapper& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.RepeatedValueWrapper)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RepeatedValueWrapper::IsInitialized() const {
  return true;
}

void RepeatedValueWrapper::Swap(RepeatedValueWrapper* other) {
  if (other == this) return;
  InternalSwap(other);
}
void RepeatedValueWrapper::InternalSwap(RepeatedValueWrapper* other) {
  using std::swap;
  CastToBase(&values_)->InternalSwap(CastToBase(&other->values_));
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata RepeatedValueWrapper::GetMetadata() const {
  protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void ListValueWrapper::InitAsDefaultInstance() {
  ::google::protobuf::testing::_ListValueWrapper_default_instance_._instance.get_mutable()->shopping_list_ = const_cast< ::google::protobuf::ListValue*>(
      ::google::protobuf::ListValue::internal_default_instance());
}
void ListValueWrapper::clear_shopping_list() {
  if (GetArenaNoVirtual() == NULL && shopping_list_ != NULL) {
    delete shopping_list_;
  }
  shopping_list_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ListValueWrapper::kShoppingListFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ListValueWrapper::ListValueWrapper()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ListValueWrapper.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.ListValueWrapper)
}
ListValueWrapper::ListValueWrapper(const ListValueWrapper& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_shopping_list()) {
    shopping_list_ = new ::google::protobuf::ListValue(*from.shopping_list_);
  } else {
    shopping_list_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.ListValueWrapper)
}

void ListValueWrapper::SharedCtor() {
  shopping_list_ = NULL;
}

ListValueWrapper::~ListValueWrapper() {
  // @@protoc_insertion_point(destructor:google.protobuf.testing.ListValueWrapper)
  SharedDtor();
}

void ListValueWrapper::SharedDtor() {
  if (this != internal_default_instance()) delete shopping_list_;
}

void ListValueWrapper::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* ListValueWrapper::descriptor() {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ListValueWrapper& ListValueWrapper::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ListValueWrapper.base);
  return *internal_default_instance();
}


void ListValueWrapper::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.testing.ListValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaNoVirtual() == NULL && shopping_list_ != NULL) {
    delete shopping_list_;
  }
  shopping_list_ = NULL;
  _internal_metadata_.Clear();
}

bool ListValueWrapper::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.protobuf.testing.ListValueWrapper)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.protobuf.ListValue shopping_list = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_shopping_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.protobuf.testing.ListValueWrapper)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.ListValueWrapper)
  return false;
#undef DO_
}

void ListValueWrapper::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.protobuf.testing.ListValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.ListValue shopping_list = 1;
  if (this->has_shopping_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_shopping_list(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.protobuf.testing.ListValueWrapper)
}

::google::protobuf::uint8* ListValueWrapper::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.ListValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.ListValue shopping_list = 1;
  if (this->has_shopping_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_shopping_list(), deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.ListValueWrapper)
  return target;
}

size_t ListValueWrapper::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.ListValueWrapper)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // .google.protobuf.ListValue shopping_list = 1;
  if (this->has_shopping_list()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *shopping_list_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ListValueWrapper::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.ListValueWrapper)
  GOOGLE_DCHECK_NE(&from, this);
  const ListValueWrapper* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ListValueWrapper>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.ListValueWrapper)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.ListValueWrapper)
    MergeFrom(*source);
  }
}

void ListValueWrapper::MergeFrom(const ListValueWrapper& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.ListValueWrapper)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_shopping_list()) {
    mutable_shopping_list()->::google::protobuf::ListValue::MergeFrom(from.shopping_list());
  }
}

void ListValueWrapper::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.ListValueWrapper)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListValueWrapper::CopyFrom(const ListValueWrapper& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.ListValueWrapper)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListValueWrapper::IsInitialized() const {
  return true;
}

void ListValueWrapper::Swap(ListValueWrapper* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ListValueWrapper::InternalSwap(ListValueWrapper* other) {
  using std::swap;
  swap(shopping_list_, other->shopping_list_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata ListValueWrapper::GetMetadata() const {
  protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void RepeatedListValueWrapper::InitAsDefaultInstance() {
}
void RepeatedListValueWrapper::clear_dimensions() {
  dimensions_.Clear();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int RepeatedListValueWrapper::kDimensionsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

RepeatedListValueWrapper::RepeatedListValueWrapper()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedListValueWrapper.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.RepeatedListValueWrapper)
}
RepeatedListValueWrapper::RepeatedListValueWrapper(const RepeatedListValueWrapper& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      dimensions_(from.dimensions_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.RepeatedListValueWrapper)
}

void RepeatedListValueWrapper::SharedCtor() {
}

RepeatedListValueWrapper::~RepeatedListValueWrapper() {
  // @@protoc_insertion_point(destructor:google.protobuf.testing.RepeatedListValueWrapper)
  SharedDtor();
}

void RepeatedListValueWrapper::SharedDtor() {
}

void RepeatedListValueWrapper::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* RepeatedListValueWrapper::descriptor() {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const RepeatedListValueWrapper& RepeatedListValueWrapper::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedListValueWrapper.base);
  return *internal_default_instance();
}


void RepeatedListValueWrapper::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.testing.RepeatedListValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  dimensions_.Clear();
  _internal_metadata_.Clear();
}

bool RepeatedListValueWrapper::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.protobuf.testing.RepeatedListValueWrapper)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .google.protobuf.ListValue dimensions = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_dimensions()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.protobuf.testing.RepeatedListValueWrapper)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.RepeatedListValueWrapper)
  return false;
#undef DO_
}

void RepeatedListValueWrapper::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.protobuf.testing.RepeatedListValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .google.protobuf.ListValue dimensions = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->dimensions_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1,
      this->dimensions(static_cast<int>(i)),
      output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.protobuf.testing.RepeatedListValueWrapper)
}

::google::protobuf::uint8* RepeatedListValueWrapper::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.RepeatedListValueWrapper)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .google.protobuf.ListValue dimensions = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->dimensions_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->dimensions(static_cast<int>(i)), deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.RepeatedListValueWrapper)
  return target;
}

size_t RepeatedListValueWrapper::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.RepeatedListValueWrapper)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated .google.protobuf.ListValue dimensions = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->dimensions_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->dimensions(static_cast<int>(i)));
    }
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RepeatedListValueWrapper::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.RepeatedListValueWrapper)
  GOOGLE_DCHECK_NE(&from, this);
  const RepeatedListValueWrapper* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedListValueWrapper>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.RepeatedListValueWrapper)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.RepeatedListValueWrapper)
    MergeFrom(*source);
  }
}

void RepeatedListValueWrapper::MergeFrom(const RepeatedListValueWrapper& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.RepeatedListValueWrapper)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  dimensions_.MergeFrom(from.dimensions_);
}

void RepeatedListValueWrapper::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.RepeatedListValueWrapper)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RepeatedListValueWrapper::CopyFrom(const RepeatedListValueWrapper& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.RepeatedListValueWrapper)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RepeatedListValueWrapper::IsInitialized() const {
  return true;
}

void RepeatedListValueWrapper::Swap(RepeatedListValueWrapper* other) {
  if (other == this) return;
  InternalSwap(other);
}
void RepeatedListValueWrapper::InternalSwap(RepeatedListValueWrapper* other) {
  using std::swap;
  CastToBase(&dimensions_)->InternalSwap(CastToBase(&other->dimensions_));
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata RepeatedListValueWrapper::GetMetadata() const {
  protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

MapOfStruct_StructMapEntry_DoNotUse::MapOfStruct_StructMapEntry_DoNotUse() {}
MapOfStruct_StructMapEntry_DoNotUse::MapOfStruct_StructMapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
void MapOfStruct_StructMapEntry_DoNotUse::MergeFrom(const MapOfStruct_StructMapEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::google::protobuf::Metadata MapOfStruct_StructMapEntry_DoNotUse::GetMetadata() const {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[6];
}
void MapOfStruct_StructMapEntry_DoNotUse::MergeFrom(
    const ::google::protobuf::Message& other) {
  ::google::protobuf::Message::MergeFrom(other);
}


// ===================================================================

MapOfStruct_ValueMapEntry_DoNotUse::MapOfStruct_ValueMapEntry_DoNotUse() {}
MapOfStruct_ValueMapEntry_DoNotUse::MapOfStruct_ValueMapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
void MapOfStruct_ValueMapEntry_DoNotUse::MergeFrom(const MapOfStruct_ValueMapEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::google::protobuf::Metadata MapOfStruct_ValueMapEntry_DoNotUse::GetMetadata() const {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[7];
}
void MapOfStruct_ValueMapEntry_DoNotUse::MergeFrom(
    const ::google::protobuf::Message& other) {
  ::google::protobuf::Message::MergeFrom(other);
}


// ===================================================================

MapOfStruct_ListvalueMapEntry_DoNotUse::MapOfStruct_ListvalueMapEntry_DoNotUse() {}
MapOfStruct_ListvalueMapEntry_DoNotUse::MapOfStruct_ListvalueMapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
void MapOfStruct_ListvalueMapEntry_DoNotUse::MergeFrom(const MapOfStruct_ListvalueMapEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::google::protobuf::Metadata MapOfStruct_ListvalueMapEntry_DoNotUse::GetMetadata() const {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[8];
}
void MapOfStruct_ListvalueMapEntry_DoNotUse::MergeFrom(
    const ::google::protobuf::Message& other) {
  ::google::protobuf::Message::MergeFrom(other);
}


// ===================================================================

void MapOfStruct::InitAsDefaultInstance() {
}
void MapOfStruct::clear_struct_map() {
  struct_map_.Clear();
}
void MapOfStruct::clear_value_map() {
  value_map_.Clear();
}
void MapOfStruct::clear_listvalue_map() {
  listvalue_map_.Clear();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int MapOfStruct::kStructMapFieldNumber;
const int MapOfStruct::kValueMapFieldNumber;
const int MapOfStruct::kListvalueMapFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

MapOfStruct::MapOfStruct()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.MapOfStruct)
}
MapOfStruct::MapOfStruct(const MapOfStruct& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  struct_map_.MergeFrom(from.struct_map_);
  value_map_.MergeFrom(from.value_map_);
  listvalue_map_.MergeFrom(from.listvalue_map_);
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapOfStruct)
}

void MapOfStruct::SharedCtor() {
}

MapOfStruct::~MapOfStruct() {
  // @@protoc_insertion_point(destructor:google.protobuf.testing.MapOfStruct)
  SharedDtor();
}

void MapOfStruct::SharedDtor() {
}

void MapOfStruct::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* MapOfStruct::descriptor() {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const MapOfStruct& MapOfStruct::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct.base);
  return *internal_default_instance();
}


void MapOfStruct::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapOfStruct)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  struct_map_.Clear();
  value_map_.Clear();
  listvalue_map_.Clear();
  _internal_metadata_.Clear();
}

bool MapOfStruct::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapOfStruct)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // map<string, .google.protobuf.Struct> struct_map = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          MapOfStruct_StructMapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
              MapOfStruct_StructMapEntry_DoNotUse,
              ::std::string, ::google::protobuf::Struct,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
              0 >,
            ::google::protobuf::Map< ::std::string, ::google::protobuf::Struct > > parser(&struct_map_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.key().data(), static_cast<int>(parser.key().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.protobuf.testing.MapOfStruct.StructMapEntry.key"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // map<string, .google.protobuf.Value> value_map = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          MapOfStruct_ValueMapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
              MapOfStruct_ValueMapEntry_DoNotUse,
              ::std::string, ::google::protobuf::Value,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
              0 >,
            ::google::protobuf::Map< ::std::string, ::google::protobuf::Value > > parser(&value_map_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.key().data(), static_cast<int>(parser.key().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.protobuf.testing.MapOfStruct.ValueMapEntry.key"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // map<string, .google.protobuf.ListValue> listvalue_map = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          MapOfStruct_ListvalueMapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
              MapOfStruct_ListvalueMapEntry_DoNotUse,
              ::std::string, ::google::protobuf::ListValue,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
              0 >,
            ::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue > > parser(&listvalue_map_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.key().data(), static_cast<int>(parser.key().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.protobuf.testing.MapOfStruct.ListvalueMapEntry.key"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapOfStruct)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapOfStruct)
  return false;
#undef DO_
}

void MapOfStruct::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapOfStruct)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // map<string, .google.protobuf.Struct> struct_map = 1;
  if (!this->struct_map().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.protobuf.testing.MapOfStruct.StructMapEntry.key");
      }
    };

    if (output->IsSerializationDeterministic() &&
        this->struct_map().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->struct_map().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_iterator
          it = this->struct_map().begin();
          it != this->struct_map().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<MapOfStruct_StructMapEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(struct_map_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            1, *entry, output);
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::std::unique_ptr<MapOfStruct_StructMapEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_iterator
          it = this->struct_map().begin();
          it != this->struct_map().end(); ++it) {
        entry.reset(struct_map_.NewEntryWrapper(
            it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            1, *entry, output);
        Utf8Check::Check(&*it);
      }
    }
  }

  // map<string, .google.protobuf.Value> value_map = 2;
  if (!this->value_map().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.protobuf.testing.MapOfStruct.ValueMapEntry.key");
      }
    };

    if (output->IsSerializationDeterministic() &&
        this->value_map().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->value_map().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
          it = this->value_map().begin();
          it != this->value_map().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<MapOfStruct_ValueMapEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(value_map_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            2, *entry, output);
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::std::unique_ptr<MapOfStruct_ValueMapEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
          it = this->value_map().begin();
          it != this->value_map().end(); ++it) {
        entry.reset(value_map_.NewEntryWrapper(
            it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            2, *entry, output);
        Utf8Check::Check(&*it);
      }
    }
  }

  // map<string, .google.protobuf.ListValue> listvalue_map = 3;
  if (!this->listvalue_map().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.protobuf.testing.MapOfStruct.ListvalueMapEntry.key");
      }
    };

    if (output->IsSerializationDeterministic() &&
        this->listvalue_map().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->listvalue_map().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_iterator
          it = this->listvalue_map().begin();
          it != this->listvalue_map().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<MapOfStruct_ListvalueMapEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(listvalue_map_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            3, *entry, output);
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::std::unique_ptr<MapOfStruct_ListvalueMapEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_iterator
          it = this->listvalue_map().begin();
          it != this->listvalue_map().end(); ++it) {
        entry.reset(listvalue_map_.NewEntryWrapper(
            it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            3, *entry, output);
        Utf8Check::Check(&*it);
      }
    }
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapOfStruct)
}

::google::protobuf::uint8* MapOfStruct::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapOfStruct)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // map<string, .google.protobuf.Struct> struct_map = 1;
  if (!this->struct_map().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.protobuf.testing.MapOfStruct.StructMapEntry.key");
      }
    };

    if (deterministic &&
        this->struct_map().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->struct_map().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_iterator
          it = this->struct_map().begin();
          it != this->struct_map().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<MapOfStruct_StructMapEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(struct_map_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       1, *entry, deterministic, target);
;
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::std::unique_ptr<MapOfStruct_StructMapEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_iterator
          it = this->struct_map().begin();
          it != this->struct_map().end(); ++it) {
        entry.reset(struct_map_.NewEntryWrapper(
            it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       1, *entry, deterministic, target);
;
        Utf8Check::Check(&*it);
      }
    }
  }

  // map<string, .google.protobuf.Value> value_map = 2;
  if (!this->value_map().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.protobuf.testing.MapOfStruct.ValueMapEntry.key");
      }
    };

    if (deterministic &&
        this->value_map().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->value_map().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
          it = this->value_map().begin();
          it != this->value_map().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<MapOfStruct_ValueMapEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(value_map_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       2, *entry, deterministic, target);
;
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::std::unique_ptr<MapOfStruct_ValueMapEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
          it = this->value_map().begin();
          it != this->value_map().end(); ++it) {
        entry.reset(value_map_.NewEntryWrapper(
            it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       2, *entry, deterministic, target);
;
        Utf8Check::Check(&*it);
      }
    }
  }

  // map<string, .google.protobuf.ListValue> listvalue_map = 3;
  if (!this->listvalue_map().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.protobuf.testing.MapOfStruct.ListvalueMapEntry.key");
      }
    };

    if (deterministic &&
        this->listvalue_map().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->listvalue_map().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_iterator
          it = this->listvalue_map().begin();
          it != this->listvalue_map().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<MapOfStruct_ListvalueMapEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(listvalue_map_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       3, *entry, deterministic, target);
;
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::std::unique_ptr<MapOfStruct_ListvalueMapEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_iterator
          it = this->listvalue_map().begin();
          it != this->listvalue_map().end(); ++it) {
        entry.reset(listvalue_map_.NewEntryWrapper(
            it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       3, *entry, deterministic, target);
;
        Utf8Check::Check(&*it);
      }
    }
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapOfStruct)
  return target;
}

size_t MapOfStruct::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapOfStruct)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // map<string, .google.protobuf.Struct> struct_map = 1;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->struct_map_size());
  {
    ::std::unique_ptr<MapOfStruct_StructMapEntry_DoNotUse> entry;
    for (::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_iterator
        it = this->struct_map().begin();
        it != this->struct_map().end(); ++it) {
      entry.reset(struct_map_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  // map<string, .google.protobuf.Value> value_map = 2;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->value_map_size());
  {
    ::std::unique_ptr<MapOfStruct_ValueMapEntry_DoNotUse> entry;
    for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
        it = this->value_map().begin();
        it != this->value_map().end(); ++it) {
      entry.reset(value_map_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  // map<string, .google.protobuf.ListValue> listvalue_map = 3;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->listvalue_map_size());
  {
    ::std::unique_ptr<MapOfStruct_ListvalueMapEntry_DoNotUse> entry;
    for (::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_iterator
        it = this->listvalue_map().begin();
        it != this->listvalue_map().end(); ++it) {
      entry.reset(listvalue_map_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void MapOfStruct::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapOfStruct)
  GOOGLE_DCHECK_NE(&from, this);
  const MapOfStruct* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const MapOfStruct>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapOfStruct)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapOfStruct)
    MergeFrom(*source);
  }
}

void MapOfStruct::MergeFrom(const MapOfStruct& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapOfStruct)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  struct_map_.MergeFrom(from.struct_map_);
  value_map_.MergeFrom(from.value_map_);
  listvalue_map_.MergeFrom(from.listvalue_map_);
}

void MapOfStruct::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapOfStruct)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void MapOfStruct::CopyFrom(const MapOfStruct& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapOfStruct)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool MapOfStruct::IsInitialized() const {
  return true;
}

void MapOfStruct::Swap(MapOfStruct* other) {
  if (other == this) return;
  InternalSwap(other);
}
void MapOfStruct::InternalSwap(MapOfStruct* other) {
  using std::swap;
  struct_map_.Swap(&other->struct_map_);
  value_map_.Swap(&other->value_map_);
  listvalue_map_.Swap(&other->listvalue_map_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata MapOfStruct::GetMetadata() const {
  protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void Dummy::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Dummy::kTextFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Dummy::Dummy()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_Dummy.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.Dummy)
}
Dummy::Dummy(const Dummy& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.text().size() > 0) {
    text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.text_);
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Dummy)
}

void Dummy::SharedCtor() {
  text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

Dummy::~Dummy() {
  // @@protoc_insertion_point(destructor:google.protobuf.testing.Dummy)
  SharedDtor();
}

void Dummy::SharedDtor() {
  text_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void Dummy::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Dummy::descriptor() {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Dummy& Dummy::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_Dummy.base);
  return *internal_default_instance();
}


void Dummy::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.testing.Dummy)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  text_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

bool Dummy::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.protobuf.testing.Dummy)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string text = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_text()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->text().data(), static_cast<int>(this->text().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.protobuf.testing.Dummy.text"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.protobuf.testing.Dummy)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Dummy)
  return false;
#undef DO_
}

void Dummy::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.protobuf.testing.Dummy)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string text = 1;
  if (this->text().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->text().data(), static_cast<int>(this->text().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.protobuf.testing.Dummy.text");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->text(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.protobuf.testing.Dummy)
}

::google::protobuf::uint8* Dummy::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.Dummy)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string text = 1;
  if (this->text().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->text().data(), static_cast<int>(this->text().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.protobuf.testing.Dummy.text");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->text(), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.Dummy)
  return target;
}

size_t Dummy::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Dummy)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string text = 1;
  if (this->text().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->text());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Dummy::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.Dummy)
  GOOGLE_DCHECK_NE(&from, this);
  const Dummy* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Dummy>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.Dummy)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.Dummy)
    MergeFrom(*source);
  }
}

void Dummy::MergeFrom(const Dummy& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Dummy)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.text().size() > 0) {

    text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.text_);
  }
}

void Dummy::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.Dummy)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Dummy::CopyFrom(const Dummy& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.Dummy)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Dummy::IsInitialized() const {
  return true;
}

void Dummy::Swap(Dummy* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Dummy::InternalSwap(Dummy* other) {
  using std::swap;
  text_.Swap(&other->text_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata Dummy::GetMetadata() const {
  protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void StructType::InitAsDefaultInstance() {
  ::google::protobuf::testing::_StructType_default_instance_._instance.get_mutable()->object_ = const_cast< ::google::protobuf::Struct*>(
      ::google::protobuf::Struct::internal_default_instance());
}
void StructType::clear_object() {
  if (GetArenaNoVirtual() == NULL && object_ != NULL) {
    delete object_;
  }
  object_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int StructType::kObjectFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

StructType::StructType()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructType.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.StructType)
}
StructType::StructType(const StructType& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_object()) {
    object_ = new ::google::protobuf::Struct(*from.object_);
  } else {
    object_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.StructType)
}

void StructType::SharedCtor() {
  object_ = NULL;
}

StructType::~StructType() {
  // @@protoc_insertion_point(destructor:google.protobuf.testing.StructType)
  SharedDtor();
}

void StructType::SharedDtor() {
  if (this != internal_default_instance()) delete object_;
}

void StructType::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* StructType::descriptor() {
  ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const StructType& StructType::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructType.base);
  return *internal_default_instance();
}


void StructType::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.testing.StructType)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaNoVirtual() == NULL && object_ != NULL) {
    delete object_;
  }
  object_ = NULL;
  _internal_metadata_.Clear();
}

bool StructType::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.protobuf.testing.StructType)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.protobuf.Struct object = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_object()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.protobuf.testing.StructType)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.StructType)
  return false;
#undef DO_
}

void StructType::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.protobuf.testing.StructType)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.Struct object = 1;
  if (this->has_object()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_object(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.protobuf.testing.StructType)
}

::google::protobuf::uint8* StructType::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.StructType)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.Struct object = 1;
  if (this->has_object()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_object(), deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.StructType)
  return target;
}

size_t StructType::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.StructType)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // .google.protobuf.Struct object = 1;
  if (this->has_object()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *object_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void StructType::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.StructType)
  GOOGLE_DCHECK_NE(&from, this);
  const StructType* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const StructType>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.StructType)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.StructType)
    MergeFrom(*source);
  }
}

void StructType::MergeFrom(const StructType& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.StructType)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_object()) {
    mutable_object()->::google::protobuf::Struct::MergeFrom(from.object());
  }
}

void StructType::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.StructType)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void StructType::CopyFrom(const StructType& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.StructType)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool StructType::IsInitialized() const {
  return true;
}

void StructType::Swap(StructType* other) {
  if (other == this) return;
  InternalSwap(other);
}
void StructType::InternalSwap(StructType* other) {
  using std::swap;
  swap(object_, other->object_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata StructType::GetMetadata() const {
  protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace testing
}  // namespace protobuf
}  // namespace google
namespace google {
namespace protobuf {
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StructTestCases* Arena::CreateMaybeMessage< ::google::protobuf::testing::StructTestCases >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::StructTestCases >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StructWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::StructWrapper >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::StructWrapper >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::ValueWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::ValueWrapper >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::ValueWrapper >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::RepeatedValueWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::RepeatedValueWrapper >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::RepeatedValueWrapper >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::ListValueWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::ListValueWrapper >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::ListValueWrapper >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::RepeatedListValueWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::RepeatedListValueWrapper >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::RepeatedListValueWrapper >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfStruct* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfStruct >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::MapOfStruct >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Dummy* Arena::CreateMaybeMessage< ::google::protobuf::testing::Dummy >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::Dummy >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StructType* Arena::CreateMaybeMessage< ::google::protobuf::testing::StructType >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::StructType >(arena);
}
}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)
