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

#include <google/protobuf/util/internal/testdata/anys.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_2fany_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fany_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Any;
}  // namespace protobuf_google_2fprotobuf_2fany_2eproto
namespace protobuf_google_2fprotobuf_2fduration_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fduration_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Duration;
}  // namespace protobuf_google_2fprotobuf_2fduration_2eproto
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_2ftimestamp_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp;
}  // namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto
namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Data_MapDataEntry_DoNotUse;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_AnyWrapper;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto ::google::protobuf::internal::SCCInfo<4> scc_info_Data;
}  // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto
namespace protobuf_google_2fprotobuf_2fwrappers_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_DoubleValue;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Int32Value;
}  // namespace protobuf_google_2fprotobuf_2fwrappers_2eproto
namespace google {
namespace protobuf {
namespace testing {
class AnyTestCasesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<AnyTestCases>
      _instance;
} _AnyTestCases_default_instance_;
class AnyWrapperDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<AnyWrapper>
      _instance;
} _AnyWrapper_default_instance_;
class ImportsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Imports>
      _instance;
} _Imports_default_instance_;
class Data_MapDataEntry_DoNotUseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Data_MapDataEntry_DoNotUse>
      _instance;
} _Data_MapDataEntry_DoNotUse_default_instance_;
class DataDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Data>
      _instance;
} _Data_default_instance_;
class AnyInDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<AnyIn>
      _instance;
} _AnyIn_default_instance_;
class AnyOutDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<AnyOut>
      _instance;
} _AnyOut_default_instance_;
class AnyMDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<AnyM>
      _instance;
} _AnyM_default_instance_;
}  // namespace testing
}  // namespace protobuf
}  // namespace google
namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto {
static void InitDefaultsAnyTestCases() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

::google::protobuf::internal::SCCInfo<2> scc_info_AnyTestCases =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsAnyTestCases}, {
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyWrapper.base,
      &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};

static void InitDefaultsAnyWrapper() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

::google::protobuf::internal::SCCInfo<1> scc_info_AnyWrapper =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAnyWrapper}, {
      &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};

static void InitDefaultsImports() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

::google::protobuf::internal::SCCInfo<6> scc_info_Imports =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsImports}, {
      &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_DoubleValue.base,
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,
      &protobuf_google_2fprotobuf_2ftimestamp_2eproto::scc_info_Timestamp.base,
      &protobuf_google_2fprotobuf_2fduration_2eproto::scc_info_Duration.base,
      &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_Int32Value.base,
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data.base,}};

static void InitDefaultsData_MapDataEntry_DoNotUse() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsData() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

::google::protobuf::internal::SCCInfo<4> scc_info_Data =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsData}, {
      &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_Int32Value.base,
      &protobuf_google_2fprotobuf_2ftimestamp_2eproto::scc_info_Timestamp.base,
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data_MapDataEntry_DoNotUse.base,
      &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};

static void InitDefaultsAnyIn() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

::google::protobuf::internal::SCCInfo<1> scc_info_AnyIn =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAnyIn}, {
      &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};

static void InitDefaultsAnyOut() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

::google::protobuf::internal::SCCInfo<1> scc_info_AnyOut =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAnyOut}, {
      &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};

static void InitDefaultsAnyM() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

void InitDefaults() {
  ::google::protobuf::internal::InitSCC(&scc_info_AnyTestCases.base);
  ::google::protobuf::internal::InitSCC(&scc_info_AnyWrapper.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Imports.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Data_MapDataEntry_DoNotUse.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Data.base);
  ::google::protobuf::internal::InitSCC(&scc_info_AnyIn.base);
  ::google::protobuf::internal::InitSCC(&scc_info_AnyOut.base);
  ::google::protobuf::internal::InitSCC(&scc_info_AnyM.base);
}

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

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::AnyTestCases, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, empty_any_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, type_only_any_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, wrapper_any_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_timestamp_value_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_duration_value_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_struct_value_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, recursive_any_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_value_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_nested_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_with_wrapper_type_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_with_timestamp_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_containing_map_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_containing_struct_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_containing_repeated_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, recursive_any_with_type_field_at_end_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, top_level_any_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, top_level_any_with_type_field_at_end_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyWrapper, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyWrapper, any_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, dbl_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, struct__),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, timestamp_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, duration_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, i32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, data_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, key_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, attr_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, str_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, msgs_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, nested_data_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, int_wrapper_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, map_data_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, struct_data_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, repeated_data_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyIn, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyIn, something_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyIn, any_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyOut, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyOut, any_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyM, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyM, foo_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, sizeof(::google::protobuf::testing::AnyTestCases)},
  { 22, -1, sizeof(::google::protobuf::testing::AnyWrapper)},
  { 28, -1, sizeof(::google::protobuf::testing::Imports)},
  { 39, 46, sizeof(::google::protobuf::testing::Data_MapDataEntry_DoNotUse)},
  { 48, -1, sizeof(::google::protobuf::testing::Data)},
  { 62, -1, sizeof(::google::protobuf::testing::AnyIn)},
  { 69, -1, sizeof(::google::protobuf::testing::AnyOut)},
  { 75, -1, sizeof(::google::protobuf::testing::AnyM)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyTestCases_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyWrapper_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Imports_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Data_MapDataEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Data_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyIn_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyOut_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyM_default_instance_),
};

void protobuf_AssignDescriptors() {
  AddDescriptors();
  AssignDescriptors(
      "google/protobuf/util/internal/testdata/anys.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, 8);
}

void AddDescriptorsImpl() {
  InitDefaults();
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
      "\n1google/protobuf/util/internal/testdata"
      "/anys.proto\022\027google.protobuf.testing\032\031go"
      "ogle/protobuf/any.proto\032\034google/protobuf"
      "/struct.proto\032\037google/protobuf/timestamp"
      ".proto\032\036google/protobuf/duration.proto\032\036"
      "google/protobuf/wrappers.proto\"\261\t\n\014AnyTe"
      "stCases\0226\n\tempty_any\030\001 \001(\0132#.google.prot"
      "obuf.testing.AnyWrapper\022:\n\rtype_only_any"
      "\030\002 \001(\0132#.google.protobuf.testing.AnyWrap"
      "per\0228\n\013wrapper_any\030\003 \001(\0132#.google.protob"
      "uf.testing.AnyWrapper\022E\n\030any_with_timest"
      "amp_value\030\004 \001(\0132#.google.protobuf.testin"
      "g.AnyWrapper\022D\n\027any_with_duration_value\030"
      "\005 \001(\0132#.google.protobuf.testing.AnyWrapp"
      "er\022B\n\025any_with_struct_value\030\006 \001(\0132#.goog"
      "le.protobuf.testing.AnyWrapper\022:\n\rrecurs"
      "ive_any\030\007 \001(\0132#.google.protobuf.testing."
      "AnyWrapper\022C\n\026any_with_message_value\030\010 \001"
      "(\0132#.google.protobuf.testing.AnyWrapper\022"
      "D\n\027any_with_nested_message\030\t \001(\0132#.googl"
      "e.protobuf.testing.AnyWrapper\022O\n\"any_wit"
      "h_message_with_wrapper_type\030\n \001(\0132#.goog"
      "le.protobuf.testing.AnyWrapper\022L\n\037any_wi"
      "th_message_with_timestamp\030\013 \001(\0132#.google"
      ".protobuf.testing.AnyWrapper\022L\n\037any_with"
      "_message_containing_map\030\014 \001(\0132#.google.p"
      "rotobuf.testing.AnyWrapper\022O\n\"any_with_m"
      "essage_containing_struct\030\r \001(\0132#.google."
      "protobuf.testing.AnyWrapper\022Y\n,any_with_"
      "message_containing_repeated_message\030\016 \001("
      "\0132#.google.protobuf.testing.AnyWrapper\022Q"
      "\n$recursive_any_with_type_field_at_end\030\017"
      " \001(\0132#.google.protobuf.testing.AnyWrappe"
      "r\022+\n\rtop_level_any\0302 \001(\0132\024.google.protob"
      "uf.Any\022B\n$top_level_any_with_type_field_"
      "at_end\0303 \001(\0132\024.google.protobuf.Any\"/\n\nAn"
      "yWrapper\022!\n\003any\030\001 \001(\0132\024.google.protobuf."
      "Any\"\220\002\n\007Imports\022)\n\003dbl\030\001 \001(\0132\034.google.pr"
      "otobuf.DoubleValue\022\'\n\006struct\030\002 \001(\0132\027.goo"
      "gle.protobuf.Struct\022-\n\ttimestamp\030\003 \001(\0132\032"
      ".google.protobuf.Timestamp\022+\n\010duration\030\004"
      " \001(\0132\031.google.protobuf.Duration\022(\n\003i32\030\005"
      " \001(\0132\033.google.protobuf.Int32Value\022+\n\004dat"
      "a\030d \001(\0132\035.google.protobuf.testing.Data\"\221"
      "\003\n\004Data\022\014\n\004attr\030\001 \001(\005\022\013\n\003str\030\002 \001(\t\022\014\n\004ms"
      "gs\030\003 \003(\t\0222\n\013nested_data\030\004 \001(\0132\035.google.p"
      "rotobuf.testing.Data\0220\n\013int_wrapper\030\005 \001("
      "\0132\033.google.protobuf.Int32Value\022(\n\004time\030\006"
      " \001(\0132\032.google.protobuf.Timestamp\022<\n\010map_"
      "data\030\007 \003(\0132*.google.protobuf.testing.Dat"
      "a.MapDataEntry\022,\n\013struct_data\030\010 \001(\0132\027.go"
      "ogle.protobuf.Struct\0224\n\rrepeated_data\030\t "
      "\003(\0132\035.google.protobuf.testing.Data\032.\n\014Ma"
      "pDataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002"
      "8\001\"=\n\005AnyIn\022\021\n\tsomething\030\001 \001(\t\022!\n\003any\030\002 "
      "\001(\0132\024.google.protobuf.Any\"+\n\006AnyOut\022!\n\003a"
      "ny\030\001 \001(\0132\024.google.protobuf.Any\"\023\n\004AnyM\022\013"
      "\n\003foo\030\001 \001(\t2\263\001\n\016AnyTestService\022T\n\004Call\022%"
      ".google.protobuf.testing.AnyTestCases\032%."
      "google.protobuf.testing.AnyTestCases\022K\n\005"
      "Call1\022 .google.protobuf.testing.Imports\032"
      " .google.protobuf.testing.Importsb\006proto"
      "3"
  };
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
      descriptor, 2481);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "google/protobuf/util/internal/testdata/anys.proto", &protobuf_RegisterTypes);
  ::protobuf_google_2fprotobuf_2fany_2eproto::AddDescriptors();
  ::protobuf_google_2fprotobuf_2fstruct_2eproto::AddDescriptors();
  ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
  ::protobuf_google_2fprotobuf_2fduration_2eproto::AddDescriptors();
  ::protobuf_google_2fprotobuf_2fwrappers_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_2fanys_2eproto
namespace google {
namespace protobuf {
namespace testing {

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

void AnyTestCases::InitAsDefaultInstance() {
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->empty_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->type_only_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->wrapper_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_timestamp_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_duration_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_struct_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->recursive_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_nested_message_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_with_wrapper_type_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_with_timestamp_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_map_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_struct_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_repeated_message_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->recursive_any_with_type_field_at_end_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
      ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->top_level_any_ = const_cast< ::google::protobuf::Any*>(
      ::google::protobuf::Any::internal_default_instance());
  ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->top_level_any_with_type_field_at_end_ = const_cast< ::google::protobuf::Any*>(
      ::google::protobuf::Any::internal_default_instance());
}
void AnyTestCases::clear_top_level_any() {
  if (GetArenaNoVirtual() == NULL && top_level_any_ != NULL) {
    delete top_level_any_;
  }
  top_level_any_ = NULL;
}
void AnyTestCases::clear_top_level_any_with_type_field_at_end() {
  if (GetArenaNoVirtual() == NULL && top_level_any_with_type_field_at_end_ != NULL) {
    delete top_level_any_with_type_field_at_end_;
  }
  top_level_any_with_type_field_at_end_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int AnyTestCases::kEmptyAnyFieldNumber;
const int AnyTestCases::kTypeOnlyAnyFieldNumber;
const int AnyTestCases::kWrapperAnyFieldNumber;
const int AnyTestCases::kAnyWithTimestampValueFieldNumber;
const int AnyTestCases::kAnyWithDurationValueFieldNumber;
const int AnyTestCases::kAnyWithStructValueFieldNumber;
const int AnyTestCases::kRecursiveAnyFieldNumber;
const int AnyTestCases::kAnyWithMessageValueFieldNumber;
const int AnyTestCases::kAnyWithNestedMessageFieldNumber;
const int AnyTestCases::kAnyWithMessageWithWrapperTypeFieldNumber;
const int AnyTestCases::kAnyWithMessageWithTimestampFieldNumber;
const int AnyTestCases::kAnyWithMessageContainingMapFieldNumber;
const int AnyTestCases::kAnyWithMessageContainingStructFieldNumber;
const int AnyTestCases::kAnyWithMessageContainingRepeatedMessageFieldNumber;
const int AnyTestCases::kRecursiveAnyWithTypeFieldAtEndFieldNumber;
const int AnyTestCases::kTopLevelAnyFieldNumber;
const int AnyTestCases::kTopLevelAnyWithTypeFieldAtEndFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

AnyTestCases::AnyTestCases()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyTestCases.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyTestCases)
}
AnyTestCases::AnyTestCases(const AnyTestCases& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_empty_any()) {
    empty_any_ = new ::google::protobuf::testing::AnyWrapper(*from.empty_any_);
  } else {
    empty_any_ = NULL;
  }
  if (from.has_type_only_any()) {
    type_only_any_ = new ::google::protobuf::testing::AnyWrapper(*from.type_only_any_);
  } else {
    type_only_any_ = NULL;
  }
  if (from.has_wrapper_any()) {
    wrapper_any_ = new ::google::protobuf::testing::AnyWrapper(*from.wrapper_any_);
  } else {
    wrapper_any_ = NULL;
  }
  if (from.has_any_with_timestamp_value()) {
    any_with_timestamp_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_timestamp_value_);
  } else {
    any_with_timestamp_value_ = NULL;
  }
  if (from.has_any_with_duration_value()) {
    any_with_duration_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_duration_value_);
  } else {
    any_with_duration_value_ = NULL;
  }
  if (from.has_any_with_struct_value()) {
    any_with_struct_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_struct_value_);
  } else {
    any_with_struct_value_ = NULL;
  }
  if (from.has_recursive_any()) {
    recursive_any_ = new ::google::protobuf::testing::AnyWrapper(*from.recursive_any_);
  } else {
    recursive_any_ = NULL;
  }
  if (from.has_any_with_message_value()) {
    any_with_message_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_value_);
  } else {
    any_with_message_value_ = NULL;
  }
  if (from.has_any_with_nested_message()) {
    any_with_nested_message_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_nested_message_);
  } else {
    any_with_nested_message_ = NULL;
  }
  if (from.has_any_with_message_with_wrapper_type()) {
    any_with_message_with_wrapper_type_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_with_wrapper_type_);
  } else {
    any_with_message_with_wrapper_type_ = NULL;
  }
  if (from.has_any_with_message_with_timestamp()) {
    any_with_message_with_timestamp_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_with_timestamp_);
  } else {
    any_with_message_with_timestamp_ = NULL;
  }
  if (from.has_any_with_message_containing_map()) {
    any_with_message_containing_map_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_containing_map_);
  } else {
    any_with_message_containing_map_ = NULL;
  }
  if (from.has_any_with_message_containing_struct()) {
    any_with_message_containing_struct_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_containing_struct_);
  } else {
    any_with_message_containing_struct_ = NULL;
  }
  if (from.has_any_with_message_containing_repeated_message()) {
    any_with_message_containing_repeated_message_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_containing_repeated_message_);
  } else {
    any_with_message_containing_repeated_message_ = NULL;
  }
  if (from.has_recursive_any_with_type_field_at_end()) {
    recursive_any_with_type_field_at_end_ = new ::google::protobuf::testing::AnyWrapper(*from.recursive_any_with_type_field_at_end_);
  } else {
    recursive_any_with_type_field_at_end_ = NULL;
  }
  if (from.has_top_level_any()) {
    top_level_any_ = new ::google::protobuf::Any(*from.top_level_any_);
  } else {
    top_level_any_ = NULL;
  }
  if (from.has_top_level_any_with_type_field_at_end()) {
    top_level_any_with_type_field_at_end_ = new ::google::protobuf::Any(*from.top_level_any_with_type_field_at_end_);
  } else {
    top_level_any_with_type_field_at_end_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyTestCases)
}

void AnyTestCases::SharedCtor() {
  ::memset(&empty_any_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&top_level_any_with_type_field_at_end_) -
      reinterpret_cast<char*>(&empty_any_)) + sizeof(top_level_any_with_type_field_at_end_));
}

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

void AnyTestCases::SharedDtor() {
  if (this != internal_default_instance()) delete empty_any_;
  if (this != internal_default_instance()) delete type_only_any_;
  if (this != internal_default_instance()) delete wrapper_any_;
  if (this != internal_default_instance()) delete any_with_timestamp_value_;
  if (this != internal_default_instance()) delete any_with_duration_value_;
  if (this != internal_default_instance()) delete any_with_struct_value_;
  if (this != internal_default_instance()) delete recursive_any_;
  if (this != internal_default_instance()) delete any_with_message_value_;
  if (this != internal_default_instance()) delete any_with_nested_message_;
  if (this != internal_default_instance()) delete any_with_message_with_wrapper_type_;
  if (this != internal_default_instance()) delete any_with_message_with_timestamp_;
  if (this != internal_default_instance()) delete any_with_message_containing_map_;
  if (this != internal_default_instance()) delete any_with_message_containing_struct_;
  if (this != internal_default_instance()) delete any_with_message_containing_repeated_message_;
  if (this != internal_default_instance()) delete recursive_any_with_type_field_at_end_;
  if (this != internal_default_instance()) delete top_level_any_;
  if (this != internal_default_instance()) delete top_level_any_with_type_field_at_end_;
}

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

const AnyTestCases& AnyTestCases::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyTestCases.base);
  return *internal_default_instance();
}


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

  if (GetArenaNoVirtual() == NULL && empty_any_ != NULL) {
    delete empty_any_;
  }
  empty_any_ = NULL;
  if (GetArenaNoVirtual() == NULL && type_only_any_ != NULL) {
    delete type_only_any_;
  }
  type_only_any_ = NULL;
  if (GetArenaNoVirtual() == NULL && wrapper_any_ != NULL) {
    delete wrapper_any_;
  }
  wrapper_any_ = NULL;
  if (GetArenaNoVirtual() == NULL && any_with_timestamp_value_ != NULL) {
    delete any_with_timestamp_value_;
  }
  any_with_timestamp_value_ = NULL;
  if (GetArenaNoVirtual() == NULL && any_with_duration_value_ != NULL) {
    delete any_with_duration_value_;
  }
  any_with_duration_value_ = NULL;
  if (GetArenaNoVirtual() == NULL && any_with_struct_value_ != NULL) {
    delete any_with_struct_value_;
  }
  any_with_struct_value_ = NULL;
  if (GetArenaNoVirtual() == NULL && recursive_any_ != NULL) {
    delete recursive_any_;
  }
  recursive_any_ = NULL;
  if (GetArenaNoVirtual() == NULL && any_with_message_value_ != NULL) {
    delete any_with_message_value_;
  }
  any_with_message_value_ = NULL;
  if (GetArenaNoVirtual() == NULL && any_with_nested_message_ != NULL) {
    delete any_with_nested_message_;
  }
  any_with_nested_message_ = NULL;
  if (GetArenaNoVirtual() == NULL && any_with_message_with_wrapper_type_ != NULL) {
    delete any_with_message_with_wrapper_type_;
  }
  any_with_message_with_wrapper_type_ = NULL;
  if (GetArenaNoVirtual() == NULL && any_with_message_with_timestamp_ != NULL) {
    delete any_with_message_with_timestamp_;
  }
  any_with_message_with_timestamp_ = NULL;
  if (GetArenaNoVirtual() == NULL && any_with_message_containing_map_ != NULL) {
    delete any_with_message_containing_map_;
  }
  any_with_message_containing_map_ = NULL;
  if (GetArenaNoVirtual() == NULL && any_with_message_containing_struct_ != NULL) {
    delete any_with_message_containing_struct_;
  }
  any_with_message_containing_struct_ = NULL;
  if (GetArenaNoVirtual() == NULL && any_with_message_containing_repeated_message_ != NULL) {
    delete any_with_message_containing_repeated_message_;
  }
  any_with_message_containing_repeated_message_ = NULL;
  if (GetArenaNoVirtual() == NULL && recursive_any_with_type_field_at_end_ != NULL) {
    delete recursive_any_with_type_field_at_end_;
  }
  recursive_any_with_type_field_at_end_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_any_ != NULL) {
    delete top_level_any_;
  }
  top_level_any_ = NULL;
  if (GetArenaNoVirtual() == NULL && top_level_any_with_type_field_at_end_ != NULL) {
    delete top_level_any_with_type_field_at_end_;
  }
  top_level_any_with_type_field_at_end_ = NULL;
  _internal_metadata_.Clear();
}

bool AnyTestCases::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.AnyTestCases)
  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.AnyWrapper empty_any = 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_any()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper type_only_any = 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_type_only_any()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper wrapper_any = 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_wrapper_any()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 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_any_with_timestamp_value()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper any_with_duration_value = 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_any_with_duration_value()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper any_with_struct_value = 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_any_with_struct_value()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper recursive_any = 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_recursive_any()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper any_with_message_value = 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_any_with_message_value()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper any_with_nested_message = 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_any_with_nested_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 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_any_with_message_with_wrapper_type()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 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_any_with_message_with_timestamp()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 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_any_with_message_containing_map()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper any_with_message_containing_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_any_with_message_containing_struct()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 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_any_with_message_containing_repeated_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 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_recursive_any_with_type_field_at_end()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Any top_level_any = 50;
      case 50: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(146u /* 402 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_any()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
      case 51: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(154u /* 410 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_top_level_any_with_type_field_at_end()));
        } 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.AnyTestCases)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyTestCases)
  return false;
#undef DO_
}

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

  // .google.protobuf.testing.AnyWrapper empty_any = 1;
  if (this->has_empty_any()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_empty_any(), output);
  }

  // .google.protobuf.testing.AnyWrapper type_only_any = 2;
  if (this->has_type_only_any()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->_internal_type_only_any(), output);
  }

  // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
  if (this->has_wrapper_any()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->_internal_wrapper_any(), output);
  }

  // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
  if (this->has_any_with_timestamp_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, this->_internal_any_with_timestamp_value(), output);
  }

  // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
  if (this->has_any_with_duration_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, this->_internal_any_with_duration_value(), output);
  }

  // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
  if (this->has_any_with_struct_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, this->_internal_any_with_struct_value(), output);
  }

  // .google.protobuf.testing.AnyWrapper recursive_any = 7;
  if (this->has_recursive_any()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, this->_internal_recursive_any(), output);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
  if (this->has_any_with_message_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      8, this->_internal_any_with_message_value(), output);
  }

  // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
  if (this->has_any_with_nested_message()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      9, this->_internal_any_with_nested_message(), output);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
  if (this->has_any_with_message_with_wrapper_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      10, this->_internal_any_with_message_with_wrapper_type(), output);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
  if (this->has_any_with_message_with_timestamp()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      11, this->_internal_any_with_message_with_timestamp(), output);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
  if (this->has_any_with_message_containing_map()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      12, this->_internal_any_with_message_containing_map(), output);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
  if (this->has_any_with_message_containing_struct()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      13, this->_internal_any_with_message_containing_struct(), output);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
  if (this->has_any_with_message_containing_repeated_message()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      14, this->_internal_any_with_message_containing_repeated_message(), output);
  }

  // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
  if (this->has_recursive_any_with_type_field_at_end()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      15, this->_internal_recursive_any_with_type_field_at_end(), output);
  }

  // .google.protobuf.Any top_level_any = 50;
  if (this->has_top_level_any()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      50, this->_internal_top_level_any(), output);
  }

  // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
  if (this->has_top_level_any_with_type_field_at_end()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      51, this->_internal_top_level_any_with_type_field_at_end(), 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.AnyTestCases)
}

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

  // .google.protobuf.testing.AnyWrapper empty_any = 1;
  if (this->has_empty_any()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_empty_any(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper type_only_any = 2;
  if (this->has_type_only_any()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->_internal_type_only_any(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
  if (this->has_wrapper_any()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->_internal_wrapper_any(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
  if (this->has_any_with_timestamp_value()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, this->_internal_any_with_timestamp_value(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
  if (this->has_any_with_duration_value()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, this->_internal_any_with_duration_value(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
  if (this->has_any_with_struct_value()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, this->_internal_any_with_struct_value(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper recursive_any = 7;
  if (this->has_recursive_any()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        7, this->_internal_recursive_any(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
  if (this->has_any_with_message_value()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        8, this->_internal_any_with_message_value(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
  if (this->has_any_with_nested_message()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        9, this->_internal_any_with_nested_message(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
  if (this->has_any_with_message_with_wrapper_type()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        10, this->_internal_any_with_message_with_wrapper_type(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
  if (this->has_any_with_message_with_timestamp()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        11, this->_internal_any_with_message_with_timestamp(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
  if (this->has_any_with_message_containing_map()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        12, this->_internal_any_with_message_containing_map(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
  if (this->has_any_with_message_containing_struct()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        13, this->_internal_any_with_message_containing_struct(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
  if (this->has_any_with_message_containing_repeated_message()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        14, this->_internal_any_with_message_containing_repeated_message(), deterministic, target);
  }

  // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
  if (this->has_recursive_any_with_type_field_at_end()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        15, this->_internal_recursive_any_with_type_field_at_end(), deterministic, target);
  }

  // .google.protobuf.Any top_level_any = 50;
  if (this->has_top_level_any()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        50, this->_internal_top_level_any(), deterministic, target);
  }

  // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
  if (this->has_top_level_any_with_type_field_at_end()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        51, this->_internal_top_level_any_with_type_field_at_end(), 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.AnyTestCases)
  return target;
}

size_t AnyTestCases::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyTestCases)
  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.AnyWrapper empty_any = 1;
  if (this->has_empty_any()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *empty_any_);
  }

  // .google.protobuf.testing.AnyWrapper type_only_any = 2;
  if (this->has_type_only_any()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *type_only_any_);
  }

  // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
  if (this->has_wrapper_any()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *wrapper_any_);
  }

  // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
  if (this->has_any_with_timestamp_value()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_with_timestamp_value_);
  }

  // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
  if (this->has_any_with_duration_value()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_with_duration_value_);
  }

  // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
  if (this->has_any_with_struct_value()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_with_struct_value_);
  }

  // .google.protobuf.testing.AnyWrapper recursive_any = 7;
  if (this->has_recursive_any()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *recursive_any_);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
  if (this->has_any_with_message_value()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_with_message_value_);
  }

  // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
  if (this->has_any_with_nested_message()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_with_nested_message_);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
  if (this->has_any_with_message_with_wrapper_type()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_with_message_with_wrapper_type_);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
  if (this->has_any_with_message_with_timestamp()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_with_message_with_timestamp_);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
  if (this->has_any_with_message_containing_map()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_with_message_containing_map_);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
  if (this->has_any_with_message_containing_struct()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_with_message_containing_struct_);
  }

  // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
  if (this->has_any_with_message_containing_repeated_message()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_with_message_containing_repeated_message_);
  }

  // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
  if (this->has_recursive_any_with_type_field_at_end()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *recursive_any_with_type_field_at_end_);
  }

  // .google.protobuf.Any top_level_any = 50;
  if (this->has_top_level_any()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_any_);
  }

  // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
  if (this->has_top_level_any_with_type_field_at_end()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *top_level_any_with_type_field_at_end_);
  }

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

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

void AnyTestCases::MergeFrom(const AnyTestCases& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyTestCases)
  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_any()) {
    mutable_empty_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.empty_any());
  }
  if (from.has_type_only_any()) {
    mutable_type_only_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.type_only_any());
  }
  if (from.has_wrapper_any()) {
    mutable_wrapper_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.wrapper_any());
  }
  if (from.has_any_with_timestamp_value()) {
    mutable_any_with_timestamp_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_timestamp_value());
  }
  if (from.has_any_with_duration_value()) {
    mutable_any_with_duration_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_duration_value());
  }
  if (from.has_any_with_struct_value()) {
    mutable_any_with_struct_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_struct_value());
  }
  if (from.has_recursive_any()) {
    mutable_recursive_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.recursive_any());
  }
  if (from.has_any_with_message_value()) {
    mutable_any_with_message_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_value());
  }
  if (from.has_any_with_nested_message()) {
    mutable_any_with_nested_message()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_nested_message());
  }
  if (from.has_any_with_message_with_wrapper_type()) {
    mutable_any_with_message_with_wrapper_type()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_with_wrapper_type());
  }
  if (from.has_any_with_message_with_timestamp()) {
    mutable_any_with_message_with_timestamp()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_with_timestamp());
  }
  if (from.has_any_with_message_containing_map()) {
    mutable_any_with_message_containing_map()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_containing_map());
  }
  if (from.has_any_with_message_containing_struct()) {
    mutable_any_with_message_containing_struct()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_containing_struct());
  }
  if (from.has_any_with_message_containing_repeated_message()) {
    mutable_any_with_message_containing_repeated_message()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_containing_repeated_message());
  }
  if (from.has_recursive_any_with_type_field_at_end()) {
    mutable_recursive_any_with_type_field_at_end()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.recursive_any_with_type_field_at_end());
  }
  if (from.has_top_level_any()) {
    mutable_top_level_any()->::google::protobuf::Any::MergeFrom(from.top_level_any());
  }
  if (from.has_top_level_any_with_type_field_at_end()) {
    mutable_top_level_any_with_type_field_at_end()->::google::protobuf::Any::MergeFrom(from.top_level_any_with_type_field_at_end());
  }
}

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

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

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

void AnyTestCases::Swap(AnyTestCases* other) {
  if (other == this) return;
  InternalSwap(other);
}
void AnyTestCases::InternalSwap(AnyTestCases* other) {
  using std::swap;
  swap(empty_any_, other->empty_any_);
  swap(type_only_any_, other->type_only_any_);
  swap(wrapper_any_, other->wrapper_any_);
  swap(any_with_timestamp_value_, other->any_with_timestamp_value_);
  swap(any_with_duration_value_, other->any_with_duration_value_);
  swap(any_with_struct_value_, other->any_with_struct_value_);
  swap(recursive_any_, other->recursive_any_);
  swap(any_with_message_value_, other->any_with_message_value_);
  swap(any_with_nested_message_, other->any_with_nested_message_);
  swap(any_with_message_with_wrapper_type_, other->any_with_message_with_wrapper_type_);
  swap(any_with_message_with_timestamp_, other->any_with_message_with_timestamp_);
  swap(any_with_message_containing_map_, other->any_with_message_containing_map_);
  swap(any_with_message_containing_struct_, other->any_with_message_containing_struct_);
  swap(any_with_message_containing_repeated_message_, other->any_with_message_containing_repeated_message_);
  swap(recursive_any_with_type_field_at_end_, other->recursive_any_with_type_field_at_end_);
  swap(top_level_any_, other->top_level_any_);
  swap(top_level_any_with_type_field_at_end_, other->top_level_any_with_type_field_at_end_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void AnyWrapper::InitAsDefaultInstance() {
  ::google::protobuf::testing::_AnyWrapper_default_instance_._instance.get_mutable()->any_ = const_cast< ::google::protobuf::Any*>(
      ::google::protobuf::Any::internal_default_instance());
}
void AnyWrapper::clear_any() {
  if (GetArenaNoVirtual() == NULL && any_ != NULL) {
    delete any_;
  }
  any_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int AnyWrapper::kAnyFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

AnyWrapper::AnyWrapper()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyWrapper.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyWrapper)
}
AnyWrapper::AnyWrapper(const AnyWrapper& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_any()) {
    any_ = new ::google::protobuf::Any(*from.any_);
  } else {
    any_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyWrapper)
}

void AnyWrapper::SharedCtor() {
  any_ = NULL;
}

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

void AnyWrapper::SharedDtor() {
  if (this != internal_default_instance()) delete any_;
}

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

const AnyWrapper& AnyWrapper::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyWrapper.base);
  return *internal_default_instance();
}


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

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

bool AnyWrapper::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.AnyWrapper)
  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.Any any = 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_any()));
        } 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.AnyWrapper)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyWrapper)
  return false;
#undef DO_
}

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

  // .google.protobuf.Any any = 1;
  if (this->has_any()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_any(), 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.AnyWrapper)
}

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

  // .google.protobuf.Any any = 1;
  if (this->has_any()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_any(), 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.AnyWrapper)
  return target;
}

size_t AnyWrapper::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyWrapper)
  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.Any any = 1;
  if (this->has_any()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_);
  }

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

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

void AnyWrapper::MergeFrom(const AnyWrapper& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyWrapper)
  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_any()) {
    mutable_any()->::google::protobuf::Any::MergeFrom(from.any());
  }
}

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

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

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

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

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


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

void Imports::InitAsDefaultInstance() {
  ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->dbl_ = const_cast< ::google::protobuf::DoubleValue*>(
      ::google::protobuf::DoubleValue::internal_default_instance());
  ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->struct__ = const_cast< ::google::protobuf::Struct*>(
      ::google::protobuf::Struct::internal_default_instance());
  ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->timestamp_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
  ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->duration_ = const_cast< ::google::protobuf::Duration*>(
      ::google::protobuf::Duration::internal_default_instance());
  ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->i32_ = const_cast< ::google::protobuf::Int32Value*>(
      ::google::protobuf::Int32Value::internal_default_instance());
  ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->data_ = const_cast< ::google::protobuf::testing::Data*>(
      ::google::protobuf::testing::Data::internal_default_instance());
}
void Imports::clear_dbl() {
  if (GetArenaNoVirtual() == NULL && dbl_ != NULL) {
    delete dbl_;
  }
  dbl_ = NULL;
}
void Imports::clear_struct_() {
  if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
    delete struct__;
  }
  struct__ = NULL;
}
void Imports::clear_timestamp() {
  if (GetArenaNoVirtual() == NULL && timestamp_ != NULL) {
    delete timestamp_;
  }
  timestamp_ = NULL;
}
void Imports::clear_duration() {
  if (GetArenaNoVirtual() == NULL && duration_ != NULL) {
    delete duration_;
  }
  duration_ = NULL;
}
void Imports::clear_i32() {
  if (GetArenaNoVirtual() == NULL && i32_ != NULL) {
    delete i32_;
  }
  i32_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Imports::kDblFieldNumber;
const int Imports::kStructFieldNumber;
const int Imports::kTimestampFieldNumber;
const int Imports::kDurationFieldNumber;
const int Imports::kI32FieldNumber;
const int Imports::kDataFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Imports::Imports()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Imports.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.Imports)
}
Imports::Imports(const Imports& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_dbl()) {
    dbl_ = new ::google::protobuf::DoubleValue(*from.dbl_);
  } else {
    dbl_ = NULL;
  }
  if (from.has_struct_()) {
    struct__ = new ::google::protobuf::Struct(*from.struct__);
  } else {
    struct__ = NULL;
  }
  if (from.has_timestamp()) {
    timestamp_ = new ::google::protobuf::Timestamp(*from.timestamp_);
  } else {
    timestamp_ = NULL;
  }
  if (from.has_duration()) {
    duration_ = new ::google::protobuf::Duration(*from.duration_);
  } else {
    duration_ = NULL;
  }
  if (from.has_i32()) {
    i32_ = new ::google::protobuf::Int32Value(*from.i32_);
  } else {
    i32_ = NULL;
  }
  if (from.has_data()) {
    data_ = new ::google::protobuf::testing::Data(*from.data_);
  } else {
    data_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Imports)
}

void Imports::SharedCtor() {
  ::memset(&dbl_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&data_) -
      reinterpret_cast<char*>(&dbl_)) + sizeof(data_));
}

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

void Imports::SharedDtor() {
  if (this != internal_default_instance()) delete dbl_;
  if (this != internal_default_instance()) delete struct__;
  if (this != internal_default_instance()) delete timestamp_;
  if (this != internal_default_instance()) delete duration_;
  if (this != internal_default_instance()) delete i32_;
  if (this != internal_default_instance()) delete data_;
}

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

const Imports& Imports::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Imports.base);
  return *internal_default_instance();
}


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

  if (GetArenaNoVirtual() == NULL && dbl_ != NULL) {
    delete dbl_;
  }
  dbl_ = NULL;
  if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
    delete struct__;
  }
  struct__ = NULL;
  if (GetArenaNoVirtual() == NULL && timestamp_ != NULL) {
    delete timestamp_;
  }
  timestamp_ = NULL;
  if (GetArenaNoVirtual() == NULL && duration_ != NULL) {
    delete duration_;
  }
  duration_ = NULL;
  if (GetArenaNoVirtual() == NULL && i32_ != NULL) {
    delete i32_;
  }
  i32_ = NULL;
  if (GetArenaNoVirtual() == NULL && data_ != NULL) {
    delete data_;
  }
  data_ = NULL;
  _internal_metadata_.Clear();
}

bool Imports::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.Imports)
  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.DoubleValue dbl = 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_dbl()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Struct struct = 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_struct_()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp timestamp = 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_timestamp()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Duration duration = 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_duration()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Int32Value i32 = 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_i32()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.Data data = 100;
      case 100: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_data()));
        } 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.Imports)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Imports)
  return false;
#undef DO_
}

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

  // .google.protobuf.DoubleValue dbl = 1;
  if (this->has_dbl()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_dbl(), output);
  }

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

  // .google.protobuf.Timestamp timestamp = 3;
  if (this->has_timestamp()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->_internal_timestamp(), output);
  }

  // .google.protobuf.Duration duration = 4;
  if (this->has_duration()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, this->_internal_duration(), output);
  }

  // .google.protobuf.Int32Value i32 = 5;
  if (this->has_i32()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, this->_internal_i32(), output);
  }

  // .google.protobuf.testing.Data data = 100;
  if (this->has_data()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      100, this->_internal_data(), 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.Imports)
}

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

  // .google.protobuf.DoubleValue dbl = 1;
  if (this->has_dbl()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_dbl(), deterministic, target);
  }

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

  // .google.protobuf.Timestamp timestamp = 3;
  if (this->has_timestamp()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->_internal_timestamp(), deterministic, target);
  }

  // .google.protobuf.Duration duration = 4;
  if (this->has_duration()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, this->_internal_duration(), deterministic, target);
  }

  // .google.protobuf.Int32Value i32 = 5;
  if (this->has_i32()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, this->_internal_i32(), deterministic, target);
  }

  // .google.protobuf.testing.Data data = 100;
  if (this->has_data()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        100, this->_internal_data(), 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.Imports)
  return target;
}

size_t Imports::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Imports)
  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.DoubleValue dbl = 1;
  if (this->has_dbl()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *dbl_);
  }

  // .google.protobuf.Struct struct = 2;
  if (this->has_struct_()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *struct__);
  }

  // .google.protobuf.Timestamp timestamp = 3;
  if (this->has_timestamp()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *timestamp_);
  }

  // .google.protobuf.Duration duration = 4;
  if (this->has_duration()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *duration_);
  }

  // .google.protobuf.Int32Value i32 = 5;
  if (this->has_i32()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *i32_);
  }

  // .google.protobuf.testing.Data data = 100;
  if (this->has_data()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *data_);
  }

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

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

void Imports::MergeFrom(const Imports& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Imports)
  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_dbl()) {
    mutable_dbl()->::google::protobuf::DoubleValue::MergeFrom(from.dbl());
  }
  if (from.has_struct_()) {
    mutable_struct_()->::google::protobuf::Struct::MergeFrom(from.struct_());
  }
  if (from.has_timestamp()) {
    mutable_timestamp()->::google::protobuf::Timestamp::MergeFrom(from.timestamp());
  }
  if (from.has_duration()) {
    mutable_duration()->::google::protobuf::Duration::MergeFrom(from.duration());
  }
  if (from.has_i32()) {
    mutable_i32()->::google::protobuf::Int32Value::MergeFrom(from.i32());
  }
  if (from.has_data()) {
    mutable_data()->::google::protobuf::testing::Data::MergeFrom(from.data());
  }
}

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

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

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

void Imports::Swap(Imports* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Imports::InternalSwap(Imports* other) {
  using std::swap;
  swap(dbl_, other->dbl_);
  swap(struct__, other->struct__);
  swap(timestamp_, other->timestamp_);
  swap(duration_, other->duration_);
  swap(i32_, other->i32_);
  swap(data_, other->data_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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


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

void Data::InitAsDefaultInstance() {
  ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->nested_data_ = const_cast< ::google::protobuf::testing::Data*>(
      ::google::protobuf::testing::Data::internal_default_instance());
  ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->int_wrapper_ = const_cast< ::google::protobuf::Int32Value*>(
      ::google::protobuf::Int32Value::internal_default_instance());
  ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
  ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->struct_data_ = const_cast< ::google::protobuf::Struct*>(
      ::google::protobuf::Struct::internal_default_instance());
}
void Data::clear_int_wrapper() {
  if (GetArenaNoVirtual() == NULL && int_wrapper_ != NULL) {
    delete int_wrapper_;
  }
  int_wrapper_ = NULL;
}
void Data::clear_time() {
  if (GetArenaNoVirtual() == NULL && time_ != NULL) {
    delete time_;
  }
  time_ = NULL;
}
void Data::clear_struct_data() {
  if (GetArenaNoVirtual() == NULL && struct_data_ != NULL) {
    delete struct_data_;
  }
  struct_data_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Data::kAttrFieldNumber;
const int Data::kStrFieldNumber;
const int Data::kMsgsFieldNumber;
const int Data::kNestedDataFieldNumber;
const int Data::kIntWrapperFieldNumber;
const int Data::kTimeFieldNumber;
const int Data::kMapDataFieldNumber;
const int Data::kStructDataFieldNumber;
const int Data::kRepeatedDataFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Data::Data()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.Data)
}
Data::Data(const Data& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      msgs_(from.msgs_),
      repeated_data_(from.repeated_data_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  map_data_.MergeFrom(from.map_data_);
  str_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.str().size() > 0) {
    str_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_);
  }
  if (from.has_nested_data()) {
    nested_data_ = new ::google::protobuf::testing::Data(*from.nested_data_);
  } else {
    nested_data_ = NULL;
  }
  if (from.has_int_wrapper()) {
    int_wrapper_ = new ::google::protobuf::Int32Value(*from.int_wrapper_);
  } else {
    int_wrapper_ = NULL;
  }
  if (from.has_time()) {
    time_ = new ::google::protobuf::Timestamp(*from.time_);
  } else {
    time_ = NULL;
  }
  if (from.has_struct_data()) {
    struct_data_ = new ::google::protobuf::Struct(*from.struct_data_);
  } else {
    struct_data_ = NULL;
  }
  attr_ = from.attr_;
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Data)
}

void Data::SharedCtor() {
  str_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&nested_data_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&attr_) -
      reinterpret_cast<char*>(&nested_data_)) + sizeof(attr_));
}

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

void Data::SharedDtor() {
  str_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete nested_data_;
  if (this != internal_default_instance()) delete int_wrapper_;
  if (this != internal_default_instance()) delete time_;
  if (this != internal_default_instance()) delete struct_data_;
}

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

const Data& Data::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data.base);
  return *internal_default_instance();
}


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

  msgs_.Clear();
  map_data_.Clear();
  repeated_data_.Clear();
  str_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && nested_data_ != NULL) {
    delete nested_data_;
  }
  nested_data_ = NULL;
  if (GetArenaNoVirtual() == NULL && int_wrapper_ != NULL) {
    delete int_wrapper_;
  }
  int_wrapper_ = NULL;
  if (GetArenaNoVirtual() == NULL && time_ != NULL) {
    delete time_;
  }
  time_ = NULL;
  if (GetArenaNoVirtual() == NULL && struct_data_ != NULL) {
    delete struct_data_;
  }
  struct_data_ = NULL;
  attr_ = 0;
  _internal_metadata_.Clear();
}

bool Data::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.Data)
  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)) {
      // int32 attr = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &attr_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string str = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_str()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->str().data(), static_cast<int>(this->str().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.protobuf.testing.Data.str"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string msgs = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_msgs()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->msgs(this->msgs_size() - 1).data(),
            static_cast<int>(this->msgs(this->msgs_size() - 1).length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.protobuf.testing.Data.msgs"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.testing.Data nested_data = 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_nested_data()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Int32Value int_wrapper = 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_int_wrapper()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp time = 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_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // map<string, string> map_data = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
          Data_MapDataEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
              Data_MapDataEntry_DoNotUse,
              ::std::string, ::std::string,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              0 >,
            ::google::protobuf::Map< ::std::string, ::std::string > > parser(&map_data_);
          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.Data.MapDataEntry.key"));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.value().data(), static_cast<int>(parser.value().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.protobuf.testing.Data.MapDataEntry.value"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Struct struct_data = 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_data()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .google.protobuf.testing.Data repeated_data = 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, add_repeated_data()));
        } 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.Data)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Data)
  return false;
#undef DO_
}

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

  // int32 attr = 1;
  if (this->attr() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->attr(), output);
  }

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

  // repeated string msgs = 3;
  for (int i = 0, n = this->msgs_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->msgs(i).data(), static_cast<int>(this->msgs(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.protobuf.testing.Data.msgs");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->msgs(i), output);
  }

  // .google.protobuf.testing.Data nested_data = 4;
  if (this->has_nested_data()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, this->_internal_nested_data(), output);
  }

  // .google.protobuf.Int32Value int_wrapper = 5;
  if (this->has_int_wrapper()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, this->_internal_int_wrapper(), output);
  }

  // .google.protobuf.Timestamp time = 6;
  if (this->has_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, this->_internal_time(), output);
  }

  // map<string, string> map_data = 7;
  if (!this->map_data().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::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.Data.MapDataEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.protobuf.testing.Data.MapDataEntry.value");
      }
    };

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

  // .google.protobuf.Struct struct_data = 8;
  if (this->has_struct_data()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      8, this->_internal_struct_data(), output);
  }

  // repeated .google.protobuf.testing.Data repeated_data = 9;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_data_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      9,
      this->repeated_data(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.Data)
}

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

  // int32 attr = 1;
  if (this->attr() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->attr(), target);
  }

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

  // repeated string msgs = 3;
  for (int i = 0, n = this->msgs_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->msgs(i).data(), static_cast<int>(this->msgs(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.protobuf.testing.Data.msgs");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->msgs(i), target);
  }

  // .google.protobuf.testing.Data nested_data = 4;
  if (this->has_nested_data()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, this->_internal_nested_data(), deterministic, target);
  }

  // .google.protobuf.Int32Value int_wrapper = 5;
  if (this->has_int_wrapper()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, this->_internal_int_wrapper(), deterministic, target);
  }

  // .google.protobuf.Timestamp time = 6;
  if (this->has_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, this->_internal_time(), deterministic, target);
  }

  // map<string, string> map_data = 7;
  if (!this->map_data().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::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.Data.MapDataEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.protobuf.testing.Data.MapDataEntry.value");
      }
    };

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

  // .google.protobuf.Struct struct_data = 8;
  if (this->has_struct_data()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        8, this->_internal_struct_data(), deterministic, target);
  }

  // repeated .google.protobuf.testing.Data repeated_data = 9;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_data_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        9, this->repeated_data(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.Data)
  return target;
}

size_t Data::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Data)
  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 string msgs = 3;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->msgs_size());
  for (int i = 0, n = this->msgs_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->msgs(i));
  }

  // map<string, string> map_data = 7;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->map_data_size());
  {
    ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
    for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
        it = this->map_data().begin();
        it != this->map_data().end(); ++it) {
      entry.reset(map_data_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  // repeated .google.protobuf.testing.Data repeated_data = 9;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_data_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->repeated_data(static_cast<int>(i)));
    }
  }

  // string str = 2;
  if (this->str().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->str());
  }

  // .google.protobuf.testing.Data nested_data = 4;
  if (this->has_nested_data()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *nested_data_);
  }

  // .google.protobuf.Int32Value int_wrapper = 5;
  if (this->has_int_wrapper()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *int_wrapper_);
  }

  // .google.protobuf.Timestamp time = 6;
  if (this->has_time()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *time_);
  }

  // .google.protobuf.Struct struct_data = 8;
  if (this->has_struct_data()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *struct_data_);
  }

  // int32 attr = 1;
  if (this->attr() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->attr());
  }

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

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

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

  msgs_.MergeFrom(from.msgs_);
  map_data_.MergeFrom(from.map_data_);
  repeated_data_.MergeFrom(from.repeated_data_);
  if (from.str().size() > 0) {

    str_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_);
  }
  if (from.has_nested_data()) {
    mutable_nested_data()->::google::protobuf::testing::Data::MergeFrom(from.nested_data());
  }
  if (from.has_int_wrapper()) {
    mutable_int_wrapper()->::google::protobuf::Int32Value::MergeFrom(from.int_wrapper());
  }
  if (from.has_time()) {
    mutable_time()->::google::protobuf::Timestamp::MergeFrom(from.time());
  }
  if (from.has_struct_data()) {
    mutable_struct_data()->::google::protobuf::Struct::MergeFrom(from.struct_data());
  }
  if (from.attr() != 0) {
    set_attr(from.attr());
  }
}

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

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

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

void Data::Swap(Data* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Data::InternalSwap(Data* other) {
  using std::swap;
  msgs_.InternalSwap(CastToBase(&other->msgs_));
  map_data_.Swap(&other->map_data_);
  CastToBase(&repeated_data_)->InternalSwap(CastToBase(&other->repeated_data_));
  str_.Swap(&other->str_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(nested_data_, other->nested_data_);
  swap(int_wrapper_, other->int_wrapper_);
  swap(time_, other->time_);
  swap(struct_data_, other->struct_data_);
  swap(attr_, other->attr_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void AnyIn::InitAsDefaultInstance() {
  ::google::protobuf::testing::_AnyIn_default_instance_._instance.get_mutable()->any_ = const_cast< ::google::protobuf::Any*>(
      ::google::protobuf::Any::internal_default_instance());
}
void AnyIn::clear_any() {
  if (GetArenaNoVirtual() == NULL && any_ != NULL) {
    delete any_;
  }
  any_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int AnyIn::kSomethingFieldNumber;
const int AnyIn::kAnyFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

AnyIn::AnyIn()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyIn.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyIn)
}
AnyIn::AnyIn(const AnyIn& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  something_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.something().size() > 0) {
    something_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.something_);
  }
  if (from.has_any()) {
    any_ = new ::google::protobuf::Any(*from.any_);
  } else {
    any_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyIn)
}

void AnyIn::SharedCtor() {
  something_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  any_ = NULL;
}

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

void AnyIn::SharedDtor() {
  something_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete any_;
}

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

const AnyIn& AnyIn::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyIn.base);
  return *internal_default_instance();
}


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

  something_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && any_ != NULL) {
    delete any_;
  }
  any_ = NULL;
  _internal_metadata_.Clear();
}

bool AnyIn::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.AnyIn)
  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 something = 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_something()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->something().data(), static_cast<int>(this->something().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.protobuf.testing.AnyIn.something"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Any any = 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_any()));
        } 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.AnyIn)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyIn)
  return false;
#undef DO_
}

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

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

  // .google.protobuf.Any any = 2;
  if (this->has_any()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->_internal_any(), 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.AnyIn)
}

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

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

  // .google.protobuf.Any any = 2;
  if (this->has_any()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->_internal_any(), 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.AnyIn)
  return target;
}

size_t AnyIn::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyIn)
  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 something = 1;
  if (this->something().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->something());
  }

  // .google.protobuf.Any any = 2;
  if (this->has_any()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_);
  }

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

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

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

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

    something_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.something_);
  }
  if (from.has_any()) {
    mutable_any()->::google::protobuf::Any::MergeFrom(from.any());
  }
}

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

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

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

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

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


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

void AnyOut::InitAsDefaultInstance() {
  ::google::protobuf::testing::_AnyOut_default_instance_._instance.get_mutable()->any_ = const_cast< ::google::protobuf::Any*>(
      ::google::protobuf::Any::internal_default_instance());
}
void AnyOut::clear_any() {
  if (GetArenaNoVirtual() == NULL && any_ != NULL) {
    delete any_;
  }
  any_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int AnyOut::kAnyFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

AnyOut::AnyOut()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyOut.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyOut)
}
AnyOut::AnyOut(const AnyOut& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_any()) {
    any_ = new ::google::protobuf::Any(*from.any_);
  } else {
    any_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyOut)
}

void AnyOut::SharedCtor() {
  any_ = NULL;
}

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

void AnyOut::SharedDtor() {
  if (this != internal_default_instance()) delete any_;
}

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

const AnyOut& AnyOut::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyOut.base);
  return *internal_default_instance();
}


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

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

bool AnyOut::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.AnyOut)
  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.Any any = 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_any()));
        } 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.AnyOut)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyOut)
  return false;
#undef DO_
}

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

  // .google.protobuf.Any any = 1;
  if (this->has_any()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_any(), 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.AnyOut)
}

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

  // .google.protobuf.Any any = 1;
  if (this->has_any()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_any(), 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.AnyOut)
  return target;
}

size_t AnyOut::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyOut)
  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.Any any = 1;
  if (this->has_any()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *any_);
  }

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

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

void AnyOut::MergeFrom(const AnyOut& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyOut)
  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_any()) {
    mutable_any()->::google::protobuf::Any::MergeFrom(from.any());
  }
}

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

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

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

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

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


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

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

AnyM::AnyM()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyM.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyM)
}
AnyM::AnyM(const AnyM& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  foo_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.foo().size() > 0) {
    foo_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.foo_);
  }
  // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyM)
}

void AnyM::SharedCtor() {
  foo_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

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

void AnyM::SharedDtor() {
  foo_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

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

const AnyM& AnyM::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyM.base);
  return *internal_default_instance();
}


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

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

bool AnyM::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.AnyM)
  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 foo = 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_foo()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->foo().data(), static_cast<int>(this->foo().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.protobuf.testing.AnyM.foo"));
        } 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.AnyM)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyM)
  return false;
#undef DO_
}

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

  // string foo = 1;
  if (this->foo().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->foo().data(), static_cast<int>(this->foo().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.protobuf.testing.AnyM.foo");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->foo(), 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.AnyM)
}

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

  // string foo = 1;
  if (this->foo().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->foo().data(), static_cast<int>(this->foo().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.protobuf.testing.AnyM.foo");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->foo(), 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.AnyM)
  return target;
}

size_t AnyM::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyM)
  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 foo = 1;
  if (this->foo().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->foo());
  }

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

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

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

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

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

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

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

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

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

::google::protobuf::Metadata AnyM::GetMetadata() const {
  protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_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::AnyTestCases* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyTestCases >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::AnyTestCases >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyWrapper >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::AnyWrapper >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Imports* Arena::CreateMaybeMessage< ::google::protobuf::testing::Imports >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::Imports >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Data_MapDataEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::Data_MapDataEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::Data_MapDataEntry_DoNotUse >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Data* Arena::CreateMaybeMessage< ::google::protobuf::testing::Data >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::Data >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyIn* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyIn >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::AnyIn >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyOut* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyOut >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::AnyOut >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyM* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyM >(Arena* arena) {
  return Arena::CreateInternal< ::google::protobuf::testing::AnyM >(arena);
}
}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)
