// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/protobuf/unittest.proto

#include <google/protobuf/unittest.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_2funittest_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessage;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_OptionalGroup_extension;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_RepeatedGroup_extension;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_NestedMessage;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_OptionalGroup;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_RepeatedGroup;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestDupFieldNumber_Bar;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestDupFieldNumber_Foo;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestDynamicExtensions_DynamicMessageType;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtensionOrderings1;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtensionOrderings2;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtensionOrderings2_TestExtensionOrderings3;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestFieldOrderings_NestedMessage;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestGroup_OptionalGroup;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestHugeFieldNumbers_OptionalGroup;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestIsInitialized_SubMessage_SubGroup;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestNestedExtension_OptionalGroup_extension;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneof2_FooGroup;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneof2_NestedMessage;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneofBackwardsCompatible_FooGroup;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneof_FooGroup;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestRecursiveMessage;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestRequired;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestRequiredOneof_NestedMessage;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_NestedTestAllTypes;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestIsInitialized_SubMessage;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMutualRecursionA;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestNestedMessageHasBits_NestedMessage;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_OptionalGroup;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedGroup;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<6> scc_info_TestAllTypes;
}  // namespace protobuf_google_2fprotobuf_2funittest_2eproto
namespace protobuf_google_2fprotobuf_2funittest_5fimport_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ImportMessage;
}  // namespace protobuf_google_2fprotobuf_2funittest_5fimport_2eproto
namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PublicImportMessage;
}  // namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto
namespace protobuf_unittest {
class TestAllTypes_NestedMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_NestedMessage>
      _instance;
} _TestAllTypes_NestedMessage_default_instance_;
class TestAllTypes_OptionalGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_OptionalGroup>
      _instance;
} _TestAllTypes_OptionalGroup_default_instance_;
class TestAllTypes_RepeatedGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_RepeatedGroup>
      _instance;
} _TestAllTypes_RepeatedGroup_default_instance_;
class TestAllTypesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes>
      _instance;
  ::google::protobuf::uint32 oneof_uint32_;
  const ::protobuf_unittest::TestAllTypes_NestedMessage* oneof_nested_message_;
  ::google::protobuf::internal::ArenaStringPtr oneof_string_;
  ::google::protobuf::internal::ArenaStringPtr oneof_bytes_;
} _TestAllTypes_default_instance_;
class NestedTestAllTypesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<NestedTestAllTypes>
      _instance;
} _NestedTestAllTypes_default_instance_;
class TestDeprecatedFieldsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestDeprecatedFields>
      _instance;
  ::google::protobuf::int32 deprecated_int32_in_oneof_;
} _TestDeprecatedFields_default_instance_;
class TestDeprecatedMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestDeprecatedMessage>
      _instance;
} _TestDeprecatedMessage_default_instance_;
class ForeignMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ForeignMessage>
      _instance;
} _ForeignMessage_default_instance_;
class TestReservedFieldsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestReservedFields>
      _instance;
} _TestReservedFields_default_instance_;
class TestAllExtensionsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestAllExtensions>
      _instance;
} _TestAllExtensions_default_instance_;
class OptionalGroup_extensionDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<OptionalGroup_extension>
      _instance;
} _OptionalGroup_extension_default_instance_;
class RepeatedGroup_extensionDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<RepeatedGroup_extension>
      _instance;
} _RepeatedGroup_extension_default_instance_;
class TestGroup_OptionalGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestGroup_OptionalGroup>
      _instance;
} _TestGroup_OptionalGroup_default_instance_;
class TestGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestGroup>
      _instance;
} _TestGroup_default_instance_;
class TestGroupExtensionDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestGroupExtension>
      _instance;
} _TestGroupExtension_default_instance_;
class TestNestedExtension_OptionalGroup_extensionDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestNestedExtension_OptionalGroup_extension>
      _instance;
} _TestNestedExtension_OptionalGroup_extension_default_instance_;
class TestNestedExtensionDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestNestedExtension>
      _instance;
} _TestNestedExtension_default_instance_;
class TestRequiredDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestRequired>
      _instance;
} _TestRequired_default_instance_;
class TestRequiredForeignDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestRequiredForeign>
      _instance;
} _TestRequiredForeign_default_instance_;
class TestRequiredMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestRequiredMessage>
      _instance;
} _TestRequiredMessage_default_instance_;
class TestForeignNestedDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestForeignNested>
      _instance;
} _TestForeignNested_default_instance_;
class TestEmptyMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestEmptyMessage>
      _instance;
} _TestEmptyMessage_default_instance_;
class TestEmptyMessageWithExtensionsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestEmptyMessageWithExtensions>
      _instance;
} _TestEmptyMessageWithExtensions_default_instance_;
class TestMultipleExtensionRangesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestMultipleExtensionRanges>
      _instance;
} _TestMultipleExtensionRanges_default_instance_;
class TestReallyLargeTagNumberDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestReallyLargeTagNumber>
      _instance;
} _TestReallyLargeTagNumber_default_instance_;
class TestRecursiveMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestRecursiveMessage>
      _instance;
} _TestRecursiveMessage_default_instance_;
class TestMutualRecursionA_SubMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestMutualRecursionA_SubMessage>
      _instance;
} _TestMutualRecursionA_SubMessage_default_instance_;
class TestMutualRecursionA_SubGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestMutualRecursionA_SubGroup>
      _instance;
} _TestMutualRecursionA_SubGroup_default_instance_;
class TestMutualRecursionADefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestMutualRecursionA>
      _instance;
} _TestMutualRecursionA_default_instance_;
class TestMutualRecursionBDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestMutualRecursionB>
      _instance;
} _TestMutualRecursionB_default_instance_;
class TestIsInitialized_SubMessage_SubGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestIsInitialized_SubMessage_SubGroup>
      _instance;
} _TestIsInitialized_SubMessage_SubGroup_default_instance_;
class TestIsInitialized_SubMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestIsInitialized_SubMessage>
      _instance;
} _TestIsInitialized_SubMessage_default_instance_;
class TestIsInitializedDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestIsInitialized>
      _instance;
} _TestIsInitialized_default_instance_;
class TestDupFieldNumber_FooDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestDupFieldNumber_Foo>
      _instance;
} _TestDupFieldNumber_Foo_default_instance_;
class TestDupFieldNumber_BarDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestDupFieldNumber_Bar>
      _instance;
} _TestDupFieldNumber_Bar_default_instance_;
class TestDupFieldNumberDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestDupFieldNumber>
      _instance;
} _TestDupFieldNumber_default_instance_;
class TestEagerMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestEagerMessage>
      _instance;
} _TestEagerMessage_default_instance_;
class TestLazyMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestLazyMessage>
      _instance;
} _TestLazyMessage_default_instance_;
class TestNestedMessageHasBits_NestedMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestNestedMessageHasBits_NestedMessage>
      _instance;
} _TestNestedMessageHasBits_NestedMessage_default_instance_;
class TestNestedMessageHasBitsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestNestedMessageHasBits>
      _instance;
} _TestNestedMessageHasBits_default_instance_;
class TestCamelCaseFieldNamesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestCamelCaseFieldNames>
      _instance;
} _TestCamelCaseFieldNames_default_instance_;
class TestFieldOrderings_NestedMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestFieldOrderings_NestedMessage>
      _instance;
} _TestFieldOrderings_NestedMessage_default_instance_;
class TestFieldOrderingsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestFieldOrderings>
      _instance;
} _TestFieldOrderings_default_instance_;
class TestExtensionOrderings1DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestExtensionOrderings1>
      _instance;
} _TestExtensionOrderings1_default_instance_;
class TestExtensionOrderings2_TestExtensionOrderings3DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestExtensionOrderings2_TestExtensionOrderings3>
      _instance;
} _TestExtensionOrderings2_TestExtensionOrderings3_default_instance_;
class TestExtensionOrderings2DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestExtensionOrderings2>
      _instance;
} _TestExtensionOrderings2_default_instance_;
class TestExtremeDefaultValuesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestExtremeDefaultValues>
      _instance;
} _TestExtremeDefaultValues_default_instance_;
class SparseEnumMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<SparseEnumMessage>
      _instance;
} _SparseEnumMessage_default_instance_;
class OneStringDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<OneString>
      _instance;
} _OneString_default_instance_;
class MoreStringDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<MoreString>
      _instance;
} _MoreString_default_instance_;
class OneBytesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<OneBytes>
      _instance;
} _OneBytes_default_instance_;
class MoreBytesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<MoreBytes>
      _instance;
} _MoreBytes_default_instance_;
class Int32MessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Int32Message>
      _instance;
} _Int32Message_default_instance_;
class Uint32MessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Uint32Message>
      _instance;
} _Uint32Message_default_instance_;
class Int64MessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Int64Message>
      _instance;
} _Int64Message_default_instance_;
class Uint64MessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Uint64Message>
      _instance;
} _Uint64Message_default_instance_;
class BoolMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<BoolMessage>
      _instance;
} _BoolMessage_default_instance_;
class TestOneof_FooGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestOneof_FooGroup>
      _instance;
} _TestOneof_FooGroup_default_instance_;
class TestOneofDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestOneof>
      _instance;
  ::google::protobuf::int32 foo_int_;
  ::google::protobuf::internal::ArenaStringPtr foo_string_;
  const ::protobuf_unittest::TestAllTypes* foo_message_;
  const ::protobuf_unittest::TestOneof_FooGroup* foogroup_;
} _TestOneof_default_instance_;
class TestOneofBackwardsCompatible_FooGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestOneofBackwardsCompatible_FooGroup>
      _instance;
} _TestOneofBackwardsCompatible_FooGroup_default_instance_;
class TestOneofBackwardsCompatibleDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestOneofBackwardsCompatible>
      _instance;
} _TestOneofBackwardsCompatible_default_instance_;
class TestOneof2_FooGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestOneof2_FooGroup>
      _instance;
} _TestOneof2_FooGroup_default_instance_;
class TestOneof2_NestedMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestOneof2_NestedMessage>
      _instance;
} _TestOneof2_NestedMessage_default_instance_;
class TestOneof2DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestOneof2>
      _instance;
  ::google::protobuf::int32 foo_int_;
  ::google::protobuf::internal::ArenaStringPtr foo_string_;
  ::google::protobuf::internal::ArenaStringPtr foo_cord_;
  ::google::protobuf::internal::ArenaStringPtr foo_string_piece_;
  ::google::protobuf::internal::ArenaStringPtr foo_bytes_;
  int foo_enum_;
  const ::protobuf_unittest::TestOneof2_NestedMessage* foo_message_;
  const ::protobuf_unittest::TestOneof2_FooGroup* foogroup_;
  const ::protobuf_unittest::TestOneof2_NestedMessage* foo_lazy_message_;
  ::google::protobuf::int32 bar_int_;
  ::google::protobuf::internal::ArenaStringPtr bar_string_;
  ::google::protobuf::internal::ArenaStringPtr bar_cord_;
  ::google::protobuf::internal::ArenaStringPtr bar_string_piece_;
  ::google::protobuf::internal::ArenaStringPtr bar_bytes_;
  int bar_enum_;
} _TestOneof2_default_instance_;
class TestRequiredOneof_NestedMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestRequiredOneof_NestedMessage>
      _instance;
} _TestRequiredOneof_NestedMessage_default_instance_;
class TestRequiredOneofDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestRequiredOneof>
      _instance;
  ::google::protobuf::int32 foo_int_;
  ::google::protobuf::internal::ArenaStringPtr foo_string_;
  const ::protobuf_unittest::TestRequiredOneof_NestedMessage* foo_message_;
} _TestRequiredOneof_default_instance_;
class TestPackedTypesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestPackedTypes>
      _instance;
} _TestPackedTypes_default_instance_;
class TestUnpackedTypesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestUnpackedTypes>
      _instance;
} _TestUnpackedTypes_default_instance_;
class TestPackedExtensionsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestPackedExtensions>
      _instance;
} _TestPackedExtensions_default_instance_;
class TestUnpackedExtensionsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestUnpackedExtensions>
      _instance;
} _TestUnpackedExtensions_default_instance_;
class TestDynamicExtensions_DynamicMessageTypeDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestDynamicExtensions_DynamicMessageType>
      _instance;
} _TestDynamicExtensions_DynamicMessageType_default_instance_;
class TestDynamicExtensionsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestDynamicExtensions>
      _instance;
} _TestDynamicExtensions_default_instance_;
class TestRepeatedScalarDifferentTagSizesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestRepeatedScalarDifferentTagSizes>
      _instance;
} _TestRepeatedScalarDifferentTagSizes_default_instance_;
class TestParsingMerge_RepeatedFieldsGenerator_Group1DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge_RepeatedFieldsGenerator_Group1>
      _instance;
} _TestParsingMerge_RepeatedFieldsGenerator_Group1_default_instance_;
class TestParsingMerge_RepeatedFieldsGenerator_Group2DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge_RepeatedFieldsGenerator_Group2>
      _instance;
} _TestParsingMerge_RepeatedFieldsGenerator_Group2_default_instance_;
class TestParsingMerge_RepeatedFieldsGeneratorDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge_RepeatedFieldsGenerator>
      _instance;
} _TestParsingMerge_RepeatedFieldsGenerator_default_instance_;
class TestParsingMerge_OptionalGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge_OptionalGroup>
      _instance;
} _TestParsingMerge_OptionalGroup_default_instance_;
class TestParsingMerge_RepeatedGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge_RepeatedGroup>
      _instance;
} _TestParsingMerge_RepeatedGroup_default_instance_;
class TestParsingMergeDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge>
      _instance;
} _TestParsingMerge_default_instance_;
class TestCommentInjectionMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestCommentInjectionMessage>
      _instance;
} _TestCommentInjectionMessage_default_instance_;
class FooRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<FooRequest>
      _instance;
} _FooRequest_default_instance_;
class FooResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<FooResponse>
      _instance;
} _FooResponse_default_instance_;
class FooClientMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<FooClientMessage>
      _instance;
} _FooClientMessage_default_instance_;
class FooServerMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<FooServerMessage>
      _instance;
} _FooServerMessage_default_instance_;
class BarRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<BarRequest>
      _instance;
} _BarRequest_default_instance_;
class BarResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<BarResponse>
      _instance;
} _BarResponse_default_instance_;
class TestJsonNameDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestJsonName>
      _instance;
} _TestJsonName_default_instance_;
class TestHugeFieldNumbers_OptionalGroupDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestHugeFieldNumbers_OptionalGroup>
      _instance;
} _TestHugeFieldNumbers_OptionalGroup_default_instance_;
class TestHugeFieldNumbers_StringStringMapEntry_DoNotUseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse>
      _instance;
} _TestHugeFieldNumbers_StringStringMapEntry_DoNotUse_default_instance_;
class TestHugeFieldNumbersDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestHugeFieldNumbers>
      _instance;
  ::google::protobuf::uint32 oneof_uint32_;
  const ::protobuf_unittest::TestAllTypes* oneof_test_all_types_;
  ::google::protobuf::internal::ArenaStringPtr oneof_string_;
  ::google::protobuf::internal::ArenaStringPtr oneof_bytes_;
} _TestHugeFieldNumbers_default_instance_;
class TestExtensionInsideTableDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestExtensionInsideTable>
      _instance;
} _TestExtensionInsideTable_default_instance_;
}  // namespace protobuf_unittest
namespace protobuf_google_2fprotobuf_2funittest_2eproto {
static void InitDefaultsTestAllTypes_NestedMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestAllTypes_NestedMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestAllTypes_NestedMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestAllTypes_NestedMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsTestAllTypes_OptionalGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestAllTypes_OptionalGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestAllTypes_OptionalGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestAllTypes_OptionalGroup::InitAsDefaultInstance();
}

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

static void InitDefaultsTestAllTypes_RepeatedGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestAllTypes_RepeatedGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestAllTypes_RepeatedGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestAllTypes_RepeatedGroup::InitAsDefaultInstance();
}

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

static void InitDefaultsTestAllTypes() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.DefaultConstruct();
  *::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get_mutable() = ::std::string("hello", 5);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get_mutable());
  ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.DefaultConstruct();
  *::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get_mutable() = ::std::string("world", 5);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get_mutable());
  ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.DefaultConstruct();
  *::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get_mutable() = ::std::string("abc", 3);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get_mutable());
  ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.DefaultConstruct();
  *::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get_mutable() = ::std::string("123", 3);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get_mutable());
  {
    void* ptr = &::protobuf_unittest::_TestAllTypes_default_instance_;
    new (ptr) ::protobuf_unittest::TestAllTypes();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestAllTypes::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<6> scc_info_TestAllTypes =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsTestAllTypes}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_OptionalGroup.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_NestedMessage.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base,
      &protobuf_google_2fprotobuf_2funittest_5fimport_2eproto::scc_info_ImportMessage.base,
      &protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto::scc_info_PublicImportMessage.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_RepeatedGroup.base,}};

static void InitDefaultsNestedTestAllTypes() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_NestedTestAllTypes_default_instance_;
    new (ptr) ::protobuf_unittest::NestedTestAllTypes();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::NestedTestAllTypes::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_NestedTestAllTypes =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNestedTestAllTypes}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};

static void InitDefaultsTestDeprecatedFields() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestDeprecatedFields_default_instance_;
    new (ptr) ::protobuf_unittest::TestDeprecatedFields();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestDeprecatedFields::InitAsDefaultInstance();
}

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

static void InitDefaultsTestDeprecatedMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestDeprecatedMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestDeprecatedMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestDeprecatedMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsForeignMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_ForeignMessage_default_instance_;
    new (ptr) ::protobuf_unittest::ForeignMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::ForeignMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsTestReservedFields() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestReservedFields_default_instance_;
    new (ptr) ::protobuf_unittest::TestReservedFields();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestReservedFields::InitAsDefaultInstance();
}

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

static void InitDefaultsTestAllExtensions() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestAllExtensions_default_instance_;
    new (ptr) ::protobuf_unittest::TestAllExtensions();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestAllExtensions::InitAsDefaultInstance();
}

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

static void InitDefaultsOptionalGroup_extension() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_OptionalGroup_extension_default_instance_;
    new (ptr) ::protobuf_unittest::OptionalGroup_extension();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::OptionalGroup_extension::InitAsDefaultInstance();
}

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

static void InitDefaultsRepeatedGroup_extension() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_RepeatedGroup_extension_default_instance_;
    new (ptr) ::protobuf_unittest::RepeatedGroup_extension();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::RepeatedGroup_extension::InitAsDefaultInstance();
}

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

static void InitDefaultsTestGroup_OptionalGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestGroup_OptionalGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestGroup_OptionalGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestGroup_OptionalGroup::InitAsDefaultInstance();
}

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

static void InitDefaultsTestGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestGroup::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestGroup =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestGroup}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup_OptionalGroup.base,}};

static void InitDefaultsTestGroupExtension() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestGroupExtension_default_instance_;
    new (ptr) ::protobuf_unittest::TestGroupExtension();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestGroupExtension::InitAsDefaultInstance();
}

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

static void InitDefaultsTestNestedExtension_OptionalGroup_extension() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestNestedExtension_OptionalGroup_extension_default_instance_;
    new (ptr) ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension::InitAsDefaultInstance();
}

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

static void InitDefaultsTestNestedExtension() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestNestedExtension_default_instance_;
    new (ptr) ::protobuf_unittest::TestNestedExtension();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestNestedExtension::InitAsDefaultInstance();
}

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

static void InitDefaultsTestRequired() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestRequired_default_instance_;
    new (ptr) ::protobuf_unittest::TestRequired();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestRequired::InitAsDefaultInstance();
}

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

static void InitDefaultsTestRequiredForeign() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestRequiredForeign_default_instance_;
    new (ptr) ::protobuf_unittest::TestRequiredForeign();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestRequiredForeign::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestRequiredForeign =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestRequiredForeign}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base,}};

static void InitDefaultsTestRequiredMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestRequiredMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestRequiredMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestRequiredMessage::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestRequiredMessage =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestRequiredMessage}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base,}};

static void InitDefaultsTestForeignNested() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestForeignNested_default_instance_;
    new (ptr) ::protobuf_unittest::TestForeignNested();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestForeignNested::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestForeignNested =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestForeignNested}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_NestedMessage.base,}};

static void InitDefaultsTestEmptyMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestEmptyMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestEmptyMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestEmptyMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsTestEmptyMessageWithExtensions() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestEmptyMessageWithExtensions_default_instance_;
    new (ptr) ::protobuf_unittest::TestEmptyMessageWithExtensions();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestEmptyMessageWithExtensions::InitAsDefaultInstance();
}

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

static void InitDefaultsTestMultipleExtensionRanges() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestMultipleExtensionRanges_default_instance_;
    new (ptr) ::protobuf_unittest::TestMultipleExtensionRanges();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestMultipleExtensionRanges::InitAsDefaultInstance();
}

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

static void InitDefaultsTestReallyLargeTagNumber() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestReallyLargeTagNumber_default_instance_;
    new (ptr) ::protobuf_unittest::TestReallyLargeTagNumber();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestReallyLargeTagNumber::InitAsDefaultInstance();
}

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

static void InitDefaultsTestRecursiveMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestRecursiveMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestRecursiveMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestRecursiveMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsTestMutualRecursionA() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestMutualRecursionA_SubMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestMutualRecursionA_SubMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  {
    void* ptr = &::protobuf_unittest::_TestMutualRecursionA_SubGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestMutualRecursionA_SubGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  {
    void* ptr = &::protobuf_unittest::_TestMutualRecursionA_default_instance_;
    new (ptr) ::protobuf_unittest::TestMutualRecursionA();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  {
    void* ptr = &::protobuf_unittest::_TestMutualRecursionB_default_instance_;
    new (ptr) ::protobuf_unittest::TestMutualRecursionB();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestMutualRecursionA_SubMessage::InitAsDefaultInstance();
  ::protobuf_unittest::TestMutualRecursionA_SubGroup::InitAsDefaultInstance();
  ::protobuf_unittest::TestMutualRecursionA::InitAsDefaultInstance();
  ::protobuf_unittest::TestMutualRecursionB::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestMutualRecursionA =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMutualRecursionA}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};

static void InitDefaultsTestIsInitialized_SubMessage_SubGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestIsInitialized_SubMessage_SubGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup::InitAsDefaultInstance();
}

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

static void InitDefaultsTestIsInitialized_SubMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestIsInitialized_SubMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestIsInitialized_SubMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestIsInitialized_SubMessage::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestIsInitialized_SubMessage =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestIsInitialized_SubMessage}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage_SubGroup.base,}};

static void InitDefaultsTestIsInitialized() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestIsInitialized_default_instance_;
    new (ptr) ::protobuf_unittest::TestIsInitialized();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestIsInitialized::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestIsInitialized =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestIsInitialized}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage.base,}};

static void InitDefaultsTestDupFieldNumber_Foo() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestDupFieldNumber_Foo_default_instance_;
    new (ptr) ::protobuf_unittest::TestDupFieldNumber_Foo();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestDupFieldNumber_Foo::InitAsDefaultInstance();
}

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

static void InitDefaultsTestDupFieldNumber_Bar() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestDupFieldNumber_Bar_default_instance_;
    new (ptr) ::protobuf_unittest::TestDupFieldNumber_Bar();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestDupFieldNumber_Bar::InitAsDefaultInstance();
}

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

static void InitDefaultsTestDupFieldNumber() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestDupFieldNumber_default_instance_;
    new (ptr) ::protobuf_unittest::TestDupFieldNumber();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestDupFieldNumber::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<2> scc_info_TestDupFieldNumber =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestDupFieldNumber}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Foo.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Bar.base,}};

static void InitDefaultsTestEagerMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestEagerMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestEagerMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestEagerMessage::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestEagerMessage =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestEagerMessage}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};

static void InitDefaultsTestLazyMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestLazyMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestLazyMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestLazyMessage::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestLazyMessage =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestLazyMessage}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};

static void InitDefaultsTestNestedMessageHasBits_NestedMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestNestedMessageHasBits_NestedMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestNestedMessageHasBits_NestedMessage =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestNestedMessageHasBits_NestedMessage}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base,}};

static void InitDefaultsTestNestedMessageHasBits() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestNestedMessageHasBits_default_instance_;
    new (ptr) ::protobuf_unittest::TestNestedMessageHasBits();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestNestedMessageHasBits::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestNestedMessageHasBits =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestNestedMessageHasBits}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits_NestedMessage.base,}};

static void InitDefaultsTestCamelCaseFieldNames() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestCamelCaseFieldNames_default_instance_;
    new (ptr) ::protobuf_unittest::TestCamelCaseFieldNames();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestCamelCaseFieldNames::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestCamelCaseFieldNames =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestCamelCaseFieldNames}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base,}};

static void InitDefaultsTestFieldOrderings_NestedMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestFieldOrderings_NestedMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestFieldOrderings_NestedMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestFieldOrderings_NestedMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsTestFieldOrderings() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestFieldOrderings_default_instance_;
    new (ptr) ::protobuf_unittest::TestFieldOrderings();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestFieldOrderings::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestFieldOrderings =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestFieldOrderings}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings_NestedMessage.base,}};

static void InitDefaultsTestExtensionOrderings1() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestExtensionOrderings1_default_instance_;
    new (ptr) ::protobuf_unittest::TestExtensionOrderings1();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestExtensionOrderings1::InitAsDefaultInstance();
}

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

static void InitDefaultsTestExtensionOrderings2_TestExtensionOrderings3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestExtensionOrderings2_TestExtensionOrderings3_default_instance_;
    new (ptr) ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3::InitAsDefaultInstance();
}

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

static void InitDefaultsTestExtensionOrderings2() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestExtensionOrderings2_default_instance_;
    new (ptr) ::protobuf_unittest::TestExtensionOrderings2();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestExtensionOrderings2::InitAsDefaultInstance();
}

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

static void InitDefaultsTestExtremeDefaultValues() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.DefaultConstruct();
  *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get_mutable() = ::std::string("\000\001\007\010\014\n\r\t\013\\\'\"\376", 13);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get_mutable());
  ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.DefaultConstruct();
  *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get_mutable() = ::std::string("\341\210\264", 3);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get_mutable());
  ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.DefaultConstruct();
  *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get_mutable() = ::std::string("\? \? \?\? \?\? \?\?\? \?\?/ \?\?-", 21);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get_mutable());
  ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.DefaultConstruct();
  *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get_mutable() = ::std::string("hel\000lo", 6);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get_mutable());
  ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.DefaultConstruct();
  *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get_mutable() = ::std::string("wor\000ld", 6);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get_mutable());
  ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.DefaultConstruct();
  *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get_mutable() = ::std::string("ab\000c", 4);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get_mutable());
  ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.DefaultConstruct();
  *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get_mutable() = ::std::string("12\0003", 4);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get_mutable());
  ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.DefaultConstruct();
  *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get_mutable() = ::std::string("${unknown}", 10);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get_mutable());
  {
    void* ptr = &::protobuf_unittest::_TestExtremeDefaultValues_default_instance_;
    new (ptr) ::protobuf_unittest::TestExtremeDefaultValues();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestExtremeDefaultValues::InitAsDefaultInstance();
}

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

static void InitDefaultsSparseEnumMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_SparseEnumMessage_default_instance_;
    new (ptr) ::protobuf_unittest::SparseEnumMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::SparseEnumMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsOneString() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_OneString_default_instance_;
    new (ptr) ::protobuf_unittest::OneString();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::OneString::InitAsDefaultInstance();
}

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

static void InitDefaultsMoreString() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_MoreString_default_instance_;
    new (ptr) ::protobuf_unittest::MoreString();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::MoreString::InitAsDefaultInstance();
}

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

static void InitDefaultsOneBytes() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_OneBytes_default_instance_;
    new (ptr) ::protobuf_unittest::OneBytes();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::OneBytes::InitAsDefaultInstance();
}

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

static void InitDefaultsMoreBytes() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_MoreBytes_default_instance_;
    new (ptr) ::protobuf_unittest::MoreBytes();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::MoreBytes::InitAsDefaultInstance();
}

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

static void InitDefaultsInt32Message() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_Int32Message_default_instance_;
    new (ptr) ::protobuf_unittest::Int32Message();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::Int32Message::InitAsDefaultInstance();
}

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

static void InitDefaultsUint32Message() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_Uint32Message_default_instance_;
    new (ptr) ::protobuf_unittest::Uint32Message();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::Uint32Message::InitAsDefaultInstance();
}

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

static void InitDefaultsInt64Message() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_Int64Message_default_instance_;
    new (ptr) ::protobuf_unittest::Int64Message();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::Int64Message::InitAsDefaultInstance();
}

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

static void InitDefaultsUint64Message() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_Uint64Message_default_instance_;
    new (ptr) ::protobuf_unittest::Uint64Message();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::Uint64Message::InitAsDefaultInstance();
}

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

static void InitDefaultsBoolMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_BoolMessage_default_instance_;
    new (ptr) ::protobuf_unittest::BoolMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::BoolMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsTestOneof_FooGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestOneof_FooGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestOneof_FooGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestOneof_FooGroup::InitAsDefaultInstance();
}

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

static void InitDefaultsTestOneof() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestOneof_default_instance_;
    new (ptr) ::protobuf_unittest::TestOneof();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestOneof::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<2> scc_info_TestOneof =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestOneof}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof_FooGroup.base,}};

static void InitDefaultsTestOneofBackwardsCompatible_FooGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestOneofBackwardsCompatible_FooGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup::InitAsDefaultInstance();
}

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

static void InitDefaultsTestOneofBackwardsCompatible() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestOneofBackwardsCompatible_default_instance_;
    new (ptr) ::protobuf_unittest::TestOneofBackwardsCompatible();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestOneofBackwardsCompatible::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<2> scc_info_TestOneofBackwardsCompatible =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestOneofBackwardsCompatible}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible_FooGroup.base,}};

static void InitDefaultsTestOneof2_FooGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestOneof2_FooGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestOneof2_FooGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestOneof2_FooGroup::InitAsDefaultInstance();
}

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

static void InitDefaultsTestOneof2_NestedMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestOneof2_NestedMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestOneof2_NestedMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestOneof2_NestedMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsTestOneof2() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_.DefaultConstruct();
  *::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_.get_mutable() = ::std::string("STRING", 6);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_.get_mutable());
  ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_.DefaultConstruct();
  *::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_.get_mutable() = ::std::string("CORD", 4);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_.get_mutable());
  ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_.DefaultConstruct();
  *::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_.get_mutable() = ::std::string("SPIECE", 6);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_.get_mutable());
  ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_.DefaultConstruct();
  *::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_.get_mutable() = ::std::string("BYTES", 5);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_.get_mutable());
  ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.DefaultConstruct();
  *::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get_mutable() = ::std::string("BAZ", 3);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get_mutable());
  {
    void* ptr = &::protobuf_unittest::_TestOneof2_default_instance_;
    new (ptr) ::protobuf_unittest::TestOneof2();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestOneof2::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<2> scc_info_TestOneof2 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestOneof2}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_NestedMessage.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_FooGroup.base,}};

static void InitDefaultsTestRequiredOneof_NestedMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestRequiredOneof_NestedMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestRequiredOneof_NestedMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestRequiredOneof_NestedMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsTestRequiredOneof() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestRequiredOneof_default_instance_;
    new (ptr) ::protobuf_unittest::TestRequiredOneof();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestRequiredOneof::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestRequiredOneof =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestRequiredOneof}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof_NestedMessage.base,}};

static void InitDefaultsTestPackedTypes() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestPackedTypes_default_instance_;
    new (ptr) ::protobuf_unittest::TestPackedTypes();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestPackedTypes::InitAsDefaultInstance();
}

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

static void InitDefaultsTestUnpackedTypes() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestUnpackedTypes_default_instance_;
    new (ptr) ::protobuf_unittest::TestUnpackedTypes();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestUnpackedTypes::InitAsDefaultInstance();
}

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

static void InitDefaultsTestPackedExtensions() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestPackedExtensions_default_instance_;
    new (ptr) ::protobuf_unittest::TestPackedExtensions();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestPackedExtensions::InitAsDefaultInstance();
}

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

static void InitDefaultsTestUnpackedExtensions() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestUnpackedExtensions_default_instance_;
    new (ptr) ::protobuf_unittest::TestUnpackedExtensions();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestUnpackedExtensions::InitAsDefaultInstance();
}

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

static void InitDefaultsTestDynamicExtensions_DynamicMessageType() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestDynamicExtensions_DynamicMessageType_default_instance_;
    new (ptr) ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType::InitAsDefaultInstance();
}

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

static void InitDefaultsTestDynamicExtensions() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestDynamicExtensions_default_instance_;
    new (ptr) ::protobuf_unittest::TestDynamicExtensions();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestDynamicExtensions::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<2> scc_info_TestDynamicExtensions =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestDynamicExtensions}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions_DynamicMessageType.base,}};

static void InitDefaultsTestRepeatedScalarDifferentTagSizes() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestRepeatedScalarDifferentTagSizes_default_instance_;
    new (ptr) ::protobuf_unittest::TestRepeatedScalarDifferentTagSizes();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestRepeatedScalarDifferentTagSizes::InitAsDefaultInstance();
}

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

static void InitDefaultsTestParsingMerge_RepeatedFieldsGenerator_Group1() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group1_default_instance_;
    new (ptr) ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMerge_RepeatedFieldsGenerator_Group1}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};

static void InitDefaultsTestParsingMerge_RepeatedFieldsGenerator_Group2() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group2_default_instance_;
    new (ptr) ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMerge_RepeatedFieldsGenerator_Group2}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};

static void InitDefaultsTestParsingMerge_RepeatedFieldsGenerator() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_default_instance_;
    new (ptr) ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<3> scc_info_TestParsingMerge_RepeatedFieldsGenerator =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsTestParsingMerge_RepeatedFieldsGenerator}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2.base,}};

static void InitDefaultsTestParsingMerge_OptionalGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestParsingMerge_OptionalGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestParsingMerge_OptionalGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestParsingMerge_OptionalGroup::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_OptionalGroup =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMerge_OptionalGroup}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};

static void InitDefaultsTestParsingMerge_RepeatedGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestParsingMerge_RepeatedGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestParsingMerge_RepeatedGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestParsingMerge_RepeatedGroup::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedGroup =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMerge_RepeatedGroup}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};

static void InitDefaultsTestParsingMerge() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestParsingMerge_default_instance_;
    new (ptr) ::protobuf_unittest::TestParsingMerge();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestParsingMerge::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<3> scc_info_TestParsingMerge =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsTestParsingMerge}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_OptionalGroup.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedGroup.base,}};

static void InitDefaultsTestCommentInjectionMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.DefaultConstruct();
  *::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get_mutable() = ::std::string("*/ <- Neither should this.", 26);
  ::google::protobuf::internal::OnShutdownDestroyString(
      ::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get_mutable());
  {
    void* ptr = &::protobuf_unittest::_TestCommentInjectionMessage_default_instance_;
    new (ptr) ::protobuf_unittest::TestCommentInjectionMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestCommentInjectionMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsFooRequest() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_FooRequest_default_instance_;
    new (ptr) ::protobuf_unittest::FooRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::FooRequest::InitAsDefaultInstance();
}

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

static void InitDefaultsFooResponse() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_FooResponse_default_instance_;
    new (ptr) ::protobuf_unittest::FooResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::FooResponse::InitAsDefaultInstance();
}

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

static void InitDefaultsFooClientMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_FooClientMessage_default_instance_;
    new (ptr) ::protobuf_unittest::FooClientMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::FooClientMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsFooServerMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_FooServerMessage_default_instance_;
    new (ptr) ::protobuf_unittest::FooServerMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::FooServerMessage::InitAsDefaultInstance();
}

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

static void InitDefaultsBarRequest() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_BarRequest_default_instance_;
    new (ptr) ::protobuf_unittest::BarRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::BarRequest::InitAsDefaultInstance();
}

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

static void InitDefaultsBarResponse() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_BarResponse_default_instance_;
    new (ptr) ::protobuf_unittest::BarResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::BarResponse::InitAsDefaultInstance();
}

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

static void InitDefaultsTestJsonName() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestJsonName_default_instance_;
    new (ptr) ::protobuf_unittest::TestJsonName();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestJsonName::InitAsDefaultInstance();
}

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

static void InitDefaultsTestHugeFieldNumbers_OptionalGroup() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestHugeFieldNumbers_OptionalGroup_default_instance_;
    new (ptr) ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup::InitAsDefaultInstance();
}

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

static void InitDefaultsTestHugeFieldNumbers_StringStringMapEntry_DoNotUse() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse_default_instance_;
    new (ptr) ::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse();
  }
  ::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::InitAsDefaultInstance();
}

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

static void InitDefaultsTestHugeFieldNumbers() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestHugeFieldNumbers_default_instance_;
    new (ptr) ::protobuf_unittest::TestHugeFieldNumbers();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestHugeFieldNumbers::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<4> scc_info_TestHugeFieldNumbers =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsTestHugeFieldNumbers}, {
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers_OptionalGroup.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse.base,
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};

static void InitDefaultsTestExtensionInsideTable() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf_unittest::_TestExtensionInsideTable_default_instance_;
    new (ptr) ::protobuf_unittest::TestExtensionInsideTable();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf_unittest::TestExtensionInsideTable::InitAsDefaultInstance();
}

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

void InitDefaults() {
  ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_NestedMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_OptionalGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_RepeatedGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes.base);
  ::google::protobuf::internal::InitSCC(&scc_info_NestedTestAllTypes.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestDeprecatedFields.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestDeprecatedMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ForeignMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestReservedFields.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestAllExtensions.base);
  ::google::protobuf::internal::InitSCC(&scc_info_OptionalGroup_extension.base);
  ::google::protobuf::internal::InitSCC(&scc_info_RepeatedGroup_extension.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestGroup_OptionalGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestGroupExtension.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestNestedExtension_OptionalGroup_extension.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestNestedExtension.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestRequired.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestRequiredForeign.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestRequiredMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestForeignNested.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestEmptyMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestEmptyMessageWithExtensions.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestMultipleExtensionRanges.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestReallyLargeTagNumber.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestRecursiveMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestMutualRecursionA.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestIsInitialized_SubMessage_SubGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestIsInitialized_SubMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestIsInitialized.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestDupFieldNumber_Foo.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestDupFieldNumber_Bar.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestDupFieldNumber.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestEagerMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestLazyMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestNestedMessageHasBits_NestedMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestNestedMessageHasBits.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestCamelCaseFieldNames.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestFieldOrderings_NestedMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestFieldOrderings.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestExtensionOrderings1.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestExtensionOrderings2_TestExtensionOrderings3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestExtensionOrderings2.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestExtremeDefaultValues.base);
  ::google::protobuf::internal::InitSCC(&scc_info_SparseEnumMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_OneString.base);
  ::google::protobuf::internal::InitSCC(&scc_info_MoreString.base);
  ::google::protobuf::internal::InitSCC(&scc_info_OneBytes.base);
  ::google::protobuf::internal::InitSCC(&scc_info_MoreBytes.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Int32Message.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Uint32Message.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Int64Message.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Uint64Message.base);
  ::google::protobuf::internal::InitSCC(&scc_info_BoolMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestOneof_FooGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestOneof.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestOneofBackwardsCompatible_FooGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestOneofBackwardsCompatible.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestOneof2_FooGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestOneof2_NestedMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestOneof2.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestRequiredOneof_NestedMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestRequiredOneof.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestPackedTypes.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestUnpackedTypes.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestPackedExtensions.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestUnpackedExtensions.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestDynamicExtensions_DynamicMessageType.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestDynamicExtensions.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestRepeatedScalarDifferentTagSizes.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge_RepeatedFieldsGenerator.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge_OptionalGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge_RepeatedGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestCommentInjectionMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_FooRequest.base);
  ::google::protobuf::internal::InitSCC(&scc_info_FooResponse.base);
  ::google::protobuf::internal::InitSCC(&scc_info_FooClientMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_FooServerMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_BarRequest.base);
  ::google::protobuf::internal::InitSCC(&scc_info_BarResponse.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestJsonName.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestHugeFieldNumbers_OptionalGroup.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestHugeFieldNumbers.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestExtensionInsideTable.base);
}

::google::protobuf::Metadata file_level_metadata[91];
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[6];
const ::google::protobuf::ServiceDescriptor* file_level_service_descriptors[1];

const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_NestedMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_NestedMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_NestedMessage, bb_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_OptionalGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_OptionalGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_OptionalGroup, a_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_RepeatedGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_RepeatedGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_RepeatedGroup, a_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_int64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_uint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_uint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_sint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_sint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_fixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_fixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_sfixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_sfixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_double_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_bool_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_string_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_bytes_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optionalgroup_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_nested_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_foreign_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_import_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_nested_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_foreign_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_import_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_string_piece_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_cord_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_public_import_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_lazy_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_int64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_uint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_uint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_sint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_sint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_fixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_fixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_sfixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_sfixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_double_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_bool_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_string_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_bytes_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeatedgroup_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_nested_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_foreign_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_import_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_nested_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_foreign_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_import_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_string_piece_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_cord_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_lazy_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_int64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_uint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_uint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_sint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_sint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_fixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_fixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_sfixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_sfixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_double_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_bool_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_string_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_bytes_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_nested_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_foreign_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_import_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_string_piece_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_cord_),
  offsetof(::protobuf_unittest::TestAllTypesDefaultTypeInternal, oneof_uint32_),
  offsetof(::protobuf_unittest::TestAllTypesDefaultTypeInternal, oneof_nested_message_),
  offsetof(::protobuf_unittest::TestAllTypesDefaultTypeInternal, oneof_string_),
  offsetof(::protobuf_unittest::TestAllTypesDefaultTypeInternal, oneof_bytes_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, oneof_field_),
  15,
  14,
  16,
  17,
  19,
  18,
  20,
  21,
  23,
  22,
  24,
  25,
  26,
  0,
  1,
  8,
  9,
  10,
  11,
  28,
  29,
  30,
  2,
  3,
  12,
  13,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  31,
  32,
  34,
  33,
  35,
  36,
  38,
  37,
  39,
  40,
  42,
  41,
  43,
  4,
  5,
  44,
  45,
  27,
  6,
  7,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedTestAllTypes, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedTestAllTypes, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedTestAllTypes, child_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedTestAllTypes, payload_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedTestAllTypes, repeated_child_),
  0,
  1,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedFields, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedFields, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedFields, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedFields, deprecated_int32_),
  offsetof(::protobuf_unittest::TestDeprecatedFieldsDefaultTypeInternal, deprecated_int32_in_oneof_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedFields, oneof_fields_),
  0,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ForeignMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ForeignMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ForeignMessage, c_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ForeignMessage, d_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReservedFields, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReservedFields, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllExtensions, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllExtensions, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllExtensions, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OptionalGroup_extension, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OptionalGroup_extension, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OptionalGroup_extension, a_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::RepeatedGroup_extension, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::RepeatedGroup_extension, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::RepeatedGroup_extension, a_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup_OptionalGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup_OptionalGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup_OptionalGroup, a_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup, optionalgroup_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup, optional_foreign_enum_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroupExtension, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroupExtension, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroupExtension, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedExtension_OptionalGroup_extension, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedExtension_OptionalGroup_extension, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedExtension_OptionalGroup_extension, a_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedExtension, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedExtension, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, a_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy2_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, b_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy4_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy5_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy6_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy7_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy8_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy9_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy10_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy11_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy12_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy13_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy14_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy15_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy16_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy17_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy18_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy19_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy20_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy21_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy22_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy23_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy24_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy25_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy26_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy27_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy28_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy29_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy30_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy31_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, c_),
  0,
  1,
  2,
  3,
  4,
  5,
  6,
  7,
  8,
  9,
  10,
  11,
  12,
  13,
  14,
  15,
  16,
  17,
  18,
  19,
  20,
  21,
  22,
  23,
  24,
  25,
  26,
  27,
  28,
  29,
  30,
  31,
  32,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredForeign, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredForeign, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredForeign, optional_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredForeign, repeated_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredForeign, dummy_),
  0,
  ~0u,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredMessage, optional_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredMessage, repeated_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredMessage, required_message_),
  0,
  ~0u,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestForeignNested, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestForeignNested, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestForeignNested, foreign_nested_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEmptyMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEmptyMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEmptyMessageWithExtensions, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEmptyMessageWithExtensions, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEmptyMessageWithExtensions, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMultipleExtensionRanges, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMultipleExtensionRanges, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMultipleExtensionRanges, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReallyLargeTagNumber, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReallyLargeTagNumber, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReallyLargeTagNumber, a_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReallyLargeTagNumber, bb_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRecursiveMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRecursiveMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRecursiveMessage, a_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRecursiveMessage, i_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubMessage, b_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubGroup, sub_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubGroup, not_in_this_scc_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA, bb_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA, subgroup_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionB, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionB, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionB, a_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionB, optional_int32_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup, i_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage, subgroup_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized, sub_message_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Foo, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Foo, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Foo, a_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Bar, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Bar, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Bar, a_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber, a_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber, foo_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber, bar_),
  2,
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEagerMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEagerMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEagerMessage, sub_message_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestLazyMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestLazyMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestLazyMessage, sub_message_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits_NestedMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits_NestedMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits_NestedMessage, nestedmessage_repeated_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits_NestedMessage, nestedmessage_repeated_foreignmessage_),
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits, optional_nested_message_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, primitivefield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, stringfield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, enumfield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, messagefield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, stringpiecefield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, cordfield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedprimitivefield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedstringfield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedenumfield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedmessagefield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedstringpiecefield_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedcordfield_),
  4,
  0,
  5,
  3,
  1,
  2,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings_NestedMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings_NestedMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings_NestedMessage, oo_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings_NestedMessage, bb_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, my_string_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, my_int_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, my_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, optional_nested_message_),
  0,
  2,
  3,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings1, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings1, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings1, my_string_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3, my_string_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2, my_string_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, escaped_bytes_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, large_uint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, large_uint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, small_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, small_int64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, really_small_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, really_small_int64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, utf8_string_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, zero_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, one_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, small_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, negative_one_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, negative_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, large_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, small_negative_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, inf_double_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, neg_inf_double_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, nan_double_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, inf_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, neg_inf_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, nan_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, cpp_trigraph_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, string_with_zero_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, bytes_with_zero_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, string_piece_with_zero_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, cord_with_zero_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, replacement_string_),
  0,
  10,
  9,
  11,
  12,
  25,
  26,
  1,
  8,
  13,
  14,
  15,
  16,
  17,
  18,
  19,
  20,
  21,
  22,
  23,
  24,
  2,
  3,
  4,
  5,
  6,
  7,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::SparseEnumMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::SparseEnumMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::SparseEnumMessage, sparse_enum_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneString, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneString, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneString, data_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreString, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreString, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreString, data_),
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneBytes, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneBytes, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneBytes, data_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreBytes, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreBytes, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreBytes, data_),
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int32Message, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int32Message, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int32Message, data_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint32Message, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint32Message, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint32Message, data_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int64Message, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int64Message, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int64Message, data_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint64Message, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint64Message, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint64Message, data_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BoolMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BoolMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BoolMessage, data_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof_FooGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof_FooGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof_FooGroup, a_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof_FooGroup, b_),
  1,
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::protobuf_unittest::TestOneofDefaultTypeInternal, foo_int_),
  offsetof(::protobuf_unittest::TestOneofDefaultTypeInternal, foo_string_),
  offsetof(::protobuf_unittest::TestOneofDefaultTypeInternal, foo_message_),
  offsetof(::protobuf_unittest::TestOneofDefaultTypeInternal, foogroup_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof, foo_),
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup, a_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup, b_),
  1,
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, foo_int_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, foo_string_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, foo_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, foogroup_),
  3,
  0,
  1,
  2,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_FooGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_FooGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_FooGroup, a_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_FooGroup, b_),
  1,
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_NestedMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_NestedMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_NestedMessage, qux_int_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_NestedMessage, corge_int_),
  0,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_int_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_string_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_cord_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_string_piece_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_bytes_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_enum_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_message_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foogroup_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_lazy_message_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_int_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_string_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_cord_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_string_piece_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_bytes_),
  offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, baz_int_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, baz_string_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, foo_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, bar_),
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  1,
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof_NestedMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof_NestedMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof_NestedMessage, required_double_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::protobuf_unittest::TestRequiredOneofDefaultTypeInternal, foo_int_),
  offsetof(::protobuf_unittest::TestRequiredOneofDefaultTypeInternal, foo_string_),
  offsetof(::protobuf_unittest::TestRequiredOneofDefaultTypeInternal, foo_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof, foo_),
  ~0u,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_int64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_uint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_uint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_sint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_sint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_fixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_fixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_sfixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_sfixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_double_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_bool_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_enum_),
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_int64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_uint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_uint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_sint32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_sint64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_fixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_fixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_sfixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_sfixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_double_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_bool_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_enum_),
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedExtensions, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedExtensions, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedExtensions, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedExtensions, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedExtensions, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedExtensions, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions_DynamicMessageType, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions_DynamicMessageType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions_DynamicMessageType, dynamic_field_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, scalar_extension_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, enum_extension_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, dynamic_enum_extension_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, message_extension_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, dynamic_message_extension_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, repeated_extension_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, packed_extension_),
  2,
  3,
  4,
  0,
  1,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_fixed32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_fixed64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_int64_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_float_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_uint64_),
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1, field1_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2, field1_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, field1_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, field2_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, field3_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, group1_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, group2_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, ext1_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, ext2_),
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_OptionalGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_OptionalGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_OptionalGroup, optional_group_all_types_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedGroup, repeated_group_all_types_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, required_all_types_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, optional_all_types_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, repeated_all_types_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, optionalgroup_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, repeatedgroup_),
  0,
  1,
  ~0u,
  2,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCommentInjectionMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCommentInjectionMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCommentInjectionMessage, a_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooRequest, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooResponse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooClientMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooClientMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooServerMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooServerMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BarRequest, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BarRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BarResponse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BarResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, field_name1_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, fieldname2_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, fieldname3_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, _field_name4_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, field_name5_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, field_name6_),
  0,
  1,
  2,
  3,
  4,
  5,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup, group_a_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse, key_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse, value_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, _extensions_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optional_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, fixed_32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, repeated_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, packed_int32_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optional_enum_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optional_string_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optional_bytes_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optional_message_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optionalgroup_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, string_string_map_),
  offsetof(::protobuf_unittest::TestHugeFieldNumbersDefaultTypeInternal, oneof_uint32_),
  offsetof(::protobuf_unittest::TestHugeFieldNumbersDefaultTypeInternal, oneof_test_all_types_),
  offsetof(::protobuf_unittest::TestHugeFieldNumbersDefaultTypeInternal, oneof_string_),
  offsetof(::protobuf_unittest::TestHugeFieldNumbersDefaultTypeInternal, oneof_bytes_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, oneof_field_),
  4,
  5,
  ~0u,
  ~0u,
  6,
  0,
  1,
  2,
  3,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field1_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field2_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field3_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field4_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field6_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field7_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field8_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field9_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field10_),
  0,
  1,
  2,
  3,
  4,
  5,
  6,
  7,
  8,
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 6, sizeof(::protobuf_unittest::TestAllTypes_NestedMessage)},
  { 7, 13, sizeof(::protobuf_unittest::TestAllTypes_OptionalGroup)},
  { 14, 20, sizeof(::protobuf_unittest::TestAllTypes_RepeatedGroup)},
  { 21, 102, sizeof(::protobuf_unittest::TestAllTypes)},
  { 177, 185, sizeof(::protobuf_unittest::NestedTestAllTypes)},
  { 188, 196, sizeof(::protobuf_unittest::TestDeprecatedFields)},
  { 198, 203, sizeof(::protobuf_unittest::TestDeprecatedMessage)},
  { 203, 210, sizeof(::protobuf_unittest::ForeignMessage)},
  { 212, 217, sizeof(::protobuf_unittest::TestReservedFields)},
  { 217, 222, sizeof(::protobuf_unittest::TestAllExtensions)},
  { 222, 228, sizeof(::protobuf_unittest::OptionalGroup_extension)},
  { 229, 235, sizeof(::protobuf_unittest::RepeatedGroup_extension)},
  { 236, 242, sizeof(::protobuf_unittest::TestGroup_OptionalGroup)},
  { 243, 250, sizeof(::protobuf_unittest::TestGroup)},
  { 252, 257, sizeof(::protobuf_unittest::TestGroupExtension)},
  { 257, 263, sizeof(::protobuf_unittest::TestNestedExtension_OptionalGroup_extension)},
  { 264, 269, sizeof(::protobuf_unittest::TestNestedExtension)},
  { 269, 307, sizeof(::protobuf_unittest::TestRequired)},
  { 340, 348, sizeof(::protobuf_unittest::TestRequiredForeign)},
  { 351, 359, sizeof(::protobuf_unittest::TestRequiredMessage)},
  { 362, 368, sizeof(::protobuf_unittest::TestForeignNested)},
  { 369, 374, sizeof(::protobuf_unittest::TestEmptyMessage)},
  { 374, 379, sizeof(::protobuf_unittest::TestEmptyMessageWithExtensions)},
  { 379, 384, sizeof(::protobuf_unittest::TestMultipleExtensionRanges)},
  { 384, 391, sizeof(::protobuf_unittest::TestReallyLargeTagNumber)},
  { 393, 400, sizeof(::protobuf_unittest::TestRecursiveMessage)},
  { 402, 408, sizeof(::protobuf_unittest::TestMutualRecursionA_SubMessage)},
  { 409, 416, sizeof(::protobuf_unittest::TestMutualRecursionA_SubGroup)},
  { 418, 425, sizeof(::protobuf_unittest::TestMutualRecursionA)},
  { 427, 434, sizeof(::protobuf_unittest::TestMutualRecursionB)},
  { 436, 442, sizeof(::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup)},
  { 443, 449, sizeof(::protobuf_unittest::TestIsInitialized_SubMessage)},
  { 450, 456, sizeof(::protobuf_unittest::TestIsInitialized)},
  { 457, 463, sizeof(::protobuf_unittest::TestDupFieldNumber_Foo)},
  { 464, 470, sizeof(::protobuf_unittest::TestDupFieldNumber_Bar)},
  { 471, 479, sizeof(::protobuf_unittest::TestDupFieldNumber)},
  { 482, 488, sizeof(::protobuf_unittest::TestEagerMessage)},
  { 489, 495, sizeof(::protobuf_unittest::TestLazyMessage)},
  { 496, 503, sizeof(::protobuf_unittest::TestNestedMessageHasBits_NestedMessage)},
  { 505, 511, sizeof(::protobuf_unittest::TestNestedMessageHasBits)},
  { 512, 529, sizeof(::protobuf_unittest::TestCamelCaseFieldNames)},
  { 541, 548, sizeof(::protobuf_unittest::TestFieldOrderings_NestedMessage)},
  { 550, 559, sizeof(::protobuf_unittest::TestFieldOrderings)},
  { 563, 569, sizeof(::protobuf_unittest::TestExtensionOrderings1)},
  { 570, 576, sizeof(::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3)},
  { 577, 583, sizeof(::protobuf_unittest::TestExtensionOrderings2)},
  { 584, 616, sizeof(::protobuf_unittest::TestExtremeDefaultValues)},
  { 643, 649, sizeof(::protobuf_unittest::SparseEnumMessage)},
  { 650, 656, sizeof(::protobuf_unittest::OneString)},
  { 657, 663, sizeof(::protobuf_unittest::MoreString)},
  { 664, 670, sizeof(::protobuf_unittest::OneBytes)},
  { 671, 677, sizeof(::protobuf_unittest::MoreBytes)},
  { 678, 684, sizeof(::protobuf_unittest::Int32Message)},
  { 685, 691, sizeof(::protobuf_unittest::Uint32Message)},
  { 692, 698, sizeof(::protobuf_unittest::Int64Message)},
  { 699, 705, sizeof(::protobuf_unittest::Uint64Message)},
  { 706, 712, sizeof(::protobuf_unittest::BoolMessage)},
  { 713, 720, sizeof(::protobuf_unittest::TestOneof_FooGroup)},
  { 722, 732, sizeof(::protobuf_unittest::TestOneof)},
  { 736, 743, sizeof(::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup)},
  { 745, 754, sizeof(::protobuf_unittest::TestOneofBackwardsCompatible)},
  { 758, 765, sizeof(::protobuf_unittest::TestOneof2_FooGroup)},
  { 767, 774, sizeof(::protobuf_unittest::TestOneof2_NestedMessage)},
  { 776, 800, sizeof(::protobuf_unittest::TestOneof2)},
  { 817, 823, sizeof(::protobuf_unittest::TestRequiredOneof_NestedMessage)},
  { 824, 833, sizeof(::protobuf_unittest::TestRequiredOneof)},
  { 836, 855, sizeof(::protobuf_unittest::TestPackedTypes)},
  { 869, 888, sizeof(::protobuf_unittest::TestUnpackedTypes)},
  { 902, 907, sizeof(::protobuf_unittest::TestPackedExtensions)},
  { 907, 912, sizeof(::protobuf_unittest::TestUnpackedExtensions)},
  { 912, 918, sizeof(::protobuf_unittest::TestDynamicExtensions_DynamicMessageType)},
  { 919, 931, sizeof(::protobuf_unittest::TestDynamicExtensions)},
  { 938, 949, sizeof(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes)},
  { 955, 961, sizeof(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1)},
  { 962, 968, sizeof(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2)},
  { 969, 981, sizeof(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator)},
  { 988, 994, sizeof(::protobuf_unittest::TestParsingMerge_OptionalGroup)},
  { 995, 1001, sizeof(::protobuf_unittest::TestParsingMerge_RepeatedGroup)},
  { 1002, 1012, sizeof(::protobuf_unittest::TestParsingMerge)},
  { 1017, 1023, sizeof(::protobuf_unittest::TestCommentInjectionMessage)},
  { 1024, 1029, sizeof(::protobuf_unittest::FooRequest)},
  { 1029, 1034, sizeof(::protobuf_unittest::FooResponse)},
  { 1034, 1039, sizeof(::protobuf_unittest::FooClientMessage)},
  { 1039, 1044, sizeof(::protobuf_unittest::FooServerMessage)},
  { 1044, 1049, sizeof(::protobuf_unittest::BarRequest)},
  { 1049, 1054, sizeof(::protobuf_unittest::BarResponse)},
  { 1054, 1065, sizeof(::protobuf_unittest::TestJsonName)},
  { 1071, 1077, sizeof(::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup)},
  { 1078, 1085, sizeof(::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse)},
  { 1087, 1107, sizeof(::protobuf_unittest::TestHugeFieldNumbers)},
  { 1121, 1135, sizeof(::protobuf_unittest::TestExtensionInsideTable)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestAllTypes_NestedMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestAllTypes_OptionalGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestAllTypes_RepeatedGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestAllTypes_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_NestedTestAllTypes_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDeprecatedFields_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDeprecatedMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_ForeignMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestReservedFields_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestAllExtensions_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_OptionalGroup_extension_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_RepeatedGroup_extension_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestGroup_OptionalGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestGroupExtension_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestNestedExtension_OptionalGroup_extension_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestNestedExtension_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRequired_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRequiredForeign_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRequiredMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestForeignNested_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEmptyMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEmptyMessageWithExtensions_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMultipleExtensionRanges_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestReallyLargeTagNumber_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRecursiveMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMutualRecursionA_SubMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMutualRecursionA_SubGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMutualRecursionA_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMutualRecursionB_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestIsInitialized_SubMessage_SubGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestIsInitialized_SubMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestIsInitialized_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDupFieldNumber_Foo_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDupFieldNumber_Bar_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDupFieldNumber_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEagerMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestLazyMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestNestedMessageHasBits_NestedMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestNestedMessageHasBits_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestCamelCaseFieldNames_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestFieldOrderings_NestedMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestFieldOrderings_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestExtensionOrderings1_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestExtensionOrderings2_TestExtensionOrderings3_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestExtensionOrderings2_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestExtremeDefaultValues_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_SparseEnumMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_OneString_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_MoreString_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_OneBytes_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_MoreBytes_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_Int32Message_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_Uint32Message_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_Int64Message_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_Uint64Message_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_BoolMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneof_FooGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneof_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneofBackwardsCompatible_FooGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneofBackwardsCompatible_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneof2_FooGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneof2_NestedMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneof2_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRequiredOneof_NestedMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRequiredOneof_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestPackedTypes_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestUnpackedTypes_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestPackedExtensions_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestUnpackedExtensions_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDynamicExtensions_DynamicMessageType_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDynamicExtensions_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRepeatedScalarDifferentTagSizes_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group1_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group2_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_OptionalGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_RepeatedGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestCommentInjectionMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_FooRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_FooResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_FooClientMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_FooServerMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_BarRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_BarResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestJsonName_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestHugeFieldNumbers_OptionalGroup_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestHugeFieldNumbers_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestExtensionInsideTable_default_instance_),
};

void protobuf_AssignDescriptors() {
  AddDescriptors();
  AssignDescriptors(
      "google/protobuf/unittest.proto", schemas, file_default_instances, TableStruct::offsets,
      file_level_metadata, file_level_enum_descriptors, file_level_service_descriptors);
}

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, 91);
}

void AddDescriptorsImpl() {
  InitDefaults();
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
      "\n\036google/protobuf/unittest.proto\022\021protob"
      "uf_unittest\032%google/protobuf/unittest_im"
      "port.proto\"\355\030\n\014TestAllTypes\022\026\n\016optional_"
      "int32\030\001 \001(\005\022\026\n\016optional_int64\030\002 \001(\003\022\027\n\017o"
      "ptional_uint32\030\003 \001(\r\022\027\n\017optional_uint64\030"
      "\004 \001(\004\022\027\n\017optional_sint32\030\005 \001(\021\022\027\n\017option"
      "al_sint64\030\006 \001(\022\022\030\n\020optional_fixed32\030\007 \001("
      "\007\022\030\n\020optional_fixed64\030\010 \001(\006\022\031\n\021optional_"
      "sfixed32\030\t \001(\017\022\031\n\021optional_sfixed64\030\n \001("
      "\020\022\026\n\016optional_float\030\013 \001(\002\022\027\n\017optional_do"
      "uble\030\014 \001(\001\022\025\n\roptional_bool\030\r \001(\010\022\027\n\017opt"
      "ional_string\030\016 \001(\t\022\026\n\016optional_bytes\030\017 \001"
      "(\014\022D\n\roptionalgroup\030\020 \001(\n2-.protobuf_uni"
      "ttest.TestAllTypes.OptionalGroup\022N\n\027opti"
      "onal_nested_message\030\022 \001(\0132-.protobuf_uni"
      "ttest.TestAllTypes.NestedMessage\022C\n\030opti"
      "onal_foreign_message\030\023 \001(\0132!.protobuf_un"
      "ittest.ForeignMessage\022H\n\027optional_import"
      "_message\030\024 \001(\0132\'.protobuf_unittest_impor"
      "t.ImportMessage\022H\n\024optional_nested_enum\030"
      "\025 \001(\0162*.protobuf_unittest.TestAllTypes.N"
      "estedEnum\022=\n\025optional_foreign_enum\030\026 \001(\016"
      "2\036.protobuf_unittest.ForeignEnum\022B\n\024opti"
      "onal_import_enum\030\027 \001(\0162$.protobuf_unitte"
      "st_import.ImportEnum\022!\n\025optional_string_"
      "piece\030\030 \001(\tB\002\010\002\022\031\n\roptional_cord\030\031 \001(\tB\002"
      "\010\001\022U\n\036optional_public_import_message\030\032 \001"
      "(\0132-.protobuf_unittest_import.PublicImpo"
      "rtMessage\022P\n\025optional_lazy_message\030\033 \001(\013"
      "2-.protobuf_unittest.TestAllTypes.Nested"
      "MessageB\002(\001\022\026\n\016repeated_int32\030\037 \003(\005\022\026\n\016r"
      "epeated_int64\030  \003(\003\022\027\n\017repeated_uint32\030!"
      " \003(\r\022\027\n\017repeated_uint64\030\" \003(\004\022\027\n\017repeate"
      "d_sint32\030# \003(\021\022\027\n\017repeated_sint64\030$ \003(\022\022"
      "\030\n\020repeated_fixed32\030% \003(\007\022\030\n\020repeated_fi"
      "xed64\030& \003(\006\022\031\n\021repeated_sfixed32\030\' \003(\017\022\031"
      "\n\021repeated_sfixed64\030( \003(\020\022\026\n\016repeated_fl"
      "oat\030) \003(\002\022\027\n\017repeated_double\030* \003(\001\022\025\n\rre"
      "peated_bool\030+ \003(\010\022\027\n\017repeated_string\030, \003"
      "(\t\022\026\n\016repeated_bytes\030- \003(\014\022D\n\rrepeatedgr"
      "oup\030. \003(\n2-.protobuf_unittest.TestAllTyp"
      "es.RepeatedGroup\022N\n\027repeated_nested_mess"
      "age\0300 \003(\0132-.protobuf_unittest.TestAllTyp"
      "es.NestedMessage\022C\n\030repeated_foreign_mes"
      "sage\0301 \003(\0132!.protobuf_unittest.ForeignMe"
      "ssage\022H\n\027repeated_import_message\0302 \003(\0132\'"
      ".protobuf_unittest_import.ImportMessage\022"
      "H\n\024repeated_nested_enum\0303 \003(\0162*.protobuf"
      "_unittest.TestAllTypes.NestedEnum\022=\n\025rep"
      "eated_foreign_enum\0304 \003(\0162\036.protobuf_unit"
      "test.ForeignEnum\022B\n\024repeated_import_enum"
      "\0305 \003(\0162$.protobuf_unittest_import.Import"
      "Enum\022!\n\025repeated_string_piece\0306 \003(\tB\002\010\002\022"
      "\031\n\rrepeated_cord\0307 \003(\tB\002\010\001\022P\n\025repeated_l"
      "azy_message\0309 \003(\0132-.protobuf_unittest.Te"
      "stAllTypes.NestedMessageB\002(\001\022\031\n\rdefault_"
      "int32\030= \001(\005:\00241\022\031\n\rdefault_int64\030> \001(\003:\002"
      "42\022\032\n\016default_uint32\030\? \001(\r:\00243\022\032\n\016defaul"
      "t_uint64\030@ \001(\004:\00244\022\033\n\016default_sint32\030A \001"
      "(\021:\003-45\022\032\n\016default_sint64\030B \001(\022:\00246\022\033\n\017d"
      "efault_fixed32\030C \001(\007:\00247\022\033\n\017default_fixe"
      "d64\030D \001(\006:\00248\022\034\n\020default_sfixed32\030E \001(\017:"
      "\00249\022\035\n\020default_sfixed64\030F \001(\020:\003-50\022\033\n\rde"
      "fault_float\030G \001(\002:\00451.5\022\035\n\016default_doubl"
      "e\030H \001(\001:\00552000\022\032\n\014default_bool\030I \001(\010:\004tr"
      "ue\022\035\n\016default_string\030J \001(\t:\005hello\022\034\n\rdef"
      "ault_bytes\030K \001(\014:\005world\022L\n\023default_neste"
      "d_enum\030Q \001(\0162*.protobuf_unittest.TestAll"
      "Types.NestedEnum:\003BAR\022I\n\024default_foreign"
      "_enum\030R \001(\0162\036.protobuf_unittest.ForeignE"
      "num:\013FOREIGN_BAR\022M\n\023default_import_enum\030"
      "S \001(\0162$.protobuf_unittest_import.ImportE"
      "num:\nIMPORT_BAR\022%\n\024default_string_piece\030"
      "T \001(\t:\003abcB\002\010\002\022\035\n\014default_cord\030U \001(\t:\00312"
      "3B\002\010\001\022\026\n\014oneof_uint32\030o \001(\rH\000\022M\n\024oneof_n"
      "ested_message\030p \001(\0132-.protobuf_unittest."
      "TestAllTypes.NestedMessageH\000\022\026\n\014oneof_st"
      "ring\030q \001(\tH\000\022\025\n\013oneof_bytes\030r \001(\014H\000\032\033\n\rN"
      "estedMessage\022\n\n\002bb\030\001 \001(\005\032\032\n\rOptionalGrou"
      "p\022\t\n\001a\030\021 \001(\005\032\032\n\rRepeatedGroup\022\t\n\001a\030/ \001(\005"
      "\"9\n\nNestedEnum\022\007\n\003FOO\020\001\022\007\n\003BAR\020\002\022\007\n\003BAZ\020"
      "\003\022\020\n\003NEG\020\377\377\377\377\377\377\377\377\377\001B\r\n\013oneof_field\"\273\001\n\022N"
      "estedTestAllTypes\0224\n\005child\030\001 \001(\0132%.proto"
      "buf_unittest.NestedTestAllTypes\0220\n\007paylo"
      "ad\030\002 \001(\0132\037.protobuf_unittest.TestAllType"
      "s\022=\n\016repeated_child\030\003 \003(\0132%.protobuf_uni"
      "ttest.NestedTestAllTypes\"m\n\024TestDeprecat"
      "edFields\022\034\n\020deprecated_int32\030\001 \001(\005B\002\030\001\022\'"
      "\n\031deprecated_int32_in_oneof\030\002 \001(\005B\002\030\001H\000B"
      "\016\n\014oneof_fields\"\033\n\025TestDeprecatedMessage"
      ":\002\030\001\"&\n\016ForeignMessage\022\t\n\001c\030\001 \001(\005\022\t\n\001d\030\002"
      " \001(\005\"0\n\022TestReservedFieldsJ\004\010\002\020\003J\004\010\017\020\020J\004"
      "\010\t\020\014R\003barR\003baz\"\035\n\021TestAllExtensions*\010\010\001\020"
      "\200\200\200\200\002\"$\n\027OptionalGroup_extension\022\t\n\001a\030\021 "
      "\001(\005\"$\n\027RepeatedGroup_extension\022\t\n\001a\030/ \001("
      "\005\"\251\001\n\tTestGroup\022A\n\roptionalgroup\030\020 \001(\n2*"
      ".protobuf_unittest.TestGroup.OptionalGro"
      "up\022=\n\025optional_foreign_enum\030\026 \001(\0162\036.prot"
      "obuf_unittest.ForeignEnum\032\032\n\rOptionalGro"
      "up\022\t\n\001a\030\021 \001(\005\"\036\n\022TestGroupExtension*\010\010\001\020"
      "\200\200\200\200\002\"\267\003\n\023TestNestedExtension\032$\n\027Optiona"
      "lGroup_extension\022\t\n\001a\030\021 \001(\00529\n\004test\022$.pr"
      "otobuf_unittest.TestAllExtensions\030\352\007 \001(\t"
      ":\004test2F\n\027nested_string_extension\022$.prot"
      "obuf_unittest.TestAllExtensions\030\353\007 \001(\t2\206"
      "\001\n\027optionalgroup_extension\022%.protobuf_un"
      "ittest.TestGroupExtension\030\020 \001(\n2>.protob"
      "uf_unittest.TestNestedExtension.Optional"
      "Group_extension2n\n\037optional_foreign_enum"
      "_extension\022%.protobuf_unittest.TestGroup"
      "Extension\030\026 \001(\0162\036.protobuf_unittest.Fore"
      "ignEnum\"\325\005\n\014TestRequired\022\t\n\001a\030\001 \002(\005\022\016\n\006d"
      "ummy2\030\002 \001(\005\022\t\n\001b\030\003 \002(\005\022\016\n\006dummy4\030\004 \001(\005\022\016"
      "\n\006dummy5\030\005 \001(\005\022\016\n\006dummy6\030\006 \001(\005\022\016\n\006dummy7"
      "\030\007 \001(\005\022\016\n\006dummy8\030\010 \001(\005\022\016\n\006dummy9\030\t \001(\005\022\017"
      "\n\007dummy10\030\n \001(\005\022\017\n\007dummy11\030\013 \001(\005\022\017\n\007dumm"
      "y12\030\014 \001(\005\022\017\n\007dummy13\030\r \001(\005\022\017\n\007dummy14\030\016 "
      "\001(\005\022\017\n\007dummy15\030\017 \001(\005\022\017\n\007dummy16\030\020 \001(\005\022\017\n"
      "\007dummy17\030\021 \001(\005\022\017\n\007dummy18\030\022 \001(\005\022\017\n\007dummy"
      "19\030\023 \001(\005\022\017\n\007dummy20\030\024 \001(\005\022\017\n\007dummy21\030\025 \001"
      "(\005\022\017\n\007dummy22\030\026 \001(\005\022\017\n\007dummy23\030\027 \001(\005\022\017\n\007"
      "dummy24\030\030 \001(\005\022\017\n\007dummy25\030\031 \001(\005\022\017\n\007dummy2"
      "6\030\032 \001(\005\022\017\n\007dummy27\030\033 \001(\005\022\017\n\007dummy28\030\034 \001("
      "\005\022\017\n\007dummy29\030\035 \001(\005\022\017\n\007dummy30\030\036 \001(\005\022\017\n\007d"
      "ummy31\030\037 \001(\005\022\017\n\007dummy32\030  \001(\005\022\t\n\001c\030! \002(\005"
      "2V\n\006single\022$.protobuf_unittest.TestAllEx"
      "tensions\030\350\007 \001(\0132\037.protobuf_unittest.Test"
      "Required2U\n\005multi\022$.protobuf_unittest.Te"
      "stAllExtensions\030\351\007 \003(\0132\037.protobuf_unitte"
      "st.TestRequired\"\232\001\n\023TestRequiredForeign\022"
      "9\n\020optional_message\030\001 \001(\0132\037.protobuf_uni"
      "ttest.TestRequired\0229\n\020repeated_message\030\002"
      " \003(\0132\037.protobuf_unittest.TestRequired\022\r\n"
      "\005dummy\030\003 \001(\005\"\306\001\n\023TestRequiredMessage\0229\n\020"
      "optional_message\030\001 \001(\0132\037.protobuf_unitte"
      "st.TestRequired\0229\n\020repeated_message\030\002 \003("
      "\0132\037.protobuf_unittest.TestRequired\0229\n\020re"
      "quired_message\030\003 \002(\0132\037.protobuf_unittest"
      ".TestRequired\"Z\n\021TestForeignNested\022E\n\016fo"
      "reign_nested\030\001 \001(\0132-.protobuf_unittest.T"
      "estAllTypes.NestedMessage\"\022\n\020TestEmptyMe"
      "ssage\"*\n\036TestEmptyMessageWithExtensions*"
      "\010\010\001\020\200\200\200\200\002\"7\n\033TestMultipleExtensionRanges"
      "*\004\010*\020+*\006\010\257 \020\224!*\n\010\200\200\004\020\200\200\200\200\002\"4\n\030TestReally"
      "LargeTagNumber\022\t\n\001a\030\001 \001(\005\022\r\n\002bb\030\377\377\377\177 \001(\005"
      "\"U\n\024TestRecursiveMessage\0222\n\001a\030\001 \001(\0132\'.pr"
      "otobuf_unittest.TestRecursiveMessage\022\t\n\001"
      "i\030\002 \001(\005\"\341\002\n\024TestMutualRecursionA\0223\n\002bb\030\001"
      " \001(\0132\'.protobuf_unittest.TestMutualRecur"
      "sionB\022B\n\010subgroup\030\002 \001(\n20.protobuf_unitt"
      "est.TestMutualRecursionA.SubGroup\032@\n\nSub"
      "Message\0222\n\001b\030\001 \001(\0132\'.protobuf_unittest.T"
      "estMutualRecursionB\032\215\001\n\010SubGroup\022G\n\013sub_"
      "message\030\003 \001(\01322.protobuf_unittest.TestMu"
      "tualRecursionA.SubMessage\0228\n\017not_in_this"
      "_scc\030\004 \001(\0132\037.protobuf_unittest.TestAllTy"
      "pes\"b\n\024TestMutualRecursionB\0222\n\001a\030\001 \001(\0132\'"
      ".protobuf_unittest.TestMutualRecursionA\022"
      "\026\n\016optional_int32\030\002 \001(\005\"\312\001\n\021TestIsInitia"
      "lized\022D\n\013sub_message\030\001 \001(\0132/.protobuf_un"
      "ittest.TestIsInitialized.SubMessage\032o\n\nS"
      "ubMessage\022J\n\010subgroup\030\001 \001(\n28.protobuf_u"
      "nittest.TestIsInitialized.SubMessage.Sub"
      "Group\032\025\n\010SubGroup\022\t\n\001i\030\002 \002(\005\"\263\001\n\022TestDup"
      "FieldNumber\022\t\n\001a\030\001 \001(\005\0226\n\003foo\030\002 \001(\n2).pr"
      "otobuf_unittest.TestDupFieldNumber.Foo\0226"
      "\n\003bar\030\003 \001(\n2).protobuf_unittest.TestDupF"
      "ieldNumber.Bar\032\020\n\003Foo\022\t\n\001a\030\001 \001(\005\032\020\n\003Bar\022"
      "\t\n\001a\030\001 \001(\005\"L\n\020TestEagerMessage\0228\n\013sub_me"
      "ssage\030\001 \001(\0132\037.protobuf_unittest.TestAllT"
      "ypesB\002(\000\"K\n\017TestLazyMessage\0228\n\013sub_messa"
      "ge\030\001 \001(\0132\037.protobuf_unittest.TestAllType"
      "sB\002(\001\"\200\002\n\030TestNestedMessageHasBits\022Z\n\027op"
      "tional_nested_message\030\001 \001(\01329.protobuf_u"
      "nittest.TestNestedMessageHasBits.NestedM"
      "essage\032\207\001\n\rNestedMessage\022$\n\034nestedmessag"
      "e_repeated_int32\030\001 \003(\005\022P\n%nestedmessage_"
      "repeated_foreignmessage\030\002 \003(\0132!.protobuf"
      "_unittest.ForeignMessage\"\345\003\n\027TestCamelCa"
      "seFieldNames\022\026\n\016PrimitiveField\030\001 \001(\005\022\023\n\013"
      "StringField\030\002 \001(\t\0221\n\tEnumField\030\003 \001(\0162\036.p"
      "rotobuf_unittest.ForeignEnum\0227\n\014MessageF"
      "ield\030\004 \001(\0132!.protobuf_unittest.ForeignMe"
      "ssage\022\034\n\020StringPieceField\030\005 \001(\tB\002\010\002\022\025\n\tC"
      "ordField\030\006 \001(\tB\002\010\001\022\036\n\026RepeatedPrimitiveF"
      "ield\030\007 \003(\005\022\033\n\023RepeatedStringField\030\010 \003(\t\022"
      "9\n\021RepeatedEnumField\030\t \003(\0162\036.protobuf_un"
      "ittest.ForeignEnum\022\?\n\024RepeatedMessageFie"
      "ld\030\n \003(\0132!.protobuf_unittest.ForeignMess"
      "age\022$\n\030RepeatedStringPieceField\030\013 \003(\tB\002\010"
      "\002\022\035\n\021RepeatedCordField\030\014 \003(\tB\002\010\001\"\325\001\n\022Tes"
      "tFieldOrderings\022\021\n\tmy_string\030\013 \001(\t\022\016\n\006my"
      "_int\030\001 \001(\003\022\020\n\010my_float\030e \001(\002\022U\n\027optional"
      "_nested_message\030\310\001 \001(\01323.protobuf_unitte"
      "st.TestFieldOrderings.NestedMessage\032\'\n\rN"
      "estedMessage\022\n\n\002oo\030\002 \001(\003\022\n\n\002bb\030\001 \001(\005*\004\010\002"
      "\020\013*\004\010\014\020e\"\234\001\n\027TestExtensionOrderings1\022\021\n\t"
      "my_string\030\001 \001(\t2n\n\023test_ext_orderings1\022%"
      ".protobuf_unittest.TestFieldOrderings\030\r "
      "\001(\0132*.protobuf_unittest.TestExtensionOrd"
      "erings1\"\324\002\n\027TestExtensionOrderings2\022\021\n\tm"
      "y_string\030\001 \001(\t\032\265\001\n\027TestExtensionOrdering"
      "s3\022\021\n\tmy_string\030\001 \001(\t2\206\001\n\023test_ext_order"
      "ings3\022%.protobuf_unittest.TestFieldOrder"
      "ings\030\016 \001(\0132B.protobuf_unittest.TestExten"
      "sionOrderings2.TestExtensionOrderings32n"
      "\n\023test_ext_orderings2\022%.protobuf_unittes"
      "t.TestFieldOrderings\030\014 \001(\0132*.protobuf_un"
      "ittest.TestExtensionOrderings2\"\266\007\n\030TestE"
      "xtremeDefaultValues\022\?\n\rescaped_bytes\030\001 \001"
      "(\014:(\\000\\001\\007\\010\\014\\n\\r\\t\\013\\\\\\\'\\\""
      "\\376\022 \n\014large_uint32\030\002 \001(\r:\n4294967295\022*"
      "\n\014large_uint64\030\003 \001(\004:\024184467440737095516"
      "15\022 \n\013small_int32\030\004 \001(\005:\013-2147483647\022)\n\013"
      "small_int64\030\005 \001(\003:\024-9223372036854775807\022"
      "\'\n\022really_small_int32\030\025 \001(\005:\013-2147483648"
      "\0220\n\022really_small_int64\030\026 \001(\003:\024-922337203"
      "6854775808\022\030\n\013utf8_string\030\006 \001(\t:\003\341\210\264\022\025\n\n"
      "zero_float\030\007 \001(\002:\0010\022\024\n\tone_float\030\010 \001(\002:\001"
      "1\022\030\n\013small_float\030\t \001(\002:\0031.5\022\036\n\022negative_"
      "one_float\030\n \001(\002:\002-1\022\034\n\016negative_float\030\013 "
      "\001(\002:\004-1.5\022\032\n\013large_float\030\014 \001(\002:\0052e+08\022$\n"
      "\024small_negative_float\030\r \001(\002:\006-8e-28\022\027\n\ni"
      "nf_double\030\016 \001(\001:\003inf\022\034\n\016neg_inf_double\030\017"
      " \001(\001:\004-inf\022\027\n\nnan_double\030\020 \001(\001:\003nan\022\026\n\ti"
      "nf_float\030\021 \001(\002:\003inf\022\033\n\rneg_inf_float\030\022 \001"
      "(\002:\004-inf\022\026\n\tnan_float\030\023 \001(\002:\003nan\022+\n\014cpp_"
      "trigraph\030\024 \001(\t:\025\? \? \?\? \?\? \?\?\? \?\?/ \?\?-\022 \n"
      "\020string_with_zero\030\027 \001(\t:\006hel\000lo\022\"\n\017bytes"
      "_with_zero\030\030 \001(\014:\twor\\000ld\022(\n\026string_pi"
      "ece_with_zero\030\031 \001(\t:\004ab\000cB\002\010\002\022 \n\016cord_wi"
      "th_zero\030\032 \001(\t:\00412\0003B\002\010\001\022&\n\022replacement_s"
      "tring\030\033 \001(\t:\n${unknown}\"K\n\021SparseEnumMes"
      "sage\0226\n\013sparse_enum\030\001 \001(\0162!.protobuf_uni"
      "ttest.TestSparseEnum\"\031\n\tOneString\022\014\n\004dat"
      "a\030\001 \001(\t\"\032\n\nMoreString\022\014\n\004data\030\001 \003(\t\"\030\n\010O"
      "neBytes\022\014\n\004data\030\001 \001(\014\"\031\n\tMoreBytes\022\014\n\004da"
      "ta\030\001 \003(\014\"\034\n\014Int32Message\022\014\n\004data\030\001 \001(\005\"\035"
      "\n\rUint32Message\022\014\n\004data\030\001 \001(\r\"\034\n\014Int64Me"
      "ssage\022\014\n\004data\030\001 \001(\003\"\035\n\rUint64Message\022\014\n\004"
      "data\030\001 \001(\004\"\033\n\013BoolMessage\022\014\n\004data\030\001 \001(\010\""
      "\320\001\n\tTestOneof\022\021\n\007foo_int\030\001 \001(\005H\000\022\024\n\nfoo_"
      "string\030\002 \001(\tH\000\0226\n\013foo_message\030\003 \001(\0132\037.pr"
      "otobuf_unittest.TestAllTypesH\000\0229\n\010foogro"
      "up\030\004 \001(\n2%.protobuf_unittest.TestOneof.F"
      "ooGroupH\000\032 \n\010FooGroup\022\t\n\001a\030\005 \001(\005\022\t\n\001b\030\006 "
      "\001(\tB\005\n\003foo\"\347\001\n\034TestOneofBackwardsCompati"
      "ble\022\017\n\007foo_int\030\001 \001(\005\022\022\n\nfoo_string\030\002 \001(\t"
      "\0224\n\013foo_message\030\003 \001(\0132\037.protobuf_unittes"
      "t.TestAllTypes\022J\n\010foogroup\030\004 \001(\n28.proto"
      "buf_unittest.TestOneofBackwardsCompatibl"
      "e.FooGroup\032 \n\010FooGroup\022\t\n\001a\030\005 \001(\005\022\t\n\001b\030\006"
      " \001(\t\"\236\006\n\nTestOneof2\022\021\n\007foo_int\030\001 \001(\005H\000\022\024"
      "\n\nfoo_string\030\002 \001(\tH\000\022\026\n\010foo_cord\030\003 \001(\tB\002"
      "\010\001H\000\022\036\n\020foo_string_piece\030\004 \001(\tB\002\010\002H\000\022\023\n\t"
      "foo_bytes\030\005 \001(\014H\000\022<\n\010foo_enum\030\006 \001(\0162(.pr"
      "otobuf_unittest.TestOneof2.NestedEnumH\000\022"
      "B\n\013foo_message\030\007 \001(\0132+.protobuf_unittest"
      ".TestOneof2.NestedMessageH\000\022:\n\010foogroup\030"
      "\010 \001(\n2&.protobuf_unittest.TestOneof2.Foo"
      "GroupH\000\022K\n\020foo_lazy_message\030\013 \001(\0132+.prot"
      "obuf_unittest.TestOneof2.NestedMessageB\002"
      "(\001H\000\022\024\n\007bar_int\030\014 \001(\005:\0015H\001\022\034\n\nbar_string"
      "\030\r \001(\t:\006STRINGH\001\022\034\n\010bar_cord\030\016 \001(\t:\004CORD"
      "B\002\010\001H\001\022&\n\020bar_string_piece\030\017 \001(\t:\006SPIECE"
      "B\002\010\002H\001\022\032\n\tbar_bytes\030\020 \001(\014:\005BYTESH\001\022A\n\010ba"
      "r_enum\030\021 \001(\0162(.protobuf_unittest.TestOne"
      "of2.NestedEnum:\003BARH\001\022\017\n\007baz_int\030\022 \001(\005\022\027"
      "\n\nbaz_string\030\023 \001(\t:\003BAZ\032 \n\010FooGroup\022\t\n\001a"
      "\030\t \001(\005\022\t\n\001b\030\n \001(\t\0323\n\rNestedMessage\022\017\n\007qu"
      "x_int\030\001 \001(\003\022\021\n\tcorge_int\030\002 \003(\005\"\'\n\nNested"
      "Enum\022\007\n\003FOO\020\001\022\007\n\003BAR\020\002\022\007\n\003BAZ\020\003B\005\n\003fooB\005"
      "\n\003bar\"\270\001\n\021TestRequiredOneof\022\021\n\007foo_int\030\001"
      " \001(\005H\000\022\024\n\nfoo_string\030\002 \001(\tH\000\022I\n\013foo_mess"
      "age\030\003 \001(\01322.protobuf_unittest.TestRequir"
      "edOneof.NestedMessageH\000\032(\n\rNestedMessage"
      "\022\027\n\017required_double\030\001 \002(\001B\005\n\003foo\"\252\003\n\017Tes"
      "tPackedTypes\022\030\n\014packed_int32\030Z \003(\005B\002\020\001\022\030"
      "\n\014packed_int64\030[ \003(\003B\002\020\001\022\031\n\rpacked_uint3"
      "2\030\\ \003(\rB\002\020\001\022\031\n\rpacked_uint64\030] \003(\004B\002\020\001\022\031"
      "\n\rpacked_sint32\030^ \003(\021B\002\020\001\022\031\n\rpacked_sint"
      "64\030_ \003(\022B\002\020\001\022\032\n\016packed_fixed32\030` \003(\007B\002\020\001"
      "\022\032\n\016packed_fixed64\030a \003(\006B\002\020\001\022\033\n\017packed_s"
      "fixed32\030b \003(\017B\002\020\001\022\033\n\017packed_sfixed64\030c \003"
      "(\020B\002\020\001\022\030\n\014packed_float\030d \003(\002B\002\020\001\022\031\n\rpack"
      "ed_double\030e \003(\001B\002\020\001\022\027\n\013packed_bool\030f \003(\010"
      "B\002\020\001\0227\n\013packed_enum\030g \003(\0162\036.protobuf_uni"
      "ttest.ForeignEnumB\002\020\001\"\310\003\n\021TestUnpackedTy"
      "pes\022\032\n\016unpacked_int32\030Z \003(\005B\002\020\000\022\032\n\016unpac"
      "ked_int64\030[ \003(\003B\002\020\000\022\033\n\017unpacked_uint32\030\\"
      " \003(\rB\002\020\000\022\033\n\017unpacked_uint64\030] \003(\004B\002\020\000\022\033\n"
      "\017unpacked_sint32\030^ \003(\021B\002\020\000\022\033\n\017unpacked_s"
      "int64\030_ \003(\022B\002\020\000\022\034\n\020unpacked_fixed32\030` \003("
      "\007B\002\020\000\022\034\n\020unpacked_fixed64\030a \003(\006B\002\020\000\022\035\n\021u"
      "npacked_sfixed32\030b \003(\017B\002\020\000\022\035\n\021unpacked_s"
      "fixed64\030c \003(\020B\002\020\000\022\032\n\016unpacked_float\030d \003("
      "\002B\002\020\000\022\033\n\017unpacked_double\030e \003(\001B\002\020\000\022\031\n\run"
      "packed_bool\030f \003(\010B\002\020\000\0229\n\runpacked_enum\030g"
      " \003(\0162\036.protobuf_unittest.ForeignEnumB\002\020\000"
      "\" \n\024TestPackedExtensions*\010\010\001\020\200\200\200\200\002\"\"\n\026Te"
      "stUnpackedExtensions*\010\010\001\020\200\200\200\200\002\"\231\004\n\025TestD"
      "ynamicExtensions\022\031\n\020scalar_extension\030\320\017 "
      "\001(\007\0227\n\016enum_extension\030\321\017 \001(\0162\036.protobuf_"
      "unittest.ForeignEnum\022Y\n\026dynamic_enum_ext"
      "ension\030\322\017 \001(\01628.protobuf_unittest.TestDy"
      "namicExtensions.DynamicEnumType\022=\n\021messa"
      "ge_extension\030\323\017 \001(\0132!.protobuf_unittest."
      "ForeignMessage\022_\n\031dynamic_message_extens"
      "ion\030\324\017 \001(\0132;.protobuf_unittest.TestDynam"
      "icExtensions.DynamicMessageType\022\033\n\022repea"
      "ted_extension\030\325\017 \003(\t\022\035\n\020packed_extension"
      "\030\326\017 \003(\021B\002\020\001\032,\n\022DynamicMessageType\022\026\n\rdyn"
      "amic_field\030\264\020 \001(\005\"G\n\017DynamicEnumType\022\020\n\013"
      "DYNAMIC_FOO\020\230\021\022\020\n\013DYNAMIC_BAR\020\231\021\022\020\n\013DYNA"
      "MIC_BAZ\020\232\021\"\300\001\n#TestRepeatedScalarDiffere"
      "ntTagSizes\022\030\n\020repeated_fixed32\030\014 \003(\007\022\026\n\016"
      "repeated_int32\030\r \003(\005\022\031\n\020repeated_fixed64"
      "\030\376\017 \003(\006\022\027\n\016repeated_int64\030\377\017 \003(\003\022\030\n\016repe"
      "ated_float\030\376\377\017 \003(\002\022\031\n\017repeated_uint64\030\377\377"
      "\017 \003(\004\"\367\t\n\020TestParsingMerge\022;\n\022required_a"
      "ll_types\030\001 \002(\0132\037.protobuf_unittest.TestA"
      "llTypes\022;\n\022optional_all_types\030\002 \001(\0132\037.pr"
      "otobuf_unittest.TestAllTypes\022;\n\022repeated"
      "_all_types\030\003 \003(\0132\037.protobuf_unittest.Tes"
      "tAllTypes\022H\n\roptionalgroup\030\n \001(\n21.proto"
      "buf_unittest.TestParsingMerge.OptionalGr"
      "oup\022H\n\rrepeatedgroup\030\024 \003(\n21.protobuf_un"
      "ittest.TestParsingMerge.RepeatedGroup\032\252\004"
      "\n\027RepeatedFieldsGenerator\022/\n\006field1\030\001 \003("
      "\0132\037.protobuf_unittest.TestAllTypes\022/\n\006fi"
      "eld2\030\002 \003(\0132\037.protobuf_unittest.TestAllTy"
      "pes\022/\n\006field3\030\003 \003(\0132\037.protobuf_unittest."
      "TestAllTypes\022R\n\006group1\030\n \003(\n2B.protobuf_"
      "unittest.TestParsingMerge.RepeatedFields"
      "Generator.Group1\022R\n\006group2\030\024 \003(\n2B.proto"
      "buf_unittest.TestParsingMerge.RepeatedFi"
      "eldsGenerator.Group2\022.\n\004ext1\030\350\007 \003(\0132\037.pr"
      "otobuf_unittest.TestAllTypes\022.\n\004ext2\030\351\007 "
      "\003(\0132\037.protobuf_unittest.TestAllTypes\0329\n\006"
      "Group1\022/\n\006field1\030\013 \001(\0132\037.protobuf_unitte"
      "st.TestAllTypes\0329\n\006Group2\022/\n\006field1\030\025 \001("
      "\0132\037.protobuf_unittest.TestAllTypes\032R\n\rOp"
      "tionalGroup\022A\n\030optional_group_all_types\030"
      "\013 \001(\0132\037.protobuf_unittest.TestAllTypes\032R"
      "\n\rRepeatedGroup\022A\n\030repeated_group_all_ty"
      "pes\030\025 \001(\0132\037.protobuf_unittest.TestAllTyp"
      "es*\t\010\350\007\020\200\200\200\200\0022[\n\014optional_ext\022#.protobuf"
      "_unittest.TestParsingMerge\030\350\007 \001(\0132\037.prot"
      "obuf_unittest.TestAllTypes2[\n\014repeated_e"
      "xt\022#.protobuf_unittest.TestParsingMerge\030"
      "\351\007 \003(\0132\037.protobuf_unittest.TestAllTypes\""
      "D\n\033TestCommentInjectionMessage\022%\n\001a\030\001 \001("
      "\t:\032*/ <- Neither should this.\"\014\n\nFooRequ"
      "est\"\r\n\013FooResponse\"\022\n\020FooClientMessage\"\022"
      "\n\020FooServerMessage\"\014\n\nBarRequest\"\r\n\013BarR"
      "esponse\"\222\001\n\014TestJsonName\022\023\n\013field_name1\030"
      "\001 \001(\005\022\022\n\nfieldName2\030\002 \001(\005\022\022\n\nFieldName3\030"
      "\003 \001(\005\022\024\n\014_field_name4\030\004 \001(\005\022\023\n\013FIELD_NAM"
      "E5\030\005 \001(\005\022\032\n\013field_name6\030\006 \001(\005R\005@type\"\375\005\n"
      "\024TestHugeFieldNumbers\022\032\n\016optional_int32\030"
      "\360\370\377\377\001 \001(\005\022\024\n\010fixed_32\030\361\370\377\377\001 \001(\005\022\036\n\016repea"
      "ted_int32\030\362\370\377\377\001 \003(\005B\002\020\000\022\034\n\014packed_int32\030"
      "\363\370\377\377\001 \003(\005B\002\020\001\0229\n\roptional_enum\030\364\370\377\377\001 \001(\016"
      "2\036.protobuf_unittest.ForeignEnum\022\033\n\017opti"
      "onal_string\030\365\370\377\377\001 \001(\t\022\032\n\016optional_bytes\030"
      "\366\370\377\377\001 \001(\014\022\?\n\020optional_message\030\367\370\377\377\001 \001(\0132"
      "!.protobuf_unittest.ForeignMessage\022P\n\rop"
      "tionalgroup\030\370\370\377\377\001 \001(\n25.protobuf_unittes"
      "t.TestHugeFieldNumbers.OptionalGroup\022[\n\021"
      "string_string_map\030\372\370\377\377\001 \003(\0132<.protobuf_u"
      "nittest.TestHugeFieldNumbers.StringStrin"
      "gMapEntry\022\032\n\014oneof_uint32\030\373\370\377\377\001 \001(\rH\000\022C\n"
      "\024oneof_test_all_types\030\374\370\377\377\001 \001(\0132\037.protob"
      "uf_unittest.TestAllTypesH\000\022\032\n\014oneof_stri"
      "ng\030\375\370\377\377\001 \001(\tH\000\022\031\n\013oneof_bytes\030\376\370\377\377\001 \001(\014H"
      "\000\032$\n\rOptionalGroup\022\023\n\007group_a\030\371\370\377\377\001 \001(\005\032"
      "6\n\024StringStringMapEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005"
      "value\030\002 \001(\t:\0028\001*\014\010\340\252\377\377\001\020\360\370\377\377\001B\r\n\013oneof_f"
      "ield\"\261\001\n\030TestExtensionInsideTable\022\016\n\006fie"
      "ld1\030\001 \001(\005\022\016\n\006field2\030\002 \001(\005\022\016\n\006field3\030\003 \001("
      "\005\022\016\n\006field4\030\004 \001(\005\022\016\n\006field6\030\006 \001(\005\022\016\n\006fie"
      "ld7\030\007 \001(\005\022\016\n\006field8\030\010 \001(\005\022\016\n\006field9\030\t \001("
      "\005\022\017\n\007field10\030\n \001(\005*\004\010\005\020\006*@\n\013ForeignEnum\022"
      "\017\n\013FOREIGN_FOO\020\004\022\017\n\013FOREIGN_BAR\020\005\022\017\n\013FOR"
      "EIGN_BAZ\020\006*K\n\024TestEnumWithDupValue\022\010\n\004FO"
      "O1\020\001\022\010\n\004BAR1\020\002\022\007\n\003BAZ\020\003\022\010\n\004FOO2\020\001\022\010\n\004BAR"
      "2\020\002\032\002\020\001*\211\001\n\016TestSparseEnum\022\014\n\010SPARSE_A\020{"
      "\022\016\n\010SPARSE_B\020\246\347\003\022\017\n\010SPARSE_C\020\262\261\200\006\022\025\n\010SPA"
      "RSE_D\020\361\377\377\377\377\377\377\377\377\001\022\025\n\010SPARSE_E\020\264\336\374\377\377\377\377\377\377\001\022"
      "\014\n\010SPARSE_F\020\000\022\014\n\010SPARSE_G\020\0022\231\001\n\013TestServ"
      "ice\022D\n\003Foo\022\035.protobuf_unittest.FooReques"
      "t\032\036.protobuf_unittest.FooResponse\022D\n\003Bar"
      "\022\035.protobuf_unittest.BarRequest\032\036.protob"
      "uf_unittest.BarResponse:F\n\030optional_int3"
      "2_extension\022$.protobuf_unittest.TestAllE"
      "xtensions\030\001 \001(\005:F\n\030optional_int64_extens"
      "ion\022$.protobuf_unittest.TestAllExtension"
      "s\030\002 \001(\003:G\n\031optional_uint32_extension\022$.p"
      "rotobuf_unittest.TestAllExtensions\030\003 \001(\r"
      ":G\n\031optional_uint64_extension\022$.protobuf"
      "_unittest.TestAllExtensions\030\004 \001(\004:G\n\031opt"
      "ional_sint32_extension\022$.protobuf_unitte"
      "st.TestAllExtensions\030\005 \001(\021:G\n\031optional_s"
      "int64_extension\022$.protobuf_unittest.Test"
      "AllExtensions\030\006 \001(\022:H\n\032optional_fixed32_"
      "extension\022$.protobuf_unittest.TestAllExt"
      "ensions\030\007 \001(\007:H\n\032optional_fixed64_extens"
      "ion\022$.protobuf_unittest.TestAllExtension"
      "s\030\010 \001(\006:I\n\033optional_sfixed32_extension\022$"
      ".protobuf_unittest.TestAllExtensions\030\t \001"
      "(\017:I\n\033optional_sfixed64_extension\022$.prot"
      "obuf_unittest.TestAllExtensions\030\n \001(\020:F\n"
      "\030optional_float_extension\022$.protobuf_uni"
      "ttest.TestAllExtensions\030\013 \001(\002:G\n\031optiona"
      "l_double_extension\022$.protobuf_unittest.T"
      "estAllExtensions\030\014 \001(\001:E\n\027optional_bool_"
      "extension\022$.protobuf_unittest.TestAllExt"
      "ensions\030\r \001(\010:G\n\031optional_string_extensi"
      "on\022$.protobuf_unittest.TestAllExtensions"
      "\030\016 \001(\t:F\n\030optional_bytes_extension\022$.pro"
      "tobuf_unittest.TestAllExtensions\030\017 \001(\014:q"
      "\n\027optionalgroup_extension\022$.protobuf_uni"
      "ttest.TestAllExtensions\030\020 \001(\n2*.protobuf"
      "_unittest.OptionalGroup_extension:~\n!opt"
      "ional_nested_message_extension\022$.protobu"
      "f_unittest.TestAllExtensions\030\022 \001(\0132-.pro"
      "tobuf_unittest.TestAllTypes.NestedMessag"
      "e:s\n\"optional_foreign_message_extension\022"
      "$.protobuf_unittest.TestAllExtensions\030\023 "
      "\001(\0132!.protobuf_unittest.ForeignMessage:x"
      "\n!optional_import_message_extension\022$.pr"
      "otobuf_unittest.TestAllExtensions\030\024 \001(\0132"
      "\'.protobuf_unittest_import.ImportMessage"
      ":x\n\036optional_nested_enum_extension\022$.pro"
      "tobuf_unittest.TestAllExtensions\030\025 \001(\0162*"
      ".protobuf_unittest.TestAllTypes.NestedEn"
      "um:m\n\037optional_foreign_enum_extension\022$."
      "protobuf_unittest.TestAllExtensions\030\026 \001("
      "\0162\036.protobuf_unittest.ForeignEnum:r\n\036opt"
      "ional_import_enum_extension\022$.protobuf_u"
      "nittest.TestAllExtensions\030\027 \001(\0162$.protob"
      "uf_unittest_import.ImportEnum:Q\n\037optiona"
      "l_string_piece_extension\022$.protobuf_unit"
      "test.TestAllExtensions\030\030 \001(\tB\002\010\002:I\n\027opti"
      "onal_cord_extension\022$.protobuf_unittest."
      "TestAllExtensions\030\031 \001(\tB\002\010\001:\205\001\n(optional"
      "_public_import_message_extension\022$.proto"
      "buf_unittest.TestAllExtensions\030\032 \001(\0132-.p"
      "rotobuf_unittest_import.PublicImportMess"
      "age:\200\001\n\037optional_lazy_message_extension\022"
      "$.protobuf_unittest.TestAllExtensions\030\033 "
      "\001(\0132-.protobuf_unittest.TestAllTypes.Nes"
      "tedMessageB\002(\001:F\n\030repeated_int32_extensi"
      "on\022$.protobuf_unittest.TestAllExtensions"
      "\030\037 \003(\005:F\n\030repeated_int64_extension\022$.pro"
      "tobuf_unittest.TestAllExtensions\030  \003(\003:G"
      "\n\031repeated_uint32_extension\022$.protobuf_u"
      "nittest.TestAllExtensions\030! \003(\r:G\n\031repea"
      "ted_uint64_extension\022$.protobuf_unittest"
      ".TestAllExtensions\030\" \003(\004:G\n\031repeated_sin"
      "t32_extension\022$.protobuf_unittest.TestAl"
      "lExtensions\030# \003(\021:G\n\031repeated_sint64_ext"
      "ension\022$.protobuf_unittest.TestAllExtens"
      "ions\030$ \003(\022:H\n\032repeated_fixed32_extension"
      "\022$.protobuf_unittest.TestAllExtensions\030%"
      " \003(\007:H\n\032repeated_fixed64_extension\022$.pro"
      "tobuf_unittest.TestAllExtensions\030& \003(\006:I"
      "\n\033repeated_sfixed32_extension\022$.protobuf"
      "_unittest.TestAllExtensions\030\' \003(\017:I\n\033rep"
      "eated_sfixed64_extension\022$.protobuf_unit"
      "test.TestAllExtensions\030( \003(\020:F\n\030repeated"
      "_float_extension\022$.protobuf_unittest.Tes"
      "tAllExtensions\030) \003(\002:G\n\031repeated_double_"
      "extension\022$.protobuf_unittest.TestAllExt"
      "ensions\030* \003(\001:E\n\027repeated_bool_extension"
      "\022$.protobuf_unittest.TestAllExtensions\030+"
      " \003(\010:G\n\031repeated_string_extension\022$.prot"
      "obuf_unittest.TestAllExtensions\030, \003(\t:F\n"
      "\030repeated_bytes_extension\022$.protobuf_uni"
      "ttest.TestAllExtensions\030- \003(\014:q\n\027repeate"
      "dgroup_extension\022$.protobuf_unittest.Tes"
      "tAllExtensions\030. \003(\n2*.protobuf_unittest"
      ".RepeatedGroup_extension:~\n!repeated_nes"
      "ted_message_extension\022$.protobuf_unittes"
      "t.TestAllExtensions\0300 \003(\0132-.protobuf_uni"
      "ttest.TestAllTypes.NestedMessage:s\n\"repe"
      "ated_foreign_message_extension\022$.protobu"
      "f_unittest.TestAllExtensions\0301 \003(\0132!.pro"
      "tobuf_unittest.ForeignMessage:x\n!repeate"
      "d_import_message_extension\022$.protobuf_un"
      "ittest.TestAllExtensions\0302 \003(\0132\'.protobu"
      "f_unittest_import.ImportMessage:x\n\036repea"
      "ted_nested_enum_extension\022$.protobuf_uni"
      "ttest.TestAllExtensions\0303 \003(\0162*.protobuf"
      "_unittest.TestAllTypes.NestedEnum:m\n\037rep"
      "eated_foreign_enum_extension\022$.protobuf_"
      "unittest.TestAllExtensions\0304 \003(\0162\036.proto"
      "buf_unittest.ForeignEnum:r\n\036repeated_imp"
      "ort_enum_extension\022$.protobuf_unittest.T"
      "estAllExtensions\0305 \003(\0162$.protobuf_unitte"
      "st_import.ImportEnum:Q\n\037repeated_string_"
      "piece_extension\022$.protobuf_unittest.Test"
      "AllExtensions\0306 \003(\tB\002\010\002:I\n\027repeated_cord"
      "_extension\022$.protobuf_unittest.TestAllEx"
      "tensions\0307 \003(\tB\002\010\001:\200\001\n\037repeated_lazy_mes"
      "sage_extension\022$.protobuf_unittest.TestA"
      "llExtensions\0309 \003(\0132-.protobuf_unittest.T"
      "estAllTypes.NestedMessageB\002(\001:I\n\027default"
      "_int32_extension\022$.protobuf_unittest.Tes"
      "tAllExtensions\030= \001(\005:\00241:I\n\027default_int6"
      "4_extension\022$.protobuf_unittest.TestAllE"
      "xtensions\030> \001(\003:\00242:J\n\030default_uint32_ex"
      "tension\022$.protobuf_unittest.TestAllExten"
      "sions\030\? \001(\r:\00243:J\n\030default_uint64_extens"
      "ion\022$.protobuf_unittest.TestAllExtension"
      "s\030@ \001(\004:\00244:K\n\030default_sint32_extension\022"
      "$.protobuf_unittest.TestAllExtensions\030A "
      "\001(\021:\003-45:J\n\030default_sint64_extension\022$.p"
      "rotobuf_unittest.TestAllExtensions\030B \001(\022"
      ":\00246:K\n\031default_fixed32_extension\022$.prot"
      "obuf_unittest.TestAllExtensions\030C \001(\007:\0024"
      "7:K\n\031default_fixed64_extension\022$.protobu"
      "f_unittest.TestAllExtensions\030D \001(\006:\00248:L"
      "\n\032default_sfixed32_extension\022$.protobuf_"
      "unittest.TestAllExtensions\030E \001(\017:\00249:M\n\032"
      "default_sfixed64_extension\022$.protobuf_un"
      "ittest.TestAllExtensions\030F \001(\020:\003-50:K\n\027d"
      "efault_float_extension\022$.protobuf_unitte"
      "st.TestAllExtensions\030G \001(\002:\00451.5:M\n\030defa"
      "ult_double_extension\022$.protobuf_unittest"
      ".TestAllExtensions\030H \001(\001:\00552000:J\n\026defau"
      "lt_bool_extension\022$.protobuf_unittest.Te"
      "stAllExtensions\030I \001(\010:\004true:M\n\030default_s"
      "tring_extension\022$.protobuf_unittest.Test"
      "AllExtensions\030J \001(\t:\005hello:L\n\027default_by"
      "tes_extension\022$.protobuf_unittest.TestAl"
      "lExtensions\030K \001(\014:\005world:|\n\035default_nest"
      "ed_enum_extension\022$.protobuf_unittest.Te"
      "stAllExtensions\030Q \001(\0162*.protobuf_unittes"
      "t.TestAllTypes.NestedEnum:\003BAR:y\n\036defaul"
      "t_foreign_enum_extension\022$.protobuf_unit"
      "test.TestAllExtensions\030R \001(\0162\036.protobuf_"
      "unittest.ForeignEnum:\013FOREIGN_BAR:}\n\035def"
      "ault_import_enum_extension\022$.protobuf_un"
      "ittest.TestAllExtensions\030S \001(\0162$.protobu"
      "f_unittest_import.ImportEnum:\nIMPORT_BAR"
      ":U\n\036default_string_piece_extension\022$.pro"
      "tobuf_unittest.TestAllExtensions\030T \001(\t:\003"
      "abcB\002\010\002:M\n\026default_cord_extension\022$.prot"
      "obuf_unittest.TestAllExtensions\030U \001(\t:\0031"
      "23B\002\010\001:D\n\026oneof_uint32_extension\022$.proto"
      "buf_unittest.TestAllExtensions\030o \001(\r:{\n\036"
      "oneof_nested_message_extension\022$.protobu"
      "f_unittest.TestAllExtensions\030p \001(\0132-.pro"
      "tobuf_unittest.TestAllTypes.NestedMessag"
      "e:D\n\026oneof_string_extension\022$.protobuf_u"
      "nittest.TestAllExtensions\030q \001(\t:C\n\025oneof"
      "_bytes_extension\022$.protobuf_unittest.Tes"
      "tAllExtensions\030r \001(\014:B\n\023my_extension_str"
      "ing\022%.protobuf_unittest.TestFieldOrderin"
      "gs\0302 \001(\t:\?\n\020my_extension_int\022%.protobuf_"
      "unittest.TestFieldOrderings\030\005 \001(\005:K\n\026pac"
      "ked_int32_extension\022\'.protobuf_unittest."
      "TestPackedExtensions\030Z \003(\005B\002\020\001:K\n\026packed"
      "_int64_extension\022\'.protobuf_unittest.Tes"
      "tPackedExtensions\030[ \003(\003B\002\020\001:L\n\027packed_ui"
      "nt32_extension\022\'.protobuf_unittest.TestP"
      "ackedExtensions\030\\ \003(\rB\002\020\001:L\n\027packed_uint"
      "64_extension\022\'.protobuf_unittest.TestPac"
      "kedExtensions\030] \003(\004B\002\020\001:L\n\027packed_sint32"
      "_extension\022\'.protobuf_unittest.TestPacke"
      "dExtensions\030^ \003(\021B\002\020\001:L\n\027packed_sint64_e"
      "xtension\022\'.protobuf_unittest.TestPackedE"
      "xtensions\030_ \003(\022B\002\020\001:M\n\030packed_fixed32_ex"
      "tension\022\'.protobuf_unittest.TestPackedEx"
      "tensions\030` \003(\007B\002\020\001:M\n\030packed_fixed64_ext"
      "ension\022\'.protobuf_unittest.TestPackedExt"
      "ensions\030a \003(\006B\002\020\001:N\n\031packed_sfixed32_ext"
      "ension\022\'.protobuf_unittest.TestPackedExt"
      "ensions\030b \003(\017B\002\020\001:N\n\031packed_sfixed64_ext"
      "ension\022\'.protobuf_unittest.TestPackedExt"
      "ensions\030c \003(\020B\002\020\001:K\n\026packed_float_extens"
      "ion\022\'.protobuf_unittest.TestPackedExtens"
      "ions\030d \003(\002B\002\020\001:L\n\027packed_double_extensio"
      "n\022\'.protobuf_unittest.TestPackedExtensio"
      "ns\030e \003(\001B\002\020\001:J\n\025packed_bool_extension\022\'."
      "protobuf_unittest.TestPackedExtensions\030f"
      " \003(\010B\002\020\001:j\n\025packed_enum_extension\022\'.prot"
      "obuf_unittest.TestPackedExtensions\030g \003(\016"
      "2\036.protobuf_unittest.ForeignEnumB\002\020\001:O\n\030"
      "unpacked_int32_extension\022).protobuf_unit"
      "test.TestUnpackedExtensions\030Z \003(\005B\002\020\000:O\n"
      "\030unpacked_int64_extension\022).protobuf_uni"
      "ttest.TestUnpackedExtensions\030[ \003(\003B\002\020\000:P"
      "\n\031unpacked_uint32_extension\022).protobuf_u"
      "nittest.TestUnpackedExtensions\030\\ \003(\rB\002\020\000"
      ":P\n\031unpacked_uint64_extension\022).protobuf"
      "_unittest.TestUnpackedExtensions\030] \003(\004B\002"
      "\020\000:P\n\031unpacked_sint32_extension\022).protob"
      "uf_unittest.TestUnpackedExtensions\030^ \003(\021"
      "B\002\020\000:P\n\031unpacked_sint64_extension\022).prot"
      "obuf_unittest.TestUnpackedExtensions\030_ \003"
      "(\022B\002\020\000:Q\n\032unpacked_fixed32_extension\022).p"
      "rotobuf_unittest.TestUnpackedExtensions\030"
      "` \003(\007B\002\020\000:Q\n\032unpacked_fixed64_extension\022"
      ").protobuf_unittest.TestUnpackedExtensio"
      "ns\030a \003(\006B\002\020\000:R\n\033unpacked_sfixed32_extens"
      "ion\022).protobuf_unittest.TestUnpackedExte"
      "nsions\030b \003(\017B\002\020\000:R\n\033unpacked_sfixed64_ex"
      "tension\022).protobuf_unittest.TestUnpacked"
      "Extensions\030c \003(\020B\002\020\000:O\n\030unpacked_float_e"
      "xtension\022).protobuf_unittest.TestUnpacke"
      "dExtensions\030d \003(\002B\002\020\000:P\n\031unpacked_double"
      "_extension\022).protobuf_unittest.TestUnpac"
      "kedExtensions\030e \003(\001B\002\020\000:N\n\027unpacked_bool"
      "_extension\022).protobuf_unittest.TestUnpac"
      "kedExtensions\030f \003(\010B\002\020\000:n\n\027unpacked_enum"
      "_extension\022).protobuf_unittest.TestUnpac"
      "kedExtensions\030g \003(\0162\036.protobuf_unittest."
      "ForeignEnumB\002\020\000:d\n\016test_all_types\022\'.prot"
      "obuf_unittest.TestHugeFieldNumbers\030\340\252\377\377\001"
      " \001(\0132\037.protobuf_unittest.TestAllTypes:Z\n"
      "%test_extension_inside_table_extension\022+"
      ".protobuf_unittest.TestExtensionInsideTa"
      "ble\030\005 \001(\005B\035B\rUnittestProtoH\001\200\001\001\210\001\001\220\001\001\370\001\001"
  };
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
      descriptor, 25000);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "google/protobuf/unittest.proto", &protobuf_RegisterTypes);
  ::protobuf_google_2fprotobuf_2funittest_5fimport_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_2funittest_2eproto
namespace protobuf_unittest {
const ::google::protobuf::EnumDescriptor* TestAllTypes_NestedEnum_descriptor() {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[0];
}
bool TestAllTypes_NestedEnum_IsValid(int value) {
  switch (value) {
    case -1:
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const TestAllTypes_NestedEnum TestAllTypes::FOO;
const TestAllTypes_NestedEnum TestAllTypes::BAR;
const TestAllTypes_NestedEnum TestAllTypes::BAZ;
const TestAllTypes_NestedEnum TestAllTypes::NEG;
const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MIN;
const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MAX;
const int TestAllTypes::NestedEnum_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* TestOneof2_NestedEnum_descriptor() {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[1];
}
bool TestOneof2_NestedEnum_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const TestOneof2_NestedEnum TestOneof2::FOO;
const TestOneof2_NestedEnum TestOneof2::BAR;
const TestOneof2_NestedEnum TestOneof2::BAZ;
const TestOneof2_NestedEnum TestOneof2::NestedEnum_MIN;
const TestOneof2_NestedEnum TestOneof2::NestedEnum_MAX;
const int TestOneof2::NestedEnum_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* TestDynamicExtensions_DynamicEnumType_descriptor() {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[2];
}
bool TestDynamicExtensions_DynamicEnumType_IsValid(int value) {
  switch (value) {
    case 2200:
    case 2201:
    case 2202:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const TestDynamicExtensions_DynamicEnumType TestDynamicExtensions::DYNAMIC_FOO;
const TestDynamicExtensions_DynamicEnumType TestDynamicExtensions::DYNAMIC_BAR;
const TestDynamicExtensions_DynamicEnumType TestDynamicExtensions::DYNAMIC_BAZ;
const TestDynamicExtensions_DynamicEnumType TestDynamicExtensions::DynamicEnumType_MIN;
const TestDynamicExtensions_DynamicEnumType TestDynamicExtensions::DynamicEnumType_MAX;
const int TestDynamicExtensions::DynamicEnumType_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* ForeignEnum_descriptor() {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[3];
}
bool ForeignEnum_IsValid(int value) {
  switch (value) {
    case 4:
    case 5:
    case 6:
      return true;
    default:
      return false;
  }
}

const ::google::protobuf::EnumDescriptor* TestEnumWithDupValue_descriptor() {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[4];
}
bool TestEnumWithDupValue_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

const ::google::protobuf::EnumDescriptor* TestSparseEnum_descriptor() {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[5];
}
bool TestSparseEnum_IsValid(int value) {
  switch (value) {
    case -53452:
    case -15:
    case 0:
    case 2:
    case 123:
    case 62374:
    case 12589234:
      return true;
    default:
      return false;
  }
}


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

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

TestAllTypes_NestedMessage::TestAllTypes_NestedMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_NestedMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypes.NestedMessage)
}
TestAllTypes_NestedMessage::TestAllTypes_NestedMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_NestedMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestAllTypes.NestedMessage)
}
TestAllTypes_NestedMessage::TestAllTypes_NestedMessage(const TestAllTypes_NestedMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  bb_ = from.bb_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypes.NestedMessage)
}

void TestAllTypes_NestedMessage::SharedCtor() {
  bb_ = 0;
}

TestAllTypes_NestedMessage::~TestAllTypes_NestedMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypes.NestedMessage)
  SharedDtor();
}

void TestAllTypes_NestedMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestAllTypes_NestedMessage::ArenaDtor(void* object) {
  TestAllTypes_NestedMessage* _this = reinterpret_cast< TestAllTypes_NestedMessage* >(object);
  (void)_this;
}
void TestAllTypes_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestAllTypes_NestedMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestAllTypes_NestedMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestAllTypes_NestedMessage& TestAllTypes_NestedMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_NestedMessage.base);
  return *internal_default_instance();
}


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

  bb_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestAllTypes_NestedMessage::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:protobuf_unittest.TestAllTypes.NestedMessage)
  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)) {
      // optional int32 bb = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_bb();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &bb_)));
        } 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:protobuf_unittest.TestAllTypes.NestedMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypes.NestedMessage)
  return false;
#undef DO_
}

void TestAllTypes_NestedMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypes.NestedMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 bb = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->bb(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypes.NestedMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 bb = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->bb(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestAllTypes.NestedMessage)
  return target;
}

size_t TestAllTypes_NestedMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypes.NestedMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 bb = 1;
  if (has_bb()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->bb());
  }

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

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

void TestAllTypes_NestedMessage::MergeFrom(const TestAllTypes_NestedMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypes.NestedMessage)
  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_bb()) {
    set_bb(from.bb());
  }
}

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

void TestAllTypes_NestedMessage::CopyFrom(const TestAllTypes_NestedMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypes.NestedMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestAllTypes_NestedMessage::Swap(TestAllTypes_NestedMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestAllTypes_NestedMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestAllTypes_NestedMessage::UnsafeArenaSwap(TestAllTypes_NestedMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestAllTypes_NestedMessage::InternalSwap(TestAllTypes_NestedMessage* other) {
  using std::swap;
  swap(bb_, other->bb_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestAllTypes_OptionalGroup::TestAllTypes_OptionalGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_OptionalGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypes.OptionalGroup)
}
TestAllTypes_OptionalGroup::TestAllTypes_OptionalGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_OptionalGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestAllTypes.OptionalGroup)
}
TestAllTypes_OptionalGroup::TestAllTypes_OptionalGroup(const TestAllTypes_OptionalGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypes.OptionalGroup)
}

void TestAllTypes_OptionalGroup::SharedCtor() {
  a_ = 0;
}

TestAllTypes_OptionalGroup::~TestAllTypes_OptionalGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypes.OptionalGroup)
  SharedDtor();
}

void TestAllTypes_OptionalGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestAllTypes_OptionalGroup::ArenaDtor(void* object) {
  TestAllTypes_OptionalGroup* _this = reinterpret_cast< TestAllTypes_OptionalGroup* >(object);
  (void)_this;
}
void TestAllTypes_OptionalGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestAllTypes_OptionalGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestAllTypes_OptionalGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestAllTypes_OptionalGroup& TestAllTypes_OptionalGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_OptionalGroup.base);
  return *internal_default_instance();
}


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

  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestAllTypes_OptionalGroup::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:protobuf_unittest.TestAllTypes.OptionalGroup)
  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)) {
      // optional int32 a = 17;
      case 17: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllTypes.OptionalGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypes.OptionalGroup)
  return false;
#undef DO_
}

void TestAllTypes_OptionalGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 17;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypes.OptionalGroup)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 17;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->a(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestAllTypes.OptionalGroup)
  return target;
}

size_t TestAllTypes_OptionalGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 a = 17;
  if (has_a()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->a());
  }

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

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

void TestAllTypes_OptionalGroup::MergeFrom(const TestAllTypes_OptionalGroup& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  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_a()) {
    set_a(from.a());
  }
}

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

void TestAllTypes_OptionalGroup::CopyFrom(const TestAllTypes_OptionalGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestAllTypes_OptionalGroup::Swap(TestAllTypes_OptionalGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestAllTypes_OptionalGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestAllTypes_OptionalGroup::UnsafeArenaSwap(TestAllTypes_OptionalGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestAllTypes_OptionalGroup::InternalSwap(TestAllTypes_OptionalGroup* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestAllTypes_RepeatedGroup::TestAllTypes_RepeatedGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_RepeatedGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypes.RepeatedGroup)
}
TestAllTypes_RepeatedGroup::TestAllTypes_RepeatedGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_RepeatedGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestAllTypes.RepeatedGroup)
}
TestAllTypes_RepeatedGroup::TestAllTypes_RepeatedGroup(const TestAllTypes_RepeatedGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypes.RepeatedGroup)
}

void TestAllTypes_RepeatedGroup::SharedCtor() {
  a_ = 0;
}

TestAllTypes_RepeatedGroup::~TestAllTypes_RepeatedGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypes.RepeatedGroup)
  SharedDtor();
}

void TestAllTypes_RepeatedGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestAllTypes_RepeatedGroup::ArenaDtor(void* object) {
  TestAllTypes_RepeatedGroup* _this = reinterpret_cast< TestAllTypes_RepeatedGroup* >(object);
  (void)_this;
}
void TestAllTypes_RepeatedGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestAllTypes_RepeatedGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestAllTypes_RepeatedGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestAllTypes_RepeatedGroup& TestAllTypes_RepeatedGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_RepeatedGroup.base);
  return *internal_default_instance();
}


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

  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestAllTypes_RepeatedGroup::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:protobuf_unittest.TestAllTypes.RepeatedGroup)
  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)) {
      // optional int32 a = 47;
      case 47: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(120u /* 376 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllTypes.RepeatedGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypes.RepeatedGroup)
  return false;
#undef DO_
}

void TestAllTypes_RepeatedGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 47;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(47, this->a(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypes.RepeatedGroup)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 47;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(47, this->a(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestAllTypes.RepeatedGroup)
  return target;
}

size_t TestAllTypes_RepeatedGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 a = 47;
  if (has_a()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->a());
  }

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

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

void TestAllTypes_RepeatedGroup::MergeFrom(const TestAllTypes_RepeatedGroup& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  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_a()) {
    set_a(from.a());
  }
}

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

void TestAllTypes_RepeatedGroup::CopyFrom(const TestAllTypes_RepeatedGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestAllTypes_RepeatedGroup::Swap(TestAllTypes_RepeatedGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestAllTypes_RepeatedGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestAllTypes_RepeatedGroup::UnsafeArenaSwap(TestAllTypes_RepeatedGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestAllTypes_RepeatedGroup::InternalSwap(TestAllTypes_RepeatedGroup* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestAllTypes::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestAllTypes_OptionalGroup*>(
      ::protobuf_unittest::TestAllTypes_OptionalGroup::internal_default_instance());
  ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::protobuf_unittest::TestAllTypes_NestedMessage*>(
      ::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_foreign_message_ = const_cast< ::protobuf_unittest::ForeignMessage*>(
      ::protobuf_unittest::ForeignMessage::internal_default_instance());
  ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_import_message_ = const_cast< ::protobuf_unittest_import::ImportMessage*>(
      ::protobuf_unittest_import::ImportMessage::internal_default_instance());
  ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_public_import_message_ = const_cast< ::protobuf_unittest_import::PublicImportMessage*>(
      ::protobuf_unittest_import::PublicImportMessage::internal_default_instance());
  ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_lazy_message_ = const_cast< ::protobuf_unittest::TestAllTypes_NestedMessage*>(
      ::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  ::protobuf_unittest::_TestAllTypes_default_instance_.oneof_uint32_ = 0u;
  ::protobuf_unittest::_TestAllTypes_default_instance_.oneof_nested_message_ = const_cast< ::protobuf_unittest::TestAllTypes_NestedMessage*>(
      ::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  ::protobuf_unittest::_TestAllTypes_default_instance_.oneof_string_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::protobuf_unittest::_TestAllTypes_default_instance_.oneof_bytes_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void TestAllTypes::unsafe_arena_set_allocated_optionalgroup(
    ::protobuf_unittest::TestAllTypes_OptionalGroup* optionalgroup) {
  if (GetArenaNoVirtual() == NULL) {
    delete optionalgroup_;
  }
  optionalgroup_ = optionalgroup;
  if (optionalgroup) {
    set_has_optionalgroup();
  } else {
    clear_has_optionalgroup();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optionalgroup)
}
void TestAllTypes::unsafe_arena_set_allocated_optional_nested_message(
    ::protobuf_unittest::TestAllTypes_NestedMessage* optional_nested_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_nested_message_;
  }
  optional_nested_message_ = optional_nested_message;
  if (optional_nested_message) {
    set_has_optional_nested_message();
  } else {
    clear_has_optional_nested_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optional_nested_message)
}
void TestAllTypes::unsafe_arena_set_allocated_optional_foreign_message(
    ::protobuf_unittest::ForeignMessage* optional_foreign_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_foreign_message_;
  }
  optional_foreign_message_ = optional_foreign_message;
  if (optional_foreign_message) {
    set_has_optional_foreign_message();
  } else {
    clear_has_optional_foreign_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optional_foreign_message)
}
void TestAllTypes::unsafe_arena_set_allocated_optional_import_message(
    ::protobuf_unittest_import::ImportMessage* optional_import_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_import_message_;
  }
  optional_import_message_ = optional_import_message;
  if (optional_import_message) {
    set_has_optional_import_message();
  } else {
    clear_has_optional_import_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optional_import_message)
}
void TestAllTypes::clear_optional_import_message() {
  if (optional_import_message_ != NULL) optional_import_message_->Clear();
  clear_has_optional_import_message();
}
void TestAllTypes::unsafe_arena_set_allocated_optional_public_import_message(
    ::protobuf_unittest_import::PublicImportMessage* optional_public_import_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_public_import_message_;
  }
  optional_public_import_message_ = optional_public_import_message;
  if (optional_public_import_message) {
    set_has_optional_public_import_message();
  } else {
    clear_has_optional_public_import_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optional_public_import_message)
}
void TestAllTypes::clear_optional_public_import_message() {
  if (optional_public_import_message_ != NULL) optional_public_import_message_->Clear();
  clear_has_optional_public_import_message();
}
void TestAllTypes::unsafe_arena_set_allocated_optional_lazy_message(
    ::protobuf_unittest::TestAllTypes_NestedMessage* optional_lazy_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_lazy_message_;
  }
  optional_lazy_message_ = optional_lazy_message;
  if (optional_lazy_message) {
    set_has_optional_lazy_message();
  } else {
    clear_has_optional_lazy_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optional_lazy_message)
}
void TestAllTypes::clear_repeated_import_message() {
  repeated_import_message_.Clear();
}
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_;
void TestAllTypes::set_allocated_oneof_nested_message(::protobuf_unittest::TestAllTypes_NestedMessage* oneof_nested_message) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_oneof_field();
  if (oneof_nested_message) {
    ::google::protobuf::Arena* submessage_arena =
      ::google::protobuf::Arena::GetArena(oneof_nested_message);
    if (message_arena != submessage_arena) {
      oneof_nested_message = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, oneof_nested_message, submessage_arena);
    }
    set_has_oneof_nested_message();
    oneof_field_.oneof_nested_message_ = oneof_nested_message;
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestAllTypes.oneof_nested_message)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestAllTypes::kOptionalInt32FieldNumber;
const int TestAllTypes::kOptionalInt64FieldNumber;
const int TestAllTypes::kOptionalUint32FieldNumber;
const int TestAllTypes::kOptionalUint64FieldNumber;
const int TestAllTypes::kOptionalSint32FieldNumber;
const int TestAllTypes::kOptionalSint64FieldNumber;
const int TestAllTypes::kOptionalFixed32FieldNumber;
const int TestAllTypes::kOptionalFixed64FieldNumber;
const int TestAllTypes::kOptionalSfixed32FieldNumber;
const int TestAllTypes::kOptionalSfixed64FieldNumber;
const int TestAllTypes::kOptionalFloatFieldNumber;
const int TestAllTypes::kOptionalDoubleFieldNumber;
const int TestAllTypes::kOptionalBoolFieldNumber;
const int TestAllTypes::kOptionalStringFieldNumber;
const int TestAllTypes::kOptionalBytesFieldNumber;
const int TestAllTypes::kOptionalgroupFieldNumber;
const int TestAllTypes::kOptionalNestedMessageFieldNumber;
const int TestAllTypes::kOptionalForeignMessageFieldNumber;
const int TestAllTypes::kOptionalImportMessageFieldNumber;
const int TestAllTypes::kOptionalNestedEnumFieldNumber;
const int TestAllTypes::kOptionalForeignEnumFieldNumber;
const int TestAllTypes::kOptionalImportEnumFieldNumber;
const int TestAllTypes::kOptionalStringPieceFieldNumber;
const int TestAllTypes::kOptionalCordFieldNumber;
const int TestAllTypes::kOptionalPublicImportMessageFieldNumber;
const int TestAllTypes::kOptionalLazyMessageFieldNumber;
const int TestAllTypes::kRepeatedInt32FieldNumber;
const int TestAllTypes::kRepeatedInt64FieldNumber;
const int TestAllTypes::kRepeatedUint32FieldNumber;
const int TestAllTypes::kRepeatedUint64FieldNumber;
const int TestAllTypes::kRepeatedSint32FieldNumber;
const int TestAllTypes::kRepeatedSint64FieldNumber;
const int TestAllTypes::kRepeatedFixed32FieldNumber;
const int TestAllTypes::kRepeatedFixed64FieldNumber;
const int TestAllTypes::kRepeatedSfixed32FieldNumber;
const int TestAllTypes::kRepeatedSfixed64FieldNumber;
const int TestAllTypes::kRepeatedFloatFieldNumber;
const int TestAllTypes::kRepeatedDoubleFieldNumber;
const int TestAllTypes::kRepeatedBoolFieldNumber;
const int TestAllTypes::kRepeatedStringFieldNumber;
const int TestAllTypes::kRepeatedBytesFieldNumber;
const int TestAllTypes::kRepeatedgroupFieldNumber;
const int TestAllTypes::kRepeatedNestedMessageFieldNumber;
const int TestAllTypes::kRepeatedForeignMessageFieldNumber;
const int TestAllTypes::kRepeatedImportMessageFieldNumber;
const int TestAllTypes::kRepeatedNestedEnumFieldNumber;
const int TestAllTypes::kRepeatedForeignEnumFieldNumber;
const int TestAllTypes::kRepeatedImportEnumFieldNumber;
const int TestAllTypes::kRepeatedStringPieceFieldNumber;
const int TestAllTypes::kRepeatedCordFieldNumber;
const int TestAllTypes::kRepeatedLazyMessageFieldNumber;
const int TestAllTypes::kDefaultInt32FieldNumber;
const int TestAllTypes::kDefaultInt64FieldNumber;
const int TestAllTypes::kDefaultUint32FieldNumber;
const int TestAllTypes::kDefaultUint64FieldNumber;
const int TestAllTypes::kDefaultSint32FieldNumber;
const int TestAllTypes::kDefaultSint64FieldNumber;
const int TestAllTypes::kDefaultFixed32FieldNumber;
const int TestAllTypes::kDefaultFixed64FieldNumber;
const int TestAllTypes::kDefaultSfixed32FieldNumber;
const int TestAllTypes::kDefaultSfixed64FieldNumber;
const int TestAllTypes::kDefaultFloatFieldNumber;
const int TestAllTypes::kDefaultDoubleFieldNumber;
const int TestAllTypes::kDefaultBoolFieldNumber;
const int TestAllTypes::kDefaultStringFieldNumber;
const int TestAllTypes::kDefaultBytesFieldNumber;
const int TestAllTypes::kDefaultNestedEnumFieldNumber;
const int TestAllTypes::kDefaultForeignEnumFieldNumber;
const int TestAllTypes::kDefaultImportEnumFieldNumber;
const int TestAllTypes::kDefaultStringPieceFieldNumber;
const int TestAllTypes::kDefaultCordFieldNumber;
const int TestAllTypes::kOneofUint32FieldNumber;
const int TestAllTypes::kOneofNestedMessageFieldNumber;
const int TestAllTypes::kOneofStringFieldNumber;
const int TestAllTypes::kOneofBytesFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestAllTypes::TestAllTypes()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypes)
}
TestAllTypes::TestAllTypes(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  repeated_int32_(arena),
  repeated_int64_(arena),
  repeated_uint32_(arena),
  repeated_uint64_(arena),
  repeated_sint32_(arena),
  repeated_sint64_(arena),
  repeated_fixed32_(arena),
  repeated_fixed64_(arena),
  repeated_sfixed32_(arena),
  repeated_sfixed64_(arena),
  repeated_float_(arena),
  repeated_double_(arena),
  repeated_bool_(arena),
  repeated_string_(arena),
  repeated_bytes_(arena),
  repeatedgroup_(arena),
  repeated_nested_message_(arena),
  repeated_foreign_message_(arena),
  repeated_import_message_(arena),
  repeated_nested_enum_(arena),
  repeated_foreign_enum_(arena),
  repeated_import_enum_(arena),
  repeated_string_piece_(arena),
  repeated_cord_(arena),
  repeated_lazy_message_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestAllTypes)
}
TestAllTypes::TestAllTypes(const TestAllTypes& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      repeated_int32_(from.repeated_int32_),
      repeated_int64_(from.repeated_int64_),
      repeated_uint32_(from.repeated_uint32_),
      repeated_uint64_(from.repeated_uint64_),
      repeated_sint32_(from.repeated_sint32_),
      repeated_sint64_(from.repeated_sint64_),
      repeated_fixed32_(from.repeated_fixed32_),
      repeated_fixed64_(from.repeated_fixed64_),
      repeated_sfixed32_(from.repeated_sfixed32_),
      repeated_sfixed64_(from.repeated_sfixed64_),
      repeated_float_(from.repeated_float_),
      repeated_double_(from.repeated_double_),
      repeated_bool_(from.repeated_bool_),
      repeated_string_(from.repeated_string_),
      repeated_bytes_(from.repeated_bytes_),
      repeatedgroup_(from.repeatedgroup_),
      repeated_nested_message_(from.repeated_nested_message_),
      repeated_foreign_message_(from.repeated_foreign_message_),
      repeated_import_message_(from.repeated_import_message_),
      repeated_nested_enum_(from.repeated_nested_enum_),
      repeated_foreign_enum_(from.repeated_foreign_enum_),
      repeated_import_enum_(from.repeated_import_enum_),
      repeated_string_piece_(from.repeated_string_piece_),
      repeated_cord_(from.repeated_cord_),
      repeated_lazy_message_(from.repeated_lazy_message_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_optional_string()) {
    optional_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string(),
      GetArenaNoVirtual());
  }
  optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_optional_bytes()) {
    optional_bytes_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes(),
      GetArenaNoVirtual());
  }
  optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_optional_string_piece()) {
    optional_string_piece_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_piece(),
      GetArenaNoVirtual());
  }
  optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_optional_cord()) {
    optional_cord_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_cord(),
      GetArenaNoVirtual());
  }
  default_string_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
  if (from.has_default_string()) {
    default_string_.Set(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(), from.default_string(),
      GetArenaNoVirtual());
  }
  default_bytes_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  if (from.has_default_bytes()) {
    default_bytes_.Set(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(), from.default_bytes(),
      GetArenaNoVirtual());
  }
  default_string_piece_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  if (from.has_default_string_piece()) {
    default_string_piece_.Set(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), from.default_string_piece(),
      GetArenaNoVirtual());
  }
  default_cord_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
  if (from.has_default_cord()) {
    default_cord_.Set(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(), from.default_cord(),
      GetArenaNoVirtual());
  }
  if (from.has_optionalgroup()) {
    optionalgroup_ = new ::protobuf_unittest::TestAllTypes_OptionalGroup(*from.optionalgroup_);
  } else {
    optionalgroup_ = NULL;
  }
  if (from.has_optional_nested_message()) {
    optional_nested_message_ = new ::protobuf_unittest::TestAllTypes_NestedMessage(*from.optional_nested_message_);
  } else {
    optional_nested_message_ = NULL;
  }
  if (from.has_optional_foreign_message()) {
    optional_foreign_message_ = new ::protobuf_unittest::ForeignMessage(*from.optional_foreign_message_);
  } else {
    optional_foreign_message_ = NULL;
  }
  if (from.has_optional_import_message()) {
    optional_import_message_ = new ::protobuf_unittest_import::ImportMessage(*from.optional_import_message_);
  } else {
    optional_import_message_ = NULL;
  }
  if (from.has_optional_public_import_message()) {
    optional_public_import_message_ = new ::protobuf_unittest_import::PublicImportMessage(*from.optional_public_import_message_);
  } else {
    optional_public_import_message_ = NULL;
  }
  if (from.has_optional_lazy_message()) {
    optional_lazy_message_ = new ::protobuf_unittest::TestAllTypes_NestedMessage(*from.optional_lazy_message_);
  } else {
    optional_lazy_message_ = NULL;
  }
  ::memcpy(&optional_int64_, &from.optional_int64_,
    static_cast<size_t>(reinterpret_cast<char*>(&default_foreign_enum_) -
    reinterpret_cast<char*>(&optional_int64_)) + sizeof(default_foreign_enum_));
  clear_has_oneof_field();
  switch (from.oneof_field_case()) {
    case kOneofUint32: {
      set_oneof_uint32(from.oneof_uint32());
      break;
    }
    case kOneofNestedMessage: {
      mutable_oneof_nested_message()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.oneof_nested_message());
      break;
    }
    case kOneofString: {
      set_oneof_string(from.oneof_string());
      break;
    }
    case kOneofBytes: {
      set_oneof_bytes(from.oneof_bytes());
      break;
    }
    case ONEOF_FIELD_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypes)
}

void TestAllTypes::SharedCtor() {
  optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  default_string_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
  default_bytes_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  default_string_piece_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  default_cord_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
  ::memset(&optionalgroup_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&optional_bool_) -
      reinterpret_cast<char*>(&optionalgroup_)) + sizeof(optional_bool_));
  default_import_enum_ = 8;
  optional_nested_enum_ = 1;
  optional_foreign_enum_ = 4;
  optional_import_enum_ = 7;
  default_int32_ = 41;
  default_int64_ = GOOGLE_LONGLONG(42);
  default_uint64_ = GOOGLE_ULONGLONG(44);
  default_uint32_ = 43u;
  default_sint32_ = -45;
  default_sint64_ = GOOGLE_LONGLONG(46);
  default_fixed64_ = GOOGLE_ULONGLONG(48);
  default_fixed32_ = 47u;
  default_sfixed32_ = 49;
  default_sfixed64_ = GOOGLE_LONGLONG(-50);
  default_double_ = 52000;
  default_float_ = 51.5f;
  default_bool_ = true;
  default_nested_enum_ = 2;
  default_foreign_enum_ = 5;
  clear_has_oneof_field();
}

TestAllTypes::~TestAllTypes() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypes)
  SharedDtor();
}

void TestAllTypes::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  optional_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  optional_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  optional_string_piece_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  optional_cord_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  default_string_.DestroyNoArena(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
  default_bytes_.DestroyNoArena(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  default_string_piece_.DestroyNoArena(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  default_cord_.DestroyNoArena(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
  if (this != internal_default_instance()) delete optionalgroup_;
  if (this != internal_default_instance()) delete optional_nested_message_;
  if (this != internal_default_instance()) delete optional_foreign_message_;
  if (this != internal_default_instance()) delete optional_import_message_;
  if (this != internal_default_instance()) delete optional_public_import_message_;
  if (this != internal_default_instance()) delete optional_lazy_message_;
  if (has_oneof_field()) {
    clear_oneof_field();
  }
}

void TestAllTypes::ArenaDtor(void* object) {
  TestAllTypes* _this = reinterpret_cast< TestAllTypes* >(object);
  (void)_this;
}
void TestAllTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestAllTypes::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestAllTypes::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestAllTypes& TestAllTypes::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base);
  return *internal_default_instance();
}


void TestAllTypes::clear_oneof_field() {
// @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestAllTypes)
  switch (oneof_field_case()) {
    case kOneofUint32: {
      // No need to clear
      break;
    }
    case kOneofNestedMessage: {
      if (GetArenaNoVirtual() == NULL) {
        delete oneof_field_.oneof_nested_message_;
      }
      break;
    }
    case kOneofString: {
      oneof_field_.oneof_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
          GetArenaNoVirtual());
      break;
    }
    case kOneofBytes: {
      oneof_field_.oneof_bytes_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
          GetArenaNoVirtual());
      break;
    }
    case ONEOF_FIELD_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
}


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

  repeated_int32_.Clear();
  repeated_int64_.Clear();
  repeated_uint32_.Clear();
  repeated_uint64_.Clear();
  repeated_sint32_.Clear();
  repeated_sint64_.Clear();
  repeated_fixed32_.Clear();
  repeated_fixed64_.Clear();
  repeated_sfixed32_.Clear();
  repeated_sfixed64_.Clear();
  repeated_float_.Clear();
  repeated_double_.Clear();
  repeated_bool_.Clear();
  repeated_string_.Clear();
  repeated_bytes_.Clear();
  repeatedgroup_.Clear();
  repeated_nested_message_.Clear();
  repeated_foreign_message_.Clear();
  repeated_import_message_.Clear();
  repeated_nested_enum_.Clear();
  repeated_foreign_enum_.Clear();
  repeated_import_enum_.Clear();
  repeated_string_piece_.Clear();
  repeated_cord_.Clear();
  repeated_lazy_message_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 255u) {
    if (cached_has_bits & 0x00000001u) {
      optional_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      optional_bytes_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      optional_string_piece_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      optional_cord_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      default_string_.ClearToDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(), GetArenaNoVirtual());
    }
    if (cached_has_bits & 0x00000020u) {
      default_bytes_.ClearToDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(), GetArenaNoVirtual());
    }
    if (cached_has_bits & 0x00000040u) {
      default_string_piece_.ClearToDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), GetArenaNoVirtual());
    }
    if (cached_has_bits & 0x00000080u) {
      default_cord_.ClearToDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(), GetArenaNoVirtual());
    }
  }
  if (cached_has_bits & 16128u) {
    if (cached_has_bits & 0x00000100u) {
      GOOGLE_DCHECK(optionalgroup_ != NULL);
      optionalgroup_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      GOOGLE_DCHECK(optional_nested_message_ != NULL);
      optional_nested_message_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      GOOGLE_DCHECK(optional_foreign_message_ != NULL);
      optional_foreign_message_->Clear();
    }
    if (cached_has_bits & 0x00000800u) {
      GOOGLE_DCHECK(optional_import_message_ != NULL);
      optional_import_message_->Clear();
    }
    if (cached_has_bits & 0x00001000u) {
      GOOGLE_DCHECK(optional_public_import_message_ != NULL);
      optional_public_import_message_->Clear();
    }
    if (cached_has_bits & 0x00002000u) {
      GOOGLE_DCHECK(optional_lazy_message_ != NULL);
      optional_lazy_message_->Clear();
    }
  }
  if (cached_has_bits & 49152u) {
    ::memset(&optional_int64_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&optional_int32_) -
        reinterpret_cast<char*>(&optional_int64_)) + sizeof(optional_int32_));
  }
  if (cached_has_bits & 16711680u) {
    ::memset(&optional_uint32_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&optional_sfixed32_) -
        reinterpret_cast<char*>(&optional_uint32_)) + sizeof(optional_sfixed32_));
  }
  if (cached_has_bits & 4278190080u) {
    ::memset(&optional_float_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&optional_bool_) -
        reinterpret_cast<char*>(&optional_float_)) + sizeof(optional_bool_));
    default_import_enum_ = 8;
    optional_nested_enum_ = 1;
    optional_foreign_enum_ = 4;
    optional_import_enum_ = 7;
    default_int32_ = 41;
  }
  cached_has_bits = _has_bits_[1];
  if (cached_has_bits & 255u) {
    default_int64_ = GOOGLE_LONGLONG(42);
    default_uint64_ = GOOGLE_ULONGLONG(44);
    default_uint32_ = 43u;
    default_sint32_ = -45;
    default_sint64_ = GOOGLE_LONGLONG(46);
    default_fixed64_ = GOOGLE_ULONGLONG(48);
    default_fixed32_ = 47u;
    default_sfixed32_ = 49;
  }
  if (cached_has_bits & 16128u) {
    default_sfixed64_ = GOOGLE_LONGLONG(-50);
    default_double_ = 52000;
    default_float_ = 51.5f;
    default_bool_ = true;
    default_nested_enum_ = 2;
    default_foreign_enum_ = 5;
  }
  clear_oneof_field();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestAllTypes::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:protobuf_unittest.TestAllTypes)
  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)) {
      // optional int32 optional_int32 = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_optional_int32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &optional_int32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 optional_int64 = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          set_has_optional_int64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &optional_int64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint32 optional_uint32 = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          set_has_optional_uint32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &optional_uint32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint64 optional_uint64 = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
          set_has_optional_uint64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &optional_uint64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional sint32 optional_sint32 = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
          set_has_optional_sint32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
                 input, &optional_sint32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional sint64 optional_sint64 = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
          set_has_optional_sint64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
                 input, &optional_sint64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional fixed32 optional_fixed32 = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
          set_has_optional_fixed32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 input, &optional_fixed32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional fixed64 optional_fixed64 = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
          set_has_optional_fixed64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
                 input, &optional_fixed64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional sfixed32 optional_sfixed32 = 9;
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
          set_has_optional_sfixed32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
                 input, &optional_sfixed32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional sfixed64 optional_sfixed64 = 10;
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
          set_has_optional_sfixed64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
                 input, &optional_sfixed64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float optional_float = 11;
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
          set_has_optional_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &optional_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional double optional_double = 12;
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(97u /* 97 & 0xFF */)) {
          set_has_optional_double();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &optional_double_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bool optional_bool = 13;
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
          set_has_optional_bool();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &optional_bool_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string optional_string = 14;
      case 14: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_optional_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->optional_string().data(), static_cast<int>(this->optional_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestAllTypes.optional_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bytes optional_bytes = 15;
      case 15: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_optional_bytes()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional group OptionalGroup = 16 { ... };
      case 16: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(131u /* 131 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                16, input, mutable_optionalgroup()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
      case 18: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_optional_nested_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
      case 19: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_optional_foreign_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
      case 20: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_optional_import_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
      case 21: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::TestAllTypes_NestedEnum_IsValid(value)) {
            set_optional_nested_enum(static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                21, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
      case 22: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
            set_optional_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                22, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
      case 23: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(184u /* 184 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest_import::ImportEnum_IsValid(value)) {
            set_optional_import_enum(static_cast< ::protobuf_unittest_import::ImportEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                23, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
      case 24: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(194u /* 194 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_optional_string_piece()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestAllTypes.optional_string_piece");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string optional_cord = 25 [ctype = CORD];
      case 25: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_optional_cord()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestAllTypes.optional_cord");
        } else {
          goto handle_unusual;
        }
        break;
      }

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

      // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
      case 27: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(218u /* 218 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_optional_lazy_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 repeated_int32 = 31;
      case 31: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(248u /* 248 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 2, 248u, input, this->mutable_repeated_int32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(250u /* 250 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_repeated_int32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int64 repeated_int64 = 32;
      case 32: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(0u /* 256 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 2, 256u, input, this->mutable_repeated_int64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(2u /* 258 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, this->mutable_repeated_int64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated uint32 repeated_uint32 = 33;
      case 33: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 2, 264u, input, this->mutable_repeated_uint32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 266 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_repeated_uint32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated uint64 repeated_uint64 = 34;
      case 34: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 272 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 2, 272u, input, this->mutable_repeated_uint64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 274 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, this->mutable_repeated_uint64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sint32 repeated_sint32 = 35;
      case 35: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 280 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
                 2, 280u, input, this->mutable_repeated_sint32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 282 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
                 input, this->mutable_repeated_sint32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sint64 repeated_sint64 = 36;
      case 36: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(32u /* 288 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
                 2, 288u, input, this->mutable_repeated_sint64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 290 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
                 input, this->mutable_repeated_sint64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated fixed32 repeated_fixed32 = 37;
      case 37: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(45u /* 301 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 2, 301u, input, this->mutable_repeated_fixed32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 298 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 input, this->mutable_repeated_fixed32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated fixed64 repeated_fixed64 = 38;
      case 38: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(49u /* 305 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
                 2, 305u, input, this->mutable_repeated_fixed64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 306 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
                 input, this->mutable_repeated_fixed64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sfixed32 repeated_sfixed32 = 39;
      case 39: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(61u /* 317 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
                 2, 317u, input, this->mutable_repeated_sfixed32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 314 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
                 input, this->mutable_repeated_sfixed32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sfixed64 repeated_sfixed64 = 40;
      case 40: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(65u /* 321 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
                 2, 321u, input, this->mutable_repeated_sfixed64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(66u /* 322 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
                 input, this->mutable_repeated_sfixed64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated float repeated_float = 41;
      case 41: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(77u /* 333 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 2, 333u, input, this->mutable_repeated_float())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(74u /* 330 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_repeated_float())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated double repeated_double = 42;
      case 42: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(81u /* 337 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 2, 337u, input, this->mutable_repeated_double())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(82u /* 338 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, this->mutable_repeated_double())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated bool repeated_bool = 43;
      case 43: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(88u /* 344 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 2, 344u, input, this->mutable_repeated_bool())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(90u /* 346 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, this->mutable_repeated_bool())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string repeated_string = 44;
      case 44: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(98u /* 354 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_repeated_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->repeated_string(this->repeated_string_size() - 1).data(),
            static_cast<int>(this->repeated_string(this->repeated_string_size() - 1).length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestAllTypes.repeated_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated bytes repeated_bytes = 45;
      case 45: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(106u /* 362 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->add_repeated_bytes()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated group RepeatedGroup = 46 { ... };
      case 46: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(115u /* 371 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(46, input, add_repeatedgroup()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
      case 48: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(130u /* 386 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_repeated_nested_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
      case 49: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(138u /* 394 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_repeated_foreign_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 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, add_repeated_import_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
      case 51: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(152u /* 408 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::TestAllTypes_NestedEnum_IsValid(value)) {
            add_repeated_nested_enum(static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                51, static_cast< ::google::protobuf::uint64>(value));
          }
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(154u /* 410 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
                 input,
                 51,
                 ::protobuf_unittest::TestAllTypes_NestedEnum_IsValid,
                 mutable_unknown_fields(),
                 this->mutable_repeated_nested_enum())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.ForeignEnum repeated_foreign_enum = 52;
      case 52: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(160u /* 416 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
            add_repeated_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                52, static_cast< ::google::protobuf::uint64>(value));
          }
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(162u /* 418 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
                 input,
                 52,
                 ::protobuf_unittest::ForeignEnum_IsValid,
                 mutable_unknown_fields(),
                 this->mutable_repeated_foreign_enum())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
      case 53: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(168u /* 424 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest_import::ImportEnum_IsValid(value)) {
            add_repeated_import_enum(static_cast< ::protobuf_unittest_import::ImportEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                53, static_cast< ::google::protobuf::uint64>(value));
          }
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(170u /* 426 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
                 input,
                 53,
                 ::protobuf_unittest_import::ImportEnum_IsValid,
                 mutable_unknown_fields(),
                 this->mutable_repeated_import_enum())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
      case 54: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(178u /* 434 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_repeated_string_piece()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->repeated_string_piece(this->repeated_string_piece_size() - 1).data(),
            static_cast<int>(this->repeated_string_piece(this->repeated_string_piece_size() - 1).length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestAllTypes.repeated_string_piece");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string repeated_cord = 55 [ctype = CORD];
      case 55: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(186u /* 442 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_repeated_cord()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->repeated_cord(this->repeated_cord_size() - 1).data(),
            static_cast<int>(this->repeated_cord(this->repeated_cord_size() - 1).length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestAllTypes.repeated_cord");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
      case 57: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(202u /* 458 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_repeated_lazy_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 default_int32 = 61 [default = 41];
      case 61: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(232u /* 488 & 0xFF */)) {
          set_has_default_int32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &default_int32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 default_int64 = 62 [default = 42];
      case 62: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(240u /* 496 & 0xFF */)) {
          set_has_default_int64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &default_int64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint32 default_uint32 = 63 [default = 43];
      case 63: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(248u /* 504 & 0xFF */)) {
          set_has_default_uint32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &default_uint32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint64 default_uint64 = 64 [default = 44];
      case 64: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(0u /* 512 & 0xFF */)) {
          set_has_default_uint64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &default_uint64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional sint32 default_sint32 = 65 [default = -45];
      case 65: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 520 & 0xFF */)) {
          set_has_default_sint32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
                 input, &default_sint32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional sint64 default_sint64 = 66 [default = 46];
      case 66: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 528 & 0xFF */)) {
          set_has_default_sint64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
                 input, &default_sint64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional fixed32 default_fixed32 = 67 [default = 47];
      case 67: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(29u /* 541 & 0xFF */)) {
          set_has_default_fixed32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 input, &default_fixed32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional fixed64 default_fixed64 = 68 [default = 48];
      case 68: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(33u /* 545 & 0xFF */)) {
          set_has_default_fixed64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
                 input, &default_fixed64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional sfixed32 default_sfixed32 = 69 [default = 49];
      case 69: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(45u /* 557 & 0xFF */)) {
          set_has_default_sfixed32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
                 input, &default_sfixed32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional sfixed64 default_sfixed64 = 70 [default = -50];
      case 70: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(49u /* 561 & 0xFF */)) {
          set_has_default_sfixed64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
                 input, &default_sfixed64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float default_float = 71 [default = 51.5];
      case 71: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(61u /* 573 & 0xFF */)) {
          set_has_default_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &default_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional double default_double = 72 [default = 52000];
      case 72: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(65u /* 577 & 0xFF */)) {
          set_has_default_double();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &default_double_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bool default_bool = 73 [default = true];
      case 73: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(72u /* 584 & 0xFF */)) {
          set_has_default_bool();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &default_bool_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string default_string = 74 [default = "hello"];
      case 74: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(82u /* 594 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_default_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->default_string().data(), static_cast<int>(this->default_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestAllTypes.default_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bytes default_bytes = 75 [default = "world"];
      case 75: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(90u /* 602 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_default_bytes()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
      case 81: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(136u /* 648 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::TestAllTypes_NestedEnum_IsValid(value)) {
            set_default_nested_enum(static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                81, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
      case 82: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(144u /* 656 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
            set_default_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                82, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
      case 83: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(152u /* 664 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest_import::ImportEnum_IsValid(value)) {
            set_default_import_enum(static_cast< ::protobuf_unittest_import::ImportEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                83, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
      case 84: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(162u /* 674 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_default_string_piece()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->default_string_piece().data(), static_cast<int>(this->default_string_piece().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestAllTypes.default_string_piece");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string default_cord = 85 [default = "123", ctype = CORD];
      case 85: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(170u /* 682 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_default_cord()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->default_cord().data(), static_cast<int>(this->default_cord().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestAllTypes.default_cord");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint32 oneof_uint32 = 111;
      case 111: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(120u /* 888 & 0xFF */)) {
          clear_oneof_field();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &oneof_field_.oneof_uint32_)));
          set_has_oneof_uint32();
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
      case 112: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(130u /* 898 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_oneof_nested_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string oneof_string = 113;
      case 113: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(138u /* 906 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_oneof_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestAllTypes.oneof_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bytes oneof_bytes = 114;
      case 114: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(146u /* 914 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_oneof_bytes()));
        } 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:protobuf_unittest.TestAllTypes)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypes)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 optional_int32 = 1;
  if (cached_has_bits & 0x00008000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->optional_int32(), output);
  }

  // optional int64 optional_int64 = 2;
  if (cached_has_bits & 0x00004000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->optional_int64(), output);
  }

  // optional uint32 optional_uint32 = 3;
  if (cached_has_bits & 0x00010000u) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->optional_uint32(), output);
  }

  // optional uint64 optional_uint64 = 4;
  if (cached_has_bits & 0x00020000u) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->optional_uint64(), output);
  }

  // optional sint32 optional_sint32 = 5;
  if (cached_has_bits & 0x00080000u) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt32(5, this->optional_sint32(), output);
  }

  // optional sint64 optional_sint64 = 6;
  if (cached_has_bits & 0x00040000u) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt64(6, this->optional_sint64(), output);
  }

  // optional fixed32 optional_fixed32 = 7;
  if (cached_has_bits & 0x00100000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed32(7, this->optional_fixed32(), output);
  }

  // optional fixed64 optional_fixed64 = 8;
  if (cached_has_bits & 0x00200000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed64(8, this->optional_fixed64(), output);
  }

  // optional sfixed32 optional_sfixed32 = 9;
  if (cached_has_bits & 0x00800000u) {
    ::google::protobuf::internal::WireFormatLite::WriteSFixed32(9, this->optional_sfixed32(), output);
  }

  // optional sfixed64 optional_sfixed64 = 10;
  if (cached_has_bits & 0x00400000u) {
    ::google::protobuf::internal::WireFormatLite::WriteSFixed64(10, this->optional_sfixed64(), output);
  }

  // optional float optional_float = 11;
  if (cached_has_bits & 0x01000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->optional_float(), output);
  }

  // optional double optional_double = 12;
  if (cached_has_bits & 0x02000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(12, this->optional_double(), output);
  }

  // optional bool optional_bool = 13;
  if (cached_has_bits & 0x04000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(13, this->optional_bool(), output);
  }

  // optional string optional_string = 14;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->optional_string().data(), static_cast<int>(this->optional_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.optional_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      14, this->optional_string(), output);
  }

  // optional bytes optional_bytes = 15;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      15, this->optional_bytes(), output);
  }

  // optional group OptionalGroup = 16 { ... };
  if (cached_has_bits & 0x00000100u) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      16, this->_internal_optionalgroup(), output);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
  if (cached_has_bits & 0x00000200u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      18, this->_internal_optional_nested_message(), output);
  }

  // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
  if (cached_has_bits & 0x00000400u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      19, this->_internal_optional_foreign_message(), output);
  }

  // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
  if (cached_has_bits & 0x00000800u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      20, this->_internal_optional_import_message(), output);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
  if (cached_has_bits & 0x10000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      21, this->optional_nested_enum(), output);
  }

  // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  if (cached_has_bits & 0x20000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      22, this->optional_foreign_enum(), output);
  }

  // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
  if (cached_has_bits & 0x40000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      23, this->optional_import_enum(), output);
  }

  // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.optional_string_piece");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      24, this->optional_string_piece(), output);
  }

  // optional string optional_cord = 25 [ctype = CORD];
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.optional_cord");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      25, this->optional_cord(), output);
  }

  // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
  if (cached_has_bits & 0x00001000u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      26, this->_internal_optional_public_import_message(), output);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
  if (cached_has_bits & 0x00002000u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      27, this->_internal_optional_lazy_message(), output);
  }

  // repeated int32 repeated_int32 = 31;
  for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      31, this->repeated_int32(i), output);
  }

  // repeated int64 repeated_int64 = 32;
  for (int i = 0, n = this->repeated_int64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(
      32, this->repeated_int64(i), output);
  }

  // repeated uint32 repeated_uint32 = 33;
  for (int i = 0, n = this->repeated_uint32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      33, this->repeated_uint32(i), output);
  }

  // repeated uint64 repeated_uint64 = 34;
  for (int i = 0, n = this->repeated_uint64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(
      34, this->repeated_uint64(i), output);
  }

  // repeated sint32 repeated_sint32 = 35;
  for (int i = 0, n = this->repeated_sint32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt32(
      35, this->repeated_sint32(i), output);
  }

  // repeated sint64 repeated_sint64 = 36;
  for (int i = 0, n = this->repeated_sint64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt64(
      36, this->repeated_sint64(i), output);
  }

  // repeated fixed32 repeated_fixed32 = 37;
  for (int i = 0, n = this->repeated_fixed32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed32(
      37, this->repeated_fixed32(i), output);
  }

  // repeated fixed64 repeated_fixed64 = 38;
  for (int i = 0, n = this->repeated_fixed64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed64(
      38, this->repeated_fixed64(i), output);
  }

  // repeated sfixed32 repeated_sfixed32 = 39;
  for (int i = 0, n = this->repeated_sfixed32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSFixed32(
      39, this->repeated_sfixed32(i), output);
  }

  // repeated sfixed64 repeated_sfixed64 = 40;
  for (int i = 0, n = this->repeated_sfixed64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSFixed64(
      40, this->repeated_sfixed64(i), output);
  }

  // repeated float repeated_float = 41;
  for (int i = 0, n = this->repeated_float_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      41, this->repeated_float(i), output);
  }

  // repeated double repeated_double = 42;
  for (int i = 0, n = this->repeated_double_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(
      42, this->repeated_double(i), output);
  }

  // repeated bool repeated_bool = 43;
  for (int i = 0, n = this->repeated_bool_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(
      43, this->repeated_bool(i), output);
  }

  // repeated string repeated_string = 44;
  for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.repeated_string");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      44, this->repeated_string(i), output);
  }

  // repeated bytes repeated_bytes = 45;
  for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      45, this->repeated_bytes(i), output);
  }

  // repeated group RepeatedGroup = 46 { ... };
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      46,
      this->repeatedgroup(static_cast<int>(i)),
      output);
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      48,
      this->repeated_nested_message(static_cast<int>(i)),
      output);
  }

  // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_foreign_message_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      49,
      this->repeated_foreign_message(static_cast<int>(i)),
      output);
  }

  // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_import_message_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      50,
      this->repeated_import_message(static_cast<int>(i)),
      output);
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
  for (int i = 0, n = this->repeated_nested_enum_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      51, this->repeated_nested_enum(i), output);
  }

  // repeated .protobuf_unittest.ForeignEnum repeated_foreign_enum = 52;
  for (int i = 0, n = this->repeated_foreign_enum_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      52, this->repeated_foreign_enum(i), output);
  }

  // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
  for (int i = 0, n = this->repeated_import_enum_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      53, this->repeated_import_enum(i), output);
  }

  // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeated_string_piece(i).data(), static_cast<int>(this->repeated_string_piece(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.repeated_string_piece");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      54, this->repeated_string_piece(i), output);
  }

  // repeated string repeated_cord = 55 [ctype = CORD];
  for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeated_cord(i).data(), static_cast<int>(this->repeated_cord(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.repeated_cord");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      55, this->repeated_cord(i), output);
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_lazy_message_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      57,
      this->repeated_lazy_message(static_cast<int>(i)),
      output);
  }

  // optional int32 default_int32 = 61 [default = 41];
  if (cached_has_bits & 0x80000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(61, this->default_int32(), output);
  }

  cached_has_bits = _has_bits_[1];
  // optional int64 default_int64 = 62 [default = 42];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(62, this->default_int64(), output);
  }

  // optional uint32 default_uint32 = 63 [default = 43];
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(63, this->default_uint32(), output);
  }

  // optional uint64 default_uint64 = 64 [default = 44];
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(64, this->default_uint64(), output);
  }

  // optional sint32 default_sint32 = 65 [default = -45];
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt32(65, this->default_sint32(), output);
  }

  // optional sint64 default_sint64 = 66 [default = 46];
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt64(66, this->default_sint64(), output);
  }

  // optional fixed32 default_fixed32 = 67 [default = 47];
  if (cached_has_bits & 0x00000040u) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed32(67, this->default_fixed32(), output);
  }

  // optional fixed64 default_fixed64 = 68 [default = 48];
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed64(68, this->default_fixed64(), output);
  }

  // optional sfixed32 default_sfixed32 = 69 [default = 49];
  if (cached_has_bits & 0x00000080u) {
    ::google::protobuf::internal::WireFormatLite::WriteSFixed32(69, this->default_sfixed32(), output);
  }

  // optional sfixed64 default_sfixed64 = 70 [default = -50];
  if (cached_has_bits & 0x00000100u) {
    ::google::protobuf::internal::WireFormatLite::WriteSFixed64(70, this->default_sfixed64(), output);
  }

  // optional float default_float = 71 [default = 51.5];
  if (cached_has_bits & 0x00000400u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(71, this->default_float(), output);
  }

  // optional double default_double = 72 [default = 52000];
  if (cached_has_bits & 0x00000200u) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(72, this->default_double(), output);
  }

  // optional bool default_bool = 73 [default = true];
  if (cached_has_bits & 0x00000800u) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(73, this->default_bool(), output);
  }

  cached_has_bits = _has_bits_[0];
  // optional string default_string = 74 [default = "hello"];
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->default_string().data(), static_cast<int>(this->default_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.default_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      74, this->default_string(), output);
  }

  // optional bytes default_bytes = 75 [default = "world"];
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      75, this->default_bytes(), output);
  }

  cached_has_bits = _has_bits_[1];
  // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
  if (cached_has_bits & 0x00001000u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      81, this->default_nested_enum(), output);
  }

  // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
  if (cached_has_bits & 0x00002000u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      82, this->default_foreign_enum(), output);
  }

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
  if (cached_has_bits & 0x08000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      83, this->default_import_enum(), output);
  }

  // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  if (cached_has_bits & 0x00000040u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->default_string_piece().data(), static_cast<int>(this->default_string_piece().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.default_string_piece");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      84, this->default_string_piece(), output);
  }

  // optional string default_cord = 85 [default = "123", ctype = CORD];
  if (cached_has_bits & 0x00000080u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->default_cord().data(), static_cast<int>(this->default_cord().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.default_cord");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      85, this->default_cord(), output);
  }

  switch (oneof_field_case()) {
    case kOneofUint32:
      ::google::protobuf::internal::WireFormatLite::WriteUInt32(111, this->oneof_uint32(), output);
      break;
    case kOneofNestedMessage:
      ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
        112, this->_internal_oneof_nested_message(), output);
      break;
    case kOneofString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestAllTypes.oneof_string");
      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
        113, this->oneof_string(), output);
      break;
    case kOneofBytes:
      ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
        114, this->oneof_bytes(), output);
      break;
    default: ;
  }
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypes)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 optional_int32 = 1;
  if (cached_has_bits & 0x00008000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->optional_int32(), target);
  }

  // optional int64 optional_int64 = 2;
  if (cached_has_bits & 0x00004000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->optional_int64(), target);
  }

  // optional uint32 optional_uint32 = 3;
  if (cached_has_bits & 0x00010000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->optional_uint32(), target);
  }

  // optional uint64 optional_uint64 = 4;
  if (cached_has_bits & 0x00020000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->optional_uint64(), target);
  }

  // optional sint32 optional_sint32 = 5;
  if (cached_has_bits & 0x00080000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(5, this->optional_sint32(), target);
  }

  // optional sint64 optional_sint64 = 6;
  if (cached_has_bits & 0x00040000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(6, this->optional_sint64(), target);
  }

  // optional fixed32 optional_fixed32 = 7;
  if (cached_has_bits & 0x00100000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(7, this->optional_fixed32(), target);
  }

  // optional fixed64 optional_fixed64 = 8;
  if (cached_has_bits & 0x00200000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(8, this->optional_fixed64(), target);
  }

  // optional sfixed32 optional_sfixed32 = 9;
  if (cached_has_bits & 0x00800000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteSFixed32ToArray(9, this->optional_sfixed32(), target);
  }

  // optional sfixed64 optional_sfixed64 = 10;
  if (cached_has_bits & 0x00400000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(10, this->optional_sfixed64(), target);
  }

  // optional float optional_float = 11;
  if (cached_has_bits & 0x01000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, this->optional_float(), target);
  }

  // optional double optional_double = 12;
  if (cached_has_bits & 0x02000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(12, this->optional_double(), target);
  }

  // optional bool optional_bool = 13;
  if (cached_has_bits & 0x04000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(13, this->optional_bool(), target);
  }

  // optional string optional_string = 14;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->optional_string().data(), static_cast<int>(this->optional_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.optional_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        14, this->optional_string(), target);
  }

  // optional bytes optional_bytes = 15;
  if (cached_has_bits & 0x00000002u) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        15, this->optional_bytes(), target);
  }

  // optional group OptionalGroup = 16 { ... };
  if (cached_has_bits & 0x00000100u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        16, this->_internal_optionalgroup(), deterministic, target);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
  if (cached_has_bits & 0x00000200u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        18, this->_internal_optional_nested_message(), deterministic, target);
  }

  // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
  if (cached_has_bits & 0x00000400u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        19, this->_internal_optional_foreign_message(), deterministic, target);
  }

  // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
  if (cached_has_bits & 0x00000800u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        20, this->_internal_optional_import_message(), deterministic, target);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
  if (cached_has_bits & 0x10000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      21, this->optional_nested_enum(), target);
  }

  // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  if (cached_has_bits & 0x20000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      22, this->optional_foreign_enum(), target);
  }

  // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
  if (cached_has_bits & 0x40000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      23, this->optional_import_enum(), target);
  }

  // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.optional_string_piece");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        24, this->optional_string_piece(), target);
  }

  // optional string optional_cord = 25 [ctype = CORD];
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.optional_cord");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        25, this->optional_cord(), target);
  }

  // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
  if (cached_has_bits & 0x00001000u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        26, this->_internal_optional_public_import_message(), deterministic, target);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
  if (cached_has_bits & 0x00002000u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        27, this->_internal_optional_lazy_message(), deterministic, target);
  }

  // repeated int32 repeated_int32 = 31;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt32ToArray(31, this->repeated_int32_, target);

  // repeated int64 repeated_int64 = 32;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt64ToArray(32, this->repeated_int64_, target);

  // repeated uint32 repeated_uint32 = 33;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteUInt32ToArray(33, this->repeated_uint32_, target);

  // repeated uint64 repeated_uint64 = 34;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteUInt64ToArray(34, this->repeated_uint64_, target);

  // repeated sint32 repeated_sint32 = 35;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteSInt32ToArray(35, this->repeated_sint32_, target);

  // repeated sint64 repeated_sint64 = 36;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteSInt64ToArray(36, this->repeated_sint64_, target);

  // repeated fixed32 repeated_fixed32 = 37;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteFixed32ToArray(37, this->repeated_fixed32_, target);

  // repeated fixed64 repeated_fixed64 = 38;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteFixed64ToArray(38, this->repeated_fixed64_, target);

  // repeated sfixed32 repeated_sfixed32 = 39;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteSFixed32ToArray(39, this->repeated_sfixed32_, target);

  // repeated sfixed64 repeated_sfixed64 = 40;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteSFixed64ToArray(40, this->repeated_sfixed64_, target);

  // repeated float repeated_float = 41;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteFloatToArray(41, this->repeated_float_, target);

  // repeated double repeated_double = 42;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteDoubleToArray(42, this->repeated_double_, target);

  // repeated bool repeated_bool = 43;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteBoolToArray(43, this->repeated_bool_, target);

  // repeated string repeated_string = 44;
  for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.repeated_string");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(44, this->repeated_string(i), target);
  }

  // repeated bytes repeated_bytes = 45;
  for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteBytesToArray(45, this->repeated_bytes(i), target);
  }

  // repeated group RepeatedGroup = 46 { ... };
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        46, this->repeatedgroup(static_cast<int>(i)), deterministic, target);
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        48, this->repeated_nested_message(static_cast<int>(i)), deterministic, target);
  }

  // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_foreign_message_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        49, this->repeated_foreign_message(static_cast<int>(i)), deterministic, target);
  }

  // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_import_message_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        50, this->repeated_import_message(static_cast<int>(i)), deterministic, target);
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
  target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
    51, this->repeated_nested_enum_, target);

  // repeated .protobuf_unittest.ForeignEnum repeated_foreign_enum = 52;
  target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
    52, this->repeated_foreign_enum_, target);

  // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
  target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
    53, this->repeated_import_enum_, target);

  // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeated_string_piece(i).data(), static_cast<int>(this->repeated_string_piece(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.repeated_string_piece");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(54, this->repeated_string_piece(i), target);
  }

  // repeated string repeated_cord = 55 [ctype = CORD];
  for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeated_cord(i).data(), static_cast<int>(this->repeated_cord(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.repeated_cord");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(55, this->repeated_cord(i), target);
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_lazy_message_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        57, this->repeated_lazy_message(static_cast<int>(i)), deterministic, target);
  }

  // optional int32 default_int32 = 61 [default = 41];
  if (cached_has_bits & 0x80000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(61, this->default_int32(), target);
  }

  cached_has_bits = _has_bits_[1];
  // optional int64 default_int64 = 62 [default = 42];
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(62, this->default_int64(), target);
  }

  // optional uint32 default_uint32 = 63 [default = 43];
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(63, this->default_uint32(), target);
  }

  // optional uint64 default_uint64 = 64 [default = 44];
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(64, this->default_uint64(), target);
  }

  // optional sint32 default_sint32 = 65 [default = -45];
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(65, this->default_sint32(), target);
  }

  // optional sint64 default_sint64 = 66 [default = 46];
  if (cached_has_bits & 0x00000010u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(66, this->default_sint64(), target);
  }

  // optional fixed32 default_fixed32 = 67 [default = 47];
  if (cached_has_bits & 0x00000040u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(67, this->default_fixed32(), target);
  }

  // optional fixed64 default_fixed64 = 68 [default = 48];
  if (cached_has_bits & 0x00000020u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(68, this->default_fixed64(), target);
  }

  // optional sfixed32 default_sfixed32 = 69 [default = 49];
  if (cached_has_bits & 0x00000080u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteSFixed32ToArray(69, this->default_sfixed32(), target);
  }

  // optional sfixed64 default_sfixed64 = 70 [default = -50];
  if (cached_has_bits & 0x00000100u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(70, this->default_sfixed64(), target);
  }

  // optional float default_float = 71 [default = 51.5];
  if (cached_has_bits & 0x00000400u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(71, this->default_float(), target);
  }

  // optional double default_double = 72 [default = 52000];
  if (cached_has_bits & 0x00000200u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(72, this->default_double(), target);
  }

  // optional bool default_bool = 73 [default = true];
  if (cached_has_bits & 0x00000800u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(73, this->default_bool(), target);
  }

  cached_has_bits = _has_bits_[0];
  // optional string default_string = 74 [default = "hello"];
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->default_string().data(), static_cast<int>(this->default_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.default_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        74, this->default_string(), target);
  }

  // optional bytes default_bytes = 75 [default = "world"];
  if (cached_has_bits & 0x00000020u) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        75, this->default_bytes(), target);
  }

  cached_has_bits = _has_bits_[1];
  // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
  if (cached_has_bits & 0x00001000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      81, this->default_nested_enum(), target);
  }

  // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
  if (cached_has_bits & 0x00002000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      82, this->default_foreign_enum(), target);
  }

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
  if (cached_has_bits & 0x08000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      83, this->default_import_enum(), target);
  }

  // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  if (cached_has_bits & 0x00000040u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->default_string_piece().data(), static_cast<int>(this->default_string_piece().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.default_string_piece");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        84, this->default_string_piece(), target);
  }

  // optional string default_cord = 85 [default = "123", ctype = CORD];
  if (cached_has_bits & 0x00000080u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->default_cord().data(), static_cast<int>(this->default_cord().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestAllTypes.default_cord");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        85, this->default_cord(), target);
  }

  switch (oneof_field_case()) {
    case kOneofUint32:
      target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(111, this->oneof_uint32(), target);
      break;
    case kOneofNestedMessage:
      target = ::google::protobuf::internal::WireFormatLite::
        InternalWriteMessageToArray(
          112, this->_internal_oneof_nested_message(), deterministic, target);
      break;
    case kOneofString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestAllTypes.oneof_string");
      target =
        ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
          113, this->oneof_string(), target);
      break;
    case kOneofBytes:
      target =
        ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
          114, this->oneof_bytes(), target);
      break;
    default: ;
  }
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestAllTypes)
  return target;
}

size_t TestAllTypes::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypes)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated int32 repeated_int32 = 31;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->repeated_int32_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
    total_size += data_size;
  }

  // repeated int64 repeated_int64 = 32;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int64Size(this->repeated_int64_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_int64_size());
    total_size += data_size;
  }

  // repeated uint32 repeated_uint32 = 33;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      UInt32Size(this->repeated_uint32_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_uint32_size());
    total_size += data_size;
  }

  // repeated uint64 repeated_uint64 = 34;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      UInt64Size(this->repeated_uint64_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_uint64_size());
    total_size += data_size;
  }

  // repeated sint32 repeated_sint32 = 35;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      SInt32Size(this->repeated_sint32_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_sint32_size());
    total_size += data_size;
  }

  // repeated sint64 repeated_sint64 = 36;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      SInt64Size(this->repeated_sint64_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_sint64_size());
    total_size += data_size;
  }

  // repeated fixed32 repeated_fixed32 = 37;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_fixed32_size());
    total_size += data_size;
  }

  // repeated fixed64 repeated_fixed64 = 38;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_fixed64_size());
    size_t data_size = 8UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_fixed64_size());
    total_size += data_size;
  }

  // repeated sfixed32 repeated_sfixed32 = 39;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_sfixed32_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_sfixed32_size());
    total_size += data_size;
  }

  // repeated sfixed64 repeated_sfixed64 = 40;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_sfixed64_size());
    size_t data_size = 8UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_sfixed64_size());
    total_size += data_size;
  }

  // repeated float repeated_float = 41;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_float_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_float_size());
    total_size += data_size;
  }

  // repeated double repeated_double = 42;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_double_size());
    size_t data_size = 8UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_double_size());
    total_size += data_size;
  }

  // repeated bool repeated_bool = 43;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_bool_size());
    size_t data_size = 1UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_bool_size());
    total_size += data_size;
  }

  // repeated string repeated_string = 44;
  total_size += 2 *
      ::google::protobuf::internal::FromIntSize(this->repeated_string_size());
  for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->repeated_string(i));
  }

  // repeated bytes repeated_bytes = 45;
  total_size += 2 *
      ::google::protobuf::internal::FromIntSize(this->repeated_bytes_size());
  for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
      this->repeated_bytes(i));
  }

  // repeated group RepeatedGroup = 46 { ... };
  {
    unsigned int count = static_cast<unsigned int>(this->repeatedgroup_size());
    total_size += 4UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          this->repeatedgroup(static_cast<int>(i)));
    }
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_nested_message_size());
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->repeated_nested_message(static_cast<int>(i)));
    }
  }

  // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_foreign_message_size());
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->repeated_foreign_message(static_cast<int>(i)));
    }
  }

  // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_import_message_size());
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->repeated_import_message(static_cast<int>(i)));
    }
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
  {
    size_t data_size = 0;
    unsigned int count = static_cast<unsigned int>(this->repeated_nested_enum_size());for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
        this->repeated_nested_enum(static_cast<int>(i)));
    }
    total_size += (2UL * count) + data_size;
  }

  // repeated .protobuf_unittest.ForeignEnum repeated_foreign_enum = 52;
  {
    size_t data_size = 0;
    unsigned int count = static_cast<unsigned int>(this->repeated_foreign_enum_size());for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
        this->repeated_foreign_enum(static_cast<int>(i)));
    }
    total_size += (2UL * count) + data_size;
  }

  // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
  {
    size_t data_size = 0;
    unsigned int count = static_cast<unsigned int>(this->repeated_import_enum_size());for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
        this->repeated_import_enum(static_cast<int>(i)));
    }
    total_size += (2UL * count) + data_size;
  }

  // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  total_size += 2 *
      ::google::protobuf::internal::FromIntSize(this->repeated_string_piece_size());
  for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->repeated_string_piece(i));
  }

  // repeated string repeated_cord = 55 [ctype = CORD];
  total_size += 2 *
      ::google::protobuf::internal::FromIntSize(this->repeated_cord_size());
  for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->repeated_cord(i));
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_lazy_message_size());
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->repeated_lazy_message(static_cast<int>(i)));
    }
  }

  if (_has_bits_[0 / 32] & 255u) {
    // optional string optional_string = 14;
    if (has_optional_string()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->optional_string());
    }

    // optional bytes optional_bytes = 15;
    if (has_optional_bytes()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->optional_bytes());
    }

    // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
    if (has_optional_string_piece()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->optional_string_piece());
    }

    // optional string optional_cord = 25 [ctype = CORD];
    if (has_optional_cord()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->optional_cord());
    }

    // optional string default_string = 74 [default = "hello"];
    if (has_default_string()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->default_string());
    }

    // optional bytes default_bytes = 75 [default = "world"];
    if (has_default_bytes()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->default_bytes());
    }

    // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
    if (has_default_string_piece()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->default_string_piece());
    }

    // optional string default_cord = 85 [default = "123", ctype = CORD];
    if (has_default_cord()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->default_cord());
    }

  }
  if (_has_bits_[8 / 32] & 65280u) {
    // optional group OptionalGroup = 16 { ... };
    if (has_optionalgroup()) {
      total_size += 4 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *optionalgroup_);
    }

    // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
    if (has_optional_nested_message()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *optional_nested_message_);
    }

    // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
    if (has_optional_foreign_message()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *optional_foreign_message_);
    }

    // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
    if (has_optional_import_message()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *optional_import_message_);
    }

    // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
    if (has_optional_public_import_message()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *optional_public_import_message_);
    }

    // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
    if (has_optional_lazy_message()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *optional_lazy_message_);
    }

    // optional int64 optional_int64 = 2;
    if (has_optional_int64()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->optional_int64());
    }

    // optional int32 optional_int32 = 1;
    if (has_optional_int32()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->optional_int32());
    }

  }
  if (_has_bits_[16 / 32] & 16711680u) {
    // optional uint32 optional_uint32 = 3;
    if (has_optional_uint32()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->optional_uint32());
    }

    // optional uint64 optional_uint64 = 4;
    if (has_optional_uint64()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->optional_uint64());
    }

    // optional sint64 optional_sint64 = 6;
    if (has_optional_sint64()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::SInt64Size(
          this->optional_sint64());
    }

    // optional sint32 optional_sint32 = 5;
    if (has_optional_sint32()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::SInt32Size(
          this->optional_sint32());
    }

    // optional fixed32 optional_fixed32 = 7;
    if (has_optional_fixed32()) {
      total_size += 1 + 4;
    }

    // optional fixed64 optional_fixed64 = 8;
    if (has_optional_fixed64()) {
      total_size += 1 + 8;
    }

    // optional sfixed64 optional_sfixed64 = 10;
    if (has_optional_sfixed64()) {
      total_size += 1 + 8;
    }

    // optional sfixed32 optional_sfixed32 = 9;
    if (has_optional_sfixed32()) {
      total_size += 1 + 4;
    }

  }
  if (_has_bits_[24 / 32] & 4278190080u) {
    // optional float optional_float = 11;
    if (has_optional_float()) {
      total_size += 1 + 4;
    }

    // optional double optional_double = 12;
    if (has_optional_double()) {
      total_size += 1 + 8;
    }

    // optional bool optional_bool = 13;
    if (has_optional_bool()) {
      total_size += 1 + 1;
    }

    // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
    if (has_default_import_enum()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_import_enum());
    }

    // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
    if (has_optional_nested_enum()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_nested_enum());
    }

    // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
    if (has_optional_foreign_enum()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_foreign_enum());
    }

    // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
    if (has_optional_import_enum()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_import_enum());
    }

    // optional int32 default_int32 = 61 [default = 41];
    if (has_default_int32()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->default_int32());
    }

  }
  if (_has_bits_[32 / 32] & 255u) {
    // optional int64 default_int64 = 62 [default = 42];
    if (has_default_int64()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->default_int64());
    }

    // optional uint64 default_uint64 = 64 [default = 44];
    if (has_default_uint64()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->default_uint64());
    }

    // optional uint32 default_uint32 = 63 [default = 43];
    if (has_default_uint32()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->default_uint32());
    }

    // optional sint32 default_sint32 = 65 [default = -45];
    if (has_default_sint32()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::SInt32Size(
          this->default_sint32());
    }

    // optional sint64 default_sint64 = 66 [default = 46];
    if (has_default_sint64()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::SInt64Size(
          this->default_sint64());
    }

    // optional fixed64 default_fixed64 = 68 [default = 48];
    if (has_default_fixed64()) {
      total_size += 2 + 8;
    }

    // optional fixed32 default_fixed32 = 67 [default = 47];
    if (has_default_fixed32()) {
      total_size += 2 + 4;
    }

    // optional sfixed32 default_sfixed32 = 69 [default = 49];
    if (has_default_sfixed32()) {
      total_size += 2 + 4;
    }

  }
  if (_has_bits_[40 / 32] & 16128u) {
    // optional sfixed64 default_sfixed64 = 70 [default = -50];
    if (has_default_sfixed64()) {
      total_size += 2 + 8;
    }

    // optional double default_double = 72 [default = 52000];
    if (has_default_double()) {
      total_size += 2 + 8;
    }

    // optional float default_float = 71 [default = 51.5];
    if (has_default_float()) {
      total_size += 2 + 4;
    }

    // optional bool default_bool = 73 [default = true];
    if (has_default_bool()) {
      total_size += 2 + 1;
    }

    // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
    if (has_default_nested_enum()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_nested_enum());
    }

    // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
    if (has_default_foreign_enum()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_foreign_enum());
    }

  }
  switch (oneof_field_case()) {
    // optional uint32 oneof_uint32 = 111;
    case kOneofUint32: {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->oneof_uint32());
      break;
    }
    // optional .protobuf_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
    case kOneofNestedMessage: {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *oneof_field_.oneof_nested_message_);
      break;
    }
    // optional string oneof_string = 113;
    case kOneofString: {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->oneof_string());
      break;
    }
    // optional bytes oneof_bytes = 114;
    case kOneofBytes: {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->oneof_bytes());
      break;
    }
    case ONEOF_FIELD_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  repeated_int32_.MergeFrom(from.repeated_int32_);
  repeated_int64_.MergeFrom(from.repeated_int64_);
  repeated_uint32_.MergeFrom(from.repeated_uint32_);
  repeated_uint64_.MergeFrom(from.repeated_uint64_);
  repeated_sint32_.MergeFrom(from.repeated_sint32_);
  repeated_sint64_.MergeFrom(from.repeated_sint64_);
  repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
  repeated_fixed64_.MergeFrom(from.repeated_fixed64_);
  repeated_sfixed32_.MergeFrom(from.repeated_sfixed32_);
  repeated_sfixed64_.MergeFrom(from.repeated_sfixed64_);
  repeated_float_.MergeFrom(from.repeated_float_);
  repeated_double_.MergeFrom(from.repeated_double_);
  repeated_bool_.MergeFrom(from.repeated_bool_);
  repeated_string_.MergeFrom(from.repeated_string_);
  repeated_bytes_.MergeFrom(from.repeated_bytes_);
  repeatedgroup_.MergeFrom(from.repeatedgroup_);
  repeated_nested_message_.MergeFrom(from.repeated_nested_message_);
  repeated_foreign_message_.MergeFrom(from.repeated_foreign_message_);
  repeated_import_message_.MergeFrom(from.repeated_import_message_);
  repeated_nested_enum_.MergeFrom(from.repeated_nested_enum_);
  repeated_foreign_enum_.MergeFrom(from.repeated_foreign_enum_);
  repeated_import_enum_.MergeFrom(from.repeated_import_enum_);
  repeated_string_piece_.MergeFrom(from.repeated_string_piece_);
  repeated_cord_.MergeFrom(from.repeated_cord_);
  repeated_lazy_message_.MergeFrom(from.repeated_lazy_message_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 255u) {
    if (cached_has_bits & 0x00000001u) {
      set_optional_string(from.optional_string());
    }
    if (cached_has_bits & 0x00000002u) {
      set_optional_bytes(from.optional_bytes());
    }
    if (cached_has_bits & 0x00000004u) {
      set_optional_string_piece(from.optional_string_piece());
    }
    if (cached_has_bits & 0x00000008u) {
      set_optional_cord(from.optional_cord());
    }
    if (cached_has_bits & 0x00000010u) {
      set_default_string(from.default_string());
    }
    if (cached_has_bits & 0x00000020u) {
      set_default_bytes(from.default_bytes());
    }
    if (cached_has_bits & 0x00000040u) {
      set_default_string_piece(from.default_string_piece());
    }
    if (cached_has_bits & 0x00000080u) {
      set_default_cord(from.default_cord());
    }
  }
  if (cached_has_bits & 65280u) {
    if (cached_has_bits & 0x00000100u) {
      mutable_optionalgroup()->::protobuf_unittest::TestAllTypes_OptionalGroup::MergeFrom(from.optionalgroup());
    }
    if (cached_has_bits & 0x00000200u) {
      mutable_optional_nested_message()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.optional_nested_message());
    }
    if (cached_has_bits & 0x00000400u) {
      mutable_optional_foreign_message()->::protobuf_unittest::ForeignMessage::MergeFrom(from.optional_foreign_message());
    }
    if (cached_has_bits & 0x00000800u) {
      mutable_optional_import_message()->::protobuf_unittest_import::ImportMessage::MergeFrom(from.optional_import_message());
    }
    if (cached_has_bits & 0x00001000u) {
      mutable_optional_public_import_message()->::protobuf_unittest_import::PublicImportMessage::MergeFrom(from.optional_public_import_message());
    }
    if (cached_has_bits & 0x00002000u) {
      mutable_optional_lazy_message()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.optional_lazy_message());
    }
    if (cached_has_bits & 0x00004000u) {
      optional_int64_ = from.optional_int64_;
    }
    if (cached_has_bits & 0x00008000u) {
      optional_int32_ = from.optional_int32_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 16711680u) {
    if (cached_has_bits & 0x00010000u) {
      optional_uint32_ = from.optional_uint32_;
    }
    if (cached_has_bits & 0x00020000u) {
      optional_uint64_ = from.optional_uint64_;
    }
    if (cached_has_bits & 0x00040000u) {
      optional_sint64_ = from.optional_sint64_;
    }
    if (cached_has_bits & 0x00080000u) {
      optional_sint32_ = from.optional_sint32_;
    }
    if (cached_has_bits & 0x00100000u) {
      optional_fixed32_ = from.optional_fixed32_;
    }
    if (cached_has_bits & 0x00200000u) {
      optional_fixed64_ = from.optional_fixed64_;
    }
    if (cached_has_bits & 0x00400000u) {
      optional_sfixed64_ = from.optional_sfixed64_;
    }
    if (cached_has_bits & 0x00800000u) {
      optional_sfixed32_ = from.optional_sfixed32_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 4278190080u) {
    if (cached_has_bits & 0x01000000u) {
      optional_float_ = from.optional_float_;
    }
    if (cached_has_bits & 0x02000000u) {
      optional_double_ = from.optional_double_;
    }
    if (cached_has_bits & 0x04000000u) {
      optional_bool_ = from.optional_bool_;
    }
    if (cached_has_bits & 0x08000000u) {
      default_import_enum_ = from.default_import_enum_;
    }
    if (cached_has_bits & 0x10000000u) {
      optional_nested_enum_ = from.optional_nested_enum_;
    }
    if (cached_has_bits & 0x20000000u) {
      optional_foreign_enum_ = from.optional_foreign_enum_;
    }
    if (cached_has_bits & 0x40000000u) {
      optional_import_enum_ = from.optional_import_enum_;
    }
    if (cached_has_bits & 0x80000000u) {
      default_int32_ = from.default_int32_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  cached_has_bits = from._has_bits_[1];
  if (cached_has_bits & 255u) {
    if (cached_has_bits & 0x00000001u) {
      default_int64_ = from.default_int64_;
    }
    if (cached_has_bits & 0x00000002u) {
      default_uint64_ = from.default_uint64_;
    }
    if (cached_has_bits & 0x00000004u) {
      default_uint32_ = from.default_uint32_;
    }
    if (cached_has_bits & 0x00000008u) {
      default_sint32_ = from.default_sint32_;
    }
    if (cached_has_bits & 0x00000010u) {
      default_sint64_ = from.default_sint64_;
    }
    if (cached_has_bits & 0x00000020u) {
      default_fixed64_ = from.default_fixed64_;
    }
    if (cached_has_bits & 0x00000040u) {
      default_fixed32_ = from.default_fixed32_;
    }
    if (cached_has_bits & 0x00000080u) {
      default_sfixed32_ = from.default_sfixed32_;
    }
    _has_bits_[1] |= cached_has_bits;
  }
  if (cached_has_bits & 16128u) {
    if (cached_has_bits & 0x00000100u) {
      default_sfixed64_ = from.default_sfixed64_;
    }
    if (cached_has_bits & 0x00000200u) {
      default_double_ = from.default_double_;
    }
    if (cached_has_bits & 0x00000400u) {
      default_float_ = from.default_float_;
    }
    if (cached_has_bits & 0x00000800u) {
      default_bool_ = from.default_bool_;
    }
    if (cached_has_bits & 0x00001000u) {
      default_nested_enum_ = from.default_nested_enum_;
    }
    if (cached_has_bits & 0x00002000u) {
      default_foreign_enum_ = from.default_foreign_enum_;
    }
    _has_bits_[1] |= cached_has_bits;
  }
  switch (from.oneof_field_case()) {
    case kOneofUint32: {
      set_oneof_uint32(from.oneof_uint32());
      break;
    }
    case kOneofNestedMessage: {
      mutable_oneof_nested_message()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.oneof_nested_message());
      break;
    }
    case kOneofString: {
      set_oneof_string(from.oneof_string());
      break;
    }
    case kOneofBytes: {
      set_oneof_bytes(from.oneof_bytes());
      break;
    }
    case ONEOF_FIELD_NOT_SET: {
      break;
    }
  }
}

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

void TestAllTypes::CopyFrom(const TestAllTypes& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypes)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestAllTypes::Swap(TestAllTypes* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestAllTypes* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestAllTypes::UnsafeArenaSwap(TestAllTypes* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestAllTypes::InternalSwap(TestAllTypes* other) {
  using std::swap;
  repeated_int32_.InternalSwap(&other->repeated_int32_);
  repeated_int64_.InternalSwap(&other->repeated_int64_);
  repeated_uint32_.InternalSwap(&other->repeated_uint32_);
  repeated_uint64_.InternalSwap(&other->repeated_uint64_);
  repeated_sint32_.InternalSwap(&other->repeated_sint32_);
  repeated_sint64_.InternalSwap(&other->repeated_sint64_);
  repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
  repeated_fixed64_.InternalSwap(&other->repeated_fixed64_);
  repeated_sfixed32_.InternalSwap(&other->repeated_sfixed32_);
  repeated_sfixed64_.InternalSwap(&other->repeated_sfixed64_);
  repeated_float_.InternalSwap(&other->repeated_float_);
  repeated_double_.InternalSwap(&other->repeated_double_);
  repeated_bool_.InternalSwap(&other->repeated_bool_);
  repeated_string_.InternalSwap(CastToBase(&other->repeated_string_));
  repeated_bytes_.InternalSwap(CastToBase(&other->repeated_bytes_));
  CastToBase(&repeatedgroup_)->InternalSwap(CastToBase(&other->repeatedgroup_));
  CastToBase(&repeated_nested_message_)->InternalSwap(CastToBase(&other->repeated_nested_message_));
  CastToBase(&repeated_foreign_message_)->InternalSwap(CastToBase(&other->repeated_foreign_message_));
  CastToBase(&repeated_import_message_)->InternalSwap(CastToBase(&other->repeated_import_message_));
  repeated_nested_enum_.InternalSwap(&other->repeated_nested_enum_);
  repeated_foreign_enum_.InternalSwap(&other->repeated_foreign_enum_);
  repeated_import_enum_.InternalSwap(&other->repeated_import_enum_);
  repeated_string_piece_.InternalSwap(CastToBase(&other->repeated_string_piece_));
  repeated_cord_.InternalSwap(CastToBase(&other->repeated_cord_));
  CastToBase(&repeated_lazy_message_)->InternalSwap(CastToBase(&other->repeated_lazy_message_));
  optional_string_.Swap(&other->optional_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  optional_bytes_.Swap(&other->optional_bytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  optional_string_piece_.Swap(&other->optional_string_piece_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  optional_cord_.Swap(&other->optional_cord_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  default_string_.Swap(&other->default_string_, &::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(),
    GetArenaNoVirtual());
  default_bytes_.Swap(&other->default_bytes_, &::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(),
    GetArenaNoVirtual());
  default_string_piece_.Swap(&other->default_string_piece_, &::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(),
    GetArenaNoVirtual());
  default_cord_.Swap(&other->default_cord_, &::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(),
    GetArenaNoVirtual());
  swap(optionalgroup_, other->optionalgroup_);
  swap(optional_nested_message_, other->optional_nested_message_);
  swap(optional_foreign_message_, other->optional_foreign_message_);
  swap(optional_import_message_, other->optional_import_message_);
  swap(optional_public_import_message_, other->optional_public_import_message_);
  swap(optional_lazy_message_, other->optional_lazy_message_);
  swap(optional_int64_, other->optional_int64_);
  swap(optional_int32_, other->optional_int32_);
  swap(optional_uint32_, other->optional_uint32_);
  swap(optional_uint64_, other->optional_uint64_);
  swap(optional_sint64_, other->optional_sint64_);
  swap(optional_sint32_, other->optional_sint32_);
  swap(optional_fixed32_, other->optional_fixed32_);
  swap(optional_fixed64_, other->optional_fixed64_);
  swap(optional_sfixed64_, other->optional_sfixed64_);
  swap(optional_sfixed32_, other->optional_sfixed32_);
  swap(optional_float_, other->optional_float_);
  swap(optional_double_, other->optional_double_);
  swap(optional_bool_, other->optional_bool_);
  swap(default_import_enum_, other->default_import_enum_);
  swap(optional_nested_enum_, other->optional_nested_enum_);
  swap(optional_foreign_enum_, other->optional_foreign_enum_);
  swap(optional_import_enum_, other->optional_import_enum_);
  swap(default_int32_, other->default_int32_);
  swap(default_int64_, other->default_int64_);
  swap(default_uint64_, other->default_uint64_);
  swap(default_uint32_, other->default_uint32_);
  swap(default_sint32_, other->default_sint32_);
  swap(default_sint64_, other->default_sint64_);
  swap(default_fixed64_, other->default_fixed64_);
  swap(default_fixed32_, other->default_fixed32_);
  swap(default_sfixed32_, other->default_sfixed32_);
  swap(default_sfixed64_, other->default_sfixed64_);
  swap(default_double_, other->default_double_);
  swap(default_float_, other->default_float_);
  swap(default_bool_, other->default_bool_);
  swap(default_nested_enum_, other->default_nested_enum_);
  swap(default_foreign_enum_, other->default_foreign_enum_);
  swap(oneof_field_, other->oneof_field_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(_has_bits_[1], other->_has_bits_[1]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void NestedTestAllTypes::InitAsDefaultInstance() {
  ::protobuf_unittest::_NestedTestAllTypes_default_instance_._instance.get_mutable()->child_ = const_cast< ::protobuf_unittest::NestedTestAllTypes*>(
      ::protobuf_unittest::NestedTestAllTypes::internal_default_instance());
  ::protobuf_unittest::_NestedTestAllTypes_default_instance_._instance.get_mutable()->payload_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
}
void NestedTestAllTypes::unsafe_arena_set_allocated_child(
    ::protobuf_unittest::NestedTestAllTypes* child) {
  if (GetArenaNoVirtual() == NULL) {
    delete child_;
  }
  child_ = child;
  if (child) {
    set_has_child();
  } else {
    clear_has_child();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.NestedTestAllTypes.child)
}
void NestedTestAllTypes::unsafe_arena_set_allocated_payload(
    ::protobuf_unittest::TestAllTypes* payload) {
  if (GetArenaNoVirtual() == NULL) {
    delete payload_;
  }
  payload_ = payload;
  if (payload) {
    set_has_payload();
  } else {
    clear_has_payload();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.NestedTestAllTypes.payload)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NestedTestAllTypes::kChildFieldNumber;
const int NestedTestAllTypes::kPayloadFieldNumber;
const int NestedTestAllTypes::kRepeatedChildFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

NestedTestAllTypes::NestedTestAllTypes()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_NestedTestAllTypes.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.NestedTestAllTypes)
}
NestedTestAllTypes::NestedTestAllTypes(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  repeated_child_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_NestedTestAllTypes.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.NestedTestAllTypes)
}
NestedTestAllTypes::NestedTestAllTypes(const NestedTestAllTypes& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      repeated_child_(from.repeated_child_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_child()) {
    child_ = new ::protobuf_unittest::NestedTestAllTypes(*from.child_);
  } else {
    child_ = NULL;
  }
  if (from.has_payload()) {
    payload_ = new ::protobuf_unittest::TestAllTypes(*from.payload_);
  } else {
    payload_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.NestedTestAllTypes)
}

void NestedTestAllTypes::SharedCtor() {
  ::memset(&child_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&payload_) -
      reinterpret_cast<char*>(&child_)) + sizeof(payload_));
}

NestedTestAllTypes::~NestedTestAllTypes() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.NestedTestAllTypes)
  SharedDtor();
}

void NestedTestAllTypes::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete child_;
  if (this != internal_default_instance()) delete payload_;
}

void NestedTestAllTypes::ArenaDtor(void* object) {
  NestedTestAllTypes* _this = reinterpret_cast< NestedTestAllTypes* >(object);
  (void)_this;
}
void NestedTestAllTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void NestedTestAllTypes::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* NestedTestAllTypes::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const NestedTestAllTypes& NestedTestAllTypes::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_NestedTestAllTypes.base);
  return *internal_default_instance();
}


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

  repeated_child_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(child_ != NULL);
      child_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(payload_ != NULL);
      payload_->Clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool NestedTestAllTypes::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:protobuf_unittest.NestedTestAllTypes)
  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)) {
      // optional .protobuf_unittest.NestedTestAllTypes child = 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_child()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestAllTypes payload = 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_payload()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.NestedTestAllTypes repeated_child = 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, add_repeated_child()));
        } 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:protobuf_unittest.NestedTestAllTypes)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.NestedTestAllTypes)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.NestedTestAllTypes child = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_child(), output);
  }

  // optional .protobuf_unittest.TestAllTypes payload = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->_internal_payload(), output);
  }

  // repeated .protobuf_unittest.NestedTestAllTypes repeated_child = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_child_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3,
      this->repeated_child(static_cast<int>(i)),
      output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.NestedTestAllTypes)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.NestedTestAllTypes child = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_child(), deterministic, target);
  }

  // optional .protobuf_unittest.TestAllTypes payload = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->_internal_payload(), deterministic, target);
  }

  // repeated .protobuf_unittest.NestedTestAllTypes repeated_child = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_child_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->repeated_child(static_cast<int>(i)), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.NestedTestAllTypes)
  return target;
}

size_t NestedTestAllTypes::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.NestedTestAllTypes)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated .protobuf_unittest.NestedTestAllTypes repeated_child = 3;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_child_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->repeated_child(static_cast<int>(i)));
    }
  }

  if (_has_bits_[0 / 32] & 3u) {
    // optional .protobuf_unittest.NestedTestAllTypes child = 1;
    if (has_child()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *child_);
    }

    // optional .protobuf_unittest.TestAllTypes payload = 2;
    if (has_payload()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *payload_);
    }

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

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

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

  repeated_child_.MergeFrom(from.repeated_child_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_child()->::protobuf_unittest::NestedTestAllTypes::MergeFrom(from.child());
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_payload()->::protobuf_unittest::TestAllTypes::MergeFrom(from.payload());
    }
  }
}

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

void NestedTestAllTypes::CopyFrom(const NestedTestAllTypes& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.NestedTestAllTypes)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void NestedTestAllTypes::Swap(NestedTestAllTypes* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    NestedTestAllTypes* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void NestedTestAllTypes::UnsafeArenaSwap(NestedTestAllTypes* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void NestedTestAllTypes::InternalSwap(NestedTestAllTypes* other) {
  using std::swap;
  CastToBase(&repeated_child_)->InternalSwap(CastToBase(&other->repeated_child_));
  swap(child_, other->child_);
  swap(payload_, other->payload_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestDeprecatedFields::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestDeprecatedFields_default_instance_.deprecated_int32_in_oneof_ = 0;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestDeprecatedFields::kDeprecatedInt32FieldNumber;
const int TestDeprecatedFields::kDeprecatedInt32InOneofFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestDeprecatedFields::TestDeprecatedFields()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedFields.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestDeprecatedFields)
}
TestDeprecatedFields::TestDeprecatedFields(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedFields.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDeprecatedFields)
}
TestDeprecatedFields::TestDeprecatedFields(const TestDeprecatedFields& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  deprecated_int32_ = from.deprecated_int32_;
  clear_has_oneof_fields();
  switch (from.oneof_fields_case()) {
    case kDeprecatedInt32InOneof: {
      set_deprecated_int32_in_oneof(from.deprecated_int32_in_oneof());
      break;
    }
    case ONEOF_FIELDS_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDeprecatedFields)
}

void TestDeprecatedFields::SharedCtor() {
  deprecated_int32_ = 0;
  clear_has_oneof_fields();
}

TestDeprecatedFields::~TestDeprecatedFields() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestDeprecatedFields)
  SharedDtor();
}

void TestDeprecatedFields::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (has_oneof_fields()) {
    clear_oneof_fields();
  }
}

void TestDeprecatedFields::ArenaDtor(void* object) {
  TestDeprecatedFields* _this = reinterpret_cast< TestDeprecatedFields* >(object);
  (void)_this;
}
void TestDeprecatedFields::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestDeprecatedFields::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestDeprecatedFields::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestDeprecatedFields& TestDeprecatedFields::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedFields.base);
  return *internal_default_instance();
}


void TestDeprecatedFields::clear_oneof_fields() {
// @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestDeprecatedFields)
  switch (oneof_fields_case()) {
    case kDeprecatedInt32InOneof: {
      // No need to clear
      break;
    }
    case ONEOF_FIELDS_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = ONEOF_FIELDS_NOT_SET;
}


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

  deprecated_int32_ = 0;
  clear_oneof_fields();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestDeprecatedFields::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:protobuf_unittest.TestDeprecatedFields)
  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)) {
      // optional int32 deprecated_int32 = 1 [deprecated = true];
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_deprecated_int32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &deprecated_int32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 deprecated_int32_in_oneof = 2 [deprecated = true];
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          clear_oneof_fields();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &oneof_fields_.deprecated_int32_in_oneof_)));
          set_has_deprecated_int32_in_oneof();
        } 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:protobuf_unittest.TestDeprecatedFields)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDeprecatedFields)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 deprecated_int32 = 1 [deprecated = true];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->deprecated_int32(), output);
  }

  // optional int32 deprecated_int32_in_oneof = 2 [deprecated = true];
  if (has_deprecated_int32_in_oneof()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->deprecated_int32_in_oneof(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDeprecatedFields)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 deprecated_int32 = 1 [deprecated = true];
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->deprecated_int32(), target);
  }

  // optional int32 deprecated_int32_in_oneof = 2 [deprecated = true];
  if (has_deprecated_int32_in_oneof()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->deprecated_int32_in_oneof(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDeprecatedFields)
  return target;
}

size_t TestDeprecatedFields::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDeprecatedFields)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 deprecated_int32 = 1 [deprecated = true];
  if (has_deprecated_int32()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->deprecated_int32());
  }

  switch (oneof_fields_case()) {
    // optional int32 deprecated_int32_in_oneof = 2 [deprecated = true];
    case kDeprecatedInt32InOneof: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->deprecated_int32_in_oneof());
      break;
    }
    case ONEOF_FIELDS_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void TestDeprecatedFields::MergeFrom(const TestDeprecatedFields& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDeprecatedFields)
  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_deprecated_int32()) {
    set_deprecated_int32(from.deprecated_int32());
  }
  switch (from.oneof_fields_case()) {
    case kDeprecatedInt32InOneof: {
      set_deprecated_int32_in_oneof(from.deprecated_int32_in_oneof());
      break;
    }
    case ONEOF_FIELDS_NOT_SET: {
      break;
    }
  }
}

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

void TestDeprecatedFields::CopyFrom(const TestDeprecatedFields& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDeprecatedFields)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestDeprecatedFields::Swap(TestDeprecatedFields* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestDeprecatedFields* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestDeprecatedFields::UnsafeArenaSwap(TestDeprecatedFields* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestDeprecatedFields::InternalSwap(TestDeprecatedFields* other) {
  using std::swap;
  swap(deprecated_int32_, other->deprecated_int32_);
  swap(oneof_fields_, other->oneof_fields_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestDeprecatedMessage::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestDeprecatedMessage::TestDeprecatedMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestDeprecatedMessage)
}
TestDeprecatedMessage::TestDeprecatedMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDeprecatedMessage)
}
TestDeprecatedMessage::TestDeprecatedMessage(const TestDeprecatedMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDeprecatedMessage)
}

void TestDeprecatedMessage::SharedCtor() {
}

TestDeprecatedMessage::~TestDeprecatedMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestDeprecatedMessage)
  SharedDtor();
}

void TestDeprecatedMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestDeprecatedMessage::ArenaDtor(void* object) {
  TestDeprecatedMessage* _this = reinterpret_cast< TestDeprecatedMessage* >(object);
  (void)_this;
}
void TestDeprecatedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestDeprecatedMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestDeprecatedMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestDeprecatedMessage& TestDeprecatedMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedMessage.base);
  return *internal_default_instance();
}


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

  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestDeprecatedMessage::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:protobuf_unittest.TestDeprecatedMessage)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDeprecatedMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDeprecatedMessage)
  return false;
#undef DO_
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDeprecatedMessage)
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDeprecatedMessage)
  return target;
}

size_t TestDeprecatedMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDeprecatedMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

}

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

void TestDeprecatedMessage::CopyFrom(const TestDeprecatedMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDeprecatedMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestDeprecatedMessage::Swap(TestDeprecatedMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestDeprecatedMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestDeprecatedMessage::UnsafeArenaSwap(TestDeprecatedMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestDeprecatedMessage::InternalSwap(TestDeprecatedMessage* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

ForeignMessage::ForeignMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ForeignMessage)
}
ForeignMessage::ForeignMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.ForeignMessage)
}
ForeignMessage::ForeignMessage(const ForeignMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&c_, &from.c_,
    static_cast<size_t>(reinterpret_cast<char*>(&d_) -
    reinterpret_cast<char*>(&c_)) + sizeof(d_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ForeignMessage)
}

void ForeignMessage::SharedCtor() {
  ::memset(&c_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&d_) -
      reinterpret_cast<char*>(&c_)) + sizeof(d_));
}

ForeignMessage::~ForeignMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.ForeignMessage)
  SharedDtor();
}

void ForeignMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void ForeignMessage::ArenaDtor(void* object) {
  ForeignMessage* _this = reinterpret_cast< ForeignMessage* >(object);
  (void)_this;
}
void ForeignMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void ForeignMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* ForeignMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ForeignMessage& ForeignMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    ::memset(&c_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&d_) -
        reinterpret_cast<char*>(&c_)) + sizeof(d_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ForeignMessage::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:protobuf_unittest.ForeignMessage)
  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)) {
      // optional int32 c = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_c();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &c_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 d = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          set_has_d();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &d_)));
        } 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:protobuf_unittest.ForeignMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.ForeignMessage)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 c = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->c(), output);
  }

  // optional int32 d = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->d(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.ForeignMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 c = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->c(), target);
  }

  // optional int32 d = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->d(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.ForeignMessage)
  return target;
}

size_t ForeignMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.ForeignMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional int32 c = 1;
    if (has_c()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->c());
    }

    // optional int32 d = 2;
    if (has_d()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->d());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      c_ = from.c_;
    }
    if (cached_has_bits & 0x00000002u) {
      d_ = from.d_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void ForeignMessage::CopyFrom(const ForeignMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.ForeignMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void ForeignMessage::Swap(ForeignMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    ForeignMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void ForeignMessage::UnsafeArenaSwap(ForeignMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void ForeignMessage::InternalSwap(ForeignMessage* other) {
  using std::swap;
  swap(c_, other->c_);
  swap(d_, other->d_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestReservedFields::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestReservedFields::TestReservedFields()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReservedFields.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestReservedFields)
}
TestReservedFields::TestReservedFields(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReservedFields.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestReservedFields)
}
TestReservedFields::TestReservedFields(const TestReservedFields& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestReservedFields)
}

void TestReservedFields::SharedCtor() {
}

TestReservedFields::~TestReservedFields() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestReservedFields)
  SharedDtor();
}

void TestReservedFields::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestReservedFields::ArenaDtor(void* object) {
  TestReservedFields* _this = reinterpret_cast< TestReservedFields* >(object);
  (void)_this;
}
void TestReservedFields::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestReservedFields::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestReservedFields::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestReservedFields& TestReservedFields::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReservedFields.base);
  return *internal_default_instance();
}


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

  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestReservedFields::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:protobuf_unittest.TestReservedFields)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestReservedFields)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestReservedFields)
  return false;
#undef DO_
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestReservedFields)
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestReservedFields)
  return target;
}

size_t TestReservedFields::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestReservedFields)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

}

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

void TestReservedFields::CopyFrom(const TestReservedFields& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestReservedFields)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestReservedFields::Swap(TestReservedFields* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestReservedFields* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestReservedFields::UnsafeArenaSwap(TestReservedFields* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestReservedFields::InternalSwap(TestReservedFields* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestAllExtensions::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestAllExtensions::TestAllExtensions()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllExtensions.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllExtensions)
}
TestAllExtensions::TestAllExtensions(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _extensions_(arena),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllExtensions.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestAllExtensions)
}
TestAllExtensions::TestAllExtensions(const TestAllExtensions& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllExtensions)
}

void TestAllExtensions::SharedCtor() {
}

TestAllExtensions::~TestAllExtensions() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllExtensions)
  SharedDtor();
}

void TestAllExtensions::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestAllExtensions::ArenaDtor(void* object) {
  TestAllExtensions* _this = reinterpret_cast< TestAllExtensions* >(object);
  (void)_this;
}
void TestAllExtensions::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestAllExtensions::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestAllExtensions::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestAllExtensions& TestAllExtensions::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllExtensions.base);
  return *internal_default_instance();
}


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

  _extensions_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestAllExtensions::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:protobuf_unittest.TestAllExtensions)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    if ((8u <= tag)) {
      DO_(_extensions_.ParseField(tag, input,
          internal_default_instance(),
          _internal_metadata_.mutable_unknown_fields()));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllExtensions)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllExtensions)
  return false;
#undef DO_
}

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

  // Extension range [1, 536870912)
  _extensions_.SerializeWithCachedSizes(
      1, 536870912, output);

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllExtensions)
}

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

  // Extension range [1, 536870912)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      1, 536870912, deterministic, target);

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestAllExtensions)
  return target;
}

size_t TestAllExtensions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllExtensions)
  size_t total_size = 0;

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

}

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

void TestAllExtensions::CopyFrom(const TestAllExtensions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllExtensions)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestAllExtensions::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

void TestAllExtensions::Swap(TestAllExtensions* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestAllExtensions* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestAllExtensions::UnsafeArenaSwap(TestAllExtensions* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestAllExtensions::InternalSwap(TestAllExtensions* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _extensions_.Swap(&other->_extensions_);
}

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


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

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

OptionalGroup_extension::OptionalGroup_extension()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OptionalGroup_extension.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.OptionalGroup_extension)
}
OptionalGroup_extension::OptionalGroup_extension(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OptionalGroup_extension.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.OptionalGroup_extension)
}
OptionalGroup_extension::OptionalGroup_extension(const OptionalGroup_extension& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.OptionalGroup_extension)
}

void OptionalGroup_extension::SharedCtor() {
  a_ = 0;
}

OptionalGroup_extension::~OptionalGroup_extension() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.OptionalGroup_extension)
  SharedDtor();
}

void OptionalGroup_extension::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void OptionalGroup_extension::ArenaDtor(void* object) {
  OptionalGroup_extension* _this = reinterpret_cast< OptionalGroup_extension* >(object);
  (void)_this;
}
void OptionalGroup_extension::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void OptionalGroup_extension::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* OptionalGroup_extension::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const OptionalGroup_extension& OptionalGroup_extension::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OptionalGroup_extension.base);
  return *internal_default_instance();
}


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

  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool OptionalGroup_extension::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:protobuf_unittest.OptionalGroup_extension)
  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)) {
      // optional int32 a = 17;
      case 17: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.OptionalGroup_extension)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.OptionalGroup_extension)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 17;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.OptionalGroup_extension)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 17;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->a(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.OptionalGroup_extension)
  return target;
}

size_t OptionalGroup_extension::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.OptionalGroup_extension)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 a = 17;
  if (has_a()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->a());
  }

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

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

void OptionalGroup_extension::MergeFrom(const OptionalGroup_extension& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.OptionalGroup_extension)
  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_a()) {
    set_a(from.a());
  }
}

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

void OptionalGroup_extension::CopyFrom(const OptionalGroup_extension& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.OptionalGroup_extension)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void OptionalGroup_extension::Swap(OptionalGroup_extension* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    OptionalGroup_extension* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void OptionalGroup_extension::UnsafeArenaSwap(OptionalGroup_extension* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void OptionalGroup_extension::InternalSwap(OptionalGroup_extension* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

RepeatedGroup_extension::RepeatedGroup_extension()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_RepeatedGroup_extension.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.RepeatedGroup_extension)
}
RepeatedGroup_extension::RepeatedGroup_extension(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_RepeatedGroup_extension.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.RepeatedGroup_extension)
}
RepeatedGroup_extension::RepeatedGroup_extension(const RepeatedGroup_extension& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.RepeatedGroup_extension)
}

void RepeatedGroup_extension::SharedCtor() {
  a_ = 0;
}

RepeatedGroup_extension::~RepeatedGroup_extension() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.RepeatedGroup_extension)
  SharedDtor();
}

void RepeatedGroup_extension::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void RepeatedGroup_extension::ArenaDtor(void* object) {
  RepeatedGroup_extension* _this = reinterpret_cast< RepeatedGroup_extension* >(object);
  (void)_this;
}
void RepeatedGroup_extension::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void RepeatedGroup_extension::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* RepeatedGroup_extension::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const RepeatedGroup_extension& RepeatedGroup_extension::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_RepeatedGroup_extension.base);
  return *internal_default_instance();
}


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

  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool RepeatedGroup_extension::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:protobuf_unittest.RepeatedGroup_extension)
  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)) {
      // optional int32 a = 47;
      case 47: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(120u /* 376 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.RepeatedGroup_extension)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.RepeatedGroup_extension)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 47;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(47, this->a(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.RepeatedGroup_extension)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 47;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(47, this->a(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.RepeatedGroup_extension)
  return target;
}

size_t RepeatedGroup_extension::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.RepeatedGroup_extension)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 a = 47;
  if (has_a()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->a());
  }

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

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

void RepeatedGroup_extension::MergeFrom(const RepeatedGroup_extension& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.RepeatedGroup_extension)
  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_a()) {
    set_a(from.a());
  }
}

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

void RepeatedGroup_extension::CopyFrom(const RepeatedGroup_extension& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.RepeatedGroup_extension)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void RepeatedGroup_extension::Swap(RepeatedGroup_extension* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    RepeatedGroup_extension* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void RepeatedGroup_extension::UnsafeArenaSwap(RepeatedGroup_extension* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void RepeatedGroup_extension::InternalSwap(RepeatedGroup_extension* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestGroup_OptionalGroup::TestGroup_OptionalGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup_OptionalGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestGroup.OptionalGroup)
}
TestGroup_OptionalGroup::TestGroup_OptionalGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup_OptionalGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestGroup.OptionalGroup)
}
TestGroup_OptionalGroup::TestGroup_OptionalGroup(const TestGroup_OptionalGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestGroup.OptionalGroup)
}

void TestGroup_OptionalGroup::SharedCtor() {
  a_ = 0;
}

TestGroup_OptionalGroup::~TestGroup_OptionalGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestGroup.OptionalGroup)
  SharedDtor();
}

void TestGroup_OptionalGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestGroup_OptionalGroup::ArenaDtor(void* object) {
  TestGroup_OptionalGroup* _this = reinterpret_cast< TestGroup_OptionalGroup* >(object);
  (void)_this;
}
void TestGroup_OptionalGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestGroup_OptionalGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestGroup_OptionalGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestGroup_OptionalGroup& TestGroup_OptionalGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup_OptionalGroup.base);
  return *internal_default_instance();
}


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

  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestGroup_OptionalGroup::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:protobuf_unittest.TestGroup.OptionalGroup)
  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)) {
      // optional int32 a = 17;
      case 17: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestGroup.OptionalGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestGroup.OptionalGroup)
  return false;
#undef DO_
}

void TestGroup_OptionalGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestGroup.OptionalGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 17;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestGroup.OptionalGroup)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 17;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->a(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestGroup.OptionalGroup)
  return target;
}

size_t TestGroup_OptionalGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestGroup.OptionalGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 a = 17;
  if (has_a()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->a());
  }

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

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

void TestGroup_OptionalGroup::MergeFrom(const TestGroup_OptionalGroup& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestGroup.OptionalGroup)
  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_a()) {
    set_a(from.a());
  }
}

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

void TestGroup_OptionalGroup::CopyFrom(const TestGroup_OptionalGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestGroup.OptionalGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestGroup_OptionalGroup::Swap(TestGroup_OptionalGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestGroup_OptionalGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestGroup_OptionalGroup::UnsafeArenaSwap(TestGroup_OptionalGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestGroup_OptionalGroup::InternalSwap(TestGroup_OptionalGroup* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestGroup::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestGroup_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestGroup_OptionalGroup*>(
      ::protobuf_unittest::TestGroup_OptionalGroup::internal_default_instance());
}
void TestGroup::unsafe_arena_set_allocated_optionalgroup(
    ::protobuf_unittest::TestGroup_OptionalGroup* optionalgroup) {
  if (GetArenaNoVirtual() == NULL) {
    delete optionalgroup_;
  }
  optionalgroup_ = optionalgroup;
  if (optionalgroup) {
    set_has_optionalgroup();
  } else {
    clear_has_optionalgroup();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestGroup.optionalgroup)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestGroup::kOptionalgroupFieldNumber;
const int TestGroup::kOptionalForeignEnumFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestGroup::TestGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestGroup)
}
TestGroup::TestGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestGroup)
}
TestGroup::TestGroup(const TestGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_optionalgroup()) {
    optionalgroup_ = new ::protobuf_unittest::TestGroup_OptionalGroup(*from.optionalgroup_);
  } else {
    optionalgroup_ = NULL;
  }
  optional_foreign_enum_ = from.optional_foreign_enum_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestGroup)
}

void TestGroup::SharedCtor() {
  optionalgroup_ = NULL;
  optional_foreign_enum_ = 4;
}

TestGroup::~TestGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestGroup)
  SharedDtor();
}

void TestGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete optionalgroup_;
}

void TestGroup::ArenaDtor(void* object) {
  TestGroup* _this = reinterpret_cast< TestGroup* >(object);
  (void)_this;
}
void TestGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestGroup& TestGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(optionalgroup_ != NULL);
      optionalgroup_->Clear();
    }
    optional_foreign_enum_ = 4;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestGroup::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:protobuf_unittest.TestGroup)
  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)) {
      // optional group OptionalGroup = 16 { ... };
      case 16: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(131u /* 131 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                16, input, mutable_optionalgroup()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
      case 22: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
            set_optional_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                22, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

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

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

  cached_has_bits = _has_bits_[0];
  // optional group OptionalGroup = 16 { ... };
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      16, this->_internal_optionalgroup(), output);
  }

  // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      22, this->optional_foreign_enum(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestGroup)
}

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

  cached_has_bits = _has_bits_[0];
  // optional group OptionalGroup = 16 { ... };
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        16, this->_internal_optionalgroup(), deterministic, target);
  }

  // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      22, this->optional_foreign_enum(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestGroup)
  return target;
}

size_t TestGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional group OptionalGroup = 16 { ... };
    if (has_optionalgroup()) {
      total_size += 4 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *optionalgroup_);
    }

    // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
    if (has_optional_foreign_enum()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_foreign_enum());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_optionalgroup()->::protobuf_unittest::TestGroup_OptionalGroup::MergeFrom(from.optionalgroup());
    }
    if (cached_has_bits & 0x00000002u) {
      optional_foreign_enum_ = from.optional_foreign_enum_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestGroup::CopyFrom(const TestGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestGroup::Swap(TestGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestGroup::UnsafeArenaSwap(TestGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestGroup::InternalSwap(TestGroup* other) {
  using std::swap;
  swap(optionalgroup_, other->optionalgroup_);
  swap(optional_foreign_enum_, other->optional_foreign_enum_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestGroupExtension::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestGroupExtension::TestGroupExtension()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroupExtension.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestGroupExtension)
}
TestGroupExtension::TestGroupExtension(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _extensions_(arena),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroupExtension.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestGroupExtension)
}
TestGroupExtension::TestGroupExtension(const TestGroupExtension& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestGroupExtension)
}

void TestGroupExtension::SharedCtor() {
}

TestGroupExtension::~TestGroupExtension() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestGroupExtension)
  SharedDtor();
}

void TestGroupExtension::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestGroupExtension::ArenaDtor(void* object) {
  TestGroupExtension* _this = reinterpret_cast< TestGroupExtension* >(object);
  (void)_this;
}
void TestGroupExtension::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestGroupExtension::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestGroupExtension::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestGroupExtension& TestGroupExtension::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroupExtension.base);
  return *internal_default_instance();
}


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

  _extensions_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestGroupExtension::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:protobuf_unittest.TestGroupExtension)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    if ((8u <= tag)) {
      DO_(_extensions_.ParseField(tag, input,
          internal_default_instance(),
          _internal_metadata_.mutable_unknown_fields()));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestGroupExtension)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestGroupExtension)
  return false;
#undef DO_
}

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

  // Extension range [1, 536870912)
  _extensions_.SerializeWithCachedSizes(
      1, 536870912, output);

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestGroupExtension)
}

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

  // Extension range [1, 536870912)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      1, 536870912, deterministic, target);

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestGroupExtension)
  return target;
}

size_t TestGroupExtension::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestGroupExtension)
  size_t total_size = 0;

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

}

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

void TestGroupExtension::CopyFrom(const TestGroupExtension& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestGroupExtension)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestGroupExtension::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

void TestGroupExtension::Swap(TestGroupExtension* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestGroupExtension* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestGroupExtension::UnsafeArenaSwap(TestGroupExtension* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestGroupExtension::InternalSwap(TestGroupExtension* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _extensions_.Swap(&other->_extensions_);
}

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


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

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

TestNestedExtension_OptionalGroup_extension::TestNestedExtension_OptionalGroup_extension()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension_OptionalGroup_extension.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
}
TestNestedExtension_OptionalGroup_extension::TestNestedExtension_OptionalGroup_extension(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension_OptionalGroup_extension.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
}
TestNestedExtension_OptionalGroup_extension::TestNestedExtension_OptionalGroup_extension(const TestNestedExtension_OptionalGroup_extension& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
}

void TestNestedExtension_OptionalGroup_extension::SharedCtor() {
  a_ = 0;
}

TestNestedExtension_OptionalGroup_extension::~TestNestedExtension_OptionalGroup_extension() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  SharedDtor();
}

void TestNestedExtension_OptionalGroup_extension::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestNestedExtension_OptionalGroup_extension::ArenaDtor(void* object) {
  TestNestedExtension_OptionalGroup_extension* _this = reinterpret_cast< TestNestedExtension_OptionalGroup_extension* >(object);
  (void)_this;
}
void TestNestedExtension_OptionalGroup_extension::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestNestedExtension_OptionalGroup_extension::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestNestedExtension_OptionalGroup_extension::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestNestedExtension_OptionalGroup_extension& TestNestedExtension_OptionalGroup_extension::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension_OptionalGroup_extension.base);
  return *internal_default_instance();
}


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

  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestNestedExtension_OptionalGroup_extension::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:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  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)) {
      // optional int32 a = 17;
      case 17: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  return false;
#undef DO_
}

void TestNestedExtension_OptionalGroup_extension::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 17;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 17;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->a(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  return target;
}

size_t TestNestedExtension_OptionalGroup_extension::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 a = 17;
  if (has_a()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->a());
  }

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

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

void TestNestedExtension_OptionalGroup_extension::MergeFrom(const TestNestedExtension_OptionalGroup_extension& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  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_a()) {
    set_a(from.a());
  }
}

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

void TestNestedExtension_OptionalGroup_extension::CopyFrom(const TestNestedExtension_OptionalGroup_extension& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestNestedExtension_OptionalGroup_extension::Swap(TestNestedExtension_OptionalGroup_extension* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestNestedExtension_OptionalGroup_extension* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestNestedExtension_OptionalGroup_extension::UnsafeArenaSwap(TestNestedExtension_OptionalGroup_extension* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestNestedExtension_OptionalGroup_extension::InternalSwap(TestNestedExtension_OptionalGroup_extension* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestNestedExtension::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestNestedExtension::TestNestedExtension()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestNestedExtension)
}
TestNestedExtension::TestNestedExtension(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestNestedExtension)
}
TestNestedExtension::TestNestedExtension(const TestNestedExtension& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestNestedExtension)
}

void TestNestedExtension::SharedCtor() {
}

TestNestedExtension::~TestNestedExtension() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestNestedExtension)
  SharedDtor();
}

void TestNestedExtension::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestNestedExtension::ArenaDtor(void* object) {
  TestNestedExtension* _this = reinterpret_cast< TestNestedExtension* >(object);
  (void)_this;
}
void TestNestedExtension::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestNestedExtension::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestNestedExtension::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestNestedExtension& TestNestedExtension::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension.base);
  return *internal_default_instance();
}


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

  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestNestedExtension::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:protobuf_unittest.TestNestedExtension)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestNestedExtension)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestNestedExtension)
  return false;
#undef DO_
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestNestedExtension)
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestNestedExtension)
  return target;
}

size_t TestNestedExtension::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestNestedExtension)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

}

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

void TestNestedExtension::CopyFrom(const TestNestedExtension& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestNestedExtension)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestNestedExtension::Swap(TestNestedExtension* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestNestedExtension* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestNestedExtension::UnsafeArenaSwap(TestNestedExtension* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestNestedExtension::InternalSwap(TestNestedExtension* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestRequired::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestRequired::kAFieldNumber;
const int TestRequired::kDummy2FieldNumber;
const int TestRequired::kBFieldNumber;
const int TestRequired::kDummy4FieldNumber;
const int TestRequired::kDummy5FieldNumber;
const int TestRequired::kDummy6FieldNumber;
const int TestRequired::kDummy7FieldNumber;
const int TestRequired::kDummy8FieldNumber;
const int TestRequired::kDummy9FieldNumber;
const int TestRequired::kDummy10FieldNumber;
const int TestRequired::kDummy11FieldNumber;
const int TestRequired::kDummy12FieldNumber;
const int TestRequired::kDummy13FieldNumber;
const int TestRequired::kDummy14FieldNumber;
const int TestRequired::kDummy15FieldNumber;
const int TestRequired::kDummy16FieldNumber;
const int TestRequired::kDummy17FieldNumber;
const int TestRequired::kDummy18FieldNumber;
const int TestRequired::kDummy19FieldNumber;
const int TestRequired::kDummy20FieldNumber;
const int TestRequired::kDummy21FieldNumber;
const int TestRequired::kDummy22FieldNumber;
const int TestRequired::kDummy23FieldNumber;
const int TestRequired::kDummy24FieldNumber;
const int TestRequired::kDummy25FieldNumber;
const int TestRequired::kDummy26FieldNumber;
const int TestRequired::kDummy27FieldNumber;
const int TestRequired::kDummy28FieldNumber;
const int TestRequired::kDummy29FieldNumber;
const int TestRequired::kDummy30FieldNumber;
const int TestRequired::kDummy31FieldNumber;
const int TestRequired::kDummy32FieldNumber;
const int TestRequired::kCFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestRequired::TestRequired()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestRequired)
}
TestRequired::TestRequired(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRequired)
}
TestRequired::TestRequired(const TestRequired& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&a_, &from.a_,
    static_cast<size_t>(reinterpret_cast<char*>(&c_) -
    reinterpret_cast<char*>(&a_)) + sizeof(c_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRequired)
}

void TestRequired::SharedCtor() {
  ::memset(&a_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&c_) -
      reinterpret_cast<char*>(&a_)) + sizeof(c_));
}

TestRequired::~TestRequired() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestRequired)
  SharedDtor();
}

void TestRequired::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestRequired::ArenaDtor(void* object) {
  TestRequired* _this = reinterpret_cast< TestRequired* >(object);
  (void)_this;
}
void TestRequired::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestRequired::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestRequired::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestRequired& TestRequired::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 255u) {
    ::memset(&a_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&dummy8_) -
        reinterpret_cast<char*>(&a_)) + sizeof(dummy8_));
  }
  if (cached_has_bits & 65280u) {
    ::memset(&dummy9_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&dummy16_) -
        reinterpret_cast<char*>(&dummy9_)) + sizeof(dummy16_));
  }
  if (cached_has_bits & 16711680u) {
    ::memset(&dummy17_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&dummy24_) -
        reinterpret_cast<char*>(&dummy17_)) + sizeof(dummy24_));
  }
  if (cached_has_bits & 4278190080u) {
    ::memset(&dummy25_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&dummy32_) -
        reinterpret_cast<char*>(&dummy25_)) + sizeof(dummy32_));
  }
  c_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestRequired::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:protobuf_unittest.TestRequired)
  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)) {
      // required int32 a = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy2 = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          set_has_dummy2();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy2_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // required int32 b = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          set_has_b();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &b_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy4 = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
          set_has_dummy4();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy4_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy5 = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
          set_has_dummy5();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy5_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy6 = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
          set_has_dummy6();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy6_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy7 = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
          set_has_dummy7();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy7_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy8 = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
          set_has_dummy8();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy8_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy9 = 9;
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
          set_has_dummy9();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy9_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy10 = 10;
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) {
          set_has_dummy10();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy10_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy11 = 11;
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) {
          set_has_dummy11();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy11_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy12 = 12;
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(96u /* 96 & 0xFF */)) {
          set_has_dummy12();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy12_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy13 = 13;
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
          set_has_dummy13();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy13_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy14 = 14;
      case 14: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(112u /* 112 & 0xFF */)) {
          set_has_dummy14();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy14_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy15 = 15;
      case 15: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(120u /* 120 & 0xFF */)) {
          set_has_dummy15();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy15_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy16 = 16;
      case 16: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(128u /* 128 & 0xFF */)) {
          set_has_dummy16();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy16_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy17 = 17;
      case 17: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
          set_has_dummy17();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy17_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy18 = 18;
      case 18: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(144u /* 144 & 0xFF */)) {
          set_has_dummy18();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy18_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy19 = 19;
      case 19: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(152u /* 152 & 0xFF */)) {
          set_has_dummy19();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy19_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy20 = 20;
      case 20: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(160u /* 160 & 0xFF */)) {
          set_has_dummy20();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy20_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy21 = 21;
      case 21: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
          set_has_dummy21();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy21_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy22 = 22;
      case 22: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
          set_has_dummy22();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy22_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy23 = 23;
      case 23: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(184u /* 184 & 0xFF */)) {
          set_has_dummy23();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy23_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy24 = 24;
      case 24: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(192u /* 192 & 0xFF */)) {
          set_has_dummy24();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy24_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy25 = 25;
      case 25: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(200u /* 200 & 0xFF */)) {
          set_has_dummy25();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy25_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy26 = 26;
      case 26: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(208u /* 208 & 0xFF */)) {
          set_has_dummy26();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy26_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy27 = 27;
      case 27: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(216u /* 216 & 0xFF */)) {
          set_has_dummy27();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy27_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy28 = 28;
      case 28: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(224u /* 224 & 0xFF */)) {
          set_has_dummy28();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy28_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy29 = 29;
      case 29: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(232u /* 232 & 0xFF */)) {
          set_has_dummy29();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy29_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy30 = 30;
      case 30: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(240u /* 240 & 0xFF */)) {
          set_has_dummy30();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy30_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy31 = 31;
      case 31: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(248u /* 248 & 0xFF */)) {
          set_has_dummy31();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy31_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy32 = 32;
      case 32: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(0u /* 256 & 0xFF */)) {
          set_has_dummy32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // required int32 c = 33;
      case 33: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) {
          set_has_c();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &c_)));
        } 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:protobuf_unittest.TestRequired)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRequired)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // required int32 a = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->a(), output);
  }

  // optional int32 dummy2 = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->dummy2(), output);
  }

  // required int32 b = 3;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->b(), output);
  }

  // optional int32 dummy4 = 4;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->dummy4(), output);
  }

  // optional int32 dummy5 = 5;
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->dummy5(), output);
  }

  // optional int32 dummy6 = 6;
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->dummy6(), output);
  }

  // optional int32 dummy7 = 7;
  if (cached_has_bits & 0x00000040u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->dummy7(), output);
  }

  // optional int32 dummy8 = 8;
  if (cached_has_bits & 0x00000080u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->dummy8(), output);
  }

  // optional int32 dummy9 = 9;
  if (cached_has_bits & 0x00000100u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->dummy9(), output);
  }

  // optional int32 dummy10 = 10;
  if (cached_has_bits & 0x00000200u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->dummy10(), output);
  }

  // optional int32 dummy11 = 11;
  if (cached_has_bits & 0x00000400u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(11, this->dummy11(), output);
  }

  // optional int32 dummy12 = 12;
  if (cached_has_bits & 0x00000800u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(12, this->dummy12(), output);
  }

  // optional int32 dummy13 = 13;
  if (cached_has_bits & 0x00001000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(13, this->dummy13(), output);
  }

  // optional int32 dummy14 = 14;
  if (cached_has_bits & 0x00002000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(14, this->dummy14(), output);
  }

  // optional int32 dummy15 = 15;
  if (cached_has_bits & 0x00004000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(15, this->dummy15(), output);
  }

  // optional int32 dummy16 = 16;
  if (cached_has_bits & 0x00008000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(16, this->dummy16(), output);
  }

  // optional int32 dummy17 = 17;
  if (cached_has_bits & 0x00010000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->dummy17(), output);
  }

  // optional int32 dummy18 = 18;
  if (cached_has_bits & 0x00020000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(18, this->dummy18(), output);
  }

  // optional int32 dummy19 = 19;
  if (cached_has_bits & 0x00040000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(19, this->dummy19(), output);
  }

  // optional int32 dummy20 = 20;
  if (cached_has_bits & 0x00080000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(20, this->dummy20(), output);
  }

  // optional int32 dummy21 = 21;
  if (cached_has_bits & 0x00100000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(21, this->dummy21(), output);
  }

  // optional int32 dummy22 = 22;
  if (cached_has_bits & 0x00200000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(22, this->dummy22(), output);
  }

  // optional int32 dummy23 = 23;
  if (cached_has_bits & 0x00400000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(23, this->dummy23(), output);
  }

  // optional int32 dummy24 = 24;
  if (cached_has_bits & 0x00800000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(24, this->dummy24(), output);
  }

  // optional int32 dummy25 = 25;
  if (cached_has_bits & 0x01000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(25, this->dummy25(), output);
  }

  // optional int32 dummy26 = 26;
  if (cached_has_bits & 0x02000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(26, this->dummy26(), output);
  }

  // optional int32 dummy27 = 27;
  if (cached_has_bits & 0x04000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(27, this->dummy27(), output);
  }

  // optional int32 dummy28 = 28;
  if (cached_has_bits & 0x08000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(28, this->dummy28(), output);
  }

  // optional int32 dummy29 = 29;
  if (cached_has_bits & 0x10000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(29, this->dummy29(), output);
  }

  // optional int32 dummy30 = 30;
  if (cached_has_bits & 0x20000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(30, this->dummy30(), output);
  }

  // optional int32 dummy31 = 31;
  if (cached_has_bits & 0x40000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(31, this->dummy31(), output);
  }

  // optional int32 dummy32 = 32;
  if (cached_has_bits & 0x80000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(32, this->dummy32(), output);
  }

  cached_has_bits = _has_bits_[1];
  // required int32 c = 33;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(33, this->c(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRequired)
}

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

  cached_has_bits = _has_bits_[0];
  // required int32 a = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->a(), target);
  }

  // optional int32 dummy2 = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->dummy2(), target);
  }

  // required int32 b = 3;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->b(), target);
  }

  // optional int32 dummy4 = 4;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->dummy4(), target);
  }

  // optional int32 dummy5 = 5;
  if (cached_has_bits & 0x00000010u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->dummy5(), target);
  }

  // optional int32 dummy6 = 6;
  if (cached_has_bits & 0x00000020u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->dummy6(), target);
  }

  // optional int32 dummy7 = 7;
  if (cached_has_bits & 0x00000040u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->dummy7(), target);
  }

  // optional int32 dummy8 = 8;
  if (cached_has_bits & 0x00000080u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->dummy8(), target);
  }

  // optional int32 dummy9 = 9;
  if (cached_has_bits & 0x00000100u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->dummy9(), target);
  }

  // optional int32 dummy10 = 10;
  if (cached_has_bits & 0x00000200u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(10, this->dummy10(), target);
  }

  // optional int32 dummy11 = 11;
  if (cached_has_bits & 0x00000400u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(11, this->dummy11(), target);
  }

  // optional int32 dummy12 = 12;
  if (cached_has_bits & 0x00000800u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(12, this->dummy12(), target);
  }

  // optional int32 dummy13 = 13;
  if (cached_has_bits & 0x00001000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(13, this->dummy13(), target);
  }

  // optional int32 dummy14 = 14;
  if (cached_has_bits & 0x00002000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(14, this->dummy14(), target);
  }

  // optional int32 dummy15 = 15;
  if (cached_has_bits & 0x00004000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(15, this->dummy15(), target);
  }

  // optional int32 dummy16 = 16;
  if (cached_has_bits & 0x00008000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(16, this->dummy16(), target);
  }

  // optional int32 dummy17 = 17;
  if (cached_has_bits & 0x00010000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->dummy17(), target);
  }

  // optional int32 dummy18 = 18;
  if (cached_has_bits & 0x00020000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(18, this->dummy18(), target);
  }

  // optional int32 dummy19 = 19;
  if (cached_has_bits & 0x00040000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(19, this->dummy19(), target);
  }

  // optional int32 dummy20 = 20;
  if (cached_has_bits & 0x00080000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(20, this->dummy20(), target);
  }

  // optional int32 dummy21 = 21;
  if (cached_has_bits & 0x00100000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(21, this->dummy21(), target);
  }

  // optional int32 dummy22 = 22;
  if (cached_has_bits & 0x00200000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(22, this->dummy22(), target);
  }

  // optional int32 dummy23 = 23;
  if (cached_has_bits & 0x00400000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(23, this->dummy23(), target);
  }

  // optional int32 dummy24 = 24;
  if (cached_has_bits & 0x00800000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(24, this->dummy24(), target);
  }

  // optional int32 dummy25 = 25;
  if (cached_has_bits & 0x01000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(25, this->dummy25(), target);
  }

  // optional int32 dummy26 = 26;
  if (cached_has_bits & 0x02000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(26, this->dummy26(), target);
  }

  // optional int32 dummy27 = 27;
  if (cached_has_bits & 0x04000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(27, this->dummy27(), target);
  }

  // optional int32 dummy28 = 28;
  if (cached_has_bits & 0x08000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(28, this->dummy28(), target);
  }

  // optional int32 dummy29 = 29;
  if (cached_has_bits & 0x10000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(29, this->dummy29(), target);
  }

  // optional int32 dummy30 = 30;
  if (cached_has_bits & 0x20000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(30, this->dummy30(), target);
  }

  // optional int32 dummy31 = 31;
  if (cached_has_bits & 0x40000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(31, this->dummy31(), target);
  }

  // optional int32 dummy32 = 32;
  if (cached_has_bits & 0x80000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(32, this->dummy32(), target);
  }

  cached_has_bits = _has_bits_[1];
  // required int32 c = 33;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(33, this->c(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRequired)
  return target;
}

size_t TestRequired::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:protobuf_unittest.TestRequired)
  size_t total_size = 0;

  if (has_a()) {
    // required int32 a = 1;
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->a());
  }

  if (has_b()) {
    // required int32 b = 3;
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->b());
  }

  if (has_c()) {
    // required int32 c = 33;
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->c());
  }

  return total_size;
}
size_t TestRequired::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRequired)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if ((((_has_bits_[0] & 0x00000005) ^ 0x00000005)
         | ((_has_bits_[1] & 0x00000001) ^ 0x00000001)) == 0) {  // All required fields are present.
    // required int32 a = 1;
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->a());

    // required int32 b = 3;
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->b());

    // required int32 c = 33;
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->c());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  // optional int32 dummy2 = 2;
  if (has_dummy2()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->dummy2());
  }

  if (_has_bits_[0 / 32] & 248u) {
    // optional int32 dummy4 = 4;
    if (has_dummy4()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy4());
    }

    // optional int32 dummy5 = 5;
    if (has_dummy5()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy5());
    }

    // optional int32 dummy6 = 6;
    if (has_dummy6()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy6());
    }

    // optional int32 dummy7 = 7;
    if (has_dummy7()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy7());
    }

    // optional int32 dummy8 = 8;
    if (has_dummy8()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy8());
    }

  }
  if (_has_bits_[8 / 32] & 65280u) {
    // optional int32 dummy9 = 9;
    if (has_dummy9()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy9());
    }

    // optional int32 dummy10 = 10;
    if (has_dummy10()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy10());
    }

    // optional int32 dummy11 = 11;
    if (has_dummy11()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy11());
    }

    // optional int32 dummy12 = 12;
    if (has_dummy12()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy12());
    }

    // optional int32 dummy13 = 13;
    if (has_dummy13()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy13());
    }

    // optional int32 dummy14 = 14;
    if (has_dummy14()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy14());
    }

    // optional int32 dummy15 = 15;
    if (has_dummy15()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy15());
    }

    // optional int32 dummy16 = 16;
    if (has_dummy16()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy16());
    }

  }
  if (_has_bits_[16 / 32] & 16711680u) {
    // optional int32 dummy17 = 17;
    if (has_dummy17()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy17());
    }

    // optional int32 dummy18 = 18;
    if (has_dummy18()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy18());
    }

    // optional int32 dummy19 = 19;
    if (has_dummy19()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy19());
    }

    // optional int32 dummy20 = 20;
    if (has_dummy20()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy20());
    }

    // optional int32 dummy21 = 21;
    if (has_dummy21()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy21());
    }

    // optional int32 dummy22 = 22;
    if (has_dummy22()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy22());
    }

    // optional int32 dummy23 = 23;
    if (has_dummy23()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy23());
    }

    // optional int32 dummy24 = 24;
    if (has_dummy24()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy24());
    }

  }
  if (_has_bits_[24 / 32] & 4278190080u) {
    // optional int32 dummy25 = 25;
    if (has_dummy25()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy25());
    }

    // optional int32 dummy26 = 26;
    if (has_dummy26()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy26());
    }

    // optional int32 dummy27 = 27;
    if (has_dummy27()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy27());
    }

    // optional int32 dummy28 = 28;
    if (has_dummy28()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy28());
    }

    // optional int32 dummy29 = 29;
    if (has_dummy29()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy29());
    }

    // optional int32 dummy30 = 30;
    if (has_dummy30()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy30());
    }

    // optional int32 dummy31 = 31;
    if (has_dummy31()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy31());
    }

    // optional int32 dummy32 = 32;
    if (has_dummy32()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy32());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 255u) {
    if (cached_has_bits & 0x00000001u) {
      a_ = from.a_;
    }
    if (cached_has_bits & 0x00000002u) {
      dummy2_ = from.dummy2_;
    }
    if (cached_has_bits & 0x00000004u) {
      b_ = from.b_;
    }
    if (cached_has_bits & 0x00000008u) {
      dummy4_ = from.dummy4_;
    }
    if (cached_has_bits & 0x00000010u) {
      dummy5_ = from.dummy5_;
    }
    if (cached_has_bits & 0x00000020u) {
      dummy6_ = from.dummy6_;
    }
    if (cached_has_bits & 0x00000040u) {
      dummy7_ = from.dummy7_;
    }
    if (cached_has_bits & 0x00000080u) {
      dummy8_ = from.dummy8_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 65280u) {
    if (cached_has_bits & 0x00000100u) {
      dummy9_ = from.dummy9_;
    }
    if (cached_has_bits & 0x00000200u) {
      dummy10_ = from.dummy10_;
    }
    if (cached_has_bits & 0x00000400u) {
      dummy11_ = from.dummy11_;
    }
    if (cached_has_bits & 0x00000800u) {
      dummy12_ = from.dummy12_;
    }
    if (cached_has_bits & 0x00001000u) {
      dummy13_ = from.dummy13_;
    }
    if (cached_has_bits & 0x00002000u) {
      dummy14_ = from.dummy14_;
    }
    if (cached_has_bits & 0x00004000u) {
      dummy15_ = from.dummy15_;
    }
    if (cached_has_bits & 0x00008000u) {
      dummy16_ = from.dummy16_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 16711680u) {
    if (cached_has_bits & 0x00010000u) {
      dummy17_ = from.dummy17_;
    }
    if (cached_has_bits & 0x00020000u) {
      dummy18_ = from.dummy18_;
    }
    if (cached_has_bits & 0x00040000u) {
      dummy19_ = from.dummy19_;
    }
    if (cached_has_bits & 0x00080000u) {
      dummy20_ = from.dummy20_;
    }
    if (cached_has_bits & 0x00100000u) {
      dummy21_ = from.dummy21_;
    }
    if (cached_has_bits & 0x00200000u) {
      dummy22_ = from.dummy22_;
    }
    if (cached_has_bits & 0x00400000u) {
      dummy23_ = from.dummy23_;
    }
    if (cached_has_bits & 0x00800000u) {
      dummy24_ = from.dummy24_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 4278190080u) {
    if (cached_has_bits & 0x01000000u) {
      dummy25_ = from.dummy25_;
    }
    if (cached_has_bits & 0x02000000u) {
      dummy26_ = from.dummy26_;
    }
    if (cached_has_bits & 0x04000000u) {
      dummy27_ = from.dummy27_;
    }
    if (cached_has_bits & 0x08000000u) {
      dummy28_ = from.dummy28_;
    }
    if (cached_has_bits & 0x10000000u) {
      dummy29_ = from.dummy29_;
    }
    if (cached_has_bits & 0x20000000u) {
      dummy30_ = from.dummy30_;
    }
    if (cached_has_bits & 0x40000000u) {
      dummy31_ = from.dummy31_;
    }
    if (cached_has_bits & 0x80000000u) {
      dummy32_ = from.dummy32_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (from.has_c()) {
    set_c(from.c());
  }
}

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

void TestRequired::CopyFrom(const TestRequired& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRequired)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestRequired::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000005) != 0x00000005) return false;
  if ((_has_bits_[1] & 0x00000001) != 0x00000001) return false;
  return true;
}

void TestRequired::Swap(TestRequired* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestRequired* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestRequired::UnsafeArenaSwap(TestRequired* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestRequired::InternalSwap(TestRequired* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(dummy2_, other->dummy2_);
  swap(b_, other->b_);
  swap(dummy4_, other->dummy4_);
  swap(dummy5_, other->dummy5_);
  swap(dummy6_, other->dummy6_);
  swap(dummy7_, other->dummy7_);
  swap(dummy8_, other->dummy8_);
  swap(dummy9_, other->dummy9_);
  swap(dummy10_, other->dummy10_);
  swap(dummy11_, other->dummy11_);
  swap(dummy12_, other->dummy12_);
  swap(dummy13_, other->dummy13_);
  swap(dummy14_, other->dummy14_);
  swap(dummy15_, other->dummy15_);
  swap(dummy16_, other->dummy16_);
  swap(dummy17_, other->dummy17_);
  swap(dummy18_, other->dummy18_);
  swap(dummy19_, other->dummy19_);
  swap(dummy20_, other->dummy20_);
  swap(dummy21_, other->dummy21_);
  swap(dummy22_, other->dummy22_);
  swap(dummy23_, other->dummy23_);
  swap(dummy24_, other->dummy24_);
  swap(dummy25_, other->dummy25_);
  swap(dummy26_, other->dummy26_);
  swap(dummy27_, other->dummy27_);
  swap(dummy28_, other->dummy28_);
  swap(dummy29_, other->dummy29_);
  swap(dummy30_, other->dummy30_);
  swap(dummy31_, other->dummy31_);
  swap(dummy32_, other->dummy32_);
  swap(c_, other->c_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(_has_bits_[1], other->_has_bits_[1]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestRequiredForeign::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestRequiredForeign_default_instance_._instance.get_mutable()->optional_message_ = const_cast< ::protobuf_unittest::TestRequired*>(
      ::protobuf_unittest::TestRequired::internal_default_instance());
}
void TestRequiredForeign::unsafe_arena_set_allocated_optional_message(
    ::protobuf_unittest::TestRequired* optional_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_message_;
  }
  optional_message_ = optional_message;
  if (optional_message) {
    set_has_optional_message();
  } else {
    clear_has_optional_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestRequiredForeign.optional_message)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestRequiredForeign::kOptionalMessageFieldNumber;
const int TestRequiredForeign::kRepeatedMessageFieldNumber;
const int TestRequiredForeign::kDummyFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestRequiredForeign::TestRequiredForeign()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredForeign.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestRequiredForeign)
}
TestRequiredForeign::TestRequiredForeign(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  repeated_message_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredForeign.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRequiredForeign)
}
TestRequiredForeign::TestRequiredForeign(const TestRequiredForeign& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      repeated_message_(from.repeated_message_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_optional_message()) {
    optional_message_ = new ::protobuf_unittest::TestRequired(*from.optional_message_);
  } else {
    optional_message_ = NULL;
  }
  dummy_ = from.dummy_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRequiredForeign)
}

void TestRequiredForeign::SharedCtor() {
  ::memset(&optional_message_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&dummy_) -
      reinterpret_cast<char*>(&optional_message_)) + sizeof(dummy_));
}

TestRequiredForeign::~TestRequiredForeign() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestRequiredForeign)
  SharedDtor();
}

void TestRequiredForeign::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete optional_message_;
}

void TestRequiredForeign::ArenaDtor(void* object) {
  TestRequiredForeign* _this = reinterpret_cast< TestRequiredForeign* >(object);
  (void)_this;
}
void TestRequiredForeign::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestRequiredForeign::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestRequiredForeign::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestRequiredForeign& TestRequiredForeign::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredForeign.base);
  return *internal_default_instance();
}


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

  repeated_message_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(optional_message_ != NULL);
    optional_message_->Clear();
  }
  dummy_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestRequiredForeign::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:protobuf_unittest.TestRequiredForeign)
  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)) {
      // optional .protobuf_unittest.TestRequired optional_message = 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_optional_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.TestRequired repeated_message = 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, add_repeated_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 dummy = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          set_has_dummy();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dummy_)));
        } 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:protobuf_unittest.TestRequiredForeign)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRequiredForeign)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestRequired optional_message = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_optional_message(), output);
  }

  // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_message_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2,
      this->repeated_message(static_cast<int>(i)),
      output);
  }

  // optional int32 dummy = 3;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->dummy(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRequiredForeign)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestRequired optional_message = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_optional_message(), deterministic, target);
  }

  // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_message_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->repeated_message(static_cast<int>(i)), deterministic, target);
  }

  // optional int32 dummy = 3;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->dummy(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRequiredForeign)
  return target;
}

size_t TestRequiredForeign::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRequiredForeign)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_message_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->repeated_message(static_cast<int>(i)));
    }
  }

  if (_has_bits_[0 / 32] & 3u) {
    // optional .protobuf_unittest.TestRequired optional_message = 1;
    if (has_optional_message()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *optional_message_);
    }

    // optional int32 dummy = 3;
    if (has_dummy()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->dummy());
    }

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

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

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

  repeated_message_.MergeFrom(from.repeated_message_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_optional_message()->::protobuf_unittest::TestRequired::MergeFrom(from.optional_message());
    }
    if (cached_has_bits & 0x00000002u) {
      dummy_ = from.dummy_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestRequiredForeign::CopyFrom(const TestRequiredForeign& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRequiredForeign)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestRequiredForeign::IsInitialized() const {
  if (!::google::protobuf::internal::AllAreInitialized(this->repeated_message())) return false;
  if (has_optional_message()) {
    if (!this->optional_message_->IsInitialized()) return false;
  }
  return true;
}

void TestRequiredForeign::Swap(TestRequiredForeign* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestRequiredForeign* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestRequiredForeign::UnsafeArenaSwap(TestRequiredForeign* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestRequiredForeign::InternalSwap(TestRequiredForeign* other) {
  using std::swap;
  CastToBase(&repeated_message_)->InternalSwap(CastToBase(&other->repeated_message_));
  swap(optional_message_, other->optional_message_);
  swap(dummy_, other->dummy_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestRequiredMessage::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestRequiredMessage_default_instance_._instance.get_mutable()->optional_message_ = const_cast< ::protobuf_unittest::TestRequired*>(
      ::protobuf_unittest::TestRequired::internal_default_instance());
  ::protobuf_unittest::_TestRequiredMessage_default_instance_._instance.get_mutable()->required_message_ = const_cast< ::protobuf_unittest::TestRequired*>(
      ::protobuf_unittest::TestRequired::internal_default_instance());
}
void TestRequiredMessage::unsafe_arena_set_allocated_optional_message(
    ::protobuf_unittest::TestRequired* optional_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_message_;
  }
  optional_message_ = optional_message;
  if (optional_message) {
    set_has_optional_message();
  } else {
    clear_has_optional_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestRequiredMessage.optional_message)
}
void TestRequiredMessage::unsafe_arena_set_allocated_required_message(
    ::protobuf_unittest::TestRequired* required_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete required_message_;
  }
  required_message_ = required_message;
  if (required_message) {
    set_has_required_message();
  } else {
    clear_has_required_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestRequiredMessage.required_message)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestRequiredMessage::kOptionalMessageFieldNumber;
const int TestRequiredMessage::kRepeatedMessageFieldNumber;
const int TestRequiredMessage::kRequiredMessageFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestRequiredMessage::TestRequiredMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestRequiredMessage)
}
TestRequiredMessage::TestRequiredMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  repeated_message_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRequiredMessage)
}
TestRequiredMessage::TestRequiredMessage(const TestRequiredMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      repeated_message_(from.repeated_message_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_optional_message()) {
    optional_message_ = new ::protobuf_unittest::TestRequired(*from.optional_message_);
  } else {
    optional_message_ = NULL;
  }
  if (from.has_required_message()) {
    required_message_ = new ::protobuf_unittest::TestRequired(*from.required_message_);
  } else {
    required_message_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRequiredMessage)
}

void TestRequiredMessage::SharedCtor() {
  ::memset(&optional_message_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&required_message_) -
      reinterpret_cast<char*>(&optional_message_)) + sizeof(required_message_));
}

TestRequiredMessage::~TestRequiredMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestRequiredMessage)
  SharedDtor();
}

void TestRequiredMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete optional_message_;
  if (this != internal_default_instance()) delete required_message_;
}

void TestRequiredMessage::ArenaDtor(void* object) {
  TestRequiredMessage* _this = reinterpret_cast< TestRequiredMessage* >(object);
  (void)_this;
}
void TestRequiredMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestRequiredMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestRequiredMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestRequiredMessage& TestRequiredMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredMessage.base);
  return *internal_default_instance();
}


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

  repeated_message_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(optional_message_ != NULL);
      optional_message_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(required_message_ != NULL);
      required_message_->Clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestRequiredMessage::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:protobuf_unittest.TestRequiredMessage)
  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)) {
      // optional .protobuf_unittest.TestRequired optional_message = 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_optional_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.TestRequired repeated_message = 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, add_repeated_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // required .protobuf_unittest.TestRequired required_message = 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_required_message()));
        } 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:protobuf_unittest.TestRequiredMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRequiredMessage)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestRequired optional_message = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_optional_message(), output);
  }

  // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_message_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2,
      this->repeated_message(static_cast<int>(i)),
      output);
  }

  // required .protobuf_unittest.TestRequired required_message = 3;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->_internal_required_message(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRequiredMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestRequired optional_message = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_optional_message(), deterministic, target);
  }

  // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_message_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->repeated_message(static_cast<int>(i)), deterministic, target);
  }

  // required .protobuf_unittest.TestRequired required_message = 3;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->_internal_required_message(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRequiredMessage)
  return target;
}

size_t TestRequiredMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRequiredMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // required .protobuf_unittest.TestRequired required_message = 3;
  if (has_required_message()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *required_message_);
  }
  // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_message_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->repeated_message(static_cast<int>(i)));
    }
  }

  // optional .protobuf_unittest.TestRequired optional_message = 1;
  if (has_optional_message()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *optional_message_);
  }

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

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

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

  repeated_message_.MergeFrom(from.repeated_message_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_optional_message()->::protobuf_unittest::TestRequired::MergeFrom(from.optional_message());
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_required_message()->::protobuf_unittest::TestRequired::MergeFrom(from.required_message());
    }
  }
}

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

void TestRequiredMessage::CopyFrom(const TestRequiredMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRequiredMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestRequiredMessage::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000002) != 0x00000002) return false;
  if (!::google::protobuf::internal::AllAreInitialized(this->repeated_message())) return false;
  if (has_optional_message()) {
    if (!this->optional_message_->IsInitialized()) return false;
  }
  if (has_required_message()) {
    if (!this->required_message_->IsInitialized()) return false;
  }
  return true;
}

void TestRequiredMessage::Swap(TestRequiredMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestRequiredMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestRequiredMessage::UnsafeArenaSwap(TestRequiredMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestRequiredMessage::InternalSwap(TestRequiredMessage* other) {
  using std::swap;
  CastToBase(&repeated_message_)->InternalSwap(CastToBase(&other->repeated_message_));
  swap(optional_message_, other->optional_message_);
  swap(required_message_, other->required_message_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestForeignNested::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestForeignNested_default_instance_._instance.get_mutable()->foreign_nested_ = const_cast< ::protobuf_unittest::TestAllTypes_NestedMessage*>(
      ::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
}
void TestForeignNested::unsafe_arena_set_allocated_foreign_nested(
    ::protobuf_unittest::TestAllTypes_NestedMessage* foreign_nested) {
  if (GetArenaNoVirtual() == NULL) {
    delete foreign_nested_;
  }
  foreign_nested_ = foreign_nested;
  if (foreign_nested) {
    set_has_foreign_nested();
  } else {
    clear_has_foreign_nested();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestForeignNested.foreign_nested)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestForeignNested::kForeignNestedFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestForeignNested::TestForeignNested()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestForeignNested.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestForeignNested)
}
TestForeignNested::TestForeignNested(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestForeignNested.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestForeignNested)
}
TestForeignNested::TestForeignNested(const TestForeignNested& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_foreign_nested()) {
    foreign_nested_ = new ::protobuf_unittest::TestAllTypes_NestedMessage(*from.foreign_nested_);
  } else {
    foreign_nested_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestForeignNested)
}

void TestForeignNested::SharedCtor() {
  foreign_nested_ = NULL;
}

TestForeignNested::~TestForeignNested() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestForeignNested)
  SharedDtor();
}

void TestForeignNested::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete foreign_nested_;
}

void TestForeignNested::ArenaDtor(void* object) {
  TestForeignNested* _this = reinterpret_cast< TestForeignNested* >(object);
  (void)_this;
}
void TestForeignNested::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestForeignNested::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestForeignNested::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestForeignNested& TestForeignNested::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestForeignNested.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(foreign_nested_ != NULL);
    foreign_nested_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestForeignNested::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:protobuf_unittest.TestForeignNested)
  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)) {
      // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 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_foreign_nested()));
        } 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:protobuf_unittest.TestForeignNested)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestForeignNested)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_foreign_nested(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestForeignNested)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_foreign_nested(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestForeignNested)
  return target;
}

size_t TestForeignNested::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestForeignNested)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
  if (has_foreign_nested()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *foreign_nested_);
  }

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

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

void TestForeignNested::MergeFrom(const TestForeignNested& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestForeignNested)
  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_foreign_nested()) {
    mutable_foreign_nested()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.foreign_nested());
  }
}

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

void TestForeignNested::CopyFrom(const TestForeignNested& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestForeignNested)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestForeignNested::Swap(TestForeignNested* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestForeignNested* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestForeignNested::UnsafeArenaSwap(TestForeignNested* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestForeignNested::InternalSwap(TestForeignNested* other) {
  using std::swap;
  swap(foreign_nested_, other->foreign_nested_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestEmptyMessage::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestEmptyMessage::TestEmptyMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestEmptyMessage)
}
TestEmptyMessage::TestEmptyMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestEmptyMessage)
}
TestEmptyMessage::TestEmptyMessage(const TestEmptyMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestEmptyMessage)
}

void TestEmptyMessage::SharedCtor() {
}

TestEmptyMessage::~TestEmptyMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestEmptyMessage)
  SharedDtor();
}

void TestEmptyMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestEmptyMessage::ArenaDtor(void* object) {
  TestEmptyMessage* _this = reinterpret_cast< TestEmptyMessage* >(object);
  (void)_this;
}
void TestEmptyMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestEmptyMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestEmptyMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestEmptyMessage& TestEmptyMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessage.base);
  return *internal_default_instance();
}


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

  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestEmptyMessage::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:protobuf_unittest.TestEmptyMessage)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestEmptyMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestEmptyMessage)
  return false;
#undef DO_
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestEmptyMessage)
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestEmptyMessage)
  return target;
}

size_t TestEmptyMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestEmptyMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

}

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

void TestEmptyMessage::CopyFrom(const TestEmptyMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestEmptyMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestEmptyMessage::Swap(TestEmptyMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestEmptyMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestEmptyMessage::UnsafeArenaSwap(TestEmptyMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestEmptyMessage::InternalSwap(TestEmptyMessage* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestEmptyMessageWithExtensions::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestEmptyMessageWithExtensions::TestEmptyMessageWithExtensions()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessageWithExtensions.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestEmptyMessageWithExtensions)
}
TestEmptyMessageWithExtensions::TestEmptyMessageWithExtensions(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _extensions_(arena),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessageWithExtensions.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestEmptyMessageWithExtensions)
}
TestEmptyMessageWithExtensions::TestEmptyMessageWithExtensions(const TestEmptyMessageWithExtensions& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestEmptyMessageWithExtensions)
}

void TestEmptyMessageWithExtensions::SharedCtor() {
}

TestEmptyMessageWithExtensions::~TestEmptyMessageWithExtensions() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestEmptyMessageWithExtensions)
  SharedDtor();
}

void TestEmptyMessageWithExtensions::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestEmptyMessageWithExtensions::ArenaDtor(void* object) {
  TestEmptyMessageWithExtensions* _this = reinterpret_cast< TestEmptyMessageWithExtensions* >(object);
  (void)_this;
}
void TestEmptyMessageWithExtensions::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestEmptyMessageWithExtensions::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestEmptyMessageWithExtensions::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestEmptyMessageWithExtensions& TestEmptyMessageWithExtensions::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessageWithExtensions.base);
  return *internal_default_instance();
}


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

  _extensions_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestEmptyMessageWithExtensions::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:protobuf_unittest.TestEmptyMessageWithExtensions)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    if ((8u <= tag)) {
      DO_(_extensions_.ParseField(tag, input,
          internal_default_instance(),
          _internal_metadata_.mutable_unknown_fields()));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestEmptyMessageWithExtensions)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestEmptyMessageWithExtensions)
  return false;
#undef DO_
}

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

  // Extension range [1, 536870912)
  _extensions_.SerializeWithCachedSizes(
      1, 536870912, output);

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestEmptyMessageWithExtensions)
}

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

  // Extension range [1, 536870912)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      1, 536870912, deterministic, target);

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestEmptyMessageWithExtensions)
  return target;
}

size_t TestEmptyMessageWithExtensions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  size_t total_size = 0;

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

}

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

void TestEmptyMessageWithExtensions::CopyFrom(const TestEmptyMessageWithExtensions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestEmptyMessageWithExtensions::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

void TestEmptyMessageWithExtensions::Swap(TestEmptyMessageWithExtensions* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestEmptyMessageWithExtensions* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestEmptyMessageWithExtensions::UnsafeArenaSwap(TestEmptyMessageWithExtensions* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestEmptyMessageWithExtensions::InternalSwap(TestEmptyMessageWithExtensions* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _extensions_.Swap(&other->_extensions_);
}

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


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

void TestMultipleExtensionRanges::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestMultipleExtensionRanges::TestMultipleExtensionRanges()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMultipleExtensionRanges.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestMultipleExtensionRanges)
}
TestMultipleExtensionRanges::TestMultipleExtensionRanges(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _extensions_(arena),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMultipleExtensionRanges.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMultipleExtensionRanges)
}
TestMultipleExtensionRanges::TestMultipleExtensionRanges(const TestMultipleExtensionRanges& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMultipleExtensionRanges)
}

void TestMultipleExtensionRanges::SharedCtor() {
}

TestMultipleExtensionRanges::~TestMultipleExtensionRanges() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestMultipleExtensionRanges)
  SharedDtor();
}

void TestMultipleExtensionRanges::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestMultipleExtensionRanges::ArenaDtor(void* object) {
  TestMultipleExtensionRanges* _this = reinterpret_cast< TestMultipleExtensionRanges* >(object);
  (void)_this;
}
void TestMultipleExtensionRanges::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestMultipleExtensionRanges::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestMultipleExtensionRanges::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestMultipleExtensionRanges& TestMultipleExtensionRanges::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMultipleExtensionRanges.base);
  return *internal_default_instance();
}


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

  _extensions_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestMultipleExtensionRanges::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:protobuf_unittest.TestMultipleExtensionRanges)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    if ((336u <= tag && tag < 344u) ||
        (33144u <= tag && tag < 33952u) ||
        (524288u <= tag)) {
      DO_(_extensions_.ParseField(tag, input,
          internal_default_instance(),
          _internal_metadata_.mutable_unknown_fields()));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestMultipleExtensionRanges)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMultipleExtensionRanges)
  return false;
#undef DO_
}

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

  // Extension range [42, 43)
  _extensions_.SerializeWithCachedSizes(
      42, 43, output);

  // Extension range [4143, 4244)
  _extensions_.SerializeWithCachedSizes(
      4143, 4244, output);

  // Extension range [65536, 536870912)
  _extensions_.SerializeWithCachedSizes(
      65536, 536870912, output);

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMultipleExtensionRanges)
}

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

  // Extension range [42, 43)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      42, 43, deterministic, target);

  // Extension range [4143, 4244)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      4143, 4244, deterministic, target);

  // Extension range [65536, 536870912)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      65536, 536870912, deterministic, target);

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMultipleExtensionRanges)
  return target;
}

size_t TestMultipleExtensionRanges::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMultipleExtensionRanges)
  size_t total_size = 0;

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

}

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

void TestMultipleExtensionRanges::CopyFrom(const TestMultipleExtensionRanges& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMultipleExtensionRanges)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestMultipleExtensionRanges::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

void TestMultipleExtensionRanges::Swap(TestMultipleExtensionRanges* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestMultipleExtensionRanges* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestMultipleExtensionRanges::UnsafeArenaSwap(TestMultipleExtensionRanges* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestMultipleExtensionRanges::InternalSwap(TestMultipleExtensionRanges* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _extensions_.Swap(&other->_extensions_);
}

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


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

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

TestReallyLargeTagNumber::TestReallyLargeTagNumber()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReallyLargeTagNumber.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestReallyLargeTagNumber)
}
TestReallyLargeTagNumber::TestReallyLargeTagNumber(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReallyLargeTagNumber.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestReallyLargeTagNumber)
}
TestReallyLargeTagNumber::TestReallyLargeTagNumber(const TestReallyLargeTagNumber& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&a_, &from.a_,
    static_cast<size_t>(reinterpret_cast<char*>(&bb_) -
    reinterpret_cast<char*>(&a_)) + sizeof(bb_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestReallyLargeTagNumber)
}

void TestReallyLargeTagNumber::SharedCtor() {
  ::memset(&a_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&bb_) -
      reinterpret_cast<char*>(&a_)) + sizeof(bb_));
}

TestReallyLargeTagNumber::~TestReallyLargeTagNumber() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestReallyLargeTagNumber)
  SharedDtor();
}

void TestReallyLargeTagNumber::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestReallyLargeTagNumber::ArenaDtor(void* object) {
  TestReallyLargeTagNumber* _this = reinterpret_cast< TestReallyLargeTagNumber* >(object);
  (void)_this;
}
void TestReallyLargeTagNumber::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestReallyLargeTagNumber::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestReallyLargeTagNumber::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestReallyLargeTagNumber& TestReallyLargeTagNumber::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReallyLargeTagNumber.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    ::memset(&a_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&bb_) -
        reinterpret_cast<char*>(&a_)) + sizeof(bb_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestReallyLargeTagNumber::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:protobuf_unittest.TestReallyLargeTagNumber)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(2147483645u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 a = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 bb = 268435455;
      case 268435455: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(248u /* 2147483640 & 0xFF */)) {
          set_has_bb();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &bb_)));
        } 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:protobuf_unittest.TestReallyLargeTagNumber)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestReallyLargeTagNumber)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->a(), output);
  }

  // optional int32 bb = 268435455;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(268435455, this->bb(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestReallyLargeTagNumber)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->a(), target);
  }

  // optional int32 bb = 268435455;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(268435455, this->bb(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestReallyLargeTagNumber)
  return target;
}

size_t TestReallyLargeTagNumber::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestReallyLargeTagNumber)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional int32 a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->a());
    }

    // optional int32 bb = 268435455;
    if (has_bb()) {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->bb());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      a_ = from.a_;
    }
    if (cached_has_bits & 0x00000002u) {
      bb_ = from.bb_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestReallyLargeTagNumber::CopyFrom(const TestReallyLargeTagNumber& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestReallyLargeTagNumber)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestReallyLargeTagNumber::Swap(TestReallyLargeTagNumber* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestReallyLargeTagNumber* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestReallyLargeTagNumber::UnsafeArenaSwap(TestReallyLargeTagNumber* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestReallyLargeTagNumber::InternalSwap(TestReallyLargeTagNumber* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(bb_, other->bb_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestRecursiveMessage::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestRecursiveMessage_default_instance_._instance.get_mutable()->a_ = const_cast< ::protobuf_unittest::TestRecursiveMessage*>(
      ::protobuf_unittest::TestRecursiveMessage::internal_default_instance());
}
void TestRecursiveMessage::unsafe_arena_set_allocated_a(
    ::protobuf_unittest::TestRecursiveMessage* a) {
  if (GetArenaNoVirtual() == NULL) {
    delete a_;
  }
  a_ = a;
  if (a) {
    set_has_a();
  } else {
    clear_has_a();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestRecursiveMessage.a)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestRecursiveMessage::kAFieldNumber;
const int TestRecursiveMessage::kIFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestRecursiveMessage::TestRecursiveMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRecursiveMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestRecursiveMessage)
}
TestRecursiveMessage::TestRecursiveMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRecursiveMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRecursiveMessage)
}
TestRecursiveMessage::TestRecursiveMessage(const TestRecursiveMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_a()) {
    a_ = new ::protobuf_unittest::TestRecursiveMessage(*from.a_);
  } else {
    a_ = NULL;
  }
  i_ = from.i_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRecursiveMessage)
}

void TestRecursiveMessage::SharedCtor() {
  ::memset(&a_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&i_) -
      reinterpret_cast<char*>(&a_)) + sizeof(i_));
}

TestRecursiveMessage::~TestRecursiveMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestRecursiveMessage)
  SharedDtor();
}

void TestRecursiveMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete a_;
}

void TestRecursiveMessage::ArenaDtor(void* object) {
  TestRecursiveMessage* _this = reinterpret_cast< TestRecursiveMessage* >(object);
  (void)_this;
}
void TestRecursiveMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestRecursiveMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestRecursiveMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestRecursiveMessage& TestRecursiveMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRecursiveMessage.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(a_ != NULL);
    a_->Clear();
  }
  i_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestRecursiveMessage::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:protobuf_unittest.TestRecursiveMessage)
  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)) {
      // optional .protobuf_unittest.TestRecursiveMessage a = 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_a()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 i = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          set_has_i();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &i_)));
        } 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:protobuf_unittest.TestRecursiveMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRecursiveMessage)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestRecursiveMessage a = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_a(), output);
  }

  // optional int32 i = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->i(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRecursiveMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestRecursiveMessage a = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_a(), deterministic, target);
  }

  // optional int32 i = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->i(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRecursiveMessage)
  return target;
}

size_t TestRecursiveMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRecursiveMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional .protobuf_unittest.TestRecursiveMessage a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *a_);
    }

    // optional int32 i = 2;
    if (has_i()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->i());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_a()->::protobuf_unittest::TestRecursiveMessage::MergeFrom(from.a());
    }
    if (cached_has_bits & 0x00000002u) {
      i_ = from.i_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestRecursiveMessage::CopyFrom(const TestRecursiveMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRecursiveMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestRecursiveMessage::Swap(TestRecursiveMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestRecursiveMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestRecursiveMessage::UnsafeArenaSwap(TestRecursiveMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestRecursiveMessage::InternalSwap(TestRecursiveMessage* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(i_, other->i_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestMutualRecursionA_SubMessage::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestMutualRecursionA_SubMessage_default_instance_._instance.get_mutable()->b_ = const_cast< ::protobuf_unittest::TestMutualRecursionB*>(
      ::protobuf_unittest::TestMutualRecursionB::internal_default_instance());
}
void TestMutualRecursionA_SubMessage::unsafe_arena_set_allocated_b(
    ::protobuf_unittest::TestMutualRecursionB* b) {
  if (GetArenaNoVirtual() == NULL) {
    delete b_;
  }
  b_ = b;
  if (b) {
    set_has_b();
  } else {
    clear_has_b();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionA.SubMessage.b)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestMutualRecursionA_SubMessage::kBFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestMutualRecursionA_SubMessage::TestMutualRecursionA_SubMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestMutualRecursionA.SubMessage)
}
TestMutualRecursionA_SubMessage::TestMutualRecursionA_SubMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMutualRecursionA.SubMessage)
}
TestMutualRecursionA_SubMessage::TestMutualRecursionA_SubMessage(const TestMutualRecursionA_SubMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_b()) {
    b_ = new ::protobuf_unittest::TestMutualRecursionB(*from.b_);
  } else {
    b_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMutualRecursionA.SubMessage)
}

void TestMutualRecursionA_SubMessage::SharedCtor() {
  b_ = NULL;
}

TestMutualRecursionA_SubMessage::~TestMutualRecursionA_SubMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestMutualRecursionA.SubMessage)
  SharedDtor();
}

void TestMutualRecursionA_SubMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete b_;
}

void TestMutualRecursionA_SubMessage::ArenaDtor(void* object) {
  TestMutualRecursionA_SubMessage* _this = reinterpret_cast< TestMutualRecursionA_SubMessage* >(object);
  (void)_this;
}
void TestMutualRecursionA_SubMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestMutualRecursionA_SubMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestMutualRecursionA_SubMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestMutualRecursionA_SubMessage& TestMutualRecursionA_SubMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(b_ != NULL);
    b_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestMutualRecursionA_SubMessage::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:protobuf_unittest.TestMutualRecursionA.SubMessage)
  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)) {
      // optional .protobuf_unittest.TestMutualRecursionB b = 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_b()));
        } 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:protobuf_unittest.TestMutualRecursionA.SubMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMutualRecursionA.SubMessage)
  return false;
#undef DO_
}

void TestMutualRecursionA_SubMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestMutualRecursionB b = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_b(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMutualRecursionA.SubMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestMutualRecursionB b = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_b(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMutualRecursionA.SubMessage)
  return target;
}

size_t TestMutualRecursionA_SubMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestMutualRecursionB b = 1;
  if (has_b()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *b_);
  }

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

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

void TestMutualRecursionA_SubMessage::MergeFrom(const TestMutualRecursionA_SubMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  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_b()) {
    mutable_b()->::protobuf_unittest::TestMutualRecursionB::MergeFrom(from.b());
  }
}

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

void TestMutualRecursionA_SubMessage::CopyFrom(const TestMutualRecursionA_SubMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestMutualRecursionA_SubMessage::Swap(TestMutualRecursionA_SubMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestMutualRecursionA_SubMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestMutualRecursionA_SubMessage::UnsafeArenaSwap(TestMutualRecursionA_SubMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestMutualRecursionA_SubMessage::InternalSwap(TestMutualRecursionA_SubMessage* other) {
  using std::swap;
  swap(b_, other->b_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestMutualRecursionA_SubGroup::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestMutualRecursionA_SubGroup_default_instance_._instance.get_mutable()->sub_message_ = const_cast< ::protobuf_unittest::TestMutualRecursionA_SubMessage*>(
      ::protobuf_unittest::TestMutualRecursionA_SubMessage::internal_default_instance());
  ::protobuf_unittest::_TestMutualRecursionA_SubGroup_default_instance_._instance.get_mutable()->not_in_this_scc_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
}
void TestMutualRecursionA_SubGroup::unsafe_arena_set_allocated_sub_message(
    ::protobuf_unittest::TestMutualRecursionA_SubMessage* sub_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete sub_message_;
  }
  sub_message_ = sub_message;
  if (sub_message) {
    set_has_sub_message();
  } else {
    clear_has_sub_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionA.SubGroup.sub_message)
}
void TestMutualRecursionA_SubGroup::unsafe_arena_set_allocated_not_in_this_scc(
    ::protobuf_unittest::TestAllTypes* not_in_this_scc) {
  if (GetArenaNoVirtual() == NULL) {
    delete not_in_this_scc_;
  }
  not_in_this_scc_ = not_in_this_scc;
  if (not_in_this_scc) {
    set_has_not_in_this_scc();
  } else {
    clear_has_not_in_this_scc();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionA.SubGroup.not_in_this_scc)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestMutualRecursionA_SubGroup::kSubMessageFieldNumber;
const int TestMutualRecursionA_SubGroup::kNotInThisSccFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestMutualRecursionA_SubGroup::TestMutualRecursionA_SubGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestMutualRecursionA.SubGroup)
}
TestMutualRecursionA_SubGroup::TestMutualRecursionA_SubGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMutualRecursionA.SubGroup)
}
TestMutualRecursionA_SubGroup::TestMutualRecursionA_SubGroup(const TestMutualRecursionA_SubGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_sub_message()) {
    sub_message_ = new ::protobuf_unittest::TestMutualRecursionA_SubMessage(*from.sub_message_);
  } else {
    sub_message_ = NULL;
  }
  if (from.has_not_in_this_scc()) {
    not_in_this_scc_ = new ::protobuf_unittest::TestAllTypes(*from.not_in_this_scc_);
  } else {
    not_in_this_scc_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMutualRecursionA.SubGroup)
}

void TestMutualRecursionA_SubGroup::SharedCtor() {
  ::memset(&sub_message_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&not_in_this_scc_) -
      reinterpret_cast<char*>(&sub_message_)) + sizeof(not_in_this_scc_));
}

TestMutualRecursionA_SubGroup::~TestMutualRecursionA_SubGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestMutualRecursionA.SubGroup)
  SharedDtor();
}

void TestMutualRecursionA_SubGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete sub_message_;
  if (this != internal_default_instance()) delete not_in_this_scc_;
}

void TestMutualRecursionA_SubGroup::ArenaDtor(void* object) {
  TestMutualRecursionA_SubGroup* _this = reinterpret_cast< TestMutualRecursionA_SubGroup* >(object);
  (void)_this;
}
void TestMutualRecursionA_SubGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestMutualRecursionA_SubGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestMutualRecursionA_SubGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestMutualRecursionA_SubGroup& TestMutualRecursionA_SubGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(sub_message_ != NULL);
      sub_message_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(not_in_this_scc_ != NULL);
      not_in_this_scc_->Clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestMutualRecursionA_SubGroup::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:protobuf_unittest.TestMutualRecursionA.SubGroup)
  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)) {
      // optional .protobuf_unittest.TestMutualRecursionA.SubMessage sub_message = 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_sub_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestAllTypes not_in_this_scc = 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_not_in_this_scc()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestMutualRecursionA.SubGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMutualRecursionA.SubGroup)
  return false;
#undef DO_
}

void TestMutualRecursionA_SubGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestMutualRecursionA.SubMessage sub_message = 3;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->_internal_sub_message(), output);
  }

  // optional .protobuf_unittest.TestAllTypes not_in_this_scc = 4;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, this->_internal_not_in_this_scc(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMutualRecursionA.SubGroup)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestMutualRecursionA.SubMessage sub_message = 3;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->_internal_sub_message(), deterministic, target);
  }

  // optional .protobuf_unittest.TestAllTypes not_in_this_scc = 4;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, this->_internal_not_in_this_scc(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMutualRecursionA.SubGroup)
  return target;
}

size_t TestMutualRecursionA_SubGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional .protobuf_unittest.TestMutualRecursionA.SubMessage sub_message = 3;
    if (has_sub_message()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *sub_message_);
    }

    // optional .protobuf_unittest.TestAllTypes not_in_this_scc = 4;
    if (has_not_in_this_scc()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *not_in_this_scc_);
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_sub_message()->::protobuf_unittest::TestMutualRecursionA_SubMessage::MergeFrom(from.sub_message());
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_not_in_this_scc()->::protobuf_unittest::TestAllTypes::MergeFrom(from.not_in_this_scc());
    }
  }
}

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

void TestMutualRecursionA_SubGroup::CopyFrom(const TestMutualRecursionA_SubGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestMutualRecursionA_SubGroup::Swap(TestMutualRecursionA_SubGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestMutualRecursionA_SubGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestMutualRecursionA_SubGroup::UnsafeArenaSwap(TestMutualRecursionA_SubGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestMutualRecursionA_SubGroup::InternalSwap(TestMutualRecursionA_SubGroup* other) {
  using std::swap;
  swap(sub_message_, other->sub_message_);
  swap(not_in_this_scc_, other->not_in_this_scc_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestMutualRecursionA::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestMutualRecursionA_default_instance_._instance.get_mutable()->bb_ = const_cast< ::protobuf_unittest::TestMutualRecursionB*>(
      ::protobuf_unittest::TestMutualRecursionB::internal_default_instance());
  ::protobuf_unittest::_TestMutualRecursionA_default_instance_._instance.get_mutable()->subgroup_ = const_cast< ::protobuf_unittest::TestMutualRecursionA_SubGroup*>(
      ::protobuf_unittest::TestMutualRecursionA_SubGroup::internal_default_instance());
}
void TestMutualRecursionA::unsafe_arena_set_allocated_bb(
    ::protobuf_unittest::TestMutualRecursionB* bb) {
  if (GetArenaNoVirtual() == NULL) {
    delete bb_;
  }
  bb_ = bb;
  if (bb) {
    set_has_bb();
  } else {
    clear_has_bb();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionA.bb)
}
void TestMutualRecursionA::unsafe_arena_set_allocated_subgroup(
    ::protobuf_unittest::TestMutualRecursionA_SubGroup* subgroup) {
  if (GetArenaNoVirtual() == NULL) {
    delete subgroup_;
  }
  subgroup_ = subgroup;
  if (subgroup) {
    set_has_subgroup();
  } else {
    clear_has_subgroup();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionA.subgroup)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestMutualRecursionA::kBbFieldNumber;
const int TestMutualRecursionA::kSubgroupFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestMutualRecursionA::TestMutualRecursionA()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestMutualRecursionA)
}
TestMutualRecursionA::TestMutualRecursionA(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMutualRecursionA)
}
TestMutualRecursionA::TestMutualRecursionA(const TestMutualRecursionA& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_bb()) {
    bb_ = new ::protobuf_unittest::TestMutualRecursionB(*from.bb_);
  } else {
    bb_ = NULL;
  }
  if (from.has_subgroup()) {
    subgroup_ = new ::protobuf_unittest::TestMutualRecursionA_SubGroup(*from.subgroup_);
  } else {
    subgroup_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMutualRecursionA)
}

void TestMutualRecursionA::SharedCtor() {
  ::memset(&bb_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&subgroup_) -
      reinterpret_cast<char*>(&bb_)) + sizeof(subgroup_));
}

TestMutualRecursionA::~TestMutualRecursionA() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestMutualRecursionA)
  SharedDtor();
}

void TestMutualRecursionA::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete bb_;
  if (this != internal_default_instance()) delete subgroup_;
}

void TestMutualRecursionA::ArenaDtor(void* object) {
  TestMutualRecursionA* _this = reinterpret_cast< TestMutualRecursionA* >(object);
  (void)_this;
}
void TestMutualRecursionA::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestMutualRecursionA::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestMutualRecursionA::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestMutualRecursionA& TestMutualRecursionA::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(bb_ != NULL);
      bb_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(subgroup_ != NULL);
      subgroup_->Clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestMutualRecursionA::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:protobuf_unittest.TestMutualRecursionA)
  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)) {
      // optional .protobuf_unittest.TestMutualRecursionB bb = 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_bb()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional group SubGroup = 2 { ... };
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(19u /* 19 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                2, input, mutable_subgroup()));
        } 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:protobuf_unittest.TestMutualRecursionA)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMutualRecursionA)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_bb(), output);
  }

  // optional group SubGroup = 2 { ... };
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      2, this->_internal_subgroup(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMutualRecursionA)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_bb(), deterministic, target);
  }

  // optional group SubGroup = 2 { ... };
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        2, this->_internal_subgroup(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMutualRecursionA)
  return target;
}

size_t TestMutualRecursionA::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMutualRecursionA)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
    if (has_bb()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *bb_);
    }

    // optional group SubGroup = 2 { ... };
    if (has_subgroup()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *subgroup_);
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_bb()->::protobuf_unittest::TestMutualRecursionB::MergeFrom(from.bb());
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_subgroup()->::protobuf_unittest::TestMutualRecursionA_SubGroup::MergeFrom(from.subgroup());
    }
  }
}

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

void TestMutualRecursionA::CopyFrom(const TestMutualRecursionA& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMutualRecursionA)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestMutualRecursionA::Swap(TestMutualRecursionA* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestMutualRecursionA* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestMutualRecursionA::UnsafeArenaSwap(TestMutualRecursionA* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestMutualRecursionA::InternalSwap(TestMutualRecursionA* other) {
  using std::swap;
  swap(bb_, other->bb_);
  swap(subgroup_, other->subgroup_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestMutualRecursionB::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestMutualRecursionB_default_instance_._instance.get_mutable()->a_ = const_cast< ::protobuf_unittest::TestMutualRecursionA*>(
      ::protobuf_unittest::TestMutualRecursionA::internal_default_instance());
}
void TestMutualRecursionB::unsafe_arena_set_allocated_a(
    ::protobuf_unittest::TestMutualRecursionA* a) {
  if (GetArenaNoVirtual() == NULL) {
    delete a_;
  }
  a_ = a;
  if (a) {
    set_has_a();
  } else {
    clear_has_a();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionB.a)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestMutualRecursionB::kAFieldNumber;
const int TestMutualRecursionB::kOptionalInt32FieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestMutualRecursionB::TestMutualRecursionB()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestMutualRecursionB)
}
TestMutualRecursionB::TestMutualRecursionB(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMutualRecursionB)
}
TestMutualRecursionB::TestMutualRecursionB(const TestMutualRecursionB& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_a()) {
    a_ = new ::protobuf_unittest::TestMutualRecursionA(*from.a_);
  } else {
    a_ = NULL;
  }
  optional_int32_ = from.optional_int32_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMutualRecursionB)
}

void TestMutualRecursionB::SharedCtor() {
  ::memset(&a_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&optional_int32_) -
      reinterpret_cast<char*>(&a_)) + sizeof(optional_int32_));
}

TestMutualRecursionB::~TestMutualRecursionB() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestMutualRecursionB)
  SharedDtor();
}

void TestMutualRecursionB::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete a_;
}

void TestMutualRecursionB::ArenaDtor(void* object) {
  TestMutualRecursionB* _this = reinterpret_cast< TestMutualRecursionB* >(object);
  (void)_this;
}
void TestMutualRecursionB::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestMutualRecursionB::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestMutualRecursionB::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestMutualRecursionB& TestMutualRecursionB::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(a_ != NULL);
    a_->Clear();
  }
  optional_int32_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestMutualRecursionB::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:protobuf_unittest.TestMutualRecursionB)
  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)) {
      // optional .protobuf_unittest.TestMutualRecursionA a = 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_a()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 optional_int32 = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          set_has_optional_int32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &optional_int32_)));
        } 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:protobuf_unittest.TestMutualRecursionB)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMutualRecursionB)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestMutualRecursionA a = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_a(), output);
  }

  // optional int32 optional_int32 = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->optional_int32(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMutualRecursionB)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestMutualRecursionA a = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_a(), deterministic, target);
  }

  // optional int32 optional_int32 = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->optional_int32(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMutualRecursionB)
  return target;
}

size_t TestMutualRecursionB::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMutualRecursionB)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional .protobuf_unittest.TestMutualRecursionA a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *a_);
    }

    // optional int32 optional_int32 = 2;
    if (has_optional_int32()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->optional_int32());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_a()->::protobuf_unittest::TestMutualRecursionA::MergeFrom(from.a());
    }
    if (cached_has_bits & 0x00000002u) {
      optional_int32_ = from.optional_int32_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestMutualRecursionB::CopyFrom(const TestMutualRecursionB& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMutualRecursionB)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestMutualRecursionB::Swap(TestMutualRecursionB* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestMutualRecursionB* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestMutualRecursionB::UnsafeArenaSwap(TestMutualRecursionB* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestMutualRecursionB::InternalSwap(TestMutualRecursionB* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(optional_int32_, other->optional_int32_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestIsInitialized_SubMessage_SubGroup::TestIsInitialized_SubMessage_SubGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage_SubGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
}
TestIsInitialized_SubMessage_SubGroup::TestIsInitialized_SubMessage_SubGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage_SubGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
}
TestIsInitialized_SubMessage_SubGroup::TestIsInitialized_SubMessage_SubGroup(const TestIsInitialized_SubMessage_SubGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  i_ = from.i_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
}

void TestIsInitialized_SubMessage_SubGroup::SharedCtor() {
  i_ = 0;
}

TestIsInitialized_SubMessage_SubGroup::~TestIsInitialized_SubMessage_SubGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  SharedDtor();
}

void TestIsInitialized_SubMessage_SubGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestIsInitialized_SubMessage_SubGroup::ArenaDtor(void* object) {
  TestIsInitialized_SubMessage_SubGroup* _this = reinterpret_cast< TestIsInitialized_SubMessage_SubGroup* >(object);
  (void)_this;
}
void TestIsInitialized_SubMessage_SubGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestIsInitialized_SubMessage_SubGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestIsInitialized_SubMessage_SubGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestIsInitialized_SubMessage_SubGroup& TestIsInitialized_SubMessage_SubGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage_SubGroup.base);
  return *internal_default_instance();
}


void TestIsInitialized_SubMessage_SubGroup::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  i_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestIsInitialized_SubMessage_SubGroup::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:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  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)) {
      // required int32 i = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          set_has_i();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &i_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  return false;
#undef DO_
}

void TestIsInitialized_SubMessage_SubGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required int32 i = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->i(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
}

::google::protobuf::uint8* TestIsInitialized_SubMessage_SubGroup::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required int32 i = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->i(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  return target;
}

size_t TestIsInitialized_SubMessage_SubGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // required int32 i = 2;
  if (has_i()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->i());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void TestIsInitialized_SubMessage_SubGroup::MergeFrom(const TestIsInitialized_SubMessage_SubGroup& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  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_i()) {
    set_i(from.i());
  }
}

void TestIsInitialized_SubMessage_SubGroup::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestIsInitialized_SubMessage_SubGroup::CopyFrom(const TestIsInitialized_SubMessage_SubGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestIsInitialized_SubMessage_SubGroup::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  return true;
}

void TestIsInitialized_SubMessage_SubGroup::Swap(TestIsInitialized_SubMessage_SubGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestIsInitialized_SubMessage_SubGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestIsInitialized_SubMessage_SubGroup::UnsafeArenaSwap(TestIsInitialized_SubMessage_SubGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestIsInitialized_SubMessage_SubGroup::InternalSwap(TestIsInitialized_SubMessage_SubGroup* other) {
  using std::swap;
  swap(i_, other->i_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestIsInitialized_SubMessage::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestIsInitialized_SubMessage_default_instance_._instance.get_mutable()->subgroup_ = const_cast< ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup*>(
      ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup::internal_default_instance());
}
void TestIsInitialized_SubMessage::unsafe_arena_set_allocated_subgroup(
    ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup* subgroup) {
  if (GetArenaNoVirtual() == NULL) {
    delete subgroup_;
  }
  subgroup_ = subgroup;
  if (subgroup) {
    set_has_subgroup();
  } else {
    clear_has_subgroup();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestIsInitialized.SubMessage.subgroup)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestIsInitialized_SubMessage::kSubgroupFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestIsInitialized_SubMessage::TestIsInitialized_SubMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestIsInitialized.SubMessage)
}
TestIsInitialized_SubMessage::TestIsInitialized_SubMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestIsInitialized.SubMessage)
}
TestIsInitialized_SubMessage::TestIsInitialized_SubMessage(const TestIsInitialized_SubMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_subgroup()) {
    subgroup_ = new ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup(*from.subgroup_);
  } else {
    subgroup_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestIsInitialized.SubMessage)
}

void TestIsInitialized_SubMessage::SharedCtor() {
  subgroup_ = NULL;
}

TestIsInitialized_SubMessage::~TestIsInitialized_SubMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestIsInitialized.SubMessage)
  SharedDtor();
}

void TestIsInitialized_SubMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete subgroup_;
}

void TestIsInitialized_SubMessage::ArenaDtor(void* object) {
  TestIsInitialized_SubMessage* _this = reinterpret_cast< TestIsInitialized_SubMessage* >(object);
  (void)_this;
}
void TestIsInitialized_SubMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestIsInitialized_SubMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestIsInitialized_SubMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestIsInitialized_SubMessage& TestIsInitialized_SubMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(subgroup_ != NULL);
    subgroup_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestIsInitialized_SubMessage::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:protobuf_unittest.TestIsInitialized.SubMessage)
  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)) {
      // optional group SubGroup = 1 { ... };
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(11u /* 11 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                1, input, mutable_subgroup()));
        } 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:protobuf_unittest.TestIsInitialized.SubMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestIsInitialized.SubMessage)
  return false;
#undef DO_
}

void TestIsInitialized_SubMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestIsInitialized.SubMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional group SubGroup = 1 { ... };
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      1, this->_internal_subgroup(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestIsInitialized.SubMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional group SubGroup = 1 { ... };
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        1, this->_internal_subgroup(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestIsInitialized.SubMessage)
  return target;
}

size_t TestIsInitialized_SubMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestIsInitialized.SubMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional group SubGroup = 1 { ... };
  if (has_subgroup()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::GroupSize(
        *subgroup_);
  }

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

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

void TestIsInitialized_SubMessage::MergeFrom(const TestIsInitialized_SubMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestIsInitialized.SubMessage)
  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_subgroup()) {
    mutable_subgroup()->::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup::MergeFrom(from.subgroup());
  }
}

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

void TestIsInitialized_SubMessage::CopyFrom(const TestIsInitialized_SubMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestIsInitialized.SubMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestIsInitialized_SubMessage::IsInitialized() const {
  if (has_subgroup()) {
    if (!this->subgroup_->IsInitialized()) return false;
  }
  return true;
}

void TestIsInitialized_SubMessage::Swap(TestIsInitialized_SubMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestIsInitialized_SubMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestIsInitialized_SubMessage::UnsafeArenaSwap(TestIsInitialized_SubMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestIsInitialized_SubMessage::InternalSwap(TestIsInitialized_SubMessage* other) {
  using std::swap;
  swap(subgroup_, other->subgroup_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestIsInitialized::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestIsInitialized_default_instance_._instance.get_mutable()->sub_message_ = const_cast< ::protobuf_unittest::TestIsInitialized_SubMessage*>(
      ::protobuf_unittest::TestIsInitialized_SubMessage::internal_default_instance());
}
void TestIsInitialized::unsafe_arena_set_allocated_sub_message(
    ::protobuf_unittest::TestIsInitialized_SubMessage* sub_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete sub_message_;
  }
  sub_message_ = sub_message;
  if (sub_message) {
    set_has_sub_message();
  } else {
    clear_has_sub_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestIsInitialized.sub_message)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestIsInitialized::kSubMessageFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestIsInitialized::TestIsInitialized()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestIsInitialized)
}
TestIsInitialized::TestIsInitialized(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestIsInitialized)
}
TestIsInitialized::TestIsInitialized(const TestIsInitialized& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_sub_message()) {
    sub_message_ = new ::protobuf_unittest::TestIsInitialized_SubMessage(*from.sub_message_);
  } else {
    sub_message_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestIsInitialized)
}

void TestIsInitialized::SharedCtor() {
  sub_message_ = NULL;
}

TestIsInitialized::~TestIsInitialized() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestIsInitialized)
  SharedDtor();
}

void TestIsInitialized::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete sub_message_;
}

void TestIsInitialized::ArenaDtor(void* object) {
  TestIsInitialized* _this = reinterpret_cast< TestIsInitialized* >(object);
  (void)_this;
}
void TestIsInitialized::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestIsInitialized::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestIsInitialized::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestIsInitialized& TestIsInitialized::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(sub_message_ != NULL);
    sub_message_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestIsInitialized::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:protobuf_unittest.TestIsInitialized)
  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)) {
      // optional .protobuf_unittest.TestIsInitialized.SubMessage sub_message = 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_sub_message()));
        } 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:protobuf_unittest.TestIsInitialized)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestIsInitialized)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestIsInitialized.SubMessage sub_message = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_sub_message(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestIsInitialized)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestIsInitialized.SubMessage sub_message = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_sub_message(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestIsInitialized)
  return target;
}

size_t TestIsInitialized::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestIsInitialized)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestIsInitialized.SubMessage sub_message = 1;
  if (has_sub_message()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *sub_message_);
  }

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

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

void TestIsInitialized::MergeFrom(const TestIsInitialized& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestIsInitialized)
  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_sub_message()) {
    mutable_sub_message()->::protobuf_unittest::TestIsInitialized_SubMessage::MergeFrom(from.sub_message());
  }
}

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

void TestIsInitialized::CopyFrom(const TestIsInitialized& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestIsInitialized)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestIsInitialized::IsInitialized() const {
  if (has_sub_message()) {
    if (!this->sub_message_->IsInitialized()) return false;
  }
  return true;
}

void TestIsInitialized::Swap(TestIsInitialized* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestIsInitialized* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestIsInitialized::UnsafeArenaSwap(TestIsInitialized* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestIsInitialized::InternalSwap(TestIsInitialized* other) {
  using std::swap;
  swap(sub_message_, other->sub_message_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestDupFieldNumber_Foo::TestDupFieldNumber_Foo()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Foo.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestDupFieldNumber.Foo)
}
TestDupFieldNumber_Foo::TestDupFieldNumber_Foo(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Foo.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDupFieldNumber.Foo)
}
TestDupFieldNumber_Foo::TestDupFieldNumber_Foo(const TestDupFieldNumber_Foo& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDupFieldNumber.Foo)
}

void TestDupFieldNumber_Foo::SharedCtor() {
  a_ = 0;
}

TestDupFieldNumber_Foo::~TestDupFieldNumber_Foo() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestDupFieldNumber.Foo)
  SharedDtor();
}

void TestDupFieldNumber_Foo::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestDupFieldNumber_Foo::ArenaDtor(void* object) {
  TestDupFieldNumber_Foo* _this = reinterpret_cast< TestDupFieldNumber_Foo* >(object);
  (void)_this;
}
void TestDupFieldNumber_Foo::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestDupFieldNumber_Foo::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestDupFieldNumber_Foo::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestDupFieldNumber_Foo& TestDupFieldNumber_Foo::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Foo.base);
  return *internal_default_instance();
}


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

  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestDupFieldNumber_Foo::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:protobuf_unittest.TestDupFieldNumber.Foo)
  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)) {
      // optional int32 a = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDupFieldNumber.Foo)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDupFieldNumber.Foo)
  return false;
#undef DO_
}

void TestDupFieldNumber_Foo::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDupFieldNumber.Foo)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->a(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDupFieldNumber.Foo)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->a(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDupFieldNumber.Foo)
  return target;
}

size_t TestDupFieldNumber_Foo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDupFieldNumber.Foo)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 a = 1;
  if (has_a()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->a());
  }

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

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

void TestDupFieldNumber_Foo::MergeFrom(const TestDupFieldNumber_Foo& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDupFieldNumber.Foo)
  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_a()) {
    set_a(from.a());
  }
}

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

void TestDupFieldNumber_Foo::CopyFrom(const TestDupFieldNumber_Foo& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDupFieldNumber.Foo)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestDupFieldNumber_Foo::Swap(TestDupFieldNumber_Foo* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestDupFieldNumber_Foo* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestDupFieldNumber_Foo::UnsafeArenaSwap(TestDupFieldNumber_Foo* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestDupFieldNumber_Foo::InternalSwap(TestDupFieldNumber_Foo* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestDupFieldNumber_Bar::TestDupFieldNumber_Bar()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Bar.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestDupFieldNumber.Bar)
}
TestDupFieldNumber_Bar::TestDupFieldNumber_Bar(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Bar.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDupFieldNumber.Bar)
}
TestDupFieldNumber_Bar::TestDupFieldNumber_Bar(const TestDupFieldNumber_Bar& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDupFieldNumber.Bar)
}

void TestDupFieldNumber_Bar::SharedCtor() {
  a_ = 0;
}

TestDupFieldNumber_Bar::~TestDupFieldNumber_Bar() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestDupFieldNumber.Bar)
  SharedDtor();
}

void TestDupFieldNumber_Bar::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestDupFieldNumber_Bar::ArenaDtor(void* object) {
  TestDupFieldNumber_Bar* _this = reinterpret_cast< TestDupFieldNumber_Bar* >(object);
  (void)_this;
}
void TestDupFieldNumber_Bar::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestDupFieldNumber_Bar::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestDupFieldNumber_Bar::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestDupFieldNumber_Bar& TestDupFieldNumber_Bar::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Bar.base);
  return *internal_default_instance();
}


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

  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestDupFieldNumber_Bar::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:protobuf_unittest.TestDupFieldNumber.Bar)
  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)) {
      // optional int32 a = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDupFieldNumber.Bar)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDupFieldNumber.Bar)
  return false;
#undef DO_
}

void TestDupFieldNumber_Bar::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDupFieldNumber.Bar)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->a(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDupFieldNumber.Bar)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->a(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDupFieldNumber.Bar)
  return target;
}

size_t TestDupFieldNumber_Bar::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDupFieldNumber.Bar)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 a = 1;
  if (has_a()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->a());
  }

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

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

void TestDupFieldNumber_Bar::MergeFrom(const TestDupFieldNumber_Bar& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDupFieldNumber.Bar)
  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_a()) {
    set_a(from.a());
  }
}

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

void TestDupFieldNumber_Bar::CopyFrom(const TestDupFieldNumber_Bar& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDupFieldNumber.Bar)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestDupFieldNumber_Bar::Swap(TestDupFieldNumber_Bar* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestDupFieldNumber_Bar* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestDupFieldNumber_Bar::UnsafeArenaSwap(TestDupFieldNumber_Bar* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestDupFieldNumber_Bar::InternalSwap(TestDupFieldNumber_Bar* other) {
  using std::swap;
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestDupFieldNumber::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestDupFieldNumber_default_instance_._instance.get_mutable()->foo_ = const_cast< ::protobuf_unittest::TestDupFieldNumber_Foo*>(
      ::protobuf_unittest::TestDupFieldNumber_Foo::internal_default_instance());
  ::protobuf_unittest::_TestDupFieldNumber_default_instance_._instance.get_mutable()->bar_ = const_cast< ::protobuf_unittest::TestDupFieldNumber_Bar*>(
      ::protobuf_unittest::TestDupFieldNumber_Bar::internal_default_instance());
}
void TestDupFieldNumber::unsafe_arena_set_allocated_foo(
    ::protobuf_unittest::TestDupFieldNumber_Foo* foo) {
  if (GetArenaNoVirtual() == NULL) {
    delete foo_;
  }
  foo_ = foo;
  if (foo) {
    set_has_foo();
  } else {
    clear_has_foo();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestDupFieldNumber.foo)
}
void TestDupFieldNumber::unsafe_arena_set_allocated_bar(
    ::protobuf_unittest::TestDupFieldNumber_Bar* bar) {
  if (GetArenaNoVirtual() == NULL) {
    delete bar_;
  }
  bar_ = bar;
  if (bar) {
    set_has_bar();
  } else {
    clear_has_bar();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestDupFieldNumber.bar)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestDupFieldNumber::kAFieldNumber;
const int TestDupFieldNumber::kFooFieldNumber;
const int TestDupFieldNumber::kBarFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestDupFieldNumber::TestDupFieldNumber()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestDupFieldNumber)
}
TestDupFieldNumber::TestDupFieldNumber(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDupFieldNumber)
}
TestDupFieldNumber::TestDupFieldNumber(const TestDupFieldNumber& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_foo()) {
    foo_ = new ::protobuf_unittest::TestDupFieldNumber_Foo(*from.foo_);
  } else {
    foo_ = NULL;
  }
  if (from.has_bar()) {
    bar_ = new ::protobuf_unittest::TestDupFieldNumber_Bar(*from.bar_);
  } else {
    bar_ = NULL;
  }
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDupFieldNumber)
}

void TestDupFieldNumber::SharedCtor() {
  ::memset(&foo_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&a_) -
      reinterpret_cast<char*>(&foo_)) + sizeof(a_));
}

TestDupFieldNumber::~TestDupFieldNumber() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestDupFieldNumber)
  SharedDtor();
}

void TestDupFieldNumber::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete foo_;
  if (this != internal_default_instance()) delete bar_;
}

void TestDupFieldNumber::ArenaDtor(void* object) {
  TestDupFieldNumber* _this = reinterpret_cast< TestDupFieldNumber* >(object);
  (void)_this;
}
void TestDupFieldNumber::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestDupFieldNumber::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestDupFieldNumber::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestDupFieldNumber& TestDupFieldNumber::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(foo_ != NULL);
      foo_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(bar_ != NULL);
      bar_->Clear();
    }
  }
  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestDupFieldNumber::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:protobuf_unittest.TestDupFieldNumber)
  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)) {
      // optional int32 a = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional group Foo = 2 { ... };
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(19u /* 19 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                2, input, mutable_foo()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional group Bar = 3 { ... };
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(27u /* 27 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                3, input, mutable_bar()));
        } 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:protobuf_unittest.TestDupFieldNumber)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDupFieldNumber)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 1;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->a(), output);
  }

  // optional group Foo = 2 { ... };
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      2, this->_internal_foo(), output);
  }

  // optional group Bar = 3 { ... };
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      3, this->_internal_bar(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDupFieldNumber)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 1;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->a(), target);
  }

  // optional group Foo = 2 { ... };
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        2, this->_internal_foo(), deterministic, target);
  }

  // optional group Bar = 3 { ... };
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        3, this->_internal_bar(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDupFieldNumber)
  return target;
}

size_t TestDupFieldNumber::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDupFieldNumber)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 7u) {
    // optional group Foo = 2 { ... };
    if (has_foo()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *foo_);
    }

    // optional group Bar = 3 { ... };
    if (has_bar()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *bar_);
    }

    // optional int32 a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->a());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 7u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_foo()->::protobuf_unittest::TestDupFieldNumber_Foo::MergeFrom(from.foo());
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_bar()->::protobuf_unittest::TestDupFieldNumber_Bar::MergeFrom(from.bar());
    }
    if (cached_has_bits & 0x00000004u) {
      a_ = from.a_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestDupFieldNumber::CopyFrom(const TestDupFieldNumber& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDupFieldNumber)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestDupFieldNumber::Swap(TestDupFieldNumber* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestDupFieldNumber* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestDupFieldNumber::UnsafeArenaSwap(TestDupFieldNumber* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestDupFieldNumber::InternalSwap(TestDupFieldNumber* other) {
  using std::swap;
  swap(foo_, other->foo_);
  swap(bar_, other->bar_);
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestEagerMessage::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestEagerMessage_default_instance_._instance.get_mutable()->sub_message_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
}
void TestEagerMessage::unsafe_arena_set_allocated_sub_message(
    ::protobuf_unittest::TestAllTypes* sub_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete sub_message_;
  }
  sub_message_ = sub_message;
  if (sub_message) {
    set_has_sub_message();
  } else {
    clear_has_sub_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestEagerMessage.sub_message)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestEagerMessage::kSubMessageFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestEagerMessage::TestEagerMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEagerMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestEagerMessage)
}
TestEagerMessage::TestEagerMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEagerMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestEagerMessage)
}
TestEagerMessage::TestEagerMessage(const TestEagerMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_sub_message()) {
    sub_message_ = new ::protobuf_unittest::TestAllTypes(*from.sub_message_);
  } else {
    sub_message_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestEagerMessage)
}

void TestEagerMessage::SharedCtor() {
  sub_message_ = NULL;
}

TestEagerMessage::~TestEagerMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestEagerMessage)
  SharedDtor();
}

void TestEagerMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete sub_message_;
}

void TestEagerMessage::ArenaDtor(void* object) {
  TestEagerMessage* _this = reinterpret_cast< TestEagerMessage* >(object);
  (void)_this;
}
void TestEagerMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestEagerMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestEagerMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestEagerMessage& TestEagerMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEagerMessage.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(sub_message_ != NULL);
    sub_message_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestEagerMessage::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:protobuf_unittest.TestEagerMessage)
  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)) {
      // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = false];
      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_sub_message()));
        } 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:protobuf_unittest.TestEagerMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestEagerMessage)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = false];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_sub_message(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestEagerMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = false];
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_sub_message(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestEagerMessage)
  return target;
}

size_t TestEagerMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestEagerMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = false];
  if (has_sub_message()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *sub_message_);
  }

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

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

void TestEagerMessage::MergeFrom(const TestEagerMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestEagerMessage)
  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_sub_message()) {
    mutable_sub_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.sub_message());
  }
}

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

void TestEagerMessage::CopyFrom(const TestEagerMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestEagerMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestEagerMessage::Swap(TestEagerMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestEagerMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestEagerMessage::UnsafeArenaSwap(TestEagerMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestEagerMessage::InternalSwap(TestEagerMessage* other) {
  using std::swap;
  swap(sub_message_, other->sub_message_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestLazyMessage::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestLazyMessage_default_instance_._instance.get_mutable()->sub_message_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
}
void TestLazyMessage::unsafe_arena_set_allocated_sub_message(
    ::protobuf_unittest::TestAllTypes* sub_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete sub_message_;
  }
  sub_message_ = sub_message;
  if (sub_message) {
    set_has_sub_message();
  } else {
    clear_has_sub_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestLazyMessage.sub_message)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestLazyMessage::kSubMessageFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestLazyMessage::TestLazyMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestLazyMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestLazyMessage)
}
TestLazyMessage::TestLazyMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestLazyMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestLazyMessage)
}
TestLazyMessage::TestLazyMessage(const TestLazyMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_sub_message()) {
    sub_message_ = new ::protobuf_unittest::TestAllTypes(*from.sub_message_);
  } else {
    sub_message_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestLazyMessage)
}

void TestLazyMessage::SharedCtor() {
  sub_message_ = NULL;
}

TestLazyMessage::~TestLazyMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestLazyMessage)
  SharedDtor();
}

void TestLazyMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete sub_message_;
}

void TestLazyMessage::ArenaDtor(void* object) {
  TestLazyMessage* _this = reinterpret_cast< TestLazyMessage* >(object);
  (void)_this;
}
void TestLazyMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestLazyMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestLazyMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestLazyMessage& TestLazyMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestLazyMessage.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(sub_message_ != NULL);
    sub_message_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestLazyMessage::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:protobuf_unittest.TestLazyMessage)
  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)) {
      // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = true];
      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_sub_message()));
        } 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:protobuf_unittest.TestLazyMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestLazyMessage)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = true];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_sub_message(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestLazyMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = true];
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_sub_message(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestLazyMessage)
  return target;
}

size_t TestLazyMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestLazyMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = true];
  if (has_sub_message()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *sub_message_);
  }

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

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

void TestLazyMessage::MergeFrom(const TestLazyMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestLazyMessage)
  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_sub_message()) {
    mutable_sub_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.sub_message());
  }
}

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

void TestLazyMessage::CopyFrom(const TestLazyMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestLazyMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestLazyMessage::Swap(TestLazyMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestLazyMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestLazyMessage::UnsafeArenaSwap(TestLazyMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestLazyMessage::InternalSwap(TestLazyMessage* other) {
  using std::swap;
  swap(sub_message_, other->sub_message_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestNestedMessageHasBits_NestedMessage::TestNestedMessageHasBits_NestedMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits_NestedMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
}
TestNestedMessageHasBits_NestedMessage::TestNestedMessageHasBits_NestedMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  nestedmessage_repeated_int32_(arena),
  nestedmessage_repeated_foreignmessage_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits_NestedMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
}
TestNestedMessageHasBits_NestedMessage::TestNestedMessageHasBits_NestedMessage(const TestNestedMessageHasBits_NestedMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      nestedmessage_repeated_int32_(from.nestedmessage_repeated_int32_),
      nestedmessage_repeated_foreignmessage_(from.nestedmessage_repeated_foreignmessage_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
}

void TestNestedMessageHasBits_NestedMessage::SharedCtor() {
}

TestNestedMessageHasBits_NestedMessage::~TestNestedMessageHasBits_NestedMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  SharedDtor();
}

void TestNestedMessageHasBits_NestedMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestNestedMessageHasBits_NestedMessage::ArenaDtor(void* object) {
  TestNestedMessageHasBits_NestedMessage* _this = reinterpret_cast< TestNestedMessageHasBits_NestedMessage* >(object);
  (void)_this;
}
void TestNestedMessageHasBits_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestNestedMessageHasBits_NestedMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestNestedMessageHasBits_NestedMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestNestedMessageHasBits_NestedMessage& TestNestedMessageHasBits_NestedMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits_NestedMessage.base);
  return *internal_default_instance();
}


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

  nestedmessage_repeated_int32_.Clear();
  nestedmessage_repeated_foreignmessage_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestNestedMessageHasBits_NestedMessage::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:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated int32 nestedmessage_repeated_int32 = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 8u, input, this->mutable_nestedmessage_repeated_int32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_nestedmessage_repeated_int32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 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, add_nestedmessage_repeated_foreignmessage()));
        } 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:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  return false;
#undef DO_
}

void TestNestedMessageHasBits_NestedMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int32 nestedmessage_repeated_int32 = 1;
  for (int i = 0, n = this->nestedmessage_repeated_int32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      1, this->nestedmessage_repeated_int32(i), output);
  }

  // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->nestedmessage_repeated_foreignmessage_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2,
      this->nestedmessage_repeated_foreignmessage(static_cast<int>(i)),
      output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
}

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

  // repeated int32 nestedmessage_repeated_int32 = 1;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt32ToArray(1, this->nestedmessage_repeated_int32_, target);

  // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->nestedmessage_repeated_foreignmessage_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->nestedmessage_repeated_foreignmessage(static_cast<int>(i)), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  return target;
}

size_t TestNestedMessageHasBits_NestedMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated int32 nestedmessage_repeated_int32 = 1;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->nestedmessage_repeated_int32_);
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->nestedmessage_repeated_int32_size());
    total_size += data_size;
  }

  // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->nestedmessage_repeated_foreignmessage_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->nestedmessage_repeated_foreignmessage(static_cast<int>(i)));
    }
  }

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

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

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

  nestedmessage_repeated_int32_.MergeFrom(from.nestedmessage_repeated_int32_);
  nestedmessage_repeated_foreignmessage_.MergeFrom(from.nestedmessage_repeated_foreignmessage_);
}

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

void TestNestedMessageHasBits_NestedMessage::CopyFrom(const TestNestedMessageHasBits_NestedMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestNestedMessageHasBits_NestedMessage::Swap(TestNestedMessageHasBits_NestedMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestNestedMessageHasBits_NestedMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestNestedMessageHasBits_NestedMessage::UnsafeArenaSwap(TestNestedMessageHasBits_NestedMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestNestedMessageHasBits_NestedMessage::InternalSwap(TestNestedMessageHasBits_NestedMessage* other) {
  using std::swap;
  nestedmessage_repeated_int32_.InternalSwap(&other->nestedmessage_repeated_int32_);
  CastToBase(&nestedmessage_repeated_foreignmessage_)->InternalSwap(CastToBase(&other->nestedmessage_repeated_foreignmessage_));
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestNestedMessageHasBits::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestNestedMessageHasBits_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage*>(
      ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage::internal_default_instance());
}
void TestNestedMessageHasBits::unsafe_arena_set_allocated_optional_nested_message(
    ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage* optional_nested_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_nested_message_;
  }
  optional_nested_message_ = optional_nested_message;
  if (optional_nested_message) {
    set_has_optional_nested_message();
  } else {
    clear_has_optional_nested_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestNestedMessageHasBits.optional_nested_message)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestNestedMessageHasBits::kOptionalNestedMessageFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestNestedMessageHasBits::TestNestedMessageHasBits()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestNestedMessageHasBits)
}
TestNestedMessageHasBits::TestNestedMessageHasBits(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestNestedMessageHasBits)
}
TestNestedMessageHasBits::TestNestedMessageHasBits(const TestNestedMessageHasBits& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_optional_nested_message()) {
    optional_nested_message_ = new ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage(*from.optional_nested_message_);
  } else {
    optional_nested_message_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestNestedMessageHasBits)
}

void TestNestedMessageHasBits::SharedCtor() {
  optional_nested_message_ = NULL;
}

TestNestedMessageHasBits::~TestNestedMessageHasBits() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestNestedMessageHasBits)
  SharedDtor();
}

void TestNestedMessageHasBits::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete optional_nested_message_;
}

void TestNestedMessageHasBits::ArenaDtor(void* object) {
  TestNestedMessageHasBits* _this = reinterpret_cast< TestNestedMessageHasBits* >(object);
  (void)_this;
}
void TestNestedMessageHasBits::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestNestedMessageHasBits::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestNestedMessageHasBits::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestNestedMessageHasBits& TestNestedMessageHasBits::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(optional_nested_message_ != NULL);
    optional_nested_message_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestNestedMessageHasBits::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:protobuf_unittest.TestNestedMessageHasBits)
  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)) {
      // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 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_optional_nested_message()));
        } 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:protobuf_unittest.TestNestedMessageHasBits)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestNestedMessageHasBits)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_optional_nested_message(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestNestedMessageHasBits)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_optional_nested_message(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestNestedMessageHasBits)
  return target;
}

size_t TestNestedMessageHasBits::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestNestedMessageHasBits)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
  if (has_optional_nested_message()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *optional_nested_message_);
  }

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

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

void TestNestedMessageHasBits::MergeFrom(const TestNestedMessageHasBits& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestNestedMessageHasBits)
  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_optional_nested_message()) {
    mutable_optional_nested_message()->::protobuf_unittest::TestNestedMessageHasBits_NestedMessage::MergeFrom(from.optional_nested_message());
  }
}

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

void TestNestedMessageHasBits::CopyFrom(const TestNestedMessageHasBits& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestNestedMessageHasBits)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestNestedMessageHasBits::Swap(TestNestedMessageHasBits* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestNestedMessageHasBits* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestNestedMessageHasBits::UnsafeArenaSwap(TestNestedMessageHasBits* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestNestedMessageHasBits::InternalSwap(TestNestedMessageHasBits* other) {
  using std::swap;
  swap(optional_nested_message_, other->optional_nested_message_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestCamelCaseFieldNames::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestCamelCaseFieldNames_default_instance_._instance.get_mutable()->messagefield_ = const_cast< ::protobuf_unittest::ForeignMessage*>(
      ::protobuf_unittest::ForeignMessage::internal_default_instance());
}
void TestCamelCaseFieldNames::unsafe_arena_set_allocated_messagefield(
    ::protobuf_unittest::ForeignMessage* messagefield) {
  if (GetArenaNoVirtual() == NULL) {
    delete messagefield_;
  }
  messagefield_ = messagefield;
  if (messagefield) {
    set_has_messagefield();
  } else {
    clear_has_messagefield();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestCamelCaseFieldNames.MessageField)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestCamelCaseFieldNames::kPrimitiveFieldFieldNumber;
const int TestCamelCaseFieldNames::kStringFieldFieldNumber;
const int TestCamelCaseFieldNames::kEnumFieldFieldNumber;
const int TestCamelCaseFieldNames::kMessageFieldFieldNumber;
const int TestCamelCaseFieldNames::kStringPieceFieldFieldNumber;
const int TestCamelCaseFieldNames::kCordFieldFieldNumber;
const int TestCamelCaseFieldNames::kRepeatedPrimitiveFieldFieldNumber;
const int TestCamelCaseFieldNames::kRepeatedStringFieldFieldNumber;
const int TestCamelCaseFieldNames::kRepeatedEnumFieldFieldNumber;
const int TestCamelCaseFieldNames::kRepeatedMessageFieldFieldNumber;
const int TestCamelCaseFieldNames::kRepeatedStringPieceFieldFieldNumber;
const int TestCamelCaseFieldNames::kRepeatedCordFieldFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestCamelCaseFieldNames::TestCamelCaseFieldNames()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCamelCaseFieldNames.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestCamelCaseFieldNames)
}
TestCamelCaseFieldNames::TestCamelCaseFieldNames(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  repeatedprimitivefield_(arena),
  repeatedstringfield_(arena),
  repeatedenumfield_(arena),
  repeatedmessagefield_(arena),
  repeatedstringpiecefield_(arena),
  repeatedcordfield_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCamelCaseFieldNames.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestCamelCaseFieldNames)
}
TestCamelCaseFieldNames::TestCamelCaseFieldNames(const TestCamelCaseFieldNames& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      repeatedprimitivefield_(from.repeatedprimitivefield_),
      repeatedstringfield_(from.repeatedstringfield_),
      repeatedenumfield_(from.repeatedenumfield_),
      repeatedmessagefield_(from.repeatedmessagefield_),
      repeatedstringpiecefield_(from.repeatedstringpiecefield_),
      repeatedcordfield_(from.repeatedcordfield_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  stringfield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_stringfield()) {
    stringfield_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stringfield(),
      GetArenaNoVirtual());
  }
  stringpiecefield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_stringpiecefield()) {
    stringpiecefield_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stringpiecefield(),
      GetArenaNoVirtual());
  }
  cordfield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_cordfield()) {
    cordfield_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cordfield(),
      GetArenaNoVirtual());
  }
  if (from.has_messagefield()) {
    messagefield_ = new ::protobuf_unittest::ForeignMessage(*from.messagefield_);
  } else {
    messagefield_ = NULL;
  }
  ::memcpy(&primitivefield_, &from.primitivefield_,
    static_cast<size_t>(reinterpret_cast<char*>(&enumfield_) -
    reinterpret_cast<char*>(&primitivefield_)) + sizeof(enumfield_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestCamelCaseFieldNames)
}

void TestCamelCaseFieldNames::SharedCtor() {
  stringfield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stringpiecefield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  cordfield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&messagefield_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&primitivefield_) -
      reinterpret_cast<char*>(&messagefield_)) + sizeof(primitivefield_));
  enumfield_ = 4;
}

TestCamelCaseFieldNames::~TestCamelCaseFieldNames() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestCamelCaseFieldNames)
  SharedDtor();
}

void TestCamelCaseFieldNames::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  stringfield_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stringpiecefield_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  cordfield_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete messagefield_;
}

void TestCamelCaseFieldNames::ArenaDtor(void* object) {
  TestCamelCaseFieldNames* _this = reinterpret_cast< TestCamelCaseFieldNames* >(object);
  (void)_this;
}
void TestCamelCaseFieldNames::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestCamelCaseFieldNames::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestCamelCaseFieldNames::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestCamelCaseFieldNames& TestCamelCaseFieldNames::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCamelCaseFieldNames.base);
  return *internal_default_instance();
}


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

  repeatedprimitivefield_.Clear();
  repeatedstringfield_.Clear();
  repeatedenumfield_.Clear();
  repeatedmessagefield_.Clear();
  repeatedstringpiecefield_.Clear();
  repeatedcordfield_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 15u) {
    if (cached_has_bits & 0x00000001u) {
      stringfield_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      stringpiecefield_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      cordfield_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(messagefield_ != NULL);
      messagefield_->Clear();
    }
  }
  if (cached_has_bits & 48u) {
    primitivefield_ = 0;
    enumfield_ = 4;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestCamelCaseFieldNames::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:protobuf_unittest.TestCamelCaseFieldNames)
  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)) {
      // optional int32 PrimitiveField = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_primitivefield();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &primitivefield_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string StringField = 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_stringfield()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->stringfield().data(), static_cast<int>(this->stringfield().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestCamelCaseFieldNames.StringField");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ForeignEnum EnumField = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
            set_enumfield(static_cast< ::protobuf_unittest::ForeignEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                3, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ForeignMessage MessageField = 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_messagefield()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string StringPieceField = 5 [ctype = STRING_PIECE];
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_stringpiecefield()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->stringpiecefield().data(), static_cast<int>(this->stringpiecefield().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestCamelCaseFieldNames.StringPieceField");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string CordField = 6 [ctype = CORD];
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_cordfield()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->cordfield().data(), static_cast<int>(this->cordfield().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestCamelCaseFieldNames.CordField");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 RepeatedPrimitiveField = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 56u, input, this->mutable_repeatedprimitivefield())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_repeatedprimitivefield())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string RepeatedStringField = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_repeatedstringfield()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->repeatedstringfield(this->repeatedstringfield_size() - 1).data(),
            static_cast<int>(this->repeatedstringfield(this->repeatedstringfield_size() - 1).length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringField");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
            add_repeatedenumfield(static_cast< ::protobuf_unittest::ForeignEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                9, static_cast< ::google::protobuf::uint64>(value));
          }
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
                 input,
                 9,
                 ::protobuf_unittest::ForeignEnum_IsValid,
                 mutable_unknown_fields(),
                 this->mutable_repeatedenumfield())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 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, add_repeatedmessagefield()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_repeatedstringpiecefield()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->repeatedstringpiecefield(this->repeatedstringpiecefield_size() - 1).data(),
            static_cast<int>(this->repeatedstringpiecefield(this->repeatedstringpiecefield_size() - 1).length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringPieceField");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string RepeatedCordField = 12 [ctype = CORD];
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_repeatedcordfield()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->repeatedcordfield(this->repeatedcordfield_size() - 1).data(),
            static_cast<int>(this->repeatedcordfield(this->repeatedcordfield_size() - 1).length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestCamelCaseFieldNames.RepeatedCordField");
        } 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:protobuf_unittest.TestCamelCaseFieldNames)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestCamelCaseFieldNames)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 PrimitiveField = 1;
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->primitivefield(), output);
  }

  // optional string StringField = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->stringfield().data(), static_cast<int>(this->stringfield().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.StringField");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->stringfield(), output);
  }

  // optional .protobuf_unittest.ForeignEnum EnumField = 3;
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      3, this->enumfield(), output);
  }

  // optional .protobuf_unittest.ForeignMessage MessageField = 4;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, this->_internal_messagefield(), output);
  }

  // optional string StringPieceField = 5 [ctype = STRING_PIECE];
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->stringpiecefield().data(), static_cast<int>(this->stringpiecefield().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.StringPieceField");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      5, this->stringpiecefield(), output);
  }

  // optional string CordField = 6 [ctype = CORD];
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->cordfield().data(), static_cast<int>(this->cordfield().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.CordField");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      6, this->cordfield(), output);
  }

  // repeated int32 RepeatedPrimitiveField = 7;
  for (int i = 0, n = this->repeatedprimitivefield_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      7, this->repeatedprimitivefield(i), output);
  }

  // repeated string RepeatedStringField = 8;
  for (int i = 0, n = this->repeatedstringfield_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeatedstringfield(i).data(), static_cast<int>(this->repeatedstringfield(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringField");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      8, this->repeatedstringfield(i), output);
  }

  // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
  for (int i = 0, n = this->repeatedenumfield_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      9, this->repeatedenumfield(i), output);
  }

  // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeatedmessagefield_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      10,
      this->repeatedmessagefield(static_cast<int>(i)),
      output);
  }

  // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
  for (int i = 0, n = this->repeatedstringpiecefield_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeatedstringpiecefield(i).data(), static_cast<int>(this->repeatedstringpiecefield(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringPieceField");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      11, this->repeatedstringpiecefield(i), output);
  }

  // repeated string RepeatedCordField = 12 [ctype = CORD];
  for (int i = 0, n = this->repeatedcordfield_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeatedcordfield(i).data(), static_cast<int>(this->repeatedcordfield(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.RepeatedCordField");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      12, this->repeatedcordfield(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestCamelCaseFieldNames)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 PrimitiveField = 1;
  if (cached_has_bits & 0x00000010u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->primitivefield(), target);
  }

  // optional string StringField = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->stringfield().data(), static_cast<int>(this->stringfield().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.StringField");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->stringfield(), target);
  }

  // optional .protobuf_unittest.ForeignEnum EnumField = 3;
  if (cached_has_bits & 0x00000020u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      3, this->enumfield(), target);
  }

  // optional .protobuf_unittest.ForeignMessage MessageField = 4;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, this->_internal_messagefield(), deterministic, target);
  }

  // optional string StringPieceField = 5 [ctype = STRING_PIECE];
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->stringpiecefield().data(), static_cast<int>(this->stringpiecefield().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.StringPieceField");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        5, this->stringpiecefield(), target);
  }

  // optional string CordField = 6 [ctype = CORD];
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->cordfield().data(), static_cast<int>(this->cordfield().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.CordField");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        6, this->cordfield(), target);
  }

  // repeated int32 RepeatedPrimitiveField = 7;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt32ToArray(7, this->repeatedprimitivefield_, target);

  // repeated string RepeatedStringField = 8;
  for (int i = 0, n = this->repeatedstringfield_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeatedstringfield(i).data(), static_cast<int>(this->repeatedstringfield(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringField");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(8, this->repeatedstringfield(i), target);
  }

  // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
  target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
    9, this->repeatedenumfield_, target);

  // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeatedmessagefield_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        10, this->repeatedmessagefield(static_cast<int>(i)), deterministic, target);
  }

  // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
  for (int i = 0, n = this->repeatedstringpiecefield_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeatedstringpiecefield(i).data(), static_cast<int>(this->repeatedstringpiecefield(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringPieceField");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(11, this->repeatedstringpiecefield(i), target);
  }

  // repeated string RepeatedCordField = 12 [ctype = CORD];
  for (int i = 0, n = this->repeatedcordfield_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeatedcordfield(i).data(), static_cast<int>(this->repeatedcordfield(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCamelCaseFieldNames.RepeatedCordField");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(12, this->repeatedcordfield(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestCamelCaseFieldNames)
  return target;
}

size_t TestCamelCaseFieldNames::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestCamelCaseFieldNames)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated int32 RepeatedPrimitiveField = 7;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->repeatedprimitivefield_);
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->repeatedprimitivefield_size());
    total_size += data_size;
  }

  // repeated string RepeatedStringField = 8;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->repeatedstringfield_size());
  for (int i = 0, n = this->repeatedstringfield_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->repeatedstringfield(i));
  }

  // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
  {
    size_t data_size = 0;
    unsigned int count = static_cast<unsigned int>(this->repeatedenumfield_size());for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
        this->repeatedenumfield(static_cast<int>(i)));
    }
    total_size += (1UL * count) + data_size;
  }

  // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
  {
    unsigned int count = static_cast<unsigned int>(this->repeatedmessagefield_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->repeatedmessagefield(static_cast<int>(i)));
    }
  }

  // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->repeatedstringpiecefield_size());
  for (int i = 0, n = this->repeatedstringpiecefield_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->repeatedstringpiecefield(i));
  }

  // repeated string RepeatedCordField = 12 [ctype = CORD];
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->repeatedcordfield_size());
  for (int i = 0, n = this->repeatedcordfield_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->repeatedcordfield(i));
  }

  if (_has_bits_[0 / 32] & 63u) {
    // optional string StringField = 2;
    if (has_stringfield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->stringfield());
    }

    // optional string StringPieceField = 5 [ctype = STRING_PIECE];
    if (has_stringpiecefield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->stringpiecefield());
    }

    // optional string CordField = 6 [ctype = CORD];
    if (has_cordfield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->cordfield());
    }

    // optional .protobuf_unittest.ForeignMessage MessageField = 4;
    if (has_messagefield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *messagefield_);
    }

    // optional int32 PrimitiveField = 1;
    if (has_primitivefield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->primitivefield());
    }

    // optional .protobuf_unittest.ForeignEnum EnumField = 3;
    if (has_enumfield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->enumfield());
    }

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

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

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

  repeatedprimitivefield_.MergeFrom(from.repeatedprimitivefield_);
  repeatedstringfield_.MergeFrom(from.repeatedstringfield_);
  repeatedenumfield_.MergeFrom(from.repeatedenumfield_);
  repeatedmessagefield_.MergeFrom(from.repeatedmessagefield_);
  repeatedstringpiecefield_.MergeFrom(from.repeatedstringpiecefield_);
  repeatedcordfield_.MergeFrom(from.repeatedcordfield_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 63u) {
    if (cached_has_bits & 0x00000001u) {
      set_stringfield(from.stringfield());
    }
    if (cached_has_bits & 0x00000002u) {
      set_stringpiecefield(from.stringpiecefield());
    }
    if (cached_has_bits & 0x00000004u) {
      set_cordfield(from.cordfield());
    }
    if (cached_has_bits & 0x00000008u) {
      mutable_messagefield()->::protobuf_unittest::ForeignMessage::MergeFrom(from.messagefield());
    }
    if (cached_has_bits & 0x00000010u) {
      primitivefield_ = from.primitivefield_;
    }
    if (cached_has_bits & 0x00000020u) {
      enumfield_ = from.enumfield_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestCamelCaseFieldNames::CopyFrom(const TestCamelCaseFieldNames& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestCamelCaseFieldNames)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestCamelCaseFieldNames::Swap(TestCamelCaseFieldNames* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestCamelCaseFieldNames* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestCamelCaseFieldNames::UnsafeArenaSwap(TestCamelCaseFieldNames* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestCamelCaseFieldNames::InternalSwap(TestCamelCaseFieldNames* other) {
  using std::swap;
  repeatedprimitivefield_.InternalSwap(&other->repeatedprimitivefield_);
  repeatedstringfield_.InternalSwap(CastToBase(&other->repeatedstringfield_));
  repeatedenumfield_.InternalSwap(&other->repeatedenumfield_);
  CastToBase(&repeatedmessagefield_)->InternalSwap(CastToBase(&other->repeatedmessagefield_));
  repeatedstringpiecefield_.InternalSwap(CastToBase(&other->repeatedstringpiecefield_));
  repeatedcordfield_.InternalSwap(CastToBase(&other->repeatedcordfield_));
  stringfield_.Swap(&other->stringfield_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  stringpiecefield_.Swap(&other->stringpiecefield_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  cordfield_.Swap(&other->cordfield_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(messagefield_, other->messagefield_);
  swap(primitivefield_, other->primitivefield_);
  swap(enumfield_, other->enumfield_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestFieldOrderings_NestedMessage::TestFieldOrderings_NestedMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings_NestedMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestFieldOrderings.NestedMessage)
}
TestFieldOrderings_NestedMessage::TestFieldOrderings_NestedMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings_NestedMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestFieldOrderings.NestedMessage)
}
TestFieldOrderings_NestedMessage::TestFieldOrderings_NestedMessage(const TestFieldOrderings_NestedMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&oo_, &from.oo_,
    static_cast<size_t>(reinterpret_cast<char*>(&bb_) -
    reinterpret_cast<char*>(&oo_)) + sizeof(bb_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestFieldOrderings.NestedMessage)
}

void TestFieldOrderings_NestedMessage::SharedCtor() {
  ::memset(&oo_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&bb_) -
      reinterpret_cast<char*>(&oo_)) + sizeof(bb_));
}

TestFieldOrderings_NestedMessage::~TestFieldOrderings_NestedMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestFieldOrderings.NestedMessage)
  SharedDtor();
}

void TestFieldOrderings_NestedMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestFieldOrderings_NestedMessage::ArenaDtor(void* object) {
  TestFieldOrderings_NestedMessage* _this = reinterpret_cast< TestFieldOrderings_NestedMessage* >(object);
  (void)_this;
}
void TestFieldOrderings_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestFieldOrderings_NestedMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestFieldOrderings_NestedMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestFieldOrderings_NestedMessage& TestFieldOrderings_NestedMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings_NestedMessage.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    ::memset(&oo_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&bb_) -
        reinterpret_cast<char*>(&oo_)) + sizeof(bb_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestFieldOrderings_NestedMessage::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:protobuf_unittest.TestFieldOrderings.NestedMessage)
  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)) {
      // optional int32 bb = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_bb();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &bb_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 oo = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          set_has_oo();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &oo_)));
        } 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:protobuf_unittest.TestFieldOrderings.NestedMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestFieldOrderings.NestedMessage)
  return false;
#undef DO_
}

void TestFieldOrderings_NestedMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 bb = 1;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->bb(), output);
  }

  // optional int64 oo = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->oo(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestFieldOrderings.NestedMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 bb = 1;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->bb(), target);
  }

  // optional int64 oo = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->oo(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestFieldOrderings.NestedMessage)
  return target;
}

size_t TestFieldOrderings_NestedMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional int64 oo = 2;
    if (has_oo()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->oo());
    }

    // optional int32 bb = 1;
    if (has_bb()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->bb());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      oo_ = from.oo_;
    }
    if (cached_has_bits & 0x00000002u) {
      bb_ = from.bb_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestFieldOrderings_NestedMessage::CopyFrom(const TestFieldOrderings_NestedMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestFieldOrderings_NestedMessage::Swap(TestFieldOrderings_NestedMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestFieldOrderings_NestedMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestFieldOrderings_NestedMessage::UnsafeArenaSwap(TestFieldOrderings_NestedMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestFieldOrderings_NestedMessage::InternalSwap(TestFieldOrderings_NestedMessage* other) {
  using std::swap;
  swap(oo_, other->oo_);
  swap(bb_, other->bb_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestFieldOrderings::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestFieldOrderings_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::protobuf_unittest::TestFieldOrderings_NestedMessage*>(
      ::protobuf_unittest::TestFieldOrderings_NestedMessage::internal_default_instance());
}
void TestFieldOrderings::unsafe_arena_set_allocated_optional_nested_message(
    ::protobuf_unittest::TestFieldOrderings_NestedMessage* optional_nested_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_nested_message_;
  }
  optional_nested_message_ = optional_nested_message;
  if (optional_nested_message) {
    set_has_optional_nested_message();
  } else {
    clear_has_optional_nested_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestFieldOrderings.optional_nested_message)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestFieldOrderings::kMyStringFieldNumber;
const int TestFieldOrderings::kMyIntFieldNumber;
const int TestFieldOrderings::kMyFloatFieldNumber;
const int TestFieldOrderings::kOptionalNestedMessageFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestFieldOrderings::TestFieldOrderings()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestFieldOrderings)
}
TestFieldOrderings::TestFieldOrderings(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _extensions_(arena),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestFieldOrderings)
}
TestFieldOrderings::TestFieldOrderings(const TestFieldOrderings& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_my_string()) {
    my_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.my_string(),
      GetArenaNoVirtual());
  }
  if (from.has_optional_nested_message()) {
    optional_nested_message_ = new ::protobuf_unittest::TestFieldOrderings_NestedMessage(*from.optional_nested_message_);
  } else {
    optional_nested_message_ = NULL;
  }
  ::memcpy(&my_int_, &from.my_int_,
    static_cast<size_t>(reinterpret_cast<char*>(&my_float_) -
    reinterpret_cast<char*>(&my_int_)) + sizeof(my_float_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestFieldOrderings)
}

void TestFieldOrderings::SharedCtor() {
  my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&optional_nested_message_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&my_float_) -
      reinterpret_cast<char*>(&optional_nested_message_)) + sizeof(my_float_));
}

TestFieldOrderings::~TestFieldOrderings() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestFieldOrderings)
  SharedDtor();
}

void TestFieldOrderings::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  my_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete optional_nested_message_;
}

void TestFieldOrderings::ArenaDtor(void* object) {
  TestFieldOrderings* _this = reinterpret_cast< TestFieldOrderings* >(object);
  (void)_this;
}
void TestFieldOrderings::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestFieldOrderings::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestFieldOrderings::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestFieldOrderings& TestFieldOrderings::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings.base);
  return *internal_default_instance();
}


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

  _extensions_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      my_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(optional_nested_message_ != NULL);
      optional_nested_message_->Clear();
    }
  }
  if (cached_has_bits & 12u) {
    ::memset(&my_int_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&my_float_) -
        reinterpret_cast<char*>(&my_int_)) + sizeof(my_float_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestFieldOrderings::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:protobuf_unittest.TestFieldOrderings)
  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)) {
      // optional int64 my_int = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_my_int();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &my_int_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string my_string = 11;
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_my_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->my_string().data(), static_cast<int>(this->my_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestFieldOrderings.my_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float my_float = 101;
      case 101: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(45u /* 813 & 0xFF */)) {
          set_has_my_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &my_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestFieldOrderings.NestedMessage optional_nested_message = 200;
      case 200: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(66u /* 1602 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_optional_nested_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        if ((16u <= tag && tag < 88u) ||
            (96u <= tag && tag < 808u)) {
          DO_(_extensions_.ParseField(tag, input,
              internal_default_instance(),
              _internal_metadata_.mutable_unknown_fields()));
          continue;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestFieldOrderings)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestFieldOrderings)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int64 my_int = 1;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->my_int(), output);
  }

  // Extension range [2, 11)
  _extensions_.SerializeWithCachedSizes(
      2, 11, output);

  // optional string my_string = 11;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->my_string().data(), static_cast<int>(this->my_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestFieldOrderings.my_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      11, this->my_string(), output);
  }

  // Extension range [12, 101)
  _extensions_.SerializeWithCachedSizes(
      12, 101, output);

  // optional float my_float = 101;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(101, this->my_float(), output);
  }

  // optional .protobuf_unittest.TestFieldOrderings.NestedMessage optional_nested_message = 200;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      200, this->_internal_optional_nested_message(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestFieldOrderings)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int64 my_int = 1;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->my_int(), target);
  }

  // Extension range [2, 11)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      2, 11, deterministic, target);

  // optional string my_string = 11;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->my_string().data(), static_cast<int>(this->my_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestFieldOrderings.my_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        11, this->my_string(), target);
  }

  // Extension range [12, 101)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      12, 101, deterministic, target);

  // optional float my_float = 101;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(101, this->my_float(), target);
  }

  // optional .protobuf_unittest.TestFieldOrderings.NestedMessage optional_nested_message = 200;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        200, this->_internal_optional_nested_message(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestFieldOrderings)
  return target;
}

size_t TestFieldOrderings::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestFieldOrderings)
  size_t total_size = 0;

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 15u) {
    // optional string my_string = 11;
    if (has_my_string()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->my_string());
    }

    // optional .protobuf_unittest.TestFieldOrderings.NestedMessage optional_nested_message = 200;
    if (has_optional_nested_message()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *optional_nested_message_);
    }

    // optional int64 my_int = 1;
    if (has_my_int()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->my_int());
    }

    // optional float my_float = 101;
    if (has_my_float()) {
      total_size += 2 + 4;
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 15u) {
    if (cached_has_bits & 0x00000001u) {
      set_my_string(from.my_string());
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_optional_nested_message()->::protobuf_unittest::TestFieldOrderings_NestedMessage::MergeFrom(from.optional_nested_message());
    }
    if (cached_has_bits & 0x00000004u) {
      my_int_ = from.my_int_;
    }
    if (cached_has_bits & 0x00000008u) {
      my_float_ = from.my_float_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestFieldOrderings::CopyFrom(const TestFieldOrderings& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestFieldOrderings)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestFieldOrderings::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

void TestFieldOrderings::Swap(TestFieldOrderings* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestFieldOrderings* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestFieldOrderings::UnsafeArenaSwap(TestFieldOrderings* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestFieldOrderings::InternalSwap(TestFieldOrderings* other) {
  using std::swap;
  my_string_.Swap(&other->my_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(optional_nested_message_, other->optional_nested_message_);
  swap(my_int_, other->my_int_);
  swap(my_float_, other->my_float_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _extensions_.Swap(&other->_extensions_);
}

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


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

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

TestExtensionOrderings1::TestExtensionOrderings1()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings1.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestExtensionOrderings1)
}
TestExtensionOrderings1::TestExtensionOrderings1(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings1.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestExtensionOrderings1)
}
TestExtensionOrderings1::TestExtensionOrderings1(const TestExtensionOrderings1& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_my_string()) {
    my_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.my_string(),
      GetArenaNoVirtual());
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestExtensionOrderings1)
}

void TestExtensionOrderings1::SharedCtor() {
  my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

TestExtensionOrderings1::~TestExtensionOrderings1() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestExtensionOrderings1)
  SharedDtor();
}

void TestExtensionOrderings1::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  my_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void TestExtensionOrderings1::ArenaDtor(void* object) {
  TestExtensionOrderings1* _this = reinterpret_cast< TestExtensionOrderings1* >(object);
  (void)_this;
}
void TestExtensionOrderings1::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestExtensionOrderings1::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestExtensionOrderings1::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestExtensionOrderings1& TestExtensionOrderings1::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings1.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    my_string_.ClearNonDefaultToEmpty();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestExtensionOrderings1::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:protobuf_unittest.TestExtensionOrderings1)
  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)) {
      // optional string my_string = 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_my_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->my_string().data(), static_cast<int>(this->my_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestExtensionOrderings1.my_string");
        } 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:protobuf_unittest.TestExtensionOrderings1)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestExtensionOrderings1)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional string my_string = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->my_string().data(), static_cast<int>(this->my_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtensionOrderings1.my_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->my_string(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestExtensionOrderings1)
}

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

  cached_has_bits = _has_bits_[0];
  // optional string my_string = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->my_string().data(), static_cast<int>(this->my_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtensionOrderings1.my_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->my_string(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestExtensionOrderings1)
  return target;
}

size_t TestExtensionOrderings1::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestExtensionOrderings1)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional string my_string = 1;
  if (has_my_string()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->my_string());
  }

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

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

void TestExtensionOrderings1::MergeFrom(const TestExtensionOrderings1& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestExtensionOrderings1)
  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_my_string()) {
    set_my_string(from.my_string());
  }
}

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

void TestExtensionOrderings1::CopyFrom(const TestExtensionOrderings1& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestExtensionOrderings1)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestExtensionOrderings1::Swap(TestExtensionOrderings1* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestExtensionOrderings1* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestExtensionOrderings1::UnsafeArenaSwap(TestExtensionOrderings1* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestExtensionOrderings1::InternalSwap(TestExtensionOrderings1* other) {
  using std::swap;
  my_string_.Swap(&other->my_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestExtensionOrderings2_TestExtensionOrderings3::TestExtensionOrderings2_TestExtensionOrderings3()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2_TestExtensionOrderings3.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
}
TestExtensionOrderings2_TestExtensionOrderings3::TestExtensionOrderings2_TestExtensionOrderings3(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2_TestExtensionOrderings3.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
}
TestExtensionOrderings2_TestExtensionOrderings3::TestExtensionOrderings2_TestExtensionOrderings3(const TestExtensionOrderings2_TestExtensionOrderings3& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_my_string()) {
    my_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.my_string(),
      GetArenaNoVirtual());
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
}

void TestExtensionOrderings2_TestExtensionOrderings3::SharedCtor() {
  my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

TestExtensionOrderings2_TestExtensionOrderings3::~TestExtensionOrderings2_TestExtensionOrderings3() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  SharedDtor();
}

void TestExtensionOrderings2_TestExtensionOrderings3::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  my_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void TestExtensionOrderings2_TestExtensionOrderings3::ArenaDtor(void* object) {
  TestExtensionOrderings2_TestExtensionOrderings3* _this = reinterpret_cast< TestExtensionOrderings2_TestExtensionOrderings3* >(object);
  (void)_this;
}
void TestExtensionOrderings2_TestExtensionOrderings3::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestExtensionOrderings2_TestExtensionOrderings3::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestExtensionOrderings2_TestExtensionOrderings3::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestExtensionOrderings2_TestExtensionOrderings3& TestExtensionOrderings2_TestExtensionOrderings3::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2_TestExtensionOrderings3.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    my_string_.ClearNonDefaultToEmpty();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestExtensionOrderings2_TestExtensionOrderings3::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:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  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)) {
      // optional string my_string = 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_my_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->my_string().data(), static_cast<int>(this->my_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3.my_string");
        } 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:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  return false;
#undef DO_
}

void TestExtensionOrderings2_TestExtensionOrderings3::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string my_string = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->my_string().data(), static_cast<int>(this->my_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3.my_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->my_string(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
}

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

  cached_has_bits = _has_bits_[0];
  // optional string my_string = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->my_string().data(), static_cast<int>(this->my_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3.my_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->my_string(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  return target;
}

size_t TestExtensionOrderings2_TestExtensionOrderings3::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional string my_string = 1;
  if (has_my_string()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->my_string());
  }

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

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

void TestExtensionOrderings2_TestExtensionOrderings3::MergeFrom(const TestExtensionOrderings2_TestExtensionOrderings3& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  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_my_string()) {
    set_my_string(from.my_string());
  }
}

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

void TestExtensionOrderings2_TestExtensionOrderings3::CopyFrom(const TestExtensionOrderings2_TestExtensionOrderings3& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestExtensionOrderings2_TestExtensionOrderings3::Swap(TestExtensionOrderings2_TestExtensionOrderings3* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestExtensionOrderings2_TestExtensionOrderings3* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestExtensionOrderings2_TestExtensionOrderings3::UnsafeArenaSwap(TestExtensionOrderings2_TestExtensionOrderings3* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestExtensionOrderings2_TestExtensionOrderings3::InternalSwap(TestExtensionOrderings2_TestExtensionOrderings3* other) {
  using std::swap;
  my_string_.Swap(&other->my_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestExtensionOrderings2::TestExtensionOrderings2()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestExtensionOrderings2)
}
TestExtensionOrderings2::TestExtensionOrderings2(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestExtensionOrderings2)
}
TestExtensionOrderings2::TestExtensionOrderings2(const TestExtensionOrderings2& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_my_string()) {
    my_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.my_string(),
      GetArenaNoVirtual());
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestExtensionOrderings2)
}

void TestExtensionOrderings2::SharedCtor() {
  my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

TestExtensionOrderings2::~TestExtensionOrderings2() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestExtensionOrderings2)
  SharedDtor();
}

void TestExtensionOrderings2::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  my_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void TestExtensionOrderings2::ArenaDtor(void* object) {
  TestExtensionOrderings2* _this = reinterpret_cast< TestExtensionOrderings2* >(object);
  (void)_this;
}
void TestExtensionOrderings2::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestExtensionOrderings2::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestExtensionOrderings2::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestExtensionOrderings2& TestExtensionOrderings2::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    my_string_.ClearNonDefaultToEmpty();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestExtensionOrderings2::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:protobuf_unittest.TestExtensionOrderings2)
  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)) {
      // optional string my_string = 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_my_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->my_string().data(), static_cast<int>(this->my_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestExtensionOrderings2.my_string");
        } 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:protobuf_unittest.TestExtensionOrderings2)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestExtensionOrderings2)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional string my_string = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->my_string().data(), static_cast<int>(this->my_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtensionOrderings2.my_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->my_string(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestExtensionOrderings2)
}

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

  cached_has_bits = _has_bits_[0];
  // optional string my_string = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->my_string().data(), static_cast<int>(this->my_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtensionOrderings2.my_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->my_string(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestExtensionOrderings2)
  return target;
}

size_t TestExtensionOrderings2::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestExtensionOrderings2)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional string my_string = 1;
  if (has_my_string()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->my_string());
  }

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

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

void TestExtensionOrderings2::MergeFrom(const TestExtensionOrderings2& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestExtensionOrderings2)
  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_my_string()) {
    set_my_string(from.my_string());
  }
}

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

void TestExtensionOrderings2::CopyFrom(const TestExtensionOrderings2& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestExtensionOrderings2)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestExtensionOrderings2::Swap(TestExtensionOrderings2* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestExtensionOrderings2* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestExtensionOrderings2::UnsafeArenaSwap(TestExtensionOrderings2* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestExtensionOrderings2::InternalSwap(TestExtensionOrderings2* other) {
  using std::swap;
  my_string_.Swap(&other->my_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestExtremeDefaultValues::InitAsDefaultInstance() {
}
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_;
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestExtremeDefaultValues::kEscapedBytesFieldNumber;
const int TestExtremeDefaultValues::kLargeUint32FieldNumber;
const int TestExtremeDefaultValues::kLargeUint64FieldNumber;
const int TestExtremeDefaultValues::kSmallInt32FieldNumber;
const int TestExtremeDefaultValues::kSmallInt64FieldNumber;
const int TestExtremeDefaultValues::kReallySmallInt32FieldNumber;
const int TestExtremeDefaultValues::kReallySmallInt64FieldNumber;
const int TestExtremeDefaultValues::kUtf8StringFieldNumber;
const int TestExtremeDefaultValues::kZeroFloatFieldNumber;
const int TestExtremeDefaultValues::kOneFloatFieldNumber;
const int TestExtremeDefaultValues::kSmallFloatFieldNumber;
const int TestExtremeDefaultValues::kNegativeOneFloatFieldNumber;
const int TestExtremeDefaultValues::kNegativeFloatFieldNumber;
const int TestExtremeDefaultValues::kLargeFloatFieldNumber;
const int TestExtremeDefaultValues::kSmallNegativeFloatFieldNumber;
const int TestExtremeDefaultValues::kInfDoubleFieldNumber;
const int TestExtremeDefaultValues::kNegInfDoubleFieldNumber;
const int TestExtremeDefaultValues::kNanDoubleFieldNumber;
const int TestExtremeDefaultValues::kInfFloatFieldNumber;
const int TestExtremeDefaultValues::kNegInfFloatFieldNumber;
const int TestExtremeDefaultValues::kNanFloatFieldNumber;
const int TestExtremeDefaultValues::kCppTrigraphFieldNumber;
const int TestExtremeDefaultValues::kStringWithZeroFieldNumber;
const int TestExtremeDefaultValues::kBytesWithZeroFieldNumber;
const int TestExtremeDefaultValues::kStringPieceWithZeroFieldNumber;
const int TestExtremeDefaultValues::kCordWithZeroFieldNumber;
const int TestExtremeDefaultValues::kReplacementStringFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestExtremeDefaultValues::TestExtremeDefaultValues()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtremeDefaultValues.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestExtremeDefaultValues)
}
TestExtremeDefaultValues::TestExtremeDefaultValues(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtremeDefaultValues.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestExtremeDefaultValues)
}
TestExtremeDefaultValues::TestExtremeDefaultValues(const TestExtremeDefaultValues& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  escaped_bytes_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get());
  if (from.has_escaped_bytes()) {
    escaped_bytes_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get(), from.escaped_bytes(),
      GetArenaNoVirtual());
  }
  utf8_string_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get());
  if (from.has_utf8_string()) {
    utf8_string_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get(), from.utf8_string(),
      GetArenaNoVirtual());
  }
  cpp_trigraph_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get());
  if (from.has_cpp_trigraph()) {
    cpp_trigraph_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get(), from.cpp_trigraph(),
      GetArenaNoVirtual());
  }
  string_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get());
  if (from.has_string_with_zero()) {
    string_with_zero_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get(), from.string_with_zero(),
      GetArenaNoVirtual());
  }
  bytes_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get());
  if (from.has_bytes_with_zero()) {
    bytes_with_zero_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get(), from.bytes_with_zero(),
      GetArenaNoVirtual());
  }
  string_piece_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get());
  if (from.has_string_piece_with_zero()) {
    string_piece_with_zero_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get(), from.string_piece_with_zero(),
      GetArenaNoVirtual());
  }
  cord_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get());
  if (from.has_cord_with_zero()) {
    cord_with_zero_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get(), from.cord_with_zero(),
      GetArenaNoVirtual());
  }
  replacement_string_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get());
  if (from.has_replacement_string()) {
    replacement_string_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get(), from.replacement_string(),
      GetArenaNoVirtual());
  }
  ::memcpy(&zero_float_, &from.zero_float_,
    static_cast<size_t>(reinterpret_cast<char*>(&really_small_int64_) -
    reinterpret_cast<char*>(&zero_float_)) + sizeof(really_small_int64_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestExtremeDefaultValues)
}

void TestExtremeDefaultValues::SharedCtor() {
  escaped_bytes_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get());
  utf8_string_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get());
  cpp_trigraph_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get());
  string_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get());
  bytes_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get());
  string_piece_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get());
  cord_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get());
  replacement_string_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get());
  zero_float_ = 0;
  large_uint64_ = GOOGLE_ULONGLONG(18446744073709551615);
  large_uint32_ = 4294967295u;
  small_int32_ = -2147483647;
  small_int64_ = GOOGLE_LONGLONG(-9223372036854775807);
  one_float_ = 1;
  small_float_ = 1.5f;
  negative_one_float_ = -1;
  negative_float_ = -1.5f;
  large_float_ = 2e+08f;
  small_negative_float_ = -8e-28f;
  inf_double_ = ::google::protobuf::internal::Infinity();
  neg_inf_double_ = -::google::protobuf::internal::Infinity();
  nan_double_ = ::google::protobuf::internal::NaN();
  inf_float_ = static_cast<float>(::google::protobuf::internal::Infinity());
  neg_inf_float_ = static_cast<float>(-::google::protobuf::internal::Infinity());
  nan_float_ = static_cast<float>(::google::protobuf::internal::NaN());
  really_small_int32_ = (~0x7fffffff);
  really_small_int64_ = GOOGLE_LONGLONG(~0x7fffffffffffffff);
}

TestExtremeDefaultValues::~TestExtremeDefaultValues() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestExtremeDefaultValues)
  SharedDtor();
}

void TestExtremeDefaultValues::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  escaped_bytes_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get());
  utf8_string_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get());
  cpp_trigraph_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get());
  string_with_zero_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get());
  bytes_with_zero_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get());
  string_piece_with_zero_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get());
  cord_with_zero_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get());
  replacement_string_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get());
}

void TestExtremeDefaultValues::ArenaDtor(void* object) {
  TestExtremeDefaultValues* _this = reinterpret_cast< TestExtremeDefaultValues* >(object);
  (void)_this;
}
void TestExtremeDefaultValues::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestExtremeDefaultValues::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestExtremeDefaultValues::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestExtremeDefaultValues& TestExtremeDefaultValues::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtremeDefaultValues.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 255u) {
    if (cached_has_bits & 0x00000001u) {
      escaped_bytes_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get(), GetArenaNoVirtual());
    }
    if (cached_has_bits & 0x00000002u) {
      utf8_string_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get(), GetArenaNoVirtual());
    }
    if (cached_has_bits & 0x00000004u) {
      cpp_trigraph_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get(), GetArenaNoVirtual());
    }
    if (cached_has_bits & 0x00000008u) {
      string_with_zero_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get(), GetArenaNoVirtual());
    }
    if (cached_has_bits & 0x00000010u) {
      bytes_with_zero_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get(), GetArenaNoVirtual());
    }
    if (cached_has_bits & 0x00000020u) {
      string_piece_with_zero_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get(), GetArenaNoVirtual());
    }
    if (cached_has_bits & 0x00000040u) {
      cord_with_zero_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get(), GetArenaNoVirtual());
    }
    if (cached_has_bits & 0x00000080u) {
      replacement_string_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get(), GetArenaNoVirtual());
    }
  }
  if (cached_has_bits & 65280u) {
    zero_float_ = 0;
    large_uint64_ = GOOGLE_ULONGLONG(18446744073709551615);
    large_uint32_ = 4294967295u;
    small_int32_ = -2147483647;
    small_int64_ = GOOGLE_LONGLONG(-9223372036854775807);
    one_float_ = 1;
    small_float_ = 1.5f;
    negative_one_float_ = -1;
  }
  if (cached_has_bits & 16711680u) {
    negative_float_ = -1.5f;
    large_float_ = 2e+08f;
    small_negative_float_ = -8e-28f;
    inf_double_ = ::google::protobuf::internal::Infinity();
    neg_inf_double_ = -::google::protobuf::internal::Infinity();
    nan_double_ = ::google::protobuf::internal::NaN();
    inf_float_ = static_cast<float>(::google::protobuf::internal::Infinity());
    neg_inf_float_ = static_cast<float>(-::google::protobuf::internal::Infinity());
  }
  if (cached_has_bits & 117440512u) {
    nan_float_ = static_cast<float>(::google::protobuf::internal::NaN());
    really_small_int32_ = (~0x7fffffff);
    really_small_int64_ = GOOGLE_LONGLONG(~0x7fffffffffffffff);
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestExtremeDefaultValues::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:protobuf_unittest.TestExtremeDefaultValues)
  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)) {
      // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_escaped_bytes()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint32 large_uint32 = 2 [default = 4294967295];
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          set_has_large_uint32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &large_uint32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          set_has_large_uint64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &large_uint64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 small_int32 = 4 [default = -2147483647];
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
          set_has_small_int32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &small_int32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 small_int64 = 5 [default = -9223372036854775807];
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
          set_has_small_int64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &small_int64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string utf8_string = 6 [default = "\341\210\264"];
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_utf8_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->utf8_string().data(), static_cast<int>(this->utf8_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestExtremeDefaultValues.utf8_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float zero_float = 7 [default = 0];
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
          set_has_zero_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &zero_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float one_float = 8 [default = 1];
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(69u /* 69 & 0xFF */)) {
          set_has_one_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &one_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float small_float = 9 [default = 1.5];
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
          set_has_small_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &small_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float negative_one_float = 10 [default = -1];
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(85u /* 85 & 0xFF */)) {
          set_has_negative_one_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &negative_one_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float negative_float = 11 [default = -1.5];
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
          set_has_negative_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &negative_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float large_float = 12 [default = 2e+08];
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(101u /* 101 & 0xFF */)) {
          set_has_large_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &large_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float small_negative_float = 13 [default = -8e-28];
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(109u /* 109 & 0xFF */)) {
          set_has_small_negative_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &small_negative_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional double inf_double = 14 [default = inf];
      case 14: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(113u /* 113 & 0xFF */)) {
          set_has_inf_double();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &inf_double_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional double neg_inf_double = 15 [default = -inf];
      case 15: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(121u /* 121 & 0xFF */)) {
          set_has_neg_inf_double();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &neg_inf_double_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional double nan_double = 16 [default = nan];
      case 16: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(129u /* 129 & 0xFF */)) {
          set_has_nan_double();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &nan_double_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float inf_float = 17 [default = inf];
      case 17: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(141u /* 141 & 0xFF */)) {
          set_has_inf_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &inf_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float neg_inf_float = 18 [default = -inf];
      case 18: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(149u /* 149 & 0xFF */)) {
          set_has_neg_inf_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &neg_inf_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float nan_float = 19 [default = nan];
      case 19: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(157u /* 157 & 0xFF */)) {
          set_has_nan_float();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &nan_float_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string cpp_trigraph = 20 [default = "? ? ?? ?? ??? ??/ ??-"];
      case 20: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_cpp_trigraph()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->cpp_trigraph().data(), static_cast<int>(this->cpp_trigraph().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestExtremeDefaultValues.cpp_trigraph");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 really_small_int32 = 21 [default = -2147483648];
      case 21: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
          set_has_really_small_int32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &really_small_int32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 really_small_int64 = 22 [default = -9223372036854775808];
      case 22: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
          set_has_really_small_int64();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &really_small_int64_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string string_with_zero = 23 [default = "hel\000lo"];
      case 23: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(186u /* 186 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_string_with_zero()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->string_with_zero().data(), static_cast<int>(this->string_with_zero().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestExtremeDefaultValues.string_with_zero");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bytes bytes_with_zero = 24 [default = "wor\000ld"];
      case 24: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(194u /* 194 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_bytes_with_zero()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string string_piece_with_zero = 25 [default = "ab\000c", ctype = STRING_PIECE];
      case 25: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_string_piece_with_zero()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->string_piece_with_zero().data(), static_cast<int>(this->string_piece_with_zero().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestExtremeDefaultValues.string_piece_with_zero");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string cord_with_zero = 26 [default = "12\0003", ctype = CORD];
      case 26: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(210u /* 210 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_cord_with_zero()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->cord_with_zero().data(), static_cast<int>(this->cord_with_zero().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestExtremeDefaultValues.cord_with_zero");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string replacement_string = 27 [default = "${unknown}"];
      case 27: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(218u /* 218 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_replacement_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->replacement_string().data(), static_cast<int>(this->replacement_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestExtremeDefaultValues.replacement_string");
        } 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:protobuf_unittest.TestExtremeDefaultValues)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestExtremeDefaultValues)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      1, this->escaped_bytes(), output);
  }

  // optional uint32 large_uint32 = 2 [default = 4294967295];
  if (cached_has_bits & 0x00000400u) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->large_uint32(), output);
  }

  // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
  if (cached_has_bits & 0x00000200u) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->large_uint64(), output);
  }

  // optional int32 small_int32 = 4 [default = -2147483647];
  if (cached_has_bits & 0x00000800u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->small_int32(), output);
  }

  // optional int64 small_int64 = 5 [default = -9223372036854775807];
  if (cached_has_bits & 0x00001000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->small_int64(), output);
  }

  // optional string utf8_string = 6 [default = "\341\210\264"];
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->utf8_string().data(), static_cast<int>(this->utf8_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.utf8_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      6, this->utf8_string(), output);
  }

  // optional float zero_float = 7 [default = 0];
  if (cached_has_bits & 0x00000100u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->zero_float(), output);
  }

  // optional float one_float = 8 [default = 1];
  if (cached_has_bits & 0x00002000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(8, this->one_float(), output);
  }

  // optional float small_float = 9 [default = 1.5];
  if (cached_has_bits & 0x00004000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(9, this->small_float(), output);
  }

  // optional float negative_one_float = 10 [default = -1];
  if (cached_has_bits & 0x00008000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(10, this->negative_one_float(), output);
  }

  // optional float negative_float = 11 [default = -1.5];
  if (cached_has_bits & 0x00010000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->negative_float(), output);
  }

  // optional float large_float = 12 [default = 2e+08];
  if (cached_has_bits & 0x00020000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(12, this->large_float(), output);
  }

  // optional float small_negative_float = 13 [default = -8e-28];
  if (cached_has_bits & 0x00040000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(13, this->small_negative_float(), output);
  }

  // optional double inf_double = 14 [default = inf];
  if (cached_has_bits & 0x00080000u) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(14, this->inf_double(), output);
  }

  // optional double neg_inf_double = 15 [default = -inf];
  if (cached_has_bits & 0x00100000u) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(15, this->neg_inf_double(), output);
  }

  // optional double nan_double = 16 [default = nan];
  if (cached_has_bits & 0x00200000u) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(16, this->nan_double(), output);
  }

  // optional float inf_float = 17 [default = inf];
  if (cached_has_bits & 0x00400000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(17, this->inf_float(), output);
  }

  // optional float neg_inf_float = 18 [default = -inf];
  if (cached_has_bits & 0x00800000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(18, this->neg_inf_float(), output);
  }

  // optional float nan_float = 19 [default = nan];
  if (cached_has_bits & 0x01000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(19, this->nan_float(), output);
  }

  // optional string cpp_trigraph = 20 [default = "? ? ?? ?? ??? ??/ ??-"];
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->cpp_trigraph().data(), static_cast<int>(this->cpp_trigraph().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.cpp_trigraph");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      20, this->cpp_trigraph(), output);
  }

  // optional int32 really_small_int32 = 21 [default = -2147483648];
  if (cached_has_bits & 0x02000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(21, this->really_small_int32(), output);
  }

  // optional int64 really_small_int64 = 22 [default = -9223372036854775808];
  if (cached_has_bits & 0x04000000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(22, this->really_small_int64(), output);
  }

  // optional string string_with_zero = 23 [default = "hel\000lo"];
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->string_with_zero().data(), static_cast<int>(this->string_with_zero().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.string_with_zero");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      23, this->string_with_zero(), output);
  }

  // optional bytes bytes_with_zero = 24 [default = "wor\000ld"];
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      24, this->bytes_with_zero(), output);
  }

  // optional string string_piece_with_zero = 25 [default = "ab\000c", ctype = STRING_PIECE];
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->string_piece_with_zero().data(), static_cast<int>(this->string_piece_with_zero().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.string_piece_with_zero");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      25, this->string_piece_with_zero(), output);
  }

  // optional string cord_with_zero = 26 [default = "12\0003", ctype = CORD];
  if (cached_has_bits & 0x00000040u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->cord_with_zero().data(), static_cast<int>(this->cord_with_zero().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.cord_with_zero");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      26, this->cord_with_zero(), output);
  }

  // optional string replacement_string = 27 [default = "${unknown}"];
  if (cached_has_bits & 0x00000080u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->replacement_string().data(), static_cast<int>(this->replacement_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.replacement_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      27, this->replacement_string(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestExtremeDefaultValues)
}

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

  cached_has_bits = _has_bits_[0];
  // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
  if (cached_has_bits & 0x00000001u) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        1, this->escaped_bytes(), target);
  }

  // optional uint32 large_uint32 = 2 [default = 4294967295];
  if (cached_has_bits & 0x00000400u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->large_uint32(), target);
  }

  // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
  if (cached_has_bits & 0x00000200u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->large_uint64(), target);
  }

  // optional int32 small_int32 = 4 [default = -2147483647];
  if (cached_has_bits & 0x00000800u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->small_int32(), target);
  }

  // optional int64 small_int64 = 5 [default = -9223372036854775807];
  if (cached_has_bits & 0x00001000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->small_int64(), target);
  }

  // optional string utf8_string = 6 [default = "\341\210\264"];
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->utf8_string().data(), static_cast<int>(this->utf8_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.utf8_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        6, this->utf8_string(), target);
  }

  // optional float zero_float = 7 [default = 0];
  if (cached_has_bits & 0x00000100u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->zero_float(), target);
  }

  // optional float one_float = 8 [default = 1];
  if (cached_has_bits & 0x00002000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(8, this->one_float(), target);
  }

  // optional float small_float = 9 [default = 1.5];
  if (cached_has_bits & 0x00004000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, this->small_float(), target);
  }

  // optional float negative_one_float = 10 [default = -1];
  if (cached_has_bits & 0x00008000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(10, this->negative_one_float(), target);
  }

  // optional float negative_float = 11 [default = -1.5];
  if (cached_has_bits & 0x00010000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, this->negative_float(), target);
  }

  // optional float large_float = 12 [default = 2e+08];
  if (cached_has_bits & 0x00020000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(12, this->large_float(), target);
  }

  // optional float small_negative_float = 13 [default = -8e-28];
  if (cached_has_bits & 0x00040000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(13, this->small_negative_float(), target);
  }

  // optional double inf_double = 14 [default = inf];
  if (cached_has_bits & 0x00080000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(14, this->inf_double(), target);
  }

  // optional double neg_inf_double = 15 [default = -inf];
  if (cached_has_bits & 0x00100000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(15, this->neg_inf_double(), target);
  }

  // optional double nan_double = 16 [default = nan];
  if (cached_has_bits & 0x00200000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(16, this->nan_double(), target);
  }

  // optional float inf_float = 17 [default = inf];
  if (cached_has_bits & 0x00400000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(17, this->inf_float(), target);
  }

  // optional float neg_inf_float = 18 [default = -inf];
  if (cached_has_bits & 0x00800000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(18, this->neg_inf_float(), target);
  }

  // optional float nan_float = 19 [default = nan];
  if (cached_has_bits & 0x01000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(19, this->nan_float(), target);
  }

  // optional string cpp_trigraph = 20 [default = "? ? ?? ?? ??? ??/ ??-"];
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->cpp_trigraph().data(), static_cast<int>(this->cpp_trigraph().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.cpp_trigraph");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        20, this->cpp_trigraph(), target);
  }

  // optional int32 really_small_int32 = 21 [default = -2147483648];
  if (cached_has_bits & 0x02000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(21, this->really_small_int32(), target);
  }

  // optional int64 really_small_int64 = 22 [default = -9223372036854775808];
  if (cached_has_bits & 0x04000000u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(22, this->really_small_int64(), target);
  }

  // optional string string_with_zero = 23 [default = "hel\000lo"];
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->string_with_zero().data(), static_cast<int>(this->string_with_zero().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.string_with_zero");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        23, this->string_with_zero(), target);
  }

  // optional bytes bytes_with_zero = 24 [default = "wor\000ld"];
  if (cached_has_bits & 0x00000010u) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        24, this->bytes_with_zero(), target);
  }

  // optional string string_piece_with_zero = 25 [default = "ab\000c", ctype = STRING_PIECE];
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->string_piece_with_zero().data(), static_cast<int>(this->string_piece_with_zero().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.string_piece_with_zero");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        25, this->string_piece_with_zero(), target);
  }

  // optional string cord_with_zero = 26 [default = "12\0003", ctype = CORD];
  if (cached_has_bits & 0x00000040u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->cord_with_zero().data(), static_cast<int>(this->cord_with_zero().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.cord_with_zero");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        26, this->cord_with_zero(), target);
  }

  // optional string replacement_string = 27 [default = "${unknown}"];
  if (cached_has_bits & 0x00000080u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->replacement_string().data(), static_cast<int>(this->replacement_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestExtremeDefaultValues.replacement_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        27, this->replacement_string(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestExtremeDefaultValues)
  return target;
}

size_t TestExtremeDefaultValues::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestExtremeDefaultValues)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 255u) {
    // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
    if (has_escaped_bytes()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->escaped_bytes());
    }

    // optional string utf8_string = 6 [default = "\341\210\264"];
    if (has_utf8_string()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->utf8_string());
    }

    // optional string cpp_trigraph = 20 [default = "? ? ?? ?? ??? ??/ ??-"];
    if (has_cpp_trigraph()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->cpp_trigraph());
    }

    // optional string string_with_zero = 23 [default = "hel\000lo"];
    if (has_string_with_zero()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->string_with_zero());
    }

    // optional bytes bytes_with_zero = 24 [default = "wor\000ld"];
    if (has_bytes_with_zero()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->bytes_with_zero());
    }

    // optional string string_piece_with_zero = 25 [default = "ab\000c", ctype = STRING_PIECE];
    if (has_string_piece_with_zero()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->string_piece_with_zero());
    }

    // optional string cord_with_zero = 26 [default = "12\0003", ctype = CORD];
    if (has_cord_with_zero()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->cord_with_zero());
    }

    // optional string replacement_string = 27 [default = "${unknown}"];
    if (has_replacement_string()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->replacement_string());
    }

  }
  if (_has_bits_[8 / 32] & 65280u) {
    // optional float zero_float = 7 [default = 0];
    if (has_zero_float()) {
      total_size += 1 + 4;
    }

    // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
    if (has_large_uint64()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->large_uint64());
    }

    // optional uint32 large_uint32 = 2 [default = 4294967295];
    if (has_large_uint32()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->large_uint32());
    }

    // optional int32 small_int32 = 4 [default = -2147483647];
    if (has_small_int32()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->small_int32());
    }

    // optional int64 small_int64 = 5 [default = -9223372036854775807];
    if (has_small_int64()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->small_int64());
    }

    // optional float one_float = 8 [default = 1];
    if (has_one_float()) {
      total_size += 1 + 4;
    }

    // optional float small_float = 9 [default = 1.5];
    if (has_small_float()) {
      total_size += 1 + 4;
    }

    // optional float negative_one_float = 10 [default = -1];
    if (has_negative_one_float()) {
      total_size += 1 + 4;
    }

  }
  if (_has_bits_[16 / 32] & 16711680u) {
    // optional float negative_float = 11 [default = -1.5];
    if (has_negative_float()) {
      total_size += 1 + 4;
    }

    // optional float large_float = 12 [default = 2e+08];
    if (has_large_float()) {
      total_size += 1 + 4;
    }

    // optional float small_negative_float = 13 [default = -8e-28];
    if (has_small_negative_float()) {
      total_size += 1 + 4;
    }

    // optional double inf_double = 14 [default = inf];
    if (has_inf_double()) {
      total_size += 1 + 8;
    }

    // optional double neg_inf_double = 15 [default = -inf];
    if (has_neg_inf_double()) {
      total_size += 1 + 8;
    }

    // optional double nan_double = 16 [default = nan];
    if (has_nan_double()) {
      total_size += 2 + 8;
    }

    // optional float inf_float = 17 [default = inf];
    if (has_inf_float()) {
      total_size += 2 + 4;
    }

    // optional float neg_inf_float = 18 [default = -inf];
    if (has_neg_inf_float()) {
      total_size += 2 + 4;
    }

  }
  if (_has_bits_[24 / 32] & 117440512u) {
    // optional float nan_float = 19 [default = nan];
    if (has_nan_float()) {
      total_size += 2 + 4;
    }

    // optional int32 really_small_int32 = 21 [default = -2147483648];
    if (has_really_small_int32()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->really_small_int32());
    }

    // optional int64 really_small_int64 = 22 [default = -9223372036854775808];
    if (has_really_small_int64()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->really_small_int64());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 255u) {
    if (cached_has_bits & 0x00000001u) {
      set_escaped_bytes(from.escaped_bytes());
    }
    if (cached_has_bits & 0x00000002u) {
      set_utf8_string(from.utf8_string());
    }
    if (cached_has_bits & 0x00000004u) {
      set_cpp_trigraph(from.cpp_trigraph());
    }
    if (cached_has_bits & 0x00000008u) {
      set_string_with_zero(from.string_with_zero());
    }
    if (cached_has_bits & 0x00000010u) {
      set_bytes_with_zero(from.bytes_with_zero());
    }
    if (cached_has_bits & 0x00000020u) {
      set_string_piece_with_zero(from.string_piece_with_zero());
    }
    if (cached_has_bits & 0x00000040u) {
      set_cord_with_zero(from.cord_with_zero());
    }
    if (cached_has_bits & 0x00000080u) {
      set_replacement_string(from.replacement_string());
    }
  }
  if (cached_has_bits & 65280u) {
    if (cached_has_bits & 0x00000100u) {
      zero_float_ = from.zero_float_;
    }
    if (cached_has_bits & 0x00000200u) {
      large_uint64_ = from.large_uint64_;
    }
    if (cached_has_bits & 0x00000400u) {
      large_uint32_ = from.large_uint32_;
    }
    if (cached_has_bits & 0x00000800u) {
      small_int32_ = from.small_int32_;
    }
    if (cached_has_bits & 0x00001000u) {
      small_int64_ = from.small_int64_;
    }
    if (cached_has_bits & 0x00002000u) {
      one_float_ = from.one_float_;
    }
    if (cached_has_bits & 0x00004000u) {
      small_float_ = from.small_float_;
    }
    if (cached_has_bits & 0x00008000u) {
      negative_one_float_ = from.negative_one_float_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 16711680u) {
    if (cached_has_bits & 0x00010000u) {
      negative_float_ = from.negative_float_;
    }
    if (cached_has_bits & 0x00020000u) {
      large_float_ = from.large_float_;
    }
    if (cached_has_bits & 0x00040000u) {
      small_negative_float_ = from.small_negative_float_;
    }
    if (cached_has_bits & 0x00080000u) {
      inf_double_ = from.inf_double_;
    }
    if (cached_has_bits & 0x00100000u) {
      neg_inf_double_ = from.neg_inf_double_;
    }
    if (cached_has_bits & 0x00200000u) {
      nan_double_ = from.nan_double_;
    }
    if (cached_has_bits & 0x00400000u) {
      inf_float_ = from.inf_float_;
    }
    if (cached_has_bits & 0x00800000u) {
      neg_inf_float_ = from.neg_inf_float_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 117440512u) {
    if (cached_has_bits & 0x01000000u) {
      nan_float_ = from.nan_float_;
    }
    if (cached_has_bits & 0x02000000u) {
      really_small_int32_ = from.really_small_int32_;
    }
    if (cached_has_bits & 0x04000000u) {
      really_small_int64_ = from.really_small_int64_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestExtremeDefaultValues::CopyFrom(const TestExtremeDefaultValues& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestExtremeDefaultValues)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestExtremeDefaultValues::Swap(TestExtremeDefaultValues* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestExtremeDefaultValues* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestExtremeDefaultValues::UnsafeArenaSwap(TestExtremeDefaultValues* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestExtremeDefaultValues::InternalSwap(TestExtremeDefaultValues* other) {
  using std::swap;
  escaped_bytes_.Swap(&other->escaped_bytes_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get(),
    GetArenaNoVirtual());
  utf8_string_.Swap(&other->utf8_string_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get(),
    GetArenaNoVirtual());
  cpp_trigraph_.Swap(&other->cpp_trigraph_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get(),
    GetArenaNoVirtual());
  string_with_zero_.Swap(&other->string_with_zero_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get(),
    GetArenaNoVirtual());
  bytes_with_zero_.Swap(&other->bytes_with_zero_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get(),
    GetArenaNoVirtual());
  string_piece_with_zero_.Swap(&other->string_piece_with_zero_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get(),
    GetArenaNoVirtual());
  cord_with_zero_.Swap(&other->cord_with_zero_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get(),
    GetArenaNoVirtual());
  replacement_string_.Swap(&other->replacement_string_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get(),
    GetArenaNoVirtual());
  swap(zero_float_, other->zero_float_);
  swap(large_uint64_, other->large_uint64_);
  swap(large_uint32_, other->large_uint32_);
  swap(small_int32_, other->small_int32_);
  swap(small_int64_, other->small_int64_);
  swap(one_float_, other->one_float_);
  swap(small_float_, other->small_float_);
  swap(negative_one_float_, other->negative_one_float_);
  swap(negative_float_, other->negative_float_);
  swap(large_float_, other->large_float_);
  swap(small_negative_float_, other->small_negative_float_);
  swap(inf_double_, other->inf_double_);
  swap(neg_inf_double_, other->neg_inf_double_);
  swap(nan_double_, other->nan_double_);
  swap(inf_float_, other->inf_float_);
  swap(neg_inf_float_, other->neg_inf_float_);
  swap(nan_float_, other->nan_float_);
  swap(really_small_int32_, other->really_small_int32_);
  swap(really_small_int64_, other->really_small_int64_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

SparseEnumMessage::SparseEnumMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_SparseEnumMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.SparseEnumMessage)
}
SparseEnumMessage::SparseEnumMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_SparseEnumMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.SparseEnumMessage)
}
SparseEnumMessage::SparseEnumMessage(const SparseEnumMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  sparse_enum_ = from.sparse_enum_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.SparseEnumMessage)
}

void SparseEnumMessage::SharedCtor() {
  sparse_enum_ = 123;
}

SparseEnumMessage::~SparseEnumMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.SparseEnumMessage)
  SharedDtor();
}

void SparseEnumMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void SparseEnumMessage::ArenaDtor(void* object) {
  SparseEnumMessage* _this = reinterpret_cast< SparseEnumMessage* >(object);
  (void)_this;
}
void SparseEnumMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void SparseEnumMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* SparseEnumMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const SparseEnumMessage& SparseEnumMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_SparseEnumMessage.base);
  return *internal_default_instance();
}


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

  sparse_enum_ = 123;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool SparseEnumMessage::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:protobuf_unittest.SparseEnumMessage)
  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)) {
      // optional .protobuf_unittest.TestSparseEnum sparse_enum = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::TestSparseEnum_IsValid(value)) {
            set_sparse_enum(static_cast< ::protobuf_unittest::TestSparseEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                1, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

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

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestSparseEnum sparse_enum = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->sparse_enum(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.SparseEnumMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestSparseEnum sparse_enum = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->sparse_enum(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.SparseEnumMessage)
  return target;
}

size_t SparseEnumMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.SparseEnumMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestSparseEnum sparse_enum = 1;
  if (has_sparse_enum()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->sparse_enum());
  }

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

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

void SparseEnumMessage::MergeFrom(const SparseEnumMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.SparseEnumMessage)
  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_sparse_enum()) {
    set_sparse_enum(from.sparse_enum());
  }
}

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

void SparseEnumMessage::CopyFrom(const SparseEnumMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.SparseEnumMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void SparseEnumMessage::Swap(SparseEnumMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    SparseEnumMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void SparseEnumMessage::UnsafeArenaSwap(SparseEnumMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void SparseEnumMessage::InternalSwap(SparseEnumMessage* other) {
  using std::swap;
  swap(sparse_enum_, other->sparse_enum_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

OneString::OneString()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneString.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.OneString)
}
OneString::OneString(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneString.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.OneString)
}
OneString::OneString(const OneString& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_data()) {
    data_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data(),
      GetArenaNoVirtual());
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.OneString)
}

void OneString::SharedCtor() {
  data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

OneString::~OneString() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.OneString)
  SharedDtor();
}

void OneString::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void OneString::ArenaDtor(void* object) {
  OneString* _this = reinterpret_cast< OneString* >(object);
  (void)_this;
}
void OneString::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void OneString::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* OneString::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const OneString& OneString::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneString.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    data_.ClearNonDefaultToEmpty();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool OneString::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:protobuf_unittest.OneString)
  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)) {
      // optional string data = 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_data()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->data().data(), static_cast<int>(this->data().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.OneString.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:protobuf_unittest.OneString)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.OneString)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional string data = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->data().data(), static_cast<int>(this->data().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.OneString.data");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->data(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.OneString)
}

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

  cached_has_bits = _has_bits_[0];
  // optional string data = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->data().data(), static_cast<int>(this->data().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.OneString.data");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->data(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.OneString)
  return target;
}

size_t OneString::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.OneString)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional string data = 1;
  if (has_data()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->data());
  }

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

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

void OneString::MergeFrom(const OneString& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.OneString)
  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_data()) {
    set_data(from.data());
  }
}

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

void OneString::CopyFrom(const OneString& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.OneString)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void OneString::Swap(OneString* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    OneString* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void OneString::UnsafeArenaSwap(OneString* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void OneString::InternalSwap(OneString* other) {
  using std::swap;
  data_.Swap(&other->data_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

MoreString::MoreString()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreString.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.MoreString)
}
MoreString::MoreString(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  data_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreString.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.MoreString)
}
MoreString::MoreString(const MoreString& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      data_(from.data_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.MoreString)
}

void MoreString::SharedCtor() {
}

MoreString::~MoreString() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.MoreString)
  SharedDtor();
}

void MoreString::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void MoreString::ArenaDtor(void* object) {
  MoreString* _this = reinterpret_cast< MoreString* >(object);
  (void)_this;
}
void MoreString::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void MoreString::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* MoreString::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const MoreString& MoreString::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreString.base);
  return *internal_default_instance();
}


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

  data_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool MoreString::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:protobuf_unittest.MoreString)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated string data = 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->add_data()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->data(this->data_size() - 1).data(),
            static_cast<int>(this->data(this->data_size() - 1).length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.MoreString.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:protobuf_unittest.MoreString)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.MoreString)
  return false;
#undef DO_
}

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

  // repeated string data = 1;
  for (int i = 0, n = this->data_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->data(i).data(), static_cast<int>(this->data(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.MoreString.data");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->data(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.MoreString)
}

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

  // repeated string data = 1;
  for (int i = 0, n = this->data_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->data(i).data(), static_cast<int>(this->data(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.MoreString.data");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(1, this->data(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.MoreString)
  return target;
}

size_t MoreString::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.MoreString)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated string data = 1;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->data_size());
  for (int i = 0, n = this->data_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->data(i));
  }

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

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

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

  data_.MergeFrom(from.data_);
}

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

void MoreString::CopyFrom(const MoreString& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.MoreString)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void MoreString::Swap(MoreString* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    MoreString* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void MoreString::UnsafeArenaSwap(MoreString* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void MoreString::InternalSwap(MoreString* other) {
  using std::swap;
  data_.InternalSwap(CastToBase(&other->data_));
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

OneBytes::OneBytes()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneBytes.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.OneBytes)
}
OneBytes::OneBytes(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneBytes.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.OneBytes)
}
OneBytes::OneBytes(const OneBytes& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_data()) {
    data_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data(),
      GetArenaNoVirtual());
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.OneBytes)
}

void OneBytes::SharedCtor() {
  data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

OneBytes::~OneBytes() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.OneBytes)
  SharedDtor();
}

void OneBytes::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void OneBytes::ArenaDtor(void* object) {
  OneBytes* _this = reinterpret_cast< OneBytes* >(object);
  (void)_this;
}
void OneBytes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void OneBytes::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* OneBytes::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const OneBytes& OneBytes::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneBytes.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    data_.ClearNonDefaultToEmpty();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool OneBytes::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:protobuf_unittest.OneBytes)
  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)) {
      // optional bytes data = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->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:protobuf_unittest.OneBytes)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.OneBytes)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional bytes data = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      1, this->data(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.OneBytes)
}

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

  cached_has_bits = _has_bits_[0];
  // optional bytes data = 1;
  if (cached_has_bits & 0x00000001u) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        1, this->data(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.OneBytes)
  return target;
}

size_t OneBytes::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.OneBytes)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional bytes data = 1;
  if (has_data()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->data());
  }

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

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

void OneBytes::MergeFrom(const OneBytes& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.OneBytes)
  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_data()) {
    set_data(from.data());
  }
}

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

void OneBytes::CopyFrom(const OneBytes& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.OneBytes)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void OneBytes::Swap(OneBytes* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    OneBytes* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void OneBytes::UnsafeArenaSwap(OneBytes* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void OneBytes::InternalSwap(OneBytes* other) {
  using std::swap;
  data_.Swap(&other->data_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

MoreBytes::MoreBytes()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreBytes.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.MoreBytes)
}
MoreBytes::MoreBytes(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  data_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreBytes.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.MoreBytes)
}
MoreBytes::MoreBytes(const MoreBytes& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      data_(from.data_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.MoreBytes)
}

void MoreBytes::SharedCtor() {
}

MoreBytes::~MoreBytes() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.MoreBytes)
  SharedDtor();
}

void MoreBytes::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void MoreBytes::ArenaDtor(void* object) {
  MoreBytes* _this = reinterpret_cast< MoreBytes* >(object);
  (void)_this;
}
void MoreBytes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void MoreBytes::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* MoreBytes::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const MoreBytes& MoreBytes::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreBytes.base);
  return *internal_default_instance();
}


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

  data_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool MoreBytes::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:protobuf_unittest.MoreBytes)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated bytes data = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->add_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:protobuf_unittest.MoreBytes)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.MoreBytes)
  return false;
#undef DO_
}

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

  // repeated bytes data = 1;
  for (int i = 0, n = this->data_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      1, this->data(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.MoreBytes)
}

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

  // repeated bytes data = 1;
  for (int i = 0, n = this->data_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteBytesToArray(1, this->data(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.MoreBytes)
  return target;
}

size_t MoreBytes::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.MoreBytes)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated bytes data = 1;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->data_size());
  for (int i = 0, n = this->data_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
      this->data(i));
  }

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

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

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

  data_.MergeFrom(from.data_);
}

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

void MoreBytes::CopyFrom(const MoreBytes& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.MoreBytes)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void MoreBytes::Swap(MoreBytes* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    MoreBytes* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void MoreBytes::UnsafeArenaSwap(MoreBytes* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void MoreBytes::InternalSwap(MoreBytes* other) {
  using std::swap;
  data_.InternalSwap(CastToBase(&other->data_));
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

Int32Message::Int32Message()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int32Message.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.Int32Message)
}
Int32Message::Int32Message(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int32Message.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.Int32Message)
}
Int32Message::Int32Message(const Int32Message& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  data_ = from.data_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.Int32Message)
}

void Int32Message::SharedCtor() {
  data_ = 0;
}

Int32Message::~Int32Message() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.Int32Message)
  SharedDtor();
}

void Int32Message::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void Int32Message::ArenaDtor(void* object) {
  Int32Message* _this = reinterpret_cast< Int32Message* >(object);
  (void)_this;
}
void Int32Message::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void Int32Message::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Int32Message::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Int32Message& Int32Message::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int32Message.base);
  return *internal_default_instance();
}


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

  data_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool Int32Message::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:protobuf_unittest.Int32Message)
  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)) {
      // optional int32 data = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_data();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &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:protobuf_unittest.Int32Message)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.Int32Message)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 data = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->data(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.Int32Message)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 data = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->data(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.Int32Message)
  return target;
}

size_t Int32Message::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.Int32Message)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 data = 1;
  if (has_data()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->data());
  }

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

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

void Int32Message::MergeFrom(const Int32Message& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.Int32Message)
  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_data()) {
    set_data(from.data());
  }
}

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

void Int32Message::CopyFrom(const Int32Message& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.Int32Message)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Int32Message::Swap(Int32Message* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    Int32Message* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void Int32Message::UnsafeArenaSwap(Int32Message* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void Int32Message::InternalSwap(Int32Message* other) {
  using std::swap;
  swap(data_, other->data_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

Uint32Message::Uint32Message()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint32Message.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.Uint32Message)
}
Uint32Message::Uint32Message(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint32Message.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.Uint32Message)
}
Uint32Message::Uint32Message(const Uint32Message& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  data_ = from.data_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.Uint32Message)
}

void Uint32Message::SharedCtor() {
  data_ = 0u;
}

Uint32Message::~Uint32Message() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.Uint32Message)
  SharedDtor();
}

void Uint32Message::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void Uint32Message::ArenaDtor(void* object) {
  Uint32Message* _this = reinterpret_cast< Uint32Message* >(object);
  (void)_this;
}
void Uint32Message::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void Uint32Message::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Uint32Message::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Uint32Message& Uint32Message::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint32Message.base);
  return *internal_default_instance();
}


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

  data_ = 0u;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool Uint32Message::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:protobuf_unittest.Uint32Message)
  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)) {
      // optional uint32 data = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_data();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &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:protobuf_unittest.Uint32Message)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.Uint32Message)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional uint32 data = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->data(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.Uint32Message)
}

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

  cached_has_bits = _has_bits_[0];
  // optional uint32 data = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->data(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.Uint32Message)
  return target;
}

size_t Uint32Message::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.Uint32Message)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional uint32 data = 1;
  if (has_data()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::UInt32Size(
        this->data());
  }

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

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

void Uint32Message::MergeFrom(const Uint32Message& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.Uint32Message)
  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_data()) {
    set_data(from.data());
  }
}

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

void Uint32Message::CopyFrom(const Uint32Message& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.Uint32Message)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Uint32Message::Swap(Uint32Message* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    Uint32Message* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void Uint32Message::UnsafeArenaSwap(Uint32Message* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void Uint32Message::InternalSwap(Uint32Message* other) {
  using std::swap;
  swap(data_, other->data_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

Int64Message::Int64Message()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int64Message.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.Int64Message)
}
Int64Message::Int64Message(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int64Message.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.Int64Message)
}
Int64Message::Int64Message(const Int64Message& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  data_ = from.data_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.Int64Message)
}

void Int64Message::SharedCtor() {
  data_ = GOOGLE_LONGLONG(0);
}

Int64Message::~Int64Message() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.Int64Message)
  SharedDtor();
}

void Int64Message::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void Int64Message::ArenaDtor(void* object) {
  Int64Message* _this = reinterpret_cast< Int64Message* >(object);
  (void)_this;
}
void Int64Message::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void Int64Message::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Int64Message::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Int64Message& Int64Message::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int64Message.base);
  return *internal_default_instance();
}


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

  data_ = GOOGLE_LONGLONG(0);
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool Int64Message::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:protobuf_unittest.Int64Message)
  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)) {
      // optional int64 data = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_data();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &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:protobuf_unittest.Int64Message)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.Int64Message)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int64 data = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->data(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.Int64Message)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int64 data = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->data(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.Int64Message)
  return target;
}

size_t Int64Message::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.Int64Message)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int64 data = 1;
  if (has_data()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int64Size(
        this->data());
  }

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

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

void Int64Message::MergeFrom(const Int64Message& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.Int64Message)
  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_data()) {
    set_data(from.data());
  }
}

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

void Int64Message::CopyFrom(const Int64Message& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.Int64Message)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Int64Message::Swap(Int64Message* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    Int64Message* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void Int64Message::UnsafeArenaSwap(Int64Message* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void Int64Message::InternalSwap(Int64Message* other) {
  using std::swap;
  swap(data_, other->data_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

Uint64Message::Uint64Message()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint64Message.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.Uint64Message)
}
Uint64Message::Uint64Message(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint64Message.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.Uint64Message)
}
Uint64Message::Uint64Message(const Uint64Message& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  data_ = from.data_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.Uint64Message)
}

void Uint64Message::SharedCtor() {
  data_ = GOOGLE_ULONGLONG(0);
}

Uint64Message::~Uint64Message() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.Uint64Message)
  SharedDtor();
}

void Uint64Message::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void Uint64Message::ArenaDtor(void* object) {
  Uint64Message* _this = reinterpret_cast< Uint64Message* >(object);
  (void)_this;
}
void Uint64Message::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void Uint64Message::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Uint64Message::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Uint64Message& Uint64Message::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint64Message.base);
  return *internal_default_instance();
}


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

  data_ = GOOGLE_ULONGLONG(0);
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool Uint64Message::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:protobuf_unittest.Uint64Message)
  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)) {
      // optional uint64 data = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_data();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &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:protobuf_unittest.Uint64Message)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.Uint64Message)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional uint64 data = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->data(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.Uint64Message)
}

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

  cached_has_bits = _has_bits_[0];
  // optional uint64 data = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->data(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.Uint64Message)
  return target;
}

size_t Uint64Message::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.Uint64Message)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional uint64 data = 1;
  if (has_data()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::UInt64Size(
        this->data());
  }

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

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

void Uint64Message::MergeFrom(const Uint64Message& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.Uint64Message)
  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_data()) {
    set_data(from.data());
  }
}

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

void Uint64Message::CopyFrom(const Uint64Message& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.Uint64Message)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Uint64Message::Swap(Uint64Message* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    Uint64Message* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void Uint64Message::UnsafeArenaSwap(Uint64Message* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void Uint64Message::InternalSwap(Uint64Message* other) {
  using std::swap;
  swap(data_, other->data_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

BoolMessage::BoolMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BoolMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.BoolMessage)
}
BoolMessage::BoolMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BoolMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.BoolMessage)
}
BoolMessage::BoolMessage(const BoolMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  data_ = from.data_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.BoolMessage)
}

void BoolMessage::SharedCtor() {
  data_ = false;
}

BoolMessage::~BoolMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.BoolMessage)
  SharedDtor();
}

void BoolMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void BoolMessage::ArenaDtor(void* object) {
  BoolMessage* _this = reinterpret_cast< BoolMessage* >(object);
  (void)_this;
}
void BoolMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void BoolMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* BoolMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const BoolMessage& BoolMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BoolMessage.base);
  return *internal_default_instance();
}


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

  data_ = false;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool BoolMessage::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:protobuf_unittest.BoolMessage)
  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)) {
      // optional bool data = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_data();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &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:protobuf_unittest.BoolMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.BoolMessage)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional bool data = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->data(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.BoolMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional bool data = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->data(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.BoolMessage)
  return target;
}

size_t BoolMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.BoolMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional bool data = 1;
  if (has_data()) {
    total_size += 1 + 1;
  }

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

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

void BoolMessage::MergeFrom(const BoolMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.BoolMessage)
  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_data()) {
    set_data(from.data());
  }
}

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

void BoolMessage::CopyFrom(const BoolMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.BoolMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void BoolMessage::Swap(BoolMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    BoolMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void BoolMessage::UnsafeArenaSwap(BoolMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void BoolMessage::InternalSwap(BoolMessage* other) {
  using std::swap;
  swap(data_, other->data_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestOneof_FooGroup::TestOneof_FooGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof_FooGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneof.FooGroup)
}
TestOneof_FooGroup::TestOneof_FooGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof_FooGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneof.FooGroup)
}
TestOneof_FooGroup::TestOneof_FooGroup(const TestOneof_FooGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_b()) {
    b_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.b(),
      GetArenaNoVirtual());
  }
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneof.FooGroup)
}

void TestOneof_FooGroup::SharedCtor() {
  b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  a_ = 0;
}

TestOneof_FooGroup::~TestOneof_FooGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneof.FooGroup)
  SharedDtor();
}

void TestOneof_FooGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  b_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void TestOneof_FooGroup::ArenaDtor(void* object) {
  TestOneof_FooGroup* _this = reinterpret_cast< TestOneof_FooGroup* >(object);
  (void)_this;
}
void TestOneof_FooGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestOneof_FooGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestOneof_FooGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestOneof_FooGroup& TestOneof_FooGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof_FooGroup.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    b_.ClearNonDefaultToEmpty();
  }
  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestOneof_FooGroup::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:protobuf_unittest.TestOneof.FooGroup)
  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)) {
      // optional int32 a = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string b = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_b()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->b().data(), static_cast<int>(this->b().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneof.FooGroup.b");
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneof.FooGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneof.FooGroup)
  return false;
#undef DO_
}

void TestOneof_FooGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneof.FooGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 5;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->a(), output);
  }

  // optional string b = 6;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->b().data(), static_cast<int>(this->b().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestOneof.FooGroup.b");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      6, this->b(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneof.FooGroup)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 5;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->a(), target);
  }

  // optional string b = 6;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->b().data(), static_cast<int>(this->b().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestOneof.FooGroup.b");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        6, this->b(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneof.FooGroup)
  return target;
}

size_t TestOneof_FooGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneof.FooGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional string b = 6;
    if (has_b()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->b());
    }

    // optional int32 a = 5;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->a());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      set_b(from.b());
    }
    if (cached_has_bits & 0x00000002u) {
      a_ = from.a_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestOneof_FooGroup::CopyFrom(const TestOneof_FooGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneof.FooGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestOneof_FooGroup::Swap(TestOneof_FooGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestOneof_FooGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestOneof_FooGroup::UnsafeArenaSwap(TestOneof_FooGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestOneof_FooGroup::InternalSwap(TestOneof_FooGroup* other) {
  using std::swap;
  b_.Swap(&other->b_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestOneof::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestOneof_default_instance_.foo_int_ = 0;
  ::protobuf_unittest::_TestOneof_default_instance_.foo_string_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::protobuf_unittest::_TestOneof_default_instance_.foo_message_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
  ::protobuf_unittest::_TestOneof_default_instance_.foogroup_ = const_cast< ::protobuf_unittest::TestOneof_FooGroup*>(
      ::protobuf_unittest::TestOneof_FooGroup::internal_default_instance());
}
void TestOneof::set_allocated_foo_message(::protobuf_unittest::TestAllTypes* foo_message) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_foo();
  if (foo_message) {
    ::google::protobuf::Arena* submessage_arena =
      ::google::protobuf::Arena::GetArena(foo_message);
    if (message_arena != submessage_arena) {
      foo_message = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, foo_message, submessage_arena);
    }
    set_has_foo_message();
    foo_.foo_message_ = foo_message;
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneof.foo_message)
}
void TestOneof::set_allocated_foogroup(::protobuf_unittest::TestOneof_FooGroup* foogroup) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_foo();
  if (foogroup) {
    ::google::protobuf::Arena* submessage_arena =
      ::google::protobuf::Arena::GetArena(foogroup);
    if (message_arena != submessage_arena) {
      foogroup = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, foogroup, submessage_arena);
    }
    set_has_foogroup();
    foo_.foogroup_ = foogroup;
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneof.foogroup)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestOneof::kFooIntFieldNumber;
const int TestOneof::kFooStringFieldNumber;
const int TestOneof::kFooMessageFieldNumber;
const int TestOneof::kFoogroupFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestOneof::TestOneof()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneof)
}
TestOneof::TestOneof(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneof)
}
TestOneof::TestOneof(const TestOneof& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  clear_has_foo();
  switch (from.foo_case()) {
    case kFooInt: {
      set_foo_int(from.foo_int());
      break;
    }
    case kFooString: {
      set_foo_string(from.foo_string());
      break;
    }
    case kFooMessage: {
      mutable_foo_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.foo_message());
      break;
    }
    case kFoogroup: {
      mutable_foogroup()->::protobuf_unittest::TestOneof_FooGroup::MergeFrom(from.foogroup());
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneof)
}

void TestOneof::SharedCtor() {
  clear_has_foo();
}

TestOneof::~TestOneof() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneof)
  SharedDtor();
}

void TestOneof::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (has_foo()) {
    clear_foo();
  }
}

void TestOneof::ArenaDtor(void* object) {
  TestOneof* _this = reinterpret_cast< TestOneof* >(object);
  (void)_this;
}
void TestOneof::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestOneof::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestOneof::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestOneof& TestOneof::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof.base);
  return *internal_default_instance();
}


void TestOneof::clear_foo() {
// @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestOneof)
  switch (foo_case()) {
    case kFooInt: {
      // No need to clear
      break;
    }
    case kFooString: {
      foo_.foo_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
          GetArenaNoVirtual());
      break;
    }
    case kFooMessage: {
      if (GetArenaNoVirtual() == NULL) {
        delete foo_.foo_message_;
      }
      break;
    }
    case kFoogroup: {
      if (GetArenaNoVirtual() == NULL) {
        delete foo_.foogroup_;
      }
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = FOO_NOT_SET;
}


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

  clear_foo();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestOneof::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:protobuf_unittest.TestOneof)
  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)) {
      // optional int32 foo_int = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          clear_foo();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &foo_.foo_int_)));
          set_has_foo_int();
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string foo_string = 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_foo_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->foo_string().data(), static_cast<int>(this->foo_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneof.foo_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestAllTypes foo_message = 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_foo_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional group FooGroup = 4 { ... };
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(35u /* 35 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                4, input, mutable_foogroup()));
        } 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:protobuf_unittest.TestOneof)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneof)
  return false;
#undef DO_
}

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

  switch (foo_case()) {
    case kFooInt:
      ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->foo_int(), output);
      break;
    case kFooString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->foo_string().data(), static_cast<int>(this->foo_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof.foo_string");
      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
        2, this->foo_string(), output);
      break;
    case kFooMessage:
      ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
        3, this->_internal_foo_message(), output);
      break;
    case kFoogroup:
      ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
        4, this->_internal_foogroup(), output);
      break;
    default: ;
  }
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneof)
}

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

  switch (foo_case()) {
    case kFooInt:
      target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->foo_int(), target);
      break;
    case kFooString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->foo_string().data(), static_cast<int>(this->foo_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof.foo_string");
      target =
        ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
          2, this->foo_string(), target);
      break;
    case kFooMessage:
      target = ::google::protobuf::internal::WireFormatLite::
        InternalWriteMessageToArray(
          3, this->_internal_foo_message(), deterministic, target);
      break;
    case kFoogroup:
      target = ::google::protobuf::internal::WireFormatLite::
        InternalWriteGroupToArray(
          4, this->_internal_foogroup(), deterministic, target);
      break;
    default: ;
  }
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneof)
  return target;
}

size_t TestOneof::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneof)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  switch (foo_case()) {
    // optional int32 foo_int = 1;
    case kFooInt: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->foo_int());
      break;
    }
    // optional string foo_string = 2;
    case kFooString: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->foo_string());
      break;
    }
    // optional .protobuf_unittest.TestAllTypes foo_message = 3;
    case kFooMessage: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *foo_.foo_message_);
      break;
    }
    // optional group FooGroup = 4 { ... };
    case kFoogroup: {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *foo_.foogroup_);
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  switch (from.foo_case()) {
    case kFooInt: {
      set_foo_int(from.foo_int());
      break;
    }
    case kFooString: {
      set_foo_string(from.foo_string());
      break;
    }
    case kFooMessage: {
      mutable_foo_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.foo_message());
      break;
    }
    case kFoogroup: {
      mutable_foogroup()->::protobuf_unittest::TestOneof_FooGroup::MergeFrom(from.foogroup());
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
}

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

void TestOneof::CopyFrom(const TestOneof& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneof)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestOneof::Swap(TestOneof* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestOneof* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestOneof::UnsafeArenaSwap(TestOneof* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestOneof::InternalSwap(TestOneof* other) {
  using std::swap;
  swap(foo_, other->foo_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestOneofBackwardsCompatible_FooGroup::TestOneofBackwardsCompatible_FooGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible_FooGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
}
TestOneofBackwardsCompatible_FooGroup::TestOneofBackwardsCompatible_FooGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible_FooGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
}
TestOneofBackwardsCompatible_FooGroup::TestOneofBackwardsCompatible_FooGroup(const TestOneofBackwardsCompatible_FooGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_b()) {
    b_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.b(),
      GetArenaNoVirtual());
  }
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
}

void TestOneofBackwardsCompatible_FooGroup::SharedCtor() {
  b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  a_ = 0;
}

TestOneofBackwardsCompatible_FooGroup::~TestOneofBackwardsCompatible_FooGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  SharedDtor();
}

void TestOneofBackwardsCompatible_FooGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  b_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void TestOneofBackwardsCompatible_FooGroup::ArenaDtor(void* object) {
  TestOneofBackwardsCompatible_FooGroup* _this = reinterpret_cast< TestOneofBackwardsCompatible_FooGroup* >(object);
  (void)_this;
}
void TestOneofBackwardsCompatible_FooGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestOneofBackwardsCompatible_FooGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestOneofBackwardsCompatible_FooGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestOneofBackwardsCompatible_FooGroup& TestOneofBackwardsCompatible_FooGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible_FooGroup.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    b_.ClearNonDefaultToEmpty();
  }
  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestOneofBackwardsCompatible_FooGroup::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:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  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)) {
      // optional int32 a = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string b = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_b()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->b().data(), static_cast<int>(this->b().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneofBackwardsCompatible.FooGroup.b");
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  return false;
#undef DO_
}

void TestOneofBackwardsCompatible_FooGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 5;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->a(), output);
  }

  // optional string b = 6;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->b().data(), static_cast<int>(this->b().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestOneofBackwardsCompatible.FooGroup.b");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      6, this->b(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 5;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->a(), target);
  }

  // optional string b = 6;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->b().data(), static_cast<int>(this->b().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestOneofBackwardsCompatible.FooGroup.b");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        6, this->b(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  return target;
}

size_t TestOneofBackwardsCompatible_FooGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional string b = 6;
    if (has_b()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->b());
    }

    // optional int32 a = 5;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->a());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      set_b(from.b());
    }
    if (cached_has_bits & 0x00000002u) {
      a_ = from.a_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestOneofBackwardsCompatible_FooGroup::CopyFrom(const TestOneofBackwardsCompatible_FooGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestOneofBackwardsCompatible_FooGroup::Swap(TestOneofBackwardsCompatible_FooGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestOneofBackwardsCompatible_FooGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestOneofBackwardsCompatible_FooGroup::UnsafeArenaSwap(TestOneofBackwardsCompatible_FooGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestOneofBackwardsCompatible_FooGroup::InternalSwap(TestOneofBackwardsCompatible_FooGroup* other) {
  using std::swap;
  b_.Swap(&other->b_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestOneofBackwardsCompatible::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestOneofBackwardsCompatible_default_instance_._instance.get_mutable()->foo_message_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
  ::protobuf_unittest::_TestOneofBackwardsCompatible_default_instance_._instance.get_mutable()->foogroup_ = const_cast< ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup*>(
      ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup::internal_default_instance());
}
void TestOneofBackwardsCompatible::unsafe_arena_set_allocated_foo_message(
    ::protobuf_unittest::TestAllTypes* foo_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete foo_message_;
  }
  foo_message_ = foo_message;
  if (foo_message) {
    set_has_foo_message();
  } else {
    clear_has_foo_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestOneofBackwardsCompatible.foo_message)
}
void TestOneofBackwardsCompatible::unsafe_arena_set_allocated_foogroup(
    ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup* foogroup) {
  if (GetArenaNoVirtual() == NULL) {
    delete foogroup_;
  }
  foogroup_ = foogroup;
  if (foogroup) {
    set_has_foogroup();
  } else {
    clear_has_foogroup();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestOneofBackwardsCompatible.foogroup)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestOneofBackwardsCompatible::kFooIntFieldNumber;
const int TestOneofBackwardsCompatible::kFooStringFieldNumber;
const int TestOneofBackwardsCompatible::kFooMessageFieldNumber;
const int TestOneofBackwardsCompatible::kFoogroupFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestOneofBackwardsCompatible::TestOneofBackwardsCompatible()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneofBackwardsCompatible)
}
TestOneofBackwardsCompatible::TestOneofBackwardsCompatible(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneofBackwardsCompatible)
}
TestOneofBackwardsCompatible::TestOneofBackwardsCompatible(const TestOneofBackwardsCompatible& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  foo_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_foo_string()) {
    foo_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.foo_string(),
      GetArenaNoVirtual());
  }
  if (from.has_foo_message()) {
    foo_message_ = new ::protobuf_unittest::TestAllTypes(*from.foo_message_);
  } else {
    foo_message_ = NULL;
  }
  if (from.has_foogroup()) {
    foogroup_ = new ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup(*from.foogroup_);
  } else {
    foogroup_ = NULL;
  }
  foo_int_ = from.foo_int_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneofBackwardsCompatible)
}

void TestOneofBackwardsCompatible::SharedCtor() {
  foo_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&foo_message_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&foo_int_) -
      reinterpret_cast<char*>(&foo_message_)) + sizeof(foo_int_));
}

TestOneofBackwardsCompatible::~TestOneofBackwardsCompatible() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneofBackwardsCompatible)
  SharedDtor();
}

void TestOneofBackwardsCompatible::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  foo_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete foo_message_;
  if (this != internal_default_instance()) delete foogroup_;
}

void TestOneofBackwardsCompatible::ArenaDtor(void* object) {
  TestOneofBackwardsCompatible* _this = reinterpret_cast< TestOneofBackwardsCompatible* >(object);
  (void)_this;
}
void TestOneofBackwardsCompatible::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestOneofBackwardsCompatible::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestOneofBackwardsCompatible::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestOneofBackwardsCompatible& TestOneofBackwardsCompatible::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 7u) {
    if (cached_has_bits & 0x00000001u) {
      foo_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(foo_message_ != NULL);
      foo_message_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(foogroup_ != NULL);
      foogroup_->Clear();
    }
  }
  foo_int_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestOneofBackwardsCompatible::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:protobuf_unittest.TestOneofBackwardsCompatible)
  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)) {
      // optional int32 foo_int = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_foo_int();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &foo_int_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string foo_string = 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_foo_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->foo_string().data(), static_cast<int>(this->foo_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneofBackwardsCompatible.foo_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestAllTypes foo_message = 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_foo_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional group FooGroup = 4 { ... };
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(35u /* 35 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                4, input, mutable_foogroup()));
        } 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:protobuf_unittest.TestOneofBackwardsCompatible)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneofBackwardsCompatible)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 foo_int = 1;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->foo_int(), output);
  }

  // optional string foo_string = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->foo_string().data(), static_cast<int>(this->foo_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestOneofBackwardsCompatible.foo_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->foo_string(), output);
  }

  // optional .protobuf_unittest.TestAllTypes foo_message = 3;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->_internal_foo_message(), output);
  }

  // optional group FooGroup = 4 { ... };
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      4, this->_internal_foogroup(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneofBackwardsCompatible)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 foo_int = 1;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->foo_int(), target);
  }

  // optional string foo_string = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->foo_string().data(), static_cast<int>(this->foo_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestOneofBackwardsCompatible.foo_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->foo_string(), target);
  }

  // optional .protobuf_unittest.TestAllTypes foo_message = 3;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->_internal_foo_message(), deterministic, target);
  }

  // optional group FooGroup = 4 { ... };
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        4, this->_internal_foogroup(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneofBackwardsCompatible)
  return target;
}

size_t TestOneofBackwardsCompatible::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneofBackwardsCompatible)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 15u) {
    // optional string foo_string = 2;
    if (has_foo_string()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->foo_string());
    }

    // optional .protobuf_unittest.TestAllTypes foo_message = 3;
    if (has_foo_message()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *foo_message_);
    }

    // optional group FooGroup = 4 { ... };
    if (has_foogroup()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *foogroup_);
    }

    // optional int32 foo_int = 1;
    if (has_foo_int()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->foo_int());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 15u) {
    if (cached_has_bits & 0x00000001u) {
      set_foo_string(from.foo_string());
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_foo_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.foo_message());
    }
    if (cached_has_bits & 0x00000004u) {
      mutable_foogroup()->::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup::MergeFrom(from.foogroup());
    }
    if (cached_has_bits & 0x00000008u) {
      foo_int_ = from.foo_int_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestOneofBackwardsCompatible::CopyFrom(const TestOneofBackwardsCompatible& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneofBackwardsCompatible)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestOneofBackwardsCompatible::Swap(TestOneofBackwardsCompatible* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestOneofBackwardsCompatible* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestOneofBackwardsCompatible::UnsafeArenaSwap(TestOneofBackwardsCompatible* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestOneofBackwardsCompatible::InternalSwap(TestOneofBackwardsCompatible* other) {
  using std::swap;
  foo_string_.Swap(&other->foo_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(foo_message_, other->foo_message_);
  swap(foogroup_, other->foogroup_);
  swap(foo_int_, other->foo_int_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestOneof2_FooGroup::TestOneof2_FooGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_FooGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneof2.FooGroup)
}
TestOneof2_FooGroup::TestOneof2_FooGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_FooGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneof2.FooGroup)
}
TestOneof2_FooGroup::TestOneof2_FooGroup(const TestOneof2_FooGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_b()) {
    b_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.b(),
      GetArenaNoVirtual());
  }
  a_ = from.a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneof2.FooGroup)
}

void TestOneof2_FooGroup::SharedCtor() {
  b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  a_ = 0;
}

TestOneof2_FooGroup::~TestOneof2_FooGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneof2.FooGroup)
  SharedDtor();
}

void TestOneof2_FooGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  b_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void TestOneof2_FooGroup::ArenaDtor(void* object) {
  TestOneof2_FooGroup* _this = reinterpret_cast< TestOneof2_FooGroup* >(object);
  (void)_this;
}
void TestOneof2_FooGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestOneof2_FooGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestOneof2_FooGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestOneof2_FooGroup& TestOneof2_FooGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_FooGroup.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    b_.ClearNonDefaultToEmpty();
  }
  a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestOneof2_FooGroup::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:protobuf_unittest.TestOneof2.FooGroup)
  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)) {
      // optional int32 a = 9;
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
          set_has_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string b = 10;
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_b()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->b().data(), static_cast<int>(this->b().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneof2.FooGroup.b");
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneof2.FooGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneof2.FooGroup)
  return false;
#undef DO_
}

void TestOneof2_FooGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneof2.FooGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 9;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->a(), output);
  }

  // optional string b = 10;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->b().data(), static_cast<int>(this->b().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestOneof2.FooGroup.b");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      10, this->b(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneof2.FooGroup)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 a = 9;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->a(), target);
  }

  // optional string b = 10;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->b().data(), static_cast<int>(this->b().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestOneof2.FooGroup.b");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        10, this->b(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneof2.FooGroup)
  return target;
}

size_t TestOneof2_FooGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneof2.FooGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional string b = 10;
    if (has_b()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->b());
    }

    // optional int32 a = 9;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->a());
    }

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

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      set_b(from.b());
    }
    if (cached_has_bits & 0x00000002u) {
      a_ = from.a_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestOneof2_FooGroup::CopyFrom(const TestOneof2_FooGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneof2.FooGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestOneof2_FooGroup::Swap(TestOneof2_FooGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestOneof2_FooGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestOneof2_FooGroup::UnsafeArenaSwap(TestOneof2_FooGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestOneof2_FooGroup::InternalSwap(TestOneof2_FooGroup* other) {
  using std::swap;
  b_.Swap(&other->b_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(a_, other->a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestOneof2_NestedMessage::TestOneof2_NestedMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_NestedMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneof2.NestedMessage)
}
TestOneof2_NestedMessage::TestOneof2_NestedMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  corge_int_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_NestedMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneof2.NestedMessage)
}
TestOneof2_NestedMessage::TestOneof2_NestedMessage(const TestOneof2_NestedMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      corge_int_(from.corge_int_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  qux_int_ = from.qux_int_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneof2.NestedMessage)
}

void TestOneof2_NestedMessage::SharedCtor() {
  qux_int_ = GOOGLE_LONGLONG(0);
}

TestOneof2_NestedMessage::~TestOneof2_NestedMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneof2.NestedMessage)
  SharedDtor();
}

void TestOneof2_NestedMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestOneof2_NestedMessage::ArenaDtor(void* object) {
  TestOneof2_NestedMessage* _this = reinterpret_cast< TestOneof2_NestedMessage* >(object);
  (void)_this;
}
void TestOneof2_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestOneof2_NestedMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestOneof2_NestedMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestOneof2_NestedMessage& TestOneof2_NestedMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_NestedMessage.base);
  return *internal_default_instance();
}


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

  corge_int_.Clear();
  qux_int_ = GOOGLE_LONGLONG(0);
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestOneof2_NestedMessage::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:protobuf_unittest.TestOneof2.NestedMessage)
  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)) {
      // optional int64 qux_int = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_qux_int();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &qux_int_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 corge_int = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 16u, input, this->mutable_corge_int())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_corge_int())));
        } 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:protobuf_unittest.TestOneof2.NestedMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneof2.NestedMessage)
  return false;
#undef DO_
}

void TestOneof2_NestedMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneof2.NestedMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int64 qux_int = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->qux_int(), output);
  }

  // repeated int32 corge_int = 2;
  for (int i = 0, n = this->corge_int_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      2, this->corge_int(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneof2.NestedMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int64 qux_int = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->qux_int(), target);
  }

  // repeated int32 corge_int = 2;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt32ToArray(2, this->corge_int_, target);

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneof2.NestedMessage)
  return target;
}

size_t TestOneof2_NestedMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneof2.NestedMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated int32 corge_int = 2;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->corge_int_);
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->corge_int_size());
    total_size += data_size;
  }

  // optional int64 qux_int = 1;
  if (has_qux_int()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int64Size(
        this->qux_int());
  }

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

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

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

  corge_int_.MergeFrom(from.corge_int_);
  if (from.has_qux_int()) {
    set_qux_int(from.qux_int());
  }
}

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

void TestOneof2_NestedMessage::CopyFrom(const TestOneof2_NestedMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneof2.NestedMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestOneof2_NestedMessage::Swap(TestOneof2_NestedMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestOneof2_NestedMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestOneof2_NestedMessage::UnsafeArenaSwap(TestOneof2_NestedMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestOneof2_NestedMessage::InternalSwap(TestOneof2_NestedMessage* other) {
  using std::swap;
  corge_int_.InternalSwap(&other->corge_int_);
  swap(qux_int_, other->qux_int_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestOneof2::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestOneof2_default_instance_.foo_int_ = 0;
  ::protobuf_unittest::_TestOneof2_default_instance_.foo_string_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::protobuf_unittest::_TestOneof2_default_instance_.foo_cord_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::protobuf_unittest::_TestOneof2_default_instance_.foo_string_piece_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::protobuf_unittest::_TestOneof2_default_instance_.foo_bytes_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::protobuf_unittest::_TestOneof2_default_instance_.foo_enum_ = 1;
  ::protobuf_unittest::_TestOneof2_default_instance_.foo_message_ = const_cast< ::protobuf_unittest::TestOneof2_NestedMessage*>(
      ::protobuf_unittest::TestOneof2_NestedMessage::internal_default_instance());
  ::protobuf_unittest::_TestOneof2_default_instance_.foogroup_ = const_cast< ::protobuf_unittest::TestOneof2_FooGroup*>(
      ::protobuf_unittest::TestOneof2_FooGroup::internal_default_instance());
  ::protobuf_unittest::_TestOneof2_default_instance_.foo_lazy_message_ = const_cast< ::protobuf_unittest::TestOneof2_NestedMessage*>(
      ::protobuf_unittest::TestOneof2_NestedMessage::internal_default_instance());
  ::protobuf_unittest::_TestOneof2_default_instance_.bar_int_ = 5;
  ::protobuf_unittest::_TestOneof2_default_instance_.bar_string_.UnsafeSetDefault(
      &::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_.get());
  ::protobuf_unittest::_TestOneof2_default_instance_.bar_cord_.UnsafeSetDefault(
      &::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_.get());
  ::protobuf_unittest::_TestOneof2_default_instance_.bar_string_piece_.UnsafeSetDefault(
      &::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_.get());
  ::protobuf_unittest::_TestOneof2_default_instance_.bar_bytes_.UnsafeSetDefault(
      &::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_.get());
  ::protobuf_unittest::_TestOneof2_default_instance_.bar_enum_ = 2;
}
void TestOneof2::set_allocated_foo_message(::protobuf_unittest::TestOneof2_NestedMessage* foo_message) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_foo();
  if (foo_message) {
    ::google::protobuf::Arena* submessage_arena =
      ::google::protobuf::Arena::GetArena(foo_message);
    if (message_arena != submessage_arena) {
      foo_message = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, foo_message, submessage_arena);
    }
    set_has_foo_message();
    foo_.foo_message_ = foo_message;
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneof2.foo_message)
}
void TestOneof2::set_allocated_foogroup(::protobuf_unittest::TestOneof2_FooGroup* foogroup) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_foo();
  if (foogroup) {
    ::google::protobuf::Arena* submessage_arena =
      ::google::protobuf::Arena::GetArena(foogroup);
    if (message_arena != submessage_arena) {
      foogroup = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, foogroup, submessage_arena);
    }
    set_has_foogroup();
    foo_.foogroup_ = foogroup;
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneof2.foogroup)
}
void TestOneof2::set_allocated_foo_lazy_message(::protobuf_unittest::TestOneof2_NestedMessage* foo_lazy_message) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_foo();
  if (foo_lazy_message) {
    ::google::protobuf::Arena* submessage_arena =
      ::google::protobuf::Arena::GetArena(foo_lazy_message);
    if (message_arena != submessage_arena) {
      foo_lazy_message = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, foo_lazy_message, submessage_arena);
    }
    set_has_foo_lazy_message();
    foo_.foo_lazy_message_ = foo_lazy_message;
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneof2.foo_lazy_message)
}
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_;
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_;
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestOneof2::kFooIntFieldNumber;
const int TestOneof2::kFooStringFieldNumber;
const int TestOneof2::kFooCordFieldNumber;
const int TestOneof2::kFooStringPieceFieldNumber;
const int TestOneof2::kFooBytesFieldNumber;
const int TestOneof2::kFooEnumFieldNumber;
const int TestOneof2::kFooMessageFieldNumber;
const int TestOneof2::kFoogroupFieldNumber;
const int TestOneof2::kFooLazyMessageFieldNumber;
const int TestOneof2::kBarIntFieldNumber;
const int TestOneof2::kBarStringFieldNumber;
const int TestOneof2::kBarCordFieldNumber;
const int TestOneof2::kBarStringPieceFieldNumber;
const int TestOneof2::kBarBytesFieldNumber;
const int TestOneof2::kBarEnumFieldNumber;
const int TestOneof2::kBazIntFieldNumber;
const int TestOneof2::kBazStringFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestOneof2::TestOneof2()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneof2)
}
TestOneof2::TestOneof2(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneof2)
}
TestOneof2::TestOneof2(const TestOneof2& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  baz_string_.UnsafeSetDefault(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get());
  if (from.has_baz_string()) {
    baz_string_.Set(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get(), from.baz_string(),
      GetArenaNoVirtual());
  }
  baz_int_ = from.baz_int_;
  clear_has_foo();
  switch (from.foo_case()) {
    case kFooInt: {
      set_foo_int(from.foo_int());
      break;
    }
    case kFooString: {
      set_foo_string(from.foo_string());
      break;
    }
    case kFooCord: {
      set_foo_cord(from.foo_cord());
      break;
    }
    case kFooStringPiece: {
      set_foo_string_piece(from.foo_string_piece());
      break;
    }
    case kFooBytes: {
      set_foo_bytes(from.foo_bytes());
      break;
    }
    case kFooEnum: {
      set_foo_enum(from.foo_enum());
      break;
    }
    case kFooMessage: {
      mutable_foo_message()->::protobuf_unittest::TestOneof2_NestedMessage::MergeFrom(from.foo_message());
      break;
    }
    case kFoogroup: {
      mutable_foogroup()->::protobuf_unittest::TestOneof2_FooGroup::MergeFrom(from.foogroup());
      break;
    }
    case kFooLazyMessage: {
      mutable_foo_lazy_message()->::protobuf_unittest::TestOneof2_NestedMessage::MergeFrom(from.foo_lazy_message());
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  clear_has_bar();
  switch (from.bar_case()) {
    case kBarInt: {
      set_bar_int(from.bar_int());
      break;
    }
    case kBarString: {
      set_bar_string(from.bar_string());
      break;
    }
    case kBarCord: {
      set_bar_cord(from.bar_cord());
      break;
    }
    case kBarStringPiece: {
      set_bar_string_piece(from.bar_string_piece());
      break;
    }
    case kBarBytes: {
      set_bar_bytes(from.bar_bytes());
      break;
    }
    case kBarEnum: {
      set_bar_enum(from.bar_enum());
      break;
    }
    case BAR_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneof2)
}

void TestOneof2::SharedCtor() {
  baz_string_.UnsafeSetDefault(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get());
  baz_int_ = 0;
  clear_has_foo();
  clear_has_bar();
}

TestOneof2::~TestOneof2() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneof2)
  SharedDtor();
}

void TestOneof2::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  baz_string_.DestroyNoArena(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get());
  if (has_foo()) {
    clear_foo();
  }
  if (has_bar()) {
    clear_bar();
  }
}

void TestOneof2::ArenaDtor(void* object) {
  TestOneof2* _this = reinterpret_cast< TestOneof2* >(object);
  (void)_this;
}
void TestOneof2::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestOneof2::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestOneof2::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestOneof2& TestOneof2::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2.base);
  return *internal_default_instance();
}


void TestOneof2::clear_foo() {
// @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestOneof2)
  switch (foo_case()) {
    case kFooInt: {
      // No need to clear
      break;
    }
    case kFooString: {
      foo_.foo_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
          GetArenaNoVirtual());
      break;
    }
    case kFooCord: {
      foo_.foo_cord_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
          GetArenaNoVirtual());
      break;
    }
    case kFooStringPiece: {
      foo_.foo_string_piece_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
          GetArenaNoVirtual());
      break;
    }
    case kFooBytes: {
      foo_.foo_bytes_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
          GetArenaNoVirtual());
      break;
    }
    case kFooEnum: {
      // No need to clear
      break;
    }
    case kFooMessage: {
      if (GetArenaNoVirtual() == NULL) {
        delete foo_.foo_message_;
      }
      break;
    }
    case kFoogroup: {
      if (GetArenaNoVirtual() == NULL) {
        delete foo_.foogroup_;
      }
      break;
    }
    case kFooLazyMessage: {
      if (GetArenaNoVirtual() == NULL) {
        delete foo_.foo_lazy_message_;
      }
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = FOO_NOT_SET;
}

void TestOneof2::clear_bar() {
// @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestOneof2)
  switch (bar_case()) {
    case kBarInt: {
      // No need to clear
      break;
    }
    case kBarString: {
      bar_.bar_string_.Destroy(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_.get(),
          GetArenaNoVirtual());
      break;
    }
    case kBarCord: {
      bar_.bar_cord_.Destroy(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_.get(),
          GetArenaNoVirtual());
      break;
    }
    case kBarStringPiece: {
      bar_.bar_string_piece_.Destroy(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_.get(),
          GetArenaNoVirtual());
      break;
    }
    case kBarBytes: {
      bar_.bar_bytes_.Destroy(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_.get(),
          GetArenaNoVirtual());
      break;
    }
    case kBarEnum: {
      // No need to clear
      break;
    }
    case BAR_NOT_SET: {
      break;
    }
  }
  _oneof_case_[1] = BAR_NOT_SET;
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    baz_string_.ClearToDefault(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get(), GetArenaNoVirtual());
  }
  baz_int_ = 0;
  clear_foo();
  clear_bar();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestOneof2::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:protobuf_unittest.TestOneof2)
  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)) {
      // optional int32 foo_int = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          clear_foo();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &foo_.foo_int_)));
          set_has_foo_int();
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string foo_string = 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_foo_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->foo_string().data(), static_cast<int>(this->foo_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneof2.foo_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string foo_cord = 3 [ctype = CORD];
      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->mutable_foo_cord()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->foo_cord().data(), static_cast<int>(this->foo_cord().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneof2.foo_cord");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string foo_string_piece = 4 [ctype = STRING_PIECE];
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_foo_string_piece()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->foo_string_piece().data(), static_cast<int>(this->foo_string_piece().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneof2.foo_string_piece");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bytes foo_bytes = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_foo_bytes()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestOneof2.NestedEnum foo_enum = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::TestOneof2_NestedEnum_IsValid(value)) {
            set_foo_enum(static_cast< ::protobuf_unittest::TestOneof2_NestedEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                6, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestOneof2.NestedMessage foo_message = 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_foo_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional group FooGroup = 8 { ... };
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(67u /* 67 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                8, input, mutable_foogroup()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestOneof2.NestedMessage foo_lazy_message = 11 [lazy = true];
      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_foo_lazy_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 bar_int = 12 [default = 5];
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(96u /* 96 & 0xFF */)) {
          clear_bar();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &bar_.bar_int_)));
          set_has_bar_int();
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string bar_string = 13 [default = "STRING"];
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_bar_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->bar_string().data(), static_cast<int>(this->bar_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneof2.bar_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string bar_cord = 14 [default = "CORD", ctype = CORD];
      case 14: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_bar_cord()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->bar_cord().data(), static_cast<int>(this->bar_cord().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneof2.bar_cord");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string bar_string_piece = 15 [default = "SPIECE", ctype = STRING_PIECE];
      case 15: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_bar_string_piece()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->bar_string_piece().data(), static_cast<int>(this->bar_string_piece().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneof2.bar_string_piece");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bytes bar_bytes = 16 [default = "BYTES"];
      case 16: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(130u /* 130 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_bar_bytes()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestOneof2.NestedEnum bar_enum = 17 [default = BAR];
      case 17: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::TestOneof2_NestedEnum_IsValid(value)) {
            set_bar_enum(static_cast< ::protobuf_unittest::TestOneof2_NestedEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                17, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 baz_int = 18;
      case 18: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(144u /* 144 & 0xFF */)) {
          set_has_baz_int();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &baz_int_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string baz_string = 19 [default = "BAZ"];
      case 19: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_baz_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->baz_string().data(), static_cast<int>(this->baz_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestOneof2.baz_string");
        } 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:protobuf_unittest.TestOneof2)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneof2)
  return false;
#undef DO_
}

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

  switch (foo_case()) {
    case kFooInt:
      ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->foo_int(), output);
      break;
    case kFooString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->foo_string().data(), static_cast<int>(this->foo_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.foo_string");
      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
        2, this->foo_string(), output);
      break;
    case kFooCord:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->foo_cord().data(), static_cast<int>(this->foo_cord().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.foo_cord");
      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
        3, this->foo_cord(), output);
      break;
    case kFooStringPiece:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->foo_string_piece().data(), static_cast<int>(this->foo_string_piece().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.foo_string_piece");
      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
        4, this->foo_string_piece(), output);
      break;
    case kFooBytes:
      ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
        5, this->foo_bytes(), output);
      break;
    case kFooEnum:
      ::google::protobuf::internal::WireFormatLite::WriteEnum(
        6, this->foo_enum(), output);
      break;
    case kFooMessage:
      ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
        7, this->_internal_foo_message(), output);
      break;
    case kFoogroup:
      ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
        8, this->_internal_foogroup(), output);
      break;
    case kFooLazyMessage:
      ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
        11, this->_internal_foo_lazy_message(), output);
      break;
    default: ;
  }
  switch (bar_case()) {
    case kBarInt:
      ::google::protobuf::internal::WireFormatLite::WriteInt32(12, this->bar_int(), output);
      break;
    case kBarString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->bar_string().data(), static_cast<int>(this->bar_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.bar_string");
      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
        13, this->bar_string(), output);
      break;
    case kBarCord:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->bar_cord().data(), static_cast<int>(this->bar_cord().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.bar_cord");
      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
        14, this->bar_cord(), output);
      break;
    case kBarStringPiece:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->bar_string_piece().data(), static_cast<int>(this->bar_string_piece().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.bar_string_piece");
      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
        15, this->bar_string_piece(), output);
      break;
    case kBarBytes:
      ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
        16, this->bar_bytes(), output);
      break;
    case kBarEnum:
      ::google::protobuf::internal::WireFormatLite::WriteEnum(
        17, this->bar_enum(), output);
      break;
    default: ;
  }
  cached_has_bits = _has_bits_[0];
  // optional int32 baz_int = 18;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(18, this->baz_int(), output);
  }

  // optional string baz_string = 19 [default = "BAZ"];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->baz_string().data(), static_cast<int>(this->baz_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestOneof2.baz_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      19, this->baz_string(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneof2)
}

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

  switch (foo_case()) {
    case kFooInt:
      target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->foo_int(), target);
      break;
    case kFooString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->foo_string().data(), static_cast<int>(this->foo_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.foo_string");
      target =
        ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
          2, this->foo_string(), target);
      break;
    case kFooCord:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->foo_cord().data(), static_cast<int>(this->foo_cord().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.foo_cord");
      target =
        ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
          3, this->foo_cord(), target);
      break;
    case kFooStringPiece:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->foo_string_piece().data(), static_cast<int>(this->foo_string_piece().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.foo_string_piece");
      target =
        ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
          4, this->foo_string_piece(), target);
      break;
    case kFooBytes:
      target =
        ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
          5, this->foo_bytes(), target);
      break;
    case kFooEnum:
      target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
        6, this->foo_enum(), target);
      break;
    case kFooMessage:
      target = ::google::protobuf::internal::WireFormatLite::
        InternalWriteMessageToArray(
          7, this->_internal_foo_message(), deterministic, target);
      break;
    case kFoogroup:
      target = ::google::protobuf::internal::WireFormatLite::
        InternalWriteGroupToArray(
          8, this->_internal_foogroup(), deterministic, target);
      break;
    case kFooLazyMessage:
      target = ::google::protobuf::internal::WireFormatLite::
        InternalWriteMessageToArray(
          11, this->_internal_foo_lazy_message(), deterministic, target);
      break;
    default: ;
  }
  switch (bar_case()) {
    case kBarInt:
      target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(12, this->bar_int(), target);
      break;
    case kBarString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->bar_string().data(), static_cast<int>(this->bar_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.bar_string");
      target =
        ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
          13, this->bar_string(), target);
      break;
    case kBarCord:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->bar_cord().data(), static_cast<int>(this->bar_cord().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.bar_cord");
      target =
        ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
          14, this->bar_cord(), target);
      break;
    case kBarStringPiece:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->bar_string_piece().data(), static_cast<int>(this->bar_string_piece().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestOneof2.bar_string_piece");
      target =
        ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
          15, this->bar_string_piece(), target);
      break;
    case kBarBytes:
      target =
        ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
          16, this->bar_bytes(), target);
      break;
    case kBarEnum:
      target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
        17, this->bar_enum(), target);
      break;
    default: ;
  }
  cached_has_bits = _has_bits_[0];
  // optional int32 baz_int = 18;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(18, this->baz_int(), target);
  }

  // optional string baz_string = 19 [default = "BAZ"];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->baz_string().data(), static_cast<int>(this->baz_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestOneof2.baz_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        19, this->baz_string(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneof2)
  return target;
}

size_t TestOneof2::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneof2)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional string baz_string = 19 [default = "BAZ"];
    if (has_baz_string()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->baz_string());
    }

    // optional int32 baz_int = 18;
    if (has_baz_int()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->baz_int());
    }

  }
  switch (foo_case()) {
    // optional int32 foo_int = 1;
    case kFooInt: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->foo_int());
      break;
    }
    // optional string foo_string = 2;
    case kFooString: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->foo_string());
      break;
    }
    // optional string foo_cord = 3 [ctype = CORD];
    case kFooCord: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->foo_cord());
      break;
    }
    // optional string foo_string_piece = 4 [ctype = STRING_PIECE];
    case kFooStringPiece: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->foo_string_piece());
      break;
    }
    // optional bytes foo_bytes = 5;
    case kFooBytes: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->foo_bytes());
      break;
    }
    // optional .protobuf_unittest.TestOneof2.NestedEnum foo_enum = 6;
    case kFooEnum: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->foo_enum());
      break;
    }
    // optional .protobuf_unittest.TestOneof2.NestedMessage foo_message = 7;
    case kFooMessage: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *foo_.foo_message_);
      break;
    }
    // optional group FooGroup = 8 { ... };
    case kFoogroup: {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *foo_.foogroup_);
      break;
    }
    // optional .protobuf_unittest.TestOneof2.NestedMessage foo_lazy_message = 11 [lazy = true];
    case kFooLazyMessage: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *foo_.foo_lazy_message_);
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  switch (bar_case()) {
    // optional int32 bar_int = 12 [default = 5];
    case kBarInt: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->bar_int());
      break;
    }
    // optional string bar_string = 13 [default = "STRING"];
    case kBarString: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->bar_string());
      break;
    }
    // optional string bar_cord = 14 [default = "CORD", ctype = CORD];
    case kBarCord: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->bar_cord());
      break;
    }
    // optional string bar_string_piece = 15 [default = "SPIECE", ctype = STRING_PIECE];
    case kBarStringPiece: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->bar_string_piece());
      break;
    }
    // optional bytes bar_bytes = 16 [default = "BYTES"];
    case kBarBytes: {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->bar_bytes());
      break;
    }
    // optional .protobuf_unittest.TestOneof2.NestedEnum bar_enum = 17 [default = BAR];
    case kBarEnum: {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->bar_enum());
      break;
    }
    case BAR_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      set_baz_string(from.baz_string());
    }
    if (cached_has_bits & 0x00000002u) {
      baz_int_ = from.baz_int_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  switch (from.foo_case()) {
    case kFooInt: {
      set_foo_int(from.foo_int());
      break;
    }
    case kFooString: {
      set_foo_string(from.foo_string());
      break;
    }
    case kFooCord: {
      set_foo_cord(from.foo_cord());
      break;
    }
    case kFooStringPiece: {
      set_foo_string_piece(from.foo_string_piece());
      break;
    }
    case kFooBytes: {
      set_foo_bytes(from.foo_bytes());
      break;
    }
    case kFooEnum: {
      set_foo_enum(from.foo_enum());
      break;
    }
    case kFooMessage: {
      mutable_foo_message()->::protobuf_unittest::TestOneof2_NestedMessage::MergeFrom(from.foo_message());
      break;
    }
    case kFoogroup: {
      mutable_foogroup()->::protobuf_unittest::TestOneof2_FooGroup::MergeFrom(from.foogroup());
      break;
    }
    case kFooLazyMessage: {
      mutable_foo_lazy_message()->::protobuf_unittest::TestOneof2_NestedMessage::MergeFrom(from.foo_lazy_message());
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  switch (from.bar_case()) {
    case kBarInt: {
      set_bar_int(from.bar_int());
      break;
    }
    case kBarString: {
      set_bar_string(from.bar_string());
      break;
    }
    case kBarCord: {
      set_bar_cord(from.bar_cord());
      break;
    }
    case kBarStringPiece: {
      set_bar_string_piece(from.bar_string_piece());
      break;
    }
    case kBarBytes: {
      set_bar_bytes(from.bar_bytes());
      break;
    }
    case kBarEnum: {
      set_bar_enum(from.bar_enum());
      break;
    }
    case BAR_NOT_SET: {
      break;
    }
  }
}

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

void TestOneof2::CopyFrom(const TestOneof2& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneof2)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestOneof2::Swap(TestOneof2* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestOneof2* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestOneof2::UnsafeArenaSwap(TestOneof2* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestOneof2::InternalSwap(TestOneof2* other) {
  using std::swap;
  baz_string_.Swap(&other->baz_string_, &::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get(),
    GetArenaNoVirtual());
  swap(baz_int_, other->baz_int_);
  swap(foo_, other->foo_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(bar_, other->bar_);
  swap(_oneof_case_[1], other->_oneof_case_[1]);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

TestRequiredOneof_NestedMessage::TestRequiredOneof_NestedMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof_NestedMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestRequiredOneof.NestedMessage)
}
TestRequiredOneof_NestedMessage::TestRequiredOneof_NestedMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof_NestedMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRequiredOneof.NestedMessage)
}
TestRequiredOneof_NestedMessage::TestRequiredOneof_NestedMessage(const TestRequiredOneof_NestedMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  required_double_ = from.required_double_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRequiredOneof.NestedMessage)
}

void TestRequiredOneof_NestedMessage::SharedCtor() {
  required_double_ = 0;
}

TestRequiredOneof_NestedMessage::~TestRequiredOneof_NestedMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestRequiredOneof.NestedMessage)
  SharedDtor();
}

void TestRequiredOneof_NestedMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestRequiredOneof_NestedMessage::ArenaDtor(void* object) {
  TestRequiredOneof_NestedMessage* _this = reinterpret_cast< TestRequiredOneof_NestedMessage* >(object);
  (void)_this;
}
void TestRequiredOneof_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestRequiredOneof_NestedMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestRequiredOneof_NestedMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestRequiredOneof_NestedMessage& TestRequiredOneof_NestedMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof_NestedMessage.base);
  return *internal_default_instance();
}


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

  required_double_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestRequiredOneof_NestedMessage::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:protobuf_unittest.TestRequiredOneof.NestedMessage)
  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)) {
      // required double required_double = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(9u /* 9 & 0xFF */)) {
          set_has_required_double();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &required_double_)));
        } 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:protobuf_unittest.TestRequiredOneof.NestedMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRequiredOneof.NestedMessage)
  return false;
#undef DO_
}

void TestRequiredOneof_NestedMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required double required_double = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->required_double(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRequiredOneof.NestedMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // required double required_double = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->required_double(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRequiredOneof.NestedMessage)
  return target;
}

size_t TestRequiredOneof_NestedMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // required double required_double = 1;
  if (has_required_double()) {
    total_size += 1 + 8;
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void TestRequiredOneof_NestedMessage::MergeFrom(const TestRequiredOneof_NestedMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  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_required_double()) {
    set_required_double(from.required_double());
  }
}

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

void TestRequiredOneof_NestedMessage::CopyFrom(const TestRequiredOneof_NestedMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestRequiredOneof_NestedMessage::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  return true;
}

void TestRequiredOneof_NestedMessage::Swap(TestRequiredOneof_NestedMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestRequiredOneof_NestedMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestRequiredOneof_NestedMessage::UnsafeArenaSwap(TestRequiredOneof_NestedMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestRequiredOneof_NestedMessage::InternalSwap(TestRequiredOneof_NestedMessage* other) {
  using std::swap;
  swap(required_double_, other->required_double_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestRequiredOneof::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestRequiredOneof_default_instance_.foo_int_ = 0;
  ::protobuf_unittest::_TestRequiredOneof_default_instance_.foo_string_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::protobuf_unittest::_TestRequiredOneof_default_instance_.foo_message_ = const_cast< ::protobuf_unittest::TestRequiredOneof_NestedMessage*>(
      ::protobuf_unittest::TestRequiredOneof_NestedMessage::internal_default_instance());
}
void TestRequiredOneof::set_allocated_foo_message(::protobuf_unittest::TestRequiredOneof_NestedMessage* foo_message) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_foo();
  if (foo_message) {
    ::google::protobuf::Arena* submessage_arena =
      ::google::protobuf::Arena::GetArena(foo_message);
    if (message_arena != submessage_arena) {
      foo_message = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, foo_message, submessage_arena);
    }
    set_has_foo_message();
    foo_.foo_message_ = foo_message;
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestRequiredOneof.foo_message)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestRequiredOneof::kFooIntFieldNumber;
const int TestRequiredOneof::kFooStringFieldNumber;
const int TestRequiredOneof::kFooMessageFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestRequiredOneof::TestRequiredOneof()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestRequiredOneof)
}
TestRequiredOneof::TestRequiredOneof(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRequiredOneof)
}
TestRequiredOneof::TestRequiredOneof(const TestRequiredOneof& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  clear_has_foo();
  switch (from.foo_case()) {
    case kFooInt: {
      set_foo_int(from.foo_int());
      break;
    }
    case kFooString: {
      set_foo_string(from.foo_string());
      break;
    }
    case kFooMessage: {
      mutable_foo_message()->::protobuf_unittest::TestRequiredOneof_NestedMessage::MergeFrom(from.foo_message());
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRequiredOneof)
}

void TestRequiredOneof::SharedCtor() {
  clear_has_foo();
}

TestRequiredOneof::~TestRequiredOneof() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestRequiredOneof)
  SharedDtor();
}

void TestRequiredOneof::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (has_foo()) {
    clear_foo();
  }
}

void TestRequiredOneof::ArenaDtor(void* object) {
  TestRequiredOneof* _this = reinterpret_cast< TestRequiredOneof* >(object);
  (void)_this;
}
void TestRequiredOneof::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestRequiredOneof::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestRequiredOneof::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestRequiredOneof& TestRequiredOneof::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof.base);
  return *internal_default_instance();
}


void TestRequiredOneof::clear_foo() {
// @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestRequiredOneof)
  switch (foo_case()) {
    case kFooInt: {
      // No need to clear
      break;
    }
    case kFooString: {
      foo_.foo_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
          GetArenaNoVirtual());
      break;
    }
    case kFooMessage: {
      if (GetArenaNoVirtual() == NULL) {
        delete foo_.foo_message_;
      }
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = FOO_NOT_SET;
}


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

  clear_foo();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestRequiredOneof::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:protobuf_unittest.TestRequiredOneof)
  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)) {
      // optional int32 foo_int = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          clear_foo();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &foo_.foo_int_)));
          set_has_foo_int();
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string foo_string = 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_foo_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->foo_string().data(), static_cast<int>(this->foo_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestRequiredOneof.foo_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestRequiredOneof.NestedMessage foo_message = 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_foo_message()));
        } 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:protobuf_unittest.TestRequiredOneof)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRequiredOneof)
  return false;
#undef DO_
}

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

  switch (foo_case()) {
    case kFooInt:
      ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->foo_int(), output);
      break;
    case kFooString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->foo_string().data(), static_cast<int>(this->foo_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestRequiredOneof.foo_string");
      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
        2, this->foo_string(), output);
      break;
    case kFooMessage:
      ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
        3, this->_internal_foo_message(), output);
      break;
    default: ;
  }
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRequiredOneof)
}

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

  switch (foo_case()) {
    case kFooInt:
      target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->foo_int(), target);
      break;
    case kFooString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->foo_string().data(), static_cast<int>(this->foo_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestRequiredOneof.foo_string");
      target =
        ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
          2, this->foo_string(), target);
      break;
    case kFooMessage:
      target = ::google::protobuf::internal::WireFormatLite::
        InternalWriteMessageToArray(
          3, this->_internal_foo_message(), deterministic, target);
      break;
    default: ;
  }
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRequiredOneof)
  return target;
}

size_t TestRequiredOneof::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRequiredOneof)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  switch (foo_case()) {
    // optional int32 foo_int = 1;
    case kFooInt: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->foo_int());
      break;
    }
    // optional string foo_string = 2;
    case kFooString: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->foo_string());
      break;
    }
    // optional .protobuf_unittest.TestRequiredOneof.NestedMessage foo_message = 3;
    case kFooMessage: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *foo_.foo_message_);
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  switch (from.foo_case()) {
    case kFooInt: {
      set_foo_int(from.foo_int());
      break;
    }
    case kFooString: {
      set_foo_string(from.foo_string());
      break;
    }
    case kFooMessage: {
      mutable_foo_message()->::protobuf_unittest::TestRequiredOneof_NestedMessage::MergeFrom(from.foo_message());
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
}

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

void TestRequiredOneof::CopyFrom(const TestRequiredOneof& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRequiredOneof)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestRequiredOneof::IsInitialized() const {
  switch (foo_case()) {
    case kFooInt: {
      break;
    }
    case kFooString: {
      break;
    }
    case kFooMessage: {
      if (has_foo_message()) {
        if (!this->foo_message().IsInitialized()) return false;
      }
      break;
    }
    case FOO_NOT_SET: {
      break;
    }
  }
  return true;
}

void TestRequiredOneof::Swap(TestRequiredOneof* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestRequiredOneof* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestRequiredOneof::UnsafeArenaSwap(TestRequiredOneof* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestRequiredOneof::InternalSwap(TestRequiredOneof* other) {
  using std::swap;
  swap(foo_, other->foo_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestPackedTypes::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestPackedTypes::kPackedInt32FieldNumber;
const int TestPackedTypes::kPackedInt64FieldNumber;
const int TestPackedTypes::kPackedUint32FieldNumber;
const int TestPackedTypes::kPackedUint64FieldNumber;
const int TestPackedTypes::kPackedSint32FieldNumber;
const int TestPackedTypes::kPackedSint64FieldNumber;
const int TestPackedTypes::kPackedFixed32FieldNumber;
const int TestPackedTypes::kPackedFixed64FieldNumber;
const int TestPackedTypes::kPackedSfixed32FieldNumber;
const int TestPackedTypes::kPackedSfixed64FieldNumber;
const int TestPackedTypes::kPackedFloatFieldNumber;
const int TestPackedTypes::kPackedDoubleFieldNumber;
const int TestPackedTypes::kPackedBoolFieldNumber;
const int TestPackedTypes::kPackedEnumFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestPackedTypes::TestPackedTypes()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedTypes.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestPackedTypes)
}
TestPackedTypes::TestPackedTypes(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  packed_int32_(arena),
  packed_int64_(arena),
  packed_uint32_(arena),
  packed_uint64_(arena),
  packed_sint32_(arena),
  packed_sint64_(arena),
  packed_fixed32_(arena),
  packed_fixed64_(arena),
  packed_sfixed32_(arena),
  packed_sfixed64_(arena),
  packed_float_(arena),
  packed_double_(arena),
  packed_bool_(arena),
  packed_enum_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedTypes.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestPackedTypes)
}
TestPackedTypes::TestPackedTypes(const TestPackedTypes& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      packed_int32_(from.packed_int32_),
      packed_int64_(from.packed_int64_),
      packed_uint32_(from.packed_uint32_),
      packed_uint64_(from.packed_uint64_),
      packed_sint32_(from.packed_sint32_),
      packed_sint64_(from.packed_sint64_),
      packed_fixed32_(from.packed_fixed32_),
      packed_fixed64_(from.packed_fixed64_),
      packed_sfixed32_(from.packed_sfixed32_),
      packed_sfixed64_(from.packed_sfixed64_),
      packed_float_(from.packed_float_),
      packed_double_(from.packed_double_),
      packed_bool_(from.packed_bool_),
      packed_enum_(from.packed_enum_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestPackedTypes)
}

void TestPackedTypes::SharedCtor() {
}

TestPackedTypes::~TestPackedTypes() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestPackedTypes)
  SharedDtor();
}

void TestPackedTypes::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestPackedTypes::ArenaDtor(void* object) {
  TestPackedTypes* _this = reinterpret_cast< TestPackedTypes* >(object);
  (void)_this;
}
void TestPackedTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestPackedTypes::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestPackedTypes::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestPackedTypes& TestPackedTypes::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedTypes.base);
  return *internal_default_instance();
}


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

  packed_int32_.Clear();
  packed_int64_.Clear();
  packed_uint32_.Clear();
  packed_uint64_.Clear();
  packed_sint32_.Clear();
  packed_sint64_.Clear();
  packed_fixed32_.Clear();
  packed_fixed64_.Clear();
  packed_sfixed32_.Clear();
  packed_sfixed64_.Clear();
  packed_float_.Clear();
  packed_double_.Clear();
  packed_bool_.Clear();
  packed_enum_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestPackedTypes::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:protobuf_unittest.TestPackedTypes)
  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)) {
      // repeated int32 packed_int32 = 90 [packed = true];
      case 90: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(210u /* 722 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_packed_int32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(208u /* 720 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 2, 722u, input, this->mutable_packed_int32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int64 packed_int64 = 91 [packed = true];
      case 91: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(218u /* 730 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, this->mutable_packed_int64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(216u /* 728 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 2, 730u, input, this->mutable_packed_int64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated uint32 packed_uint32 = 92 [packed = true];
      case 92: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(226u /* 738 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_packed_uint32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(224u /* 736 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 2, 738u, input, this->mutable_packed_uint32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated uint64 packed_uint64 = 93 [packed = true];
      case 93: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(234u /* 746 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, this->mutable_packed_uint64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(232u /* 744 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 2, 746u, input, this->mutable_packed_uint64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sint32 packed_sint32 = 94 [packed = true];
      case 94: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(242u /* 754 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
                 input, this->mutable_packed_sint32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(240u /* 752 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
                 2, 754u, input, this->mutable_packed_sint32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sint64 packed_sint64 = 95 [packed = true];
      case 95: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(250u /* 762 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
                 input, this->mutable_packed_sint64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(248u /* 760 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
                 2, 762u, input, this->mutable_packed_sint64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated fixed32 packed_fixed32 = 96 [packed = true];
      case 96: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(2u /* 770 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 input, this->mutable_packed_fixed32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(5u /* 773 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 2, 770u, input, this->mutable_packed_fixed32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated fixed64 packed_fixed64 = 97 [packed = true];
      case 97: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 778 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
                 input, this->mutable_packed_fixed64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(9u /* 777 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
                 2, 778u, input, this->mutable_packed_fixed64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
      case 98: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 786 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
                 input, this->mutable_packed_sfixed32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(21u /* 789 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
                 2, 786u, input, this->mutable_packed_sfixed32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
      case 99: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 794 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
                 input, this->mutable_packed_sfixed64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(25u /* 793 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
                 2, 794u, input, this->mutable_packed_sfixed64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated float packed_float = 100 [packed = true];
      case 100: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_packed_float())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(37u /* 805 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 2, 802u, input, this->mutable_packed_float())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated double packed_double = 101 [packed = true];
      case 101: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, this->mutable_packed_double())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(41u /* 809 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 2, 810u, input, this->mutable_packed_double())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated bool packed_bool = 102 [packed = true];
      case 102: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, this->mutable_packed_bool())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u /* 816 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 2, 818u, input, this->mutable_packed_bool())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
      case 103: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 826 & 0xFF */)) {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
          while (input->BytesUntilLimit() > 0) {
            int value;
            DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
            if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
              add_packed_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
            } else {
            mutable_unknown_fields()->AddVarint(
                103, static_cast< ::google::protobuf::uint64>(value));
            }
          }
          input->PopLimit(limit);
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(56u /* 824 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
            add_packed_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                103, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

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

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

  // repeated int32 packed_int32 = 90 [packed = true];
  if (this->packed_int32_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(90, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_int32_cached_byte_size_));
  }
  for (int i = 0, n = this->packed_int32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
      this->packed_int32(i), output);
  }

  // repeated int64 packed_int64 = 91 [packed = true];
  if (this->packed_int64_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(91, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_int64_cached_byte_size_));
  }
  for (int i = 0, n = this->packed_int64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
      this->packed_int64(i), output);
  }

  // repeated uint32 packed_uint32 = 92 [packed = true];
  if (this->packed_uint32_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(92, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_uint32_cached_byte_size_));
  }
  for (int i = 0, n = this->packed_uint32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag(
      this->packed_uint32(i), output);
  }

  // repeated uint64 packed_uint64 = 93 [packed = true];
  if (this->packed_uint64_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(93, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_uint64_cached_byte_size_));
  }
  for (int i = 0, n = this->packed_uint64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
      this->packed_uint64(i), output);
  }

  // repeated sint32 packed_sint32 = 94 [packed = true];
  if (this->packed_sint32_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(94, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_sint32_cached_byte_size_));
  }
  for (int i = 0, n = this->packed_sint32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt32NoTag(
      this->packed_sint32(i), output);
  }

  // repeated sint64 packed_sint64 = 95 [packed = true];
  if (this->packed_sint64_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(95, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_sint64_cached_byte_size_));
  }
  for (int i = 0, n = this->packed_sint64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt64NoTag(
      this->packed_sint64(i), output);
  }

  // repeated fixed32 packed_fixed32 = 96 [packed = true];
  if (this->packed_fixed32_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(96, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_fixed32_cached_byte_size_));
    ::google::protobuf::internal::WireFormatLite::WriteFixed32Array(
      this->packed_fixed32().data(), this->packed_fixed32_size(), output);
  }

  // repeated fixed64 packed_fixed64 = 97 [packed = true];
  if (this->packed_fixed64_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(97, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_fixed64_cached_byte_size_));
    ::google::protobuf::internal::WireFormatLite::WriteFixed64Array(
      this->packed_fixed64().data(), this->packed_fixed64_size(), output);
  }

  // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  if (this->packed_sfixed32_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(98, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_sfixed32_cached_byte_size_));
    ::google::protobuf::internal::WireFormatLite::WriteSFixed32Array(
      this->packed_sfixed32().data(), this->packed_sfixed32_size(), output);
  }

  // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  if (this->packed_sfixed64_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(99, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_sfixed64_cached_byte_size_));
    ::google::protobuf::internal::WireFormatLite::WriteSFixed64Array(
      this->packed_sfixed64().data(), this->packed_sfixed64_size(), output);
  }

  // repeated float packed_float = 100 [packed = true];
  if (this->packed_float_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(100, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_float_cached_byte_size_));
    ::google::protobuf::internal::WireFormatLite::WriteFloatArray(
      this->packed_float().data(), this->packed_float_size(), output);
  }

  // repeated double packed_double = 101 [packed = true];
  if (this->packed_double_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(101, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_double_cached_byte_size_));
    ::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
      this->packed_double().data(), this->packed_double_size(), output);
  }

  // repeated bool packed_bool = 102 [packed = true];
  if (this->packed_bool_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(102, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_bool_cached_byte_size_));
    ::google::protobuf::internal::WireFormatLite::WriteBoolArray(
      this->packed_bool().data(), this->packed_bool_size(), output);
  }

  // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
  if (this->packed_enum_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(
      103,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      output);
    output->WriteVarint32(
        static_cast< ::google::protobuf::uint32>(_packed_enum_cached_byte_size_));
  }
  for (int i = 0, n = this->packed_enum_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
      this->packed_enum(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestPackedTypes)
}

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

  // repeated int32 packed_int32 = 90 [packed = true];
  if (this->packed_int32_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      90,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_int32_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32NoTagToArray(this->packed_int32_, target);
  }

  // repeated int64 packed_int64 = 91 [packed = true];
  if (this->packed_int64_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      91,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_int64_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt64NoTagToArray(this->packed_int64_, target);
  }

  // repeated uint32 packed_uint32 = 92 [packed = true];
  if (this->packed_uint32_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      92,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_uint32_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32NoTagToArray(this->packed_uint32_, target);
  }

  // repeated uint64 packed_uint64 = 93 [packed = true];
  if (this->packed_uint64_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      93,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_uint64_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt64NoTagToArray(this->packed_uint64_, target);
  }

  // repeated sint32 packed_sint32 = 94 [packed = true];
  if (this->packed_sint32_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      94,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_sint32_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteSInt32NoTagToArray(this->packed_sint32_, target);
  }

  // repeated sint64 packed_sint64 = 95 [packed = true];
  if (this->packed_sint64_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      95,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_sint64_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteSInt64NoTagToArray(this->packed_sint64_, target);
  }

  // repeated fixed32 packed_fixed32 = 96 [packed = true];
  if (this->packed_fixed32_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      96,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_fixed32_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFixed32NoTagToArray(this->packed_fixed32_, target);
  }

  // repeated fixed64 packed_fixed64 = 97 [packed = true];
  if (this->packed_fixed64_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      97,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_fixed64_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFixed64NoTagToArray(this->packed_fixed64_, target);
  }

  // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  if (this->packed_sfixed32_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      98,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_sfixed32_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteSFixed32NoTagToArray(this->packed_sfixed32_, target);
  }

  // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  if (this->packed_sfixed64_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      99,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_sfixed64_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteSFixed64NoTagToArray(this->packed_sfixed64_, target);
  }

  // repeated float packed_float = 100 [packed = true];
  if (this->packed_float_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      100,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_float_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->packed_float_, target);
  }

  // repeated double packed_double = 101 [packed = true];
  if (this->packed_double_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      101,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_double_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteDoubleNoTagToArray(this->packed_double_, target);
  }

  // repeated bool packed_bool = 102 [packed = true];
  if (this->packed_bool_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      102,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_bool_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteBoolNoTagToArray(this->packed_bool_, target);
  }

  // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
  if (this->packed_enum_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      103,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(      static_cast< ::google::protobuf::uint32>(
            _packed_enum_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray(
      this->packed_enum_, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestPackedTypes)
  return target;
}

size_t TestPackedTypes::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestPackedTypes)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated int32 packed_int32 = 90 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->packed_int32_);
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_int32_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated int64 packed_int64 = 91 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int64Size(this->packed_int64_);
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_int64_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated uint32 packed_uint32 = 92 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      UInt32Size(this->packed_uint32_);
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_uint32_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated uint64 packed_uint64 = 93 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      UInt64Size(this->packed_uint64_);
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_uint64_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated sint32 packed_sint32 = 94 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      SInt32Size(this->packed_sint32_);
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_sint32_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated sint64 packed_sint64 = 95 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      SInt64Size(this->packed_sint64_);
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_sint64_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated fixed32 packed_fixed32 = 96 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->packed_fixed32_size());
    size_t data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_fixed32_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated fixed64 packed_fixed64 = 97 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->packed_fixed64_size());
    size_t data_size = 8UL * count;
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_fixed64_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->packed_sfixed32_size());
    size_t data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_sfixed32_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->packed_sfixed64_size());
    size_t data_size = 8UL * count;
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_sfixed64_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated float packed_float = 100 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->packed_float_size());
    size_t data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_float_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated double packed_double = 101 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->packed_double_size());
    size_t data_size = 8UL * count;
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_double_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated bool packed_bool = 102 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->packed_bool_size());
    size_t data_size = 1UL * count;
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_bool_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
  {
    size_t data_size = 0;
    unsigned int count = static_cast<unsigned int>(this->packed_enum_size());for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
        this->packed_enum(static_cast<int>(i)));
    }
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_enum_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

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

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

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

  packed_int32_.MergeFrom(from.packed_int32_);
  packed_int64_.MergeFrom(from.packed_int64_);
  packed_uint32_.MergeFrom(from.packed_uint32_);
  packed_uint64_.MergeFrom(from.packed_uint64_);
  packed_sint32_.MergeFrom(from.packed_sint32_);
  packed_sint64_.MergeFrom(from.packed_sint64_);
  packed_fixed32_.MergeFrom(from.packed_fixed32_);
  packed_fixed64_.MergeFrom(from.packed_fixed64_);
  packed_sfixed32_.MergeFrom(from.packed_sfixed32_);
  packed_sfixed64_.MergeFrom(from.packed_sfixed64_);
  packed_float_.MergeFrom(from.packed_float_);
  packed_double_.MergeFrom(from.packed_double_);
  packed_bool_.MergeFrom(from.packed_bool_);
  packed_enum_.MergeFrom(from.packed_enum_);
}

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

void TestPackedTypes::CopyFrom(const TestPackedTypes& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestPackedTypes)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestPackedTypes::Swap(TestPackedTypes* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestPackedTypes* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestPackedTypes::UnsafeArenaSwap(TestPackedTypes* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestPackedTypes::InternalSwap(TestPackedTypes* other) {
  using std::swap;
  packed_int32_.InternalSwap(&other->packed_int32_);
  packed_int64_.InternalSwap(&other->packed_int64_);
  packed_uint32_.InternalSwap(&other->packed_uint32_);
  packed_uint64_.InternalSwap(&other->packed_uint64_);
  packed_sint32_.InternalSwap(&other->packed_sint32_);
  packed_sint64_.InternalSwap(&other->packed_sint64_);
  packed_fixed32_.InternalSwap(&other->packed_fixed32_);
  packed_fixed64_.InternalSwap(&other->packed_fixed64_);
  packed_sfixed32_.InternalSwap(&other->packed_sfixed32_);
  packed_sfixed64_.InternalSwap(&other->packed_sfixed64_);
  packed_float_.InternalSwap(&other->packed_float_);
  packed_double_.InternalSwap(&other->packed_double_);
  packed_bool_.InternalSwap(&other->packed_bool_);
  packed_enum_.InternalSwap(&other->packed_enum_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestUnpackedTypes::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestUnpackedTypes::kUnpackedInt32FieldNumber;
const int TestUnpackedTypes::kUnpackedInt64FieldNumber;
const int TestUnpackedTypes::kUnpackedUint32FieldNumber;
const int TestUnpackedTypes::kUnpackedUint64FieldNumber;
const int TestUnpackedTypes::kUnpackedSint32FieldNumber;
const int TestUnpackedTypes::kUnpackedSint64FieldNumber;
const int TestUnpackedTypes::kUnpackedFixed32FieldNumber;
const int TestUnpackedTypes::kUnpackedFixed64FieldNumber;
const int TestUnpackedTypes::kUnpackedSfixed32FieldNumber;
const int TestUnpackedTypes::kUnpackedSfixed64FieldNumber;
const int TestUnpackedTypes::kUnpackedFloatFieldNumber;
const int TestUnpackedTypes::kUnpackedDoubleFieldNumber;
const int TestUnpackedTypes::kUnpackedBoolFieldNumber;
const int TestUnpackedTypes::kUnpackedEnumFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestUnpackedTypes::TestUnpackedTypes()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedTypes.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestUnpackedTypes)
}
TestUnpackedTypes::TestUnpackedTypes(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  unpacked_int32_(arena),
  unpacked_int64_(arena),
  unpacked_uint32_(arena),
  unpacked_uint64_(arena),
  unpacked_sint32_(arena),
  unpacked_sint64_(arena),
  unpacked_fixed32_(arena),
  unpacked_fixed64_(arena),
  unpacked_sfixed32_(arena),
  unpacked_sfixed64_(arena),
  unpacked_float_(arena),
  unpacked_double_(arena),
  unpacked_bool_(arena),
  unpacked_enum_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedTypes.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestUnpackedTypes)
}
TestUnpackedTypes::TestUnpackedTypes(const TestUnpackedTypes& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      unpacked_int32_(from.unpacked_int32_),
      unpacked_int64_(from.unpacked_int64_),
      unpacked_uint32_(from.unpacked_uint32_),
      unpacked_uint64_(from.unpacked_uint64_),
      unpacked_sint32_(from.unpacked_sint32_),
      unpacked_sint64_(from.unpacked_sint64_),
      unpacked_fixed32_(from.unpacked_fixed32_),
      unpacked_fixed64_(from.unpacked_fixed64_),
      unpacked_sfixed32_(from.unpacked_sfixed32_),
      unpacked_sfixed64_(from.unpacked_sfixed64_),
      unpacked_float_(from.unpacked_float_),
      unpacked_double_(from.unpacked_double_),
      unpacked_bool_(from.unpacked_bool_),
      unpacked_enum_(from.unpacked_enum_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestUnpackedTypes)
}

void TestUnpackedTypes::SharedCtor() {
}

TestUnpackedTypes::~TestUnpackedTypes() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestUnpackedTypes)
  SharedDtor();
}

void TestUnpackedTypes::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestUnpackedTypes::ArenaDtor(void* object) {
  TestUnpackedTypes* _this = reinterpret_cast< TestUnpackedTypes* >(object);
  (void)_this;
}
void TestUnpackedTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestUnpackedTypes::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestUnpackedTypes::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestUnpackedTypes& TestUnpackedTypes::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedTypes.base);
  return *internal_default_instance();
}


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

  unpacked_int32_.Clear();
  unpacked_int64_.Clear();
  unpacked_uint32_.Clear();
  unpacked_uint64_.Clear();
  unpacked_sint32_.Clear();
  unpacked_sint64_.Clear();
  unpacked_fixed32_.Clear();
  unpacked_fixed64_.Clear();
  unpacked_sfixed32_.Clear();
  unpacked_sfixed64_.Clear();
  unpacked_float_.Clear();
  unpacked_double_.Clear();
  unpacked_bool_.Clear();
  unpacked_enum_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestUnpackedTypes::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:protobuf_unittest.TestUnpackedTypes)
  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)) {
      // repeated int32 unpacked_int32 = 90 [packed = false];
      case 90: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(208u /* 720 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 2, 720u, input, this->mutable_unpacked_int32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(210u /* 722 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_unpacked_int32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int64 unpacked_int64 = 91 [packed = false];
      case 91: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(216u /* 728 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 2, 728u, input, this->mutable_unpacked_int64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(218u /* 730 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, this->mutable_unpacked_int64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated uint32 unpacked_uint32 = 92 [packed = false];
      case 92: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(224u /* 736 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 2, 736u, input, this->mutable_unpacked_uint32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(226u /* 738 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_unpacked_uint32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated uint64 unpacked_uint64 = 93 [packed = false];
      case 93: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(232u /* 744 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 2, 744u, input, this->mutable_unpacked_uint64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(234u /* 746 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, this->mutable_unpacked_uint64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sint32 unpacked_sint32 = 94 [packed = false];
      case 94: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(240u /* 752 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
                 2, 752u, input, this->mutable_unpacked_sint32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(242u /* 754 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
                 input, this->mutable_unpacked_sint32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sint64 unpacked_sint64 = 95 [packed = false];
      case 95: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(248u /* 760 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
                 2, 760u, input, this->mutable_unpacked_sint64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(250u /* 762 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
                 input, this->mutable_unpacked_sint64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated fixed32 unpacked_fixed32 = 96 [packed = false];
      case 96: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(5u /* 773 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 2, 773u, input, this->mutable_unpacked_fixed32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(2u /* 770 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 input, this->mutable_unpacked_fixed32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated fixed64 unpacked_fixed64 = 97 [packed = false];
      case 97: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(9u /* 777 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
                 2, 777u, input, this->mutable_unpacked_fixed64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 778 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
                 input, this->mutable_unpacked_fixed64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
      case 98: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(21u /* 789 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
                 2, 789u, input, this->mutable_unpacked_sfixed32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 786 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
                 input, this->mutable_unpacked_sfixed32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
      case 99: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(25u /* 793 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
                 2, 793u, input, this->mutable_unpacked_sfixed64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 794 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
                 input, this->mutable_unpacked_sfixed64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated float unpacked_float = 100 [packed = false];
      case 100: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(37u /* 805 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 2, 805u, input, this->mutable_unpacked_float())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_unpacked_float())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated double unpacked_double = 101 [packed = false];
      case 101: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(41u /* 809 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 2, 809u, input, this->mutable_unpacked_double())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, this->mutable_unpacked_double())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated bool unpacked_bool = 102 [packed = false];
      case 102: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u /* 816 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 2, 816u, input, this->mutable_unpacked_bool())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, this->mutable_unpacked_bool())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.ForeignEnum unpacked_enum = 103 [packed = false];
      case 103: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(56u /* 824 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
            add_unpacked_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                103, static_cast< ::google::protobuf::uint64>(value));
          }
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 826 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
                 input,
                 103,
                 ::protobuf_unittest::ForeignEnum_IsValid,
                 mutable_unknown_fields(),
                 this->mutable_unpacked_enum())));
        } 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:protobuf_unittest.TestUnpackedTypes)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestUnpackedTypes)
  return false;
#undef DO_
}

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

  // repeated int32 unpacked_int32 = 90 [packed = false];
  for (int i = 0, n = this->unpacked_int32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      90, this->unpacked_int32(i), output);
  }

  // repeated int64 unpacked_int64 = 91 [packed = false];
  for (int i = 0, n = this->unpacked_int64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(
      91, this->unpacked_int64(i), output);
  }

  // repeated uint32 unpacked_uint32 = 92 [packed = false];
  for (int i = 0, n = this->unpacked_uint32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      92, this->unpacked_uint32(i), output);
  }

  // repeated uint64 unpacked_uint64 = 93 [packed = false];
  for (int i = 0, n = this->unpacked_uint64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(
      93, this->unpacked_uint64(i), output);
  }

  // repeated sint32 unpacked_sint32 = 94 [packed = false];
  for (int i = 0, n = this->unpacked_sint32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt32(
      94, this->unpacked_sint32(i), output);
  }

  // repeated sint64 unpacked_sint64 = 95 [packed = false];
  for (int i = 0, n = this->unpacked_sint64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt64(
      95, this->unpacked_sint64(i), output);
  }

  // repeated fixed32 unpacked_fixed32 = 96 [packed = false];
  for (int i = 0, n = this->unpacked_fixed32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed32(
      96, this->unpacked_fixed32(i), output);
  }

  // repeated fixed64 unpacked_fixed64 = 97 [packed = false];
  for (int i = 0, n = this->unpacked_fixed64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed64(
      97, this->unpacked_fixed64(i), output);
  }

  // repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
  for (int i = 0, n = this->unpacked_sfixed32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSFixed32(
      98, this->unpacked_sfixed32(i), output);
  }

  // repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
  for (int i = 0, n = this->unpacked_sfixed64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSFixed64(
      99, this->unpacked_sfixed64(i), output);
  }

  // repeated float unpacked_float = 100 [packed = false];
  for (int i = 0, n = this->unpacked_float_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      100, this->unpacked_float(i), output);
  }

  // repeated double unpacked_double = 101 [packed = false];
  for (int i = 0, n = this->unpacked_double_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(
      101, this->unpacked_double(i), output);
  }

  // repeated bool unpacked_bool = 102 [packed = false];
  for (int i = 0, n = this->unpacked_bool_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(
      102, this->unpacked_bool(i), output);
  }

  // repeated .protobuf_unittest.ForeignEnum unpacked_enum = 103 [packed = false];
  for (int i = 0, n = this->unpacked_enum_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      103, this->unpacked_enum(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestUnpackedTypes)
}

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

  // repeated int32 unpacked_int32 = 90 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt32ToArray(90, this->unpacked_int32_, target);

  // repeated int64 unpacked_int64 = 91 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt64ToArray(91, this->unpacked_int64_, target);

  // repeated uint32 unpacked_uint32 = 92 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteUInt32ToArray(92, this->unpacked_uint32_, target);

  // repeated uint64 unpacked_uint64 = 93 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteUInt64ToArray(93, this->unpacked_uint64_, target);

  // repeated sint32 unpacked_sint32 = 94 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteSInt32ToArray(94, this->unpacked_sint32_, target);

  // repeated sint64 unpacked_sint64 = 95 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteSInt64ToArray(95, this->unpacked_sint64_, target);

  // repeated fixed32 unpacked_fixed32 = 96 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteFixed32ToArray(96, this->unpacked_fixed32_, target);

  // repeated fixed64 unpacked_fixed64 = 97 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteFixed64ToArray(97, this->unpacked_fixed64_, target);

  // repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteSFixed32ToArray(98, this->unpacked_sfixed32_, target);

  // repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteSFixed64ToArray(99, this->unpacked_sfixed64_, target);

  // repeated float unpacked_float = 100 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteFloatToArray(100, this->unpacked_float_, target);

  // repeated double unpacked_double = 101 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteDoubleToArray(101, this->unpacked_double_, target);

  // repeated bool unpacked_bool = 102 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteBoolToArray(102, this->unpacked_bool_, target);

  // repeated .protobuf_unittest.ForeignEnum unpacked_enum = 103 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
    103, this->unpacked_enum_, target);

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestUnpackedTypes)
  return target;
}

size_t TestUnpackedTypes::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestUnpackedTypes)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated int32 unpacked_int32 = 90 [packed = false];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->unpacked_int32_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_int32_size());
    total_size += data_size;
  }

  // repeated int64 unpacked_int64 = 91 [packed = false];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int64Size(this->unpacked_int64_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_int64_size());
    total_size += data_size;
  }

  // repeated uint32 unpacked_uint32 = 92 [packed = false];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      UInt32Size(this->unpacked_uint32_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_uint32_size());
    total_size += data_size;
  }

  // repeated uint64 unpacked_uint64 = 93 [packed = false];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      UInt64Size(this->unpacked_uint64_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_uint64_size());
    total_size += data_size;
  }

  // repeated sint32 unpacked_sint32 = 94 [packed = false];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      SInt32Size(this->unpacked_sint32_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_sint32_size());
    total_size += data_size;
  }

  // repeated sint64 unpacked_sint64 = 95 [packed = false];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      SInt64Size(this->unpacked_sint64_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_sint64_size());
    total_size += data_size;
  }

  // repeated fixed32 unpacked_fixed32 = 96 [packed = false];
  {
    unsigned int count = static_cast<unsigned int>(this->unpacked_fixed32_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_fixed32_size());
    total_size += data_size;
  }

  // repeated fixed64 unpacked_fixed64 = 97 [packed = false];
  {
    unsigned int count = static_cast<unsigned int>(this->unpacked_fixed64_size());
    size_t data_size = 8UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_fixed64_size());
    total_size += data_size;
  }

  // repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
  {
    unsigned int count = static_cast<unsigned int>(this->unpacked_sfixed32_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_sfixed32_size());
    total_size += data_size;
  }

  // repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
  {
    unsigned int count = static_cast<unsigned int>(this->unpacked_sfixed64_size());
    size_t data_size = 8UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_sfixed64_size());
    total_size += data_size;
  }

  // repeated float unpacked_float = 100 [packed = false];
  {
    unsigned int count = static_cast<unsigned int>(this->unpacked_float_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_float_size());
    total_size += data_size;
  }

  // repeated double unpacked_double = 101 [packed = false];
  {
    unsigned int count = static_cast<unsigned int>(this->unpacked_double_size());
    size_t data_size = 8UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_double_size());
    total_size += data_size;
  }

  // repeated bool unpacked_bool = 102 [packed = false];
  {
    unsigned int count = static_cast<unsigned int>(this->unpacked_bool_size());
    size_t data_size = 1UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->unpacked_bool_size());
    total_size += data_size;
  }

  // repeated .protobuf_unittest.ForeignEnum unpacked_enum = 103 [packed = false];
  {
    size_t data_size = 0;
    unsigned int count = static_cast<unsigned int>(this->unpacked_enum_size());for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
        this->unpacked_enum(static_cast<int>(i)));
    }
    total_size += (2UL * count) + data_size;
  }

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

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

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

  unpacked_int32_.MergeFrom(from.unpacked_int32_);
  unpacked_int64_.MergeFrom(from.unpacked_int64_);
  unpacked_uint32_.MergeFrom(from.unpacked_uint32_);
  unpacked_uint64_.MergeFrom(from.unpacked_uint64_);
  unpacked_sint32_.MergeFrom(from.unpacked_sint32_);
  unpacked_sint64_.MergeFrom(from.unpacked_sint64_);
  unpacked_fixed32_.MergeFrom(from.unpacked_fixed32_);
  unpacked_fixed64_.MergeFrom(from.unpacked_fixed64_);
  unpacked_sfixed32_.MergeFrom(from.unpacked_sfixed32_);
  unpacked_sfixed64_.MergeFrom(from.unpacked_sfixed64_);
  unpacked_float_.MergeFrom(from.unpacked_float_);
  unpacked_double_.MergeFrom(from.unpacked_double_);
  unpacked_bool_.MergeFrom(from.unpacked_bool_);
  unpacked_enum_.MergeFrom(from.unpacked_enum_);
}

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

void TestUnpackedTypes::CopyFrom(const TestUnpackedTypes& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestUnpackedTypes)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestUnpackedTypes::Swap(TestUnpackedTypes* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestUnpackedTypes* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestUnpackedTypes::UnsafeArenaSwap(TestUnpackedTypes* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestUnpackedTypes::InternalSwap(TestUnpackedTypes* other) {
  using std::swap;
  unpacked_int32_.InternalSwap(&other->unpacked_int32_);
  unpacked_int64_.InternalSwap(&other->unpacked_int64_);
  unpacked_uint32_.InternalSwap(&other->unpacked_uint32_);
  unpacked_uint64_.InternalSwap(&other->unpacked_uint64_);
  unpacked_sint32_.InternalSwap(&other->unpacked_sint32_);
  unpacked_sint64_.InternalSwap(&other->unpacked_sint64_);
  unpacked_fixed32_.InternalSwap(&other->unpacked_fixed32_);
  unpacked_fixed64_.InternalSwap(&other->unpacked_fixed64_);
  unpacked_sfixed32_.InternalSwap(&other->unpacked_sfixed32_);
  unpacked_sfixed64_.InternalSwap(&other->unpacked_sfixed64_);
  unpacked_float_.InternalSwap(&other->unpacked_float_);
  unpacked_double_.InternalSwap(&other->unpacked_double_);
  unpacked_bool_.InternalSwap(&other->unpacked_bool_);
  unpacked_enum_.InternalSwap(&other->unpacked_enum_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestPackedExtensions::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestPackedExtensions::TestPackedExtensions()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedExtensions.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestPackedExtensions)
}
TestPackedExtensions::TestPackedExtensions(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _extensions_(arena),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedExtensions.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestPackedExtensions)
}
TestPackedExtensions::TestPackedExtensions(const TestPackedExtensions& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestPackedExtensions)
}

void TestPackedExtensions::SharedCtor() {
}

TestPackedExtensions::~TestPackedExtensions() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestPackedExtensions)
  SharedDtor();
}

void TestPackedExtensions::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestPackedExtensions::ArenaDtor(void* object) {
  TestPackedExtensions* _this = reinterpret_cast< TestPackedExtensions* >(object);
  (void)_this;
}
void TestPackedExtensions::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestPackedExtensions::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestPackedExtensions::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestPackedExtensions& TestPackedExtensions::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedExtensions.base);
  return *internal_default_instance();
}


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

  _extensions_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestPackedExtensions::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:protobuf_unittest.TestPackedExtensions)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    if ((8u <= tag)) {
      DO_(_extensions_.ParseField(tag, input,
          internal_default_instance(),
          _internal_metadata_.mutable_unknown_fields()));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestPackedExtensions)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestPackedExtensions)
  return false;
#undef DO_
}

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

  // Extension range [1, 536870912)
  _extensions_.SerializeWithCachedSizes(
      1, 536870912, output);

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestPackedExtensions)
}

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

  // Extension range [1, 536870912)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      1, 536870912, deterministic, target);

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestPackedExtensions)
  return target;
}

size_t TestPackedExtensions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestPackedExtensions)
  size_t total_size = 0;

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

}

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

void TestPackedExtensions::CopyFrom(const TestPackedExtensions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestPackedExtensions)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestPackedExtensions::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

void TestPackedExtensions::Swap(TestPackedExtensions* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestPackedExtensions* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestPackedExtensions::UnsafeArenaSwap(TestPackedExtensions* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestPackedExtensions::InternalSwap(TestPackedExtensions* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _extensions_.Swap(&other->_extensions_);
}

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


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

void TestUnpackedExtensions::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestUnpackedExtensions::TestUnpackedExtensions()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedExtensions.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestUnpackedExtensions)
}
TestUnpackedExtensions::TestUnpackedExtensions(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _extensions_(arena),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedExtensions.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestUnpackedExtensions)
}
TestUnpackedExtensions::TestUnpackedExtensions(const TestUnpackedExtensions& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestUnpackedExtensions)
}

void TestUnpackedExtensions::SharedCtor() {
}

TestUnpackedExtensions::~TestUnpackedExtensions() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestUnpackedExtensions)
  SharedDtor();
}

void TestUnpackedExtensions::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestUnpackedExtensions::ArenaDtor(void* object) {
  TestUnpackedExtensions* _this = reinterpret_cast< TestUnpackedExtensions* >(object);
  (void)_this;
}
void TestUnpackedExtensions::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestUnpackedExtensions::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestUnpackedExtensions::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestUnpackedExtensions& TestUnpackedExtensions::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedExtensions.base);
  return *internal_default_instance();
}


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

  _extensions_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestUnpackedExtensions::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:protobuf_unittest.TestUnpackedExtensions)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    if ((8u <= tag)) {
      DO_(_extensions_.ParseField(tag, input,
          internal_default_instance(),
          _internal_metadata_.mutable_unknown_fields()));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestUnpackedExtensions)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestUnpackedExtensions)
  return false;
#undef DO_
}

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

  // Extension range [1, 536870912)
  _extensions_.SerializeWithCachedSizes(
      1, 536870912, output);

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestUnpackedExtensions)
}

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

  // Extension range [1, 536870912)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      1, 536870912, deterministic, target);

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestUnpackedExtensions)
  return target;
}

size_t TestUnpackedExtensions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestUnpackedExtensions)
  size_t total_size = 0;

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

}

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

void TestUnpackedExtensions::CopyFrom(const TestUnpackedExtensions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestUnpackedExtensions)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestUnpackedExtensions::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

void TestUnpackedExtensions::Swap(TestUnpackedExtensions* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestUnpackedExtensions* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestUnpackedExtensions::UnsafeArenaSwap(TestUnpackedExtensions* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestUnpackedExtensions::InternalSwap(TestUnpackedExtensions* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _extensions_.Swap(&other->_extensions_);
}

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


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

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

TestDynamicExtensions_DynamicMessageType::TestDynamicExtensions_DynamicMessageType()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions_DynamicMessageType.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
}
TestDynamicExtensions_DynamicMessageType::TestDynamicExtensions_DynamicMessageType(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions_DynamicMessageType.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
}
TestDynamicExtensions_DynamicMessageType::TestDynamicExtensions_DynamicMessageType(const TestDynamicExtensions_DynamicMessageType& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  dynamic_field_ = from.dynamic_field_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
}

void TestDynamicExtensions_DynamicMessageType::SharedCtor() {
  dynamic_field_ = 0;
}

TestDynamicExtensions_DynamicMessageType::~TestDynamicExtensions_DynamicMessageType() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  SharedDtor();
}

void TestDynamicExtensions_DynamicMessageType::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestDynamicExtensions_DynamicMessageType::ArenaDtor(void* object) {
  TestDynamicExtensions_DynamicMessageType* _this = reinterpret_cast< TestDynamicExtensions_DynamicMessageType* >(object);
  (void)_this;
}
void TestDynamicExtensions_DynamicMessageType::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestDynamicExtensions_DynamicMessageType::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestDynamicExtensions_DynamicMessageType::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestDynamicExtensions_DynamicMessageType& TestDynamicExtensions_DynamicMessageType::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions_DynamicMessageType.base);
  return *internal_default_instance();
}


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

  dynamic_field_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestDynamicExtensions_DynamicMessageType::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:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16805u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 dynamic_field = 2100;
      case 2100: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(160u /* 16800 & 0xFF */)) {
          set_has_dynamic_field();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &dynamic_field_)));
        } 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:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  return false;
#undef DO_
}

void TestDynamicExtensions_DynamicMessageType::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 dynamic_field = 2100;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2100, this->dynamic_field(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 dynamic_field = 2100;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2100, this->dynamic_field(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  return target;
}

size_t TestDynamicExtensions_DynamicMessageType::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 dynamic_field = 2100;
  if (has_dynamic_field()) {
    total_size += 3 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->dynamic_field());
  }

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

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

void TestDynamicExtensions_DynamicMessageType::MergeFrom(const TestDynamicExtensions_DynamicMessageType& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  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_dynamic_field()) {
    set_dynamic_field(from.dynamic_field());
  }
}

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

void TestDynamicExtensions_DynamicMessageType::CopyFrom(const TestDynamicExtensions_DynamicMessageType& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestDynamicExtensions_DynamicMessageType::Swap(TestDynamicExtensions_DynamicMessageType* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestDynamicExtensions_DynamicMessageType* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestDynamicExtensions_DynamicMessageType::UnsafeArenaSwap(TestDynamicExtensions_DynamicMessageType* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestDynamicExtensions_DynamicMessageType::InternalSwap(TestDynamicExtensions_DynamicMessageType* other) {
  using std::swap;
  swap(dynamic_field_, other->dynamic_field_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestDynamicExtensions::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestDynamicExtensions_default_instance_._instance.get_mutable()->message_extension_ = const_cast< ::protobuf_unittest::ForeignMessage*>(
      ::protobuf_unittest::ForeignMessage::internal_default_instance());
  ::protobuf_unittest::_TestDynamicExtensions_default_instance_._instance.get_mutable()->dynamic_message_extension_ = const_cast< ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType*>(
      ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType::internal_default_instance());
}
void TestDynamicExtensions::unsafe_arena_set_allocated_message_extension(
    ::protobuf_unittest::ForeignMessage* message_extension) {
  if (GetArenaNoVirtual() == NULL) {
    delete message_extension_;
  }
  message_extension_ = message_extension;
  if (message_extension) {
    set_has_message_extension();
  } else {
    clear_has_message_extension();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestDynamicExtensions.message_extension)
}
void TestDynamicExtensions::unsafe_arena_set_allocated_dynamic_message_extension(
    ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType* dynamic_message_extension) {
  if (GetArenaNoVirtual() == NULL) {
    delete dynamic_message_extension_;
  }
  dynamic_message_extension_ = dynamic_message_extension;
  if (dynamic_message_extension) {
    set_has_dynamic_message_extension();
  } else {
    clear_has_dynamic_message_extension();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestDynamicExtensions.dynamic_message_extension)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestDynamicExtensions::kScalarExtensionFieldNumber;
const int TestDynamicExtensions::kEnumExtensionFieldNumber;
const int TestDynamicExtensions::kDynamicEnumExtensionFieldNumber;
const int TestDynamicExtensions::kMessageExtensionFieldNumber;
const int TestDynamicExtensions::kDynamicMessageExtensionFieldNumber;
const int TestDynamicExtensions::kRepeatedExtensionFieldNumber;
const int TestDynamicExtensions::kPackedExtensionFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestDynamicExtensions::TestDynamicExtensions()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestDynamicExtensions)
}
TestDynamicExtensions::TestDynamicExtensions(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  repeated_extension_(arena),
  packed_extension_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDynamicExtensions)
}
TestDynamicExtensions::TestDynamicExtensions(const TestDynamicExtensions& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      repeated_extension_(from.repeated_extension_),
      packed_extension_(from.packed_extension_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_message_extension()) {
    message_extension_ = new ::protobuf_unittest::ForeignMessage(*from.message_extension_);
  } else {
    message_extension_ = NULL;
  }
  if (from.has_dynamic_message_extension()) {
    dynamic_message_extension_ = new ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType(*from.dynamic_message_extension_);
  } else {
    dynamic_message_extension_ = NULL;
  }
  ::memcpy(&scalar_extension_, &from.scalar_extension_,
    static_cast<size_t>(reinterpret_cast<char*>(&dynamic_enum_extension_) -
    reinterpret_cast<char*>(&scalar_extension_)) + sizeof(dynamic_enum_extension_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDynamicExtensions)
}

void TestDynamicExtensions::SharedCtor() {
  ::memset(&message_extension_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&scalar_extension_) -
      reinterpret_cast<char*>(&message_extension_)) + sizeof(scalar_extension_));
  enum_extension_ = 4;
  dynamic_enum_extension_ = 2200;
}

TestDynamicExtensions::~TestDynamicExtensions() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestDynamicExtensions)
  SharedDtor();
}

void TestDynamicExtensions::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete message_extension_;
  if (this != internal_default_instance()) delete dynamic_message_extension_;
}

void TestDynamicExtensions::ArenaDtor(void* object) {
  TestDynamicExtensions* _this = reinterpret_cast< TestDynamicExtensions* >(object);
  (void)_this;
}
void TestDynamicExtensions::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestDynamicExtensions::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestDynamicExtensions::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestDynamicExtensions& TestDynamicExtensions::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions.base);
  return *internal_default_instance();
}


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

  repeated_extension_.Clear();
  packed_extension_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(message_extension_ != NULL);
      message_extension_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(dynamic_message_extension_ != NULL);
      dynamic_message_extension_->Clear();
    }
  }
  if (cached_has_bits & 28u) {
    scalar_extension_ = 0u;
    enum_extension_ = 4;
    dynamic_enum_extension_ = 2200;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestDynamicExtensions::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:protobuf_unittest.TestDynamicExtensions)
  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)) {
      // optional fixed32 scalar_extension = 2000;
      case 2000: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(133u /* 16005 & 0xFF */)) {
          set_has_scalar_extension();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 input, &scalar_extension_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ForeignEnum enum_extension = 2001;
      case 2001: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(136u /* 16008 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
            set_enum_extension(static_cast< ::protobuf_unittest::ForeignEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                2001, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestDynamicExtensions.DynamicEnumType dynamic_enum_extension = 2002;
      case 2002: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(144u /* 16016 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::TestDynamicExtensions_DynamicEnumType_IsValid(value)) {
            set_dynamic_enum_extension(static_cast< ::protobuf_unittest::TestDynamicExtensions_DynamicEnumType >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                2002, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ForeignMessage message_extension = 2003;
      case 2003: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(154u /* 16026 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_message_extension()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestDynamicExtensions.DynamicMessageType dynamic_message_extension = 2004;
      case 2004: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(162u /* 16034 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_dynamic_message_extension()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string repeated_extension = 2005;
      case 2005: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(170u /* 16042 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_repeated_extension()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->repeated_extension(this->repeated_extension_size() - 1).data(),
            static_cast<int>(this->repeated_extension(this->repeated_extension_size() - 1).length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestDynamicExtensions.repeated_extension");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated sint32 packed_extension = 2006 [packed = true];
      case 2006: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(178u /* 16050 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
                 input, this->mutable_packed_extension())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(176u /* 16048 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
                 2, 16050u, input, this->mutable_packed_extension())));
        } 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:protobuf_unittest.TestDynamicExtensions)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDynamicExtensions)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional fixed32 scalar_extension = 2000;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed32(2000, this->scalar_extension(), output);
  }

  // optional .protobuf_unittest.ForeignEnum enum_extension = 2001;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2001, this->enum_extension(), output);
  }

  // optional .protobuf_unittest.TestDynamicExtensions.DynamicEnumType dynamic_enum_extension = 2002;
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2002, this->dynamic_enum_extension(), output);
  }

  // optional .protobuf_unittest.ForeignMessage message_extension = 2003;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2003, this->_internal_message_extension(), output);
  }

  // optional .protobuf_unittest.TestDynamicExtensions.DynamicMessageType dynamic_message_extension = 2004;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2004, this->_internal_dynamic_message_extension(), output);
  }

  // repeated string repeated_extension = 2005;
  for (int i = 0, n = this->repeated_extension_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeated_extension(i).data(), static_cast<int>(this->repeated_extension(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestDynamicExtensions.repeated_extension");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2005, this->repeated_extension(i), output);
  }

  // repeated sint32 packed_extension = 2006 [packed = true];
  if (this->packed_extension_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(2006, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_extension_cached_byte_size_));
  }
  for (int i = 0, n = this->packed_extension_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteSInt32NoTag(
      this->packed_extension(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDynamicExtensions)
}

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

  cached_has_bits = _has_bits_[0];
  // optional fixed32 scalar_extension = 2000;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(2000, this->scalar_extension(), target);
  }

  // optional .protobuf_unittest.ForeignEnum enum_extension = 2001;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2001, this->enum_extension(), target);
  }

  // optional .protobuf_unittest.TestDynamicExtensions.DynamicEnumType dynamic_enum_extension = 2002;
  if (cached_has_bits & 0x00000010u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2002, this->dynamic_enum_extension(), target);
  }

  // optional .protobuf_unittest.ForeignMessage message_extension = 2003;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2003, this->_internal_message_extension(), deterministic, target);
  }

  // optional .protobuf_unittest.TestDynamicExtensions.DynamicMessageType dynamic_message_extension = 2004;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2004, this->_internal_dynamic_message_extension(), deterministic, target);
  }

  // repeated string repeated_extension = 2005;
  for (int i = 0, n = this->repeated_extension_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->repeated_extension(i).data(), static_cast<int>(this->repeated_extension(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestDynamicExtensions.repeated_extension");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2005, this->repeated_extension(i), target);
  }

  // repeated sint32 packed_extension = 2006 [packed = true];
  if (this->packed_extension_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      2006,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_extension_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteSInt32NoTagToArray(this->packed_extension_, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDynamicExtensions)
  return target;
}

size_t TestDynamicExtensions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDynamicExtensions)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated string repeated_extension = 2005;
  total_size += 2 *
      ::google::protobuf::internal::FromIntSize(this->repeated_extension_size());
  for (int i = 0, n = this->repeated_extension_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->repeated_extension(i));
  }

  // repeated sint32 packed_extension = 2006 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      SInt32Size(this->packed_extension_);
    if (data_size > 0) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_extension_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  if (_has_bits_[0 / 32] & 31u) {
    // optional .protobuf_unittest.ForeignMessage message_extension = 2003;
    if (has_message_extension()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *message_extension_);
    }

    // optional .protobuf_unittest.TestDynamicExtensions.DynamicMessageType dynamic_message_extension = 2004;
    if (has_dynamic_message_extension()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *dynamic_message_extension_);
    }

    // optional fixed32 scalar_extension = 2000;
    if (has_scalar_extension()) {
      total_size += 2 + 4;
    }

    // optional .protobuf_unittest.ForeignEnum enum_extension = 2001;
    if (has_enum_extension()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->enum_extension());
    }

    // optional .protobuf_unittest.TestDynamicExtensions.DynamicEnumType dynamic_enum_extension = 2002;
    if (has_dynamic_enum_extension()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dynamic_enum_extension());
    }

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

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

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

  repeated_extension_.MergeFrom(from.repeated_extension_);
  packed_extension_.MergeFrom(from.packed_extension_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 31u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_message_extension()->::protobuf_unittest::ForeignMessage::MergeFrom(from.message_extension());
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_dynamic_message_extension()->::protobuf_unittest::TestDynamicExtensions_DynamicMessageType::MergeFrom(from.dynamic_message_extension());
    }
    if (cached_has_bits & 0x00000004u) {
      scalar_extension_ = from.scalar_extension_;
    }
    if (cached_has_bits & 0x00000008u) {
      enum_extension_ = from.enum_extension_;
    }
    if (cached_has_bits & 0x00000010u) {
      dynamic_enum_extension_ = from.dynamic_enum_extension_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

void TestDynamicExtensions::CopyFrom(const TestDynamicExtensions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDynamicExtensions)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestDynamicExtensions::Swap(TestDynamicExtensions* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestDynamicExtensions* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestDynamicExtensions::UnsafeArenaSwap(TestDynamicExtensions* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestDynamicExtensions::InternalSwap(TestDynamicExtensions* other) {
  using std::swap;
  repeated_extension_.InternalSwap(CastToBase(&other->repeated_extension_));
  packed_extension_.InternalSwap(&other->packed_extension_);
  swap(message_extension_, other->message_extension_);
  swap(dynamic_message_extension_, other->dynamic_message_extension_);
  swap(scalar_extension_, other->scalar_extension_);
  swap(enum_extension_, other->enum_extension_);
  swap(dynamic_enum_extension_, other->dynamic_enum_extension_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestRepeatedScalarDifferentTagSizes::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestRepeatedScalarDifferentTagSizes::kRepeatedFixed32FieldNumber;
const int TestRepeatedScalarDifferentTagSizes::kRepeatedInt32FieldNumber;
const int TestRepeatedScalarDifferentTagSizes::kRepeatedFixed64FieldNumber;
const int TestRepeatedScalarDifferentTagSizes::kRepeatedInt64FieldNumber;
const int TestRepeatedScalarDifferentTagSizes::kRepeatedFloatFieldNumber;
const int TestRepeatedScalarDifferentTagSizes::kRepeatedUint64FieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestRepeatedScalarDifferentTagSizes::TestRepeatedScalarDifferentTagSizes()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRepeatedScalarDifferentTagSizes.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
}
TestRepeatedScalarDifferentTagSizes::TestRepeatedScalarDifferentTagSizes(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  repeated_fixed32_(arena),
  repeated_int32_(arena),
  repeated_fixed64_(arena),
  repeated_int64_(arena),
  repeated_float_(arena),
  repeated_uint64_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRepeatedScalarDifferentTagSizes.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
}
TestRepeatedScalarDifferentTagSizes::TestRepeatedScalarDifferentTagSizes(const TestRepeatedScalarDifferentTagSizes& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      repeated_fixed32_(from.repeated_fixed32_),
      repeated_int32_(from.repeated_int32_),
      repeated_fixed64_(from.repeated_fixed64_),
      repeated_int64_(from.repeated_int64_),
      repeated_float_(from.repeated_float_),
      repeated_uint64_(from.repeated_uint64_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
}

void TestRepeatedScalarDifferentTagSizes::SharedCtor() {
}

TestRepeatedScalarDifferentTagSizes::~TestRepeatedScalarDifferentTagSizes() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  SharedDtor();
}

void TestRepeatedScalarDifferentTagSizes::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestRepeatedScalarDifferentTagSizes::ArenaDtor(void* object) {
  TestRepeatedScalarDifferentTagSizes* _this = reinterpret_cast< TestRepeatedScalarDifferentTagSizes* >(object);
  (void)_this;
}
void TestRepeatedScalarDifferentTagSizes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestRepeatedScalarDifferentTagSizes::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestRepeatedScalarDifferentTagSizes::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestRepeatedScalarDifferentTagSizes& TestRepeatedScalarDifferentTagSizes::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRepeatedScalarDifferentTagSizes.base);
  return *internal_default_instance();
}


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

  repeated_fixed32_.Clear();
  repeated_int32_.Clear();
  repeated_fixed64_.Clear();
  repeated_int64_.Clear();
  repeated_float_.Clear();
  repeated_uint64_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestRepeatedScalarDifferentTagSizes::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:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(2097149u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated fixed32 repeated_fixed32 = 12;
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(101u /* 101 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 1, 101u, input, this->mutable_repeated_fixed32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
                 input, this->mutable_repeated_fixed32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 repeated_int32 = 13;
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 104u, input, this->mutable_repeated_int32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_repeated_int32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated fixed64 repeated_fixed64 = 2046;
      case 2046: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(241u /* 16369 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
                 2, 16369u, input, this->mutable_repeated_fixed64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(242u /* 16370 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
                 input, this->mutable_repeated_fixed64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int64 repeated_int64 = 2047;
      case 2047: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(248u /* 16376 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 2, 16376u, input, this->mutable_repeated_int64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(250u /* 16378 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, this->mutable_repeated_int64())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated float repeated_float = 262142;
      case 262142: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(245u /* 2097141 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 3, 2097141u, input, this->mutable_repeated_float())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(242u /* 2097138 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_repeated_float())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated uint64 repeated_uint64 = 262143;
      case 262143: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(248u /* 2097144 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 3, 2097144u, input, this->mutable_repeated_uint64())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(250u /* 2097146 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, this->mutable_repeated_uint64())));
        } 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:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  return false;
#undef DO_
}

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

  // repeated fixed32 repeated_fixed32 = 12;
  for (int i = 0, n = this->repeated_fixed32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed32(
      12, this->repeated_fixed32(i), output);
  }

  // repeated int32 repeated_int32 = 13;
  for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      13, this->repeated_int32(i), output);
  }

  // repeated fixed64 repeated_fixed64 = 2046;
  for (int i = 0, n = this->repeated_fixed64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFixed64(
      2046, this->repeated_fixed64(i), output);
  }

  // repeated int64 repeated_int64 = 2047;
  for (int i = 0, n = this->repeated_int64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(
      2047, this->repeated_int64(i), output);
  }

  // repeated float repeated_float = 262142;
  for (int i = 0, n = this->repeated_float_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      262142, this->repeated_float(i), output);
  }

  // repeated uint64 repeated_uint64 = 262143;
  for (int i = 0, n = this->repeated_uint64_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(
      262143, this->repeated_uint64(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
}

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

  // repeated fixed32 repeated_fixed32 = 12;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteFixed32ToArray(12, this->repeated_fixed32_, target);

  // repeated int32 repeated_int32 = 13;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt32ToArray(13, this->repeated_int32_, target);

  // repeated fixed64 repeated_fixed64 = 2046;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteFixed64ToArray(2046, this->repeated_fixed64_, target);

  // repeated int64 repeated_int64 = 2047;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt64ToArray(2047, this->repeated_int64_, target);

  // repeated float repeated_float = 262142;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteFloatToArray(262142, this->repeated_float_, target);

  // repeated uint64 repeated_uint64 = 262143;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteUInt64ToArray(262143, this->repeated_uint64_, target);

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  return target;
}

size_t TestRepeatedScalarDifferentTagSizes::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated fixed32 repeated_fixed32 = 12;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_fixed32_size());
    total_size += data_size;
  }

  // repeated int32 repeated_int32 = 13;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->repeated_int32_);
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
    total_size += data_size;
  }

  // repeated fixed64 repeated_fixed64 = 2046;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_fixed64_size());
    size_t data_size = 8UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_fixed64_size());
    total_size += data_size;
  }

  // repeated int64 repeated_int64 = 2047;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int64Size(this->repeated_int64_);
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_int64_size());
    total_size += data_size;
  }

  // repeated float repeated_float = 262142;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_float_size());
    size_t data_size = 4UL * count;
    total_size += 3 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_float_size());
    total_size += data_size;
  }

  // repeated uint64 repeated_uint64 = 262143;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      UInt64Size(this->repeated_uint64_);
    total_size += 3 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_uint64_size());
    total_size += data_size;
  }

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

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

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

  repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
  repeated_int32_.MergeFrom(from.repeated_int32_);
  repeated_fixed64_.MergeFrom(from.repeated_fixed64_);
  repeated_int64_.MergeFrom(from.repeated_int64_);
  repeated_float_.MergeFrom(from.repeated_float_);
  repeated_uint64_.MergeFrom(from.repeated_uint64_);
}

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

void TestRepeatedScalarDifferentTagSizes::CopyFrom(const TestRepeatedScalarDifferentTagSizes& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestRepeatedScalarDifferentTagSizes::Swap(TestRepeatedScalarDifferentTagSizes* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestRepeatedScalarDifferentTagSizes* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestRepeatedScalarDifferentTagSizes::UnsafeArenaSwap(TestRepeatedScalarDifferentTagSizes* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestRepeatedScalarDifferentTagSizes::InternalSwap(TestRepeatedScalarDifferentTagSizes* other) {
  using std::swap;
  repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
  repeated_int32_.InternalSwap(&other->repeated_int32_);
  repeated_fixed64_.InternalSwap(&other->repeated_fixed64_);
  repeated_int64_.InternalSwap(&other->repeated_int64_);
  repeated_float_.InternalSwap(&other->repeated_float_);
  repeated_uint64_.InternalSwap(&other->repeated_uint64_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestParsingMerge_RepeatedFieldsGenerator_Group1::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group1_default_instance_._instance.get_mutable()->field1_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
}
void TestParsingMerge_RepeatedFieldsGenerator_Group1::unsafe_arena_set_allocated_field1(
    ::protobuf_unittest::TestAllTypes* field1) {
  if (GetArenaNoVirtual() == NULL) {
    delete field1_;
  }
  field1_ = field1;
  if (field1) {
    set_has_field1();
  } else {
    clear_has_field1();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.field1)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestParsingMerge_RepeatedFieldsGenerator_Group1::kField1FieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestParsingMerge_RepeatedFieldsGenerator_Group1::TestParsingMerge_RepeatedFieldsGenerator_Group1()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
}
TestParsingMerge_RepeatedFieldsGenerator_Group1::TestParsingMerge_RepeatedFieldsGenerator_Group1(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
}
TestParsingMerge_RepeatedFieldsGenerator_Group1::TestParsingMerge_RepeatedFieldsGenerator_Group1(const TestParsingMerge_RepeatedFieldsGenerator_Group1& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_field1()) {
    field1_ = new ::protobuf_unittest::TestAllTypes(*from.field1_);
  } else {
    field1_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
}

void TestParsingMerge_RepeatedFieldsGenerator_Group1::SharedCtor() {
  field1_ = NULL;
}

TestParsingMerge_RepeatedFieldsGenerator_Group1::~TestParsingMerge_RepeatedFieldsGenerator_Group1() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  SharedDtor();
}

void TestParsingMerge_RepeatedFieldsGenerator_Group1::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete field1_;
}

void TestParsingMerge_RepeatedFieldsGenerator_Group1::ArenaDtor(void* object) {
  TestParsingMerge_RepeatedFieldsGenerator_Group1* _this = reinterpret_cast< TestParsingMerge_RepeatedFieldsGenerator_Group1* >(object);
  (void)_this;
}
void TestParsingMerge_RepeatedFieldsGenerator_Group1::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestParsingMerge_RepeatedFieldsGenerator_Group1::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestParsingMerge_RepeatedFieldsGenerator_Group1::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestParsingMerge_RepeatedFieldsGenerator_Group1& TestParsingMerge_RepeatedFieldsGenerator_Group1::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1.base);
  return *internal_default_instance();
}


void TestParsingMerge_RepeatedFieldsGenerator_Group1::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(field1_ != NULL);
    field1_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestParsingMerge_RepeatedFieldsGenerator_Group1::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:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  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)) {
      // optional .protobuf_unittest.TestAllTypes field1 = 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_field1()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  return false;
#undef DO_
}

void TestParsingMerge_RepeatedFieldsGenerator_Group1::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes field1 = 11;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      11, this->_internal_field1(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
}

::google::protobuf::uint8* TestParsingMerge_RepeatedFieldsGenerator_Group1::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes field1 = 11;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        11, this->_internal_field1(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  return target;
}

size_t TestParsingMerge_RepeatedFieldsGenerator_Group1::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestAllTypes field1 = 11;
  if (has_field1()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *field1_);
  }

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

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

void TestParsingMerge_RepeatedFieldsGenerator_Group1::MergeFrom(const TestParsingMerge_RepeatedFieldsGenerator_Group1& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  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_field1()) {
    mutable_field1()->::protobuf_unittest::TestAllTypes::MergeFrom(from.field1());
  }
}

void TestParsingMerge_RepeatedFieldsGenerator_Group1::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestParsingMerge_RepeatedFieldsGenerator_Group1::CopyFrom(const TestParsingMerge_RepeatedFieldsGenerator_Group1& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestParsingMerge_RepeatedFieldsGenerator_Group1::Swap(TestParsingMerge_RepeatedFieldsGenerator_Group1* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestParsingMerge_RepeatedFieldsGenerator_Group1* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestParsingMerge_RepeatedFieldsGenerator_Group1::UnsafeArenaSwap(TestParsingMerge_RepeatedFieldsGenerator_Group1* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestParsingMerge_RepeatedFieldsGenerator_Group1::InternalSwap(TestParsingMerge_RepeatedFieldsGenerator_Group1* other) {
  using std::swap;
  swap(field1_, other->field1_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestParsingMerge_RepeatedFieldsGenerator_Group2::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group2_default_instance_._instance.get_mutable()->field1_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
}
void TestParsingMerge_RepeatedFieldsGenerator_Group2::unsafe_arena_set_allocated_field1(
    ::protobuf_unittest::TestAllTypes* field1) {
  if (GetArenaNoVirtual() == NULL) {
    delete field1_;
  }
  field1_ = field1;
  if (field1) {
    set_has_field1();
  } else {
    clear_has_field1();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.field1)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestParsingMerge_RepeatedFieldsGenerator_Group2::kField1FieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestParsingMerge_RepeatedFieldsGenerator_Group2::TestParsingMerge_RepeatedFieldsGenerator_Group2()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
}
TestParsingMerge_RepeatedFieldsGenerator_Group2::TestParsingMerge_RepeatedFieldsGenerator_Group2(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
}
TestParsingMerge_RepeatedFieldsGenerator_Group2::TestParsingMerge_RepeatedFieldsGenerator_Group2(const TestParsingMerge_RepeatedFieldsGenerator_Group2& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_field1()) {
    field1_ = new ::protobuf_unittest::TestAllTypes(*from.field1_);
  } else {
    field1_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
}

void TestParsingMerge_RepeatedFieldsGenerator_Group2::SharedCtor() {
  field1_ = NULL;
}

TestParsingMerge_RepeatedFieldsGenerator_Group2::~TestParsingMerge_RepeatedFieldsGenerator_Group2() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  SharedDtor();
}

void TestParsingMerge_RepeatedFieldsGenerator_Group2::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete field1_;
}

void TestParsingMerge_RepeatedFieldsGenerator_Group2::ArenaDtor(void* object) {
  TestParsingMerge_RepeatedFieldsGenerator_Group2* _this = reinterpret_cast< TestParsingMerge_RepeatedFieldsGenerator_Group2* >(object);
  (void)_this;
}
void TestParsingMerge_RepeatedFieldsGenerator_Group2::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestParsingMerge_RepeatedFieldsGenerator_Group2::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestParsingMerge_RepeatedFieldsGenerator_Group2::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestParsingMerge_RepeatedFieldsGenerator_Group2& TestParsingMerge_RepeatedFieldsGenerator_Group2::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2.base);
  return *internal_default_instance();
}


void TestParsingMerge_RepeatedFieldsGenerator_Group2::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(field1_ != NULL);
    field1_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestParsingMerge_RepeatedFieldsGenerator_Group2::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:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  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)) {
      // optional .protobuf_unittest.TestAllTypes field1 = 21;
      case 21: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_field1()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  return false;
#undef DO_
}

void TestParsingMerge_RepeatedFieldsGenerator_Group2::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes field1 = 21;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      21, this->_internal_field1(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
}

::google::protobuf::uint8* TestParsingMerge_RepeatedFieldsGenerator_Group2::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes field1 = 21;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        21, this->_internal_field1(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  return target;
}

size_t TestParsingMerge_RepeatedFieldsGenerator_Group2::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestAllTypes field1 = 21;
  if (has_field1()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *field1_);
  }

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

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

void TestParsingMerge_RepeatedFieldsGenerator_Group2::MergeFrom(const TestParsingMerge_RepeatedFieldsGenerator_Group2& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  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_field1()) {
    mutable_field1()->::protobuf_unittest::TestAllTypes::MergeFrom(from.field1());
  }
}

void TestParsingMerge_RepeatedFieldsGenerator_Group2::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestParsingMerge_RepeatedFieldsGenerator_Group2::CopyFrom(const TestParsingMerge_RepeatedFieldsGenerator_Group2& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestParsingMerge_RepeatedFieldsGenerator_Group2::Swap(TestParsingMerge_RepeatedFieldsGenerator_Group2* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestParsingMerge_RepeatedFieldsGenerator_Group2* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestParsingMerge_RepeatedFieldsGenerator_Group2::UnsafeArenaSwap(TestParsingMerge_RepeatedFieldsGenerator_Group2* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestParsingMerge_RepeatedFieldsGenerator_Group2::InternalSwap(TestParsingMerge_RepeatedFieldsGenerator_Group2* other) {
  using std::swap;
  swap(field1_, other->field1_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestParsingMerge_RepeatedFieldsGenerator::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestParsingMerge_RepeatedFieldsGenerator::kField1FieldNumber;
const int TestParsingMerge_RepeatedFieldsGenerator::kField2FieldNumber;
const int TestParsingMerge_RepeatedFieldsGenerator::kField3FieldNumber;
const int TestParsingMerge_RepeatedFieldsGenerator::kGroup1FieldNumber;
const int TestParsingMerge_RepeatedFieldsGenerator::kGroup2FieldNumber;
const int TestParsingMerge_RepeatedFieldsGenerator::kExt1FieldNumber;
const int TestParsingMerge_RepeatedFieldsGenerator::kExt2FieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestParsingMerge_RepeatedFieldsGenerator::TestParsingMerge_RepeatedFieldsGenerator()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
}
TestParsingMerge_RepeatedFieldsGenerator::TestParsingMerge_RepeatedFieldsGenerator(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena),
  field1_(arena),
  field2_(arena),
  field3_(arena),
  group1_(arena),
  group2_(arena),
  ext1_(arena),
  ext2_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
}
TestParsingMerge_RepeatedFieldsGenerator::TestParsingMerge_RepeatedFieldsGenerator(const TestParsingMerge_RepeatedFieldsGenerator& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      field1_(from.field1_),
      field2_(from.field2_),
      field3_(from.field3_),
      group1_(from.group1_),
      group2_(from.group2_),
      ext1_(from.ext1_),
      ext2_(from.ext2_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
}

void TestParsingMerge_RepeatedFieldsGenerator::SharedCtor() {
}

TestParsingMerge_RepeatedFieldsGenerator::~TestParsingMerge_RepeatedFieldsGenerator() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  SharedDtor();
}

void TestParsingMerge_RepeatedFieldsGenerator::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestParsingMerge_RepeatedFieldsGenerator::ArenaDtor(void* object) {
  TestParsingMerge_RepeatedFieldsGenerator* _this = reinterpret_cast< TestParsingMerge_RepeatedFieldsGenerator* >(object);
  (void)_this;
}
void TestParsingMerge_RepeatedFieldsGenerator::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestParsingMerge_RepeatedFieldsGenerator::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestParsingMerge_RepeatedFieldsGenerator::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestParsingMerge_RepeatedFieldsGenerator& TestParsingMerge_RepeatedFieldsGenerator::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator.base);
  return *internal_default_instance();
}


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

  field1_.Clear();
  field2_.Clear();
  field3_.Clear();
  group1_.Clear();
  group2_.Clear();
  ext1_.Clear();
  ext2_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestParsingMerge_RepeatedFieldsGenerator::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:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  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)) {
      // repeated .protobuf_unittest.TestAllTypes field1 = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_field1()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.TestAllTypes field2 = 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, add_field2()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.TestAllTypes field3 = 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, add_field3()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated group Group1 = 10 { ... };
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(83u /* 83 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(10, input, add_group1()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated group Group2 = 20 { ... };
      case 20: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(163u /* 163 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(20, input, add_group2()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.TestAllTypes ext1 = 1000;
      case 1000: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(66u /* 8002 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_ext1()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.TestAllTypes ext2 = 1001;
      case 1001: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(74u /* 8010 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_ext2()));
        } 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:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  return false;
#undef DO_
}

void TestParsingMerge_RepeatedFieldsGenerator::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  // repeated .protobuf_unittest.TestAllTypes field2 = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->field2_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2,
      this->field2(static_cast<int>(i)),
      output);
  }

  // repeated .protobuf_unittest.TestAllTypes field3 = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->field3_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3,
      this->field3(static_cast<int>(i)),
      output);
  }

  // repeated group Group1 = 10 { ... };
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->group1_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      10,
      this->group1(static_cast<int>(i)),
      output);
  }

  // repeated group Group2 = 20 { ... };
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->group2_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      20,
      this->group2(static_cast<int>(i)),
      output);
  }

  // repeated .protobuf_unittest.TestAllTypes ext1 = 1000;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->ext1_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1000,
      this->ext1(static_cast<int>(i)),
      output);
  }

  // repeated .protobuf_unittest.TestAllTypes ext2 = 1001;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->ext2_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1001,
      this->ext2(static_cast<int>(i)),
      output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
}

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

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

  // repeated .protobuf_unittest.TestAllTypes field2 = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->field2_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->field2(static_cast<int>(i)), deterministic, target);
  }

  // repeated .protobuf_unittest.TestAllTypes field3 = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->field3_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->field3(static_cast<int>(i)), deterministic, target);
  }

  // repeated group Group1 = 10 { ... };
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->group1_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        10, this->group1(static_cast<int>(i)), deterministic, target);
  }

  // repeated group Group2 = 20 { ... };
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->group2_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        20, this->group2(static_cast<int>(i)), deterministic, target);
  }

  // repeated .protobuf_unittest.TestAllTypes ext1 = 1000;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->ext1_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1000, this->ext1(static_cast<int>(i)), deterministic, target);
  }

  // repeated .protobuf_unittest.TestAllTypes ext2 = 1001;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->ext2_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1001, this->ext2(static_cast<int>(i)), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  return target;
}

size_t TestParsingMerge_RepeatedFieldsGenerator::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated .protobuf_unittest.TestAllTypes field1 = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->field1_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->field1(static_cast<int>(i)));
    }
  }

  // repeated .protobuf_unittest.TestAllTypes field2 = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->field2_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->field2(static_cast<int>(i)));
    }
  }

  // repeated .protobuf_unittest.TestAllTypes field3 = 3;
  {
    unsigned int count = static_cast<unsigned int>(this->field3_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->field3(static_cast<int>(i)));
    }
  }

  // repeated group Group1 = 10 { ... };
  {
    unsigned int count = static_cast<unsigned int>(this->group1_size());
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          this->group1(static_cast<int>(i)));
    }
  }

  // repeated group Group2 = 20 { ... };
  {
    unsigned int count = static_cast<unsigned int>(this->group2_size());
    total_size += 4UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          this->group2(static_cast<int>(i)));
    }
  }

  // repeated .protobuf_unittest.TestAllTypes ext1 = 1000;
  {
    unsigned int count = static_cast<unsigned int>(this->ext1_size());
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->ext1(static_cast<int>(i)));
    }
  }

  // repeated .protobuf_unittest.TestAllTypes ext2 = 1001;
  {
    unsigned int count = static_cast<unsigned int>(this->ext2_size());
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->ext2(static_cast<int>(i)));
    }
  }

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

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

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

  field1_.MergeFrom(from.field1_);
  field2_.MergeFrom(from.field2_);
  field3_.MergeFrom(from.field3_);
  group1_.MergeFrom(from.group1_);
  group2_.MergeFrom(from.group2_);
  ext1_.MergeFrom(from.ext1_);
  ext2_.MergeFrom(from.ext2_);
}

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

void TestParsingMerge_RepeatedFieldsGenerator::CopyFrom(const TestParsingMerge_RepeatedFieldsGenerator& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestParsingMerge_RepeatedFieldsGenerator::Swap(TestParsingMerge_RepeatedFieldsGenerator* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestParsingMerge_RepeatedFieldsGenerator* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestParsingMerge_RepeatedFieldsGenerator::UnsafeArenaSwap(TestParsingMerge_RepeatedFieldsGenerator* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestParsingMerge_RepeatedFieldsGenerator::InternalSwap(TestParsingMerge_RepeatedFieldsGenerator* other) {
  using std::swap;
  CastToBase(&field1_)->InternalSwap(CastToBase(&other->field1_));
  CastToBase(&field2_)->InternalSwap(CastToBase(&other->field2_));
  CastToBase(&field3_)->InternalSwap(CastToBase(&other->field3_));
  CastToBase(&group1_)->InternalSwap(CastToBase(&other->group1_));
  CastToBase(&group2_)->InternalSwap(CastToBase(&other->group2_));
  CastToBase(&ext1_)->InternalSwap(CastToBase(&other->ext1_));
  CastToBase(&ext2_)->InternalSwap(CastToBase(&other->ext2_));
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestParsingMerge_OptionalGroup::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestParsingMerge_OptionalGroup_default_instance_._instance.get_mutable()->optional_group_all_types_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
}
void TestParsingMerge_OptionalGroup::unsafe_arena_set_allocated_optional_group_all_types(
    ::protobuf_unittest::TestAllTypes* optional_group_all_types) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_group_all_types_;
  }
  optional_group_all_types_ = optional_group_all_types;
  if (optional_group_all_types) {
    set_has_optional_group_all_types();
  } else {
    clear_has_optional_group_all_types();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.OptionalGroup.optional_group_all_types)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestParsingMerge_OptionalGroup::kOptionalGroupAllTypesFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestParsingMerge_OptionalGroup::TestParsingMerge_OptionalGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_OptionalGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge.OptionalGroup)
}
TestParsingMerge_OptionalGroup::TestParsingMerge_OptionalGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_OptionalGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge.OptionalGroup)
}
TestParsingMerge_OptionalGroup::TestParsingMerge_OptionalGroup(const TestParsingMerge_OptionalGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_optional_group_all_types()) {
    optional_group_all_types_ = new ::protobuf_unittest::TestAllTypes(*from.optional_group_all_types_);
  } else {
    optional_group_all_types_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge.OptionalGroup)
}

void TestParsingMerge_OptionalGroup::SharedCtor() {
  optional_group_all_types_ = NULL;
}

TestParsingMerge_OptionalGroup::~TestParsingMerge_OptionalGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge.OptionalGroup)
  SharedDtor();
}

void TestParsingMerge_OptionalGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete optional_group_all_types_;
}

void TestParsingMerge_OptionalGroup::ArenaDtor(void* object) {
  TestParsingMerge_OptionalGroup* _this = reinterpret_cast< TestParsingMerge_OptionalGroup* >(object);
  (void)_this;
}
void TestParsingMerge_OptionalGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestParsingMerge_OptionalGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestParsingMerge_OptionalGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestParsingMerge_OptionalGroup& TestParsingMerge_OptionalGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_OptionalGroup.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(optional_group_all_types_ != NULL);
    optional_group_all_types_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestParsingMerge_OptionalGroup::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:protobuf_unittest.TestParsingMerge.OptionalGroup)
  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)) {
      // optional .protobuf_unittest.TestAllTypes optional_group_all_types = 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_optional_group_all_types()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge.OptionalGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge.OptionalGroup)
  return false;
#undef DO_
}

void TestParsingMerge_OptionalGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes optional_group_all_types = 11;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      11, this->_internal_optional_group_all_types(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge.OptionalGroup)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes optional_group_all_types = 11;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        11, this->_internal_optional_group_all_types(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge.OptionalGroup)
  return target;
}

size_t TestParsingMerge_OptionalGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestAllTypes optional_group_all_types = 11;
  if (has_optional_group_all_types()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *optional_group_all_types_);
  }

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

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

void TestParsingMerge_OptionalGroup::MergeFrom(const TestParsingMerge_OptionalGroup& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  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_optional_group_all_types()) {
    mutable_optional_group_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.optional_group_all_types());
  }
}

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

void TestParsingMerge_OptionalGroup::CopyFrom(const TestParsingMerge_OptionalGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestParsingMerge_OptionalGroup::Swap(TestParsingMerge_OptionalGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestParsingMerge_OptionalGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestParsingMerge_OptionalGroup::UnsafeArenaSwap(TestParsingMerge_OptionalGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestParsingMerge_OptionalGroup::InternalSwap(TestParsingMerge_OptionalGroup* other) {
  using std::swap;
  swap(optional_group_all_types_, other->optional_group_all_types_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestParsingMerge_RepeatedGroup::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestParsingMerge_RepeatedGroup_default_instance_._instance.get_mutable()->repeated_group_all_types_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
}
void TestParsingMerge_RepeatedGroup::unsafe_arena_set_allocated_repeated_group_all_types(
    ::protobuf_unittest::TestAllTypes* repeated_group_all_types) {
  if (GetArenaNoVirtual() == NULL) {
    delete repeated_group_all_types_;
  }
  repeated_group_all_types_ = repeated_group_all_types;
  if (repeated_group_all_types) {
    set_has_repeated_group_all_types();
  } else {
    clear_has_repeated_group_all_types();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.RepeatedGroup.repeated_group_all_types)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestParsingMerge_RepeatedGroup::kRepeatedGroupAllTypesFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestParsingMerge_RepeatedGroup::TestParsingMerge_RepeatedGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge.RepeatedGroup)
}
TestParsingMerge_RepeatedGroup::TestParsingMerge_RepeatedGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge.RepeatedGroup)
}
TestParsingMerge_RepeatedGroup::TestParsingMerge_RepeatedGroup(const TestParsingMerge_RepeatedGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_repeated_group_all_types()) {
    repeated_group_all_types_ = new ::protobuf_unittest::TestAllTypes(*from.repeated_group_all_types_);
  } else {
    repeated_group_all_types_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge.RepeatedGroup)
}

void TestParsingMerge_RepeatedGroup::SharedCtor() {
  repeated_group_all_types_ = NULL;
}

TestParsingMerge_RepeatedGroup::~TestParsingMerge_RepeatedGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  SharedDtor();
}

void TestParsingMerge_RepeatedGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete repeated_group_all_types_;
}

void TestParsingMerge_RepeatedGroup::ArenaDtor(void* object) {
  TestParsingMerge_RepeatedGroup* _this = reinterpret_cast< TestParsingMerge_RepeatedGroup* >(object);
  (void)_this;
}
void TestParsingMerge_RepeatedGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestParsingMerge_RepeatedGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestParsingMerge_RepeatedGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestParsingMerge_RepeatedGroup& TestParsingMerge_RepeatedGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedGroup.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(repeated_group_all_types_ != NULL);
    repeated_group_all_types_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestParsingMerge_RepeatedGroup::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:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  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)) {
      // optional .protobuf_unittest.TestAllTypes repeated_group_all_types = 21;
      case 21: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_repeated_group_all_types()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  return false;
#undef DO_
}

void TestParsingMerge_RepeatedGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes repeated_group_all_types = 21;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      21, this->_internal_repeated_group_all_types(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge.RepeatedGroup)
}

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

  cached_has_bits = _has_bits_[0];
  // optional .protobuf_unittest.TestAllTypes repeated_group_all_types = 21;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        21, this->_internal_repeated_group_all_types(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  return target;
}

size_t TestParsingMerge_RepeatedGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional .protobuf_unittest.TestAllTypes repeated_group_all_types = 21;
  if (has_repeated_group_all_types()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *repeated_group_all_types_);
  }

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

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

void TestParsingMerge_RepeatedGroup::MergeFrom(const TestParsingMerge_RepeatedGroup& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  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_repeated_group_all_types()) {
    mutable_repeated_group_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.repeated_group_all_types());
  }
}

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

void TestParsingMerge_RepeatedGroup::CopyFrom(const TestParsingMerge_RepeatedGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestParsingMerge_RepeatedGroup::Swap(TestParsingMerge_RepeatedGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestParsingMerge_RepeatedGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestParsingMerge_RepeatedGroup::UnsafeArenaSwap(TestParsingMerge_RepeatedGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestParsingMerge_RepeatedGroup::InternalSwap(TestParsingMerge_RepeatedGroup* other) {
  using std::swap;
  swap(repeated_group_all_types_, other->repeated_group_all_types_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void TestParsingMerge::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestParsingMerge_default_instance_._instance.get_mutable()->required_all_types_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
  ::protobuf_unittest::_TestParsingMerge_default_instance_._instance.get_mutable()->optional_all_types_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
  ::protobuf_unittest::_TestParsingMerge_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestParsingMerge_OptionalGroup*>(
      ::protobuf_unittest::TestParsingMerge_OptionalGroup::internal_default_instance());
}
void TestParsingMerge::unsafe_arena_set_allocated_required_all_types(
    ::protobuf_unittest::TestAllTypes* required_all_types) {
  if (GetArenaNoVirtual() == NULL) {
    delete required_all_types_;
  }
  required_all_types_ = required_all_types;
  if (required_all_types) {
    set_has_required_all_types();
  } else {
    clear_has_required_all_types();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.required_all_types)
}
void TestParsingMerge::unsafe_arena_set_allocated_optional_all_types(
    ::protobuf_unittest::TestAllTypes* optional_all_types) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_all_types_;
  }
  optional_all_types_ = optional_all_types;
  if (optional_all_types) {
    set_has_optional_all_types();
  } else {
    clear_has_optional_all_types();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.optional_all_types)
}
void TestParsingMerge::unsafe_arena_set_allocated_optionalgroup(
    ::protobuf_unittest::TestParsingMerge_OptionalGroup* optionalgroup) {
  if (GetArenaNoVirtual() == NULL) {
    delete optionalgroup_;
  }
  optionalgroup_ = optionalgroup;
  if (optionalgroup) {
    set_has_optionalgroup();
  } else {
    clear_has_optionalgroup();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.optionalgroup)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestParsingMerge::kRequiredAllTypesFieldNumber;
const int TestParsingMerge::kOptionalAllTypesFieldNumber;
const int TestParsingMerge::kRepeatedAllTypesFieldNumber;
const int TestParsingMerge::kOptionalgroupFieldNumber;
const int TestParsingMerge::kRepeatedgroupFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestParsingMerge::TestParsingMerge()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge)
}
TestParsingMerge::TestParsingMerge(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _extensions_(arena),
  _internal_metadata_(arena),
  repeated_all_types_(arena),
  repeatedgroup_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge)
}
TestParsingMerge::TestParsingMerge(const TestParsingMerge& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      repeated_all_types_(from.repeated_all_types_),
      repeatedgroup_(from.repeatedgroup_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  if (from.has_required_all_types()) {
    required_all_types_ = new ::protobuf_unittest::TestAllTypes(*from.required_all_types_);
  } else {
    required_all_types_ = NULL;
  }
  if (from.has_optional_all_types()) {
    optional_all_types_ = new ::protobuf_unittest::TestAllTypes(*from.optional_all_types_);
  } else {
    optional_all_types_ = NULL;
  }
  if (from.has_optionalgroup()) {
    optionalgroup_ = new ::protobuf_unittest::TestParsingMerge_OptionalGroup(*from.optionalgroup_);
  } else {
    optionalgroup_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge)
}

void TestParsingMerge::SharedCtor() {
  ::memset(&required_all_types_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&optionalgroup_) -
      reinterpret_cast<char*>(&required_all_types_)) + sizeof(optionalgroup_));
}

TestParsingMerge::~TestParsingMerge() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge)
  SharedDtor();
}

void TestParsingMerge::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  if (this != internal_default_instance()) delete required_all_types_;
  if (this != internal_default_instance()) delete optional_all_types_;
  if (this != internal_default_instance()) delete optionalgroup_;
}

void TestParsingMerge::ArenaDtor(void* object) {
  TestParsingMerge* _this = reinterpret_cast< TestParsingMerge* >(object);
  (void)_this;
}
void TestParsingMerge::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestParsingMerge::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestParsingMerge::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestParsingMerge& TestParsingMerge::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge.base);
  return *internal_default_instance();
}


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

  _extensions_.Clear();
  repeated_all_types_.Clear();
  repeatedgroup_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 7u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(required_all_types_ != NULL);
      required_all_types_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(optional_all_types_ != NULL);
      optional_all_types_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(optionalgroup_ != NULL);
      optionalgroup_->Clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestParsingMerge::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:protobuf_unittest.TestParsingMerge)
  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)) {
      // required .protobuf_unittest.TestAllTypes required_all_types = 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_required_all_types()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestAllTypes optional_all_types = 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_optional_all_types()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.TestAllTypes repeated_all_types = 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, add_repeated_all_types()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional group OptionalGroup = 10 { ... };
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(83u /* 83 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                10, input, mutable_optionalgroup()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated group RepeatedGroup = 20 { ... };
      case 20: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(163u /* 163 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(20, input, add_repeatedgroup()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        if ((8000u <= tag)) {
          DO_(_extensions_.ParseField(tag, input,
              internal_default_instance(),
              _internal_metadata_.mutable_unknown_fields()));
          continue;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // required .protobuf_unittest.TestAllTypes required_all_types = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->_internal_required_all_types(), output);
  }

  // optional .protobuf_unittest.TestAllTypes optional_all_types = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->_internal_optional_all_types(), output);
  }

  // repeated .protobuf_unittest.TestAllTypes repeated_all_types = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_all_types_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3,
      this->repeated_all_types(static_cast<int>(i)),
      output);
  }

  // optional group OptionalGroup = 10 { ... };
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      10, this->_internal_optionalgroup(), output);
  }

  // repeated group RepeatedGroup = 20 { ... };
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      20,
      this->repeatedgroup(static_cast<int>(i)),
      output);
  }

  // Extension range [1000, 536870912)
  _extensions_.SerializeWithCachedSizes(
      1000, 536870912, output);

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge)
}

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

  cached_has_bits = _has_bits_[0];
  // required .protobuf_unittest.TestAllTypes required_all_types = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->_internal_required_all_types(), deterministic, target);
  }

  // optional .protobuf_unittest.TestAllTypes optional_all_types = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->_internal_optional_all_types(), deterministic, target);
  }

  // repeated .protobuf_unittest.TestAllTypes repeated_all_types = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeated_all_types_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->repeated_all_types(static_cast<int>(i)), deterministic, target);
  }

  // optional group OptionalGroup = 10 { ... };
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        10, this->_internal_optionalgroup(), deterministic, target);
  }

  // repeated group RepeatedGroup = 20 { ... };
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        20, this->repeatedgroup(static_cast<int>(i)), deterministic, target);
  }

  // Extension range [1000, 536870912)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      1000, 536870912, deterministic, target);

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge)
  return target;
}

size_t TestParsingMerge::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge)
  size_t total_size = 0;

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // required .protobuf_unittest.TestAllTypes required_all_types = 1;
  if (has_required_all_types()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *required_all_types_);
  }
  // repeated .protobuf_unittest.TestAllTypes repeated_all_types = 3;
  {
    unsigned int count = static_cast<unsigned int>(this->repeated_all_types_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->repeated_all_types(static_cast<int>(i)));
    }
  }

  // repeated group RepeatedGroup = 20 { ... };
  {
    unsigned int count = static_cast<unsigned int>(this->repeatedgroup_size());
    total_size += 4UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          this->repeatedgroup(static_cast<int>(i)));
    }
  }

  if (_has_bits_[0 / 32] & 6u) {
    // optional .protobuf_unittest.TestAllTypes optional_all_types = 2;
    if (has_optional_all_types()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *optional_all_types_);
    }

    // optional group OptionalGroup = 10 { ... };
    if (has_optionalgroup()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *optionalgroup_);
    }

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

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

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

  repeated_all_types_.MergeFrom(from.repeated_all_types_);
  repeatedgroup_.MergeFrom(from.repeatedgroup_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 7u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_required_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.required_all_types());
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_optional_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.optional_all_types());
    }
    if (cached_has_bits & 0x00000004u) {
      mutable_optionalgroup()->::protobuf_unittest::TestParsingMerge_OptionalGroup::MergeFrom(from.optionalgroup());
    }
  }
}

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

void TestParsingMerge::CopyFrom(const TestParsingMerge& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestParsingMerge::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  return true;
}

void TestParsingMerge::Swap(TestParsingMerge* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestParsingMerge* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestParsingMerge::UnsafeArenaSwap(TestParsingMerge* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestParsingMerge::InternalSwap(TestParsingMerge* other) {
  using std::swap;
  CastToBase(&repeated_all_types_)->InternalSwap(CastToBase(&other->repeated_all_types_));
  CastToBase(&repeatedgroup_)->InternalSwap(CastToBase(&other->repeatedgroup_));
  swap(required_all_types_, other->required_all_types_);
  swap(optional_all_types_, other->optional_all_types_);
  swap(optionalgroup_, other->optionalgroup_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _extensions_.Swap(&other->_extensions_);
}

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


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

void TestCommentInjectionMessage::InitAsDefaultInstance() {
}
::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_;
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestCommentInjectionMessage::kAFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestCommentInjectionMessage::TestCommentInjectionMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCommentInjectionMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestCommentInjectionMessage)
}
TestCommentInjectionMessage::TestCommentInjectionMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCommentInjectionMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestCommentInjectionMessage)
}
TestCommentInjectionMessage::TestCommentInjectionMessage(const TestCommentInjectionMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  a_.UnsafeSetDefault(&::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get());
  if (from.has_a()) {
    a_.Set(&::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get(), from.a(),
      GetArenaNoVirtual());
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestCommentInjectionMessage)
}

void TestCommentInjectionMessage::SharedCtor() {
  a_.UnsafeSetDefault(&::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get());
}

TestCommentInjectionMessage::~TestCommentInjectionMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestCommentInjectionMessage)
  SharedDtor();
}

void TestCommentInjectionMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  a_.DestroyNoArena(&::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get());
}

void TestCommentInjectionMessage::ArenaDtor(void* object) {
  TestCommentInjectionMessage* _this = reinterpret_cast< TestCommentInjectionMessage* >(object);
  (void)_this;
}
void TestCommentInjectionMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestCommentInjectionMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestCommentInjectionMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestCommentInjectionMessage& TestCommentInjectionMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCommentInjectionMessage.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    a_.ClearToDefault(&::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get(), GetArenaNoVirtual());
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestCommentInjectionMessage::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:protobuf_unittest.TestCommentInjectionMessage)
  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)) {
      // optional string a = 1 [default = "*/ <- Neither should this."];
      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_a()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->a().data(), static_cast<int>(this->a().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestCommentInjectionMessage.a");
        } 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:protobuf_unittest.TestCommentInjectionMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestCommentInjectionMessage)
  return false;
#undef DO_
}

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

  cached_has_bits = _has_bits_[0];
  // optional string a = 1 [default = "*/ <- Neither should this."];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->a().data(), static_cast<int>(this->a().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCommentInjectionMessage.a");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->a(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestCommentInjectionMessage)
}

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

  cached_has_bits = _has_bits_[0];
  // optional string a = 1 [default = "*/ <- Neither should this."];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->a().data(), static_cast<int>(this->a().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestCommentInjectionMessage.a");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->a(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestCommentInjectionMessage)
  return target;
}

size_t TestCommentInjectionMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestCommentInjectionMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional string a = 1 [default = "*/ <- Neither should this."];
  if (has_a()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->a());
  }

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

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

void TestCommentInjectionMessage::MergeFrom(const TestCommentInjectionMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestCommentInjectionMessage)
  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_a()) {
    set_a(from.a());
  }
}

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

void TestCommentInjectionMessage::CopyFrom(const TestCommentInjectionMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestCommentInjectionMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TestCommentInjectionMessage::Swap(TestCommentInjectionMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestCommentInjectionMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestCommentInjectionMessage::UnsafeArenaSwap(TestCommentInjectionMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestCommentInjectionMessage::InternalSwap(TestCommentInjectionMessage* other) {
  using std::swap;
  a_.Swap(&other->a_, &::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get(),
    GetArenaNoVirtual());
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

void FooRequest::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

FooRequest::FooRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooRequest.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.FooRequest)
}
FooRequest::FooRequest(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooRequest.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.FooRequest)
}
FooRequest::FooRequest(const FooRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.FooRequest)
}

void FooRequest::SharedCtor() {
}

FooRequest::~FooRequest() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.FooRequest)
  SharedDtor();
}

void FooRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void FooRequest::ArenaDtor(void* object) {
  FooRequest* _this = reinterpret_cast< FooRequest* >(object);
  (void)_this;
}
void FooRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void FooRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* FooRequest::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const FooRequest& FooRequest::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooRequest.base);
  return *internal_default_instance();
}


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

  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool FooRequest::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:protobuf_unittest.FooRequest)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.FooRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.FooRequest)
  return false;
#undef DO_
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.FooRequest)
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.FooRequest)
  return target;
}

size_t FooRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.FooRequest)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void FooRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.FooRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const FooRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const FooRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.FooRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.FooRequest)
    MergeFrom(*source);
  }
}

void FooRequest::MergeFrom(const FooRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.FooRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

void FooRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.FooRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FooRequest::CopyFrom(const FooRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.FooRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool FooRequest::IsInitialized() const {
  return true;
}

void FooRequest::Swap(FooRequest* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    FooRequest* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void FooRequest::UnsafeArenaSwap(FooRequest* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void FooRequest::InternalSwap(FooRequest* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata FooRequest::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void FooResponse::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

FooResponse::FooResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooResponse.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.FooResponse)
}
FooResponse::FooResponse(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooResponse.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.FooResponse)
}
FooResponse::FooResponse(const FooResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.FooResponse)
}

void FooResponse::SharedCtor() {
}

FooResponse::~FooResponse() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.FooResponse)
  SharedDtor();
}

void FooResponse::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void FooResponse::ArenaDtor(void* object) {
  FooResponse* _this = reinterpret_cast< FooResponse* >(object);
  (void)_this;
}
void FooResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void FooResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* FooResponse::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const FooResponse& FooResponse::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooResponse.base);
  return *internal_default_instance();
}


void FooResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.FooResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool FooResponse::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:protobuf_unittest.FooResponse)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.FooResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.FooResponse)
  return false;
#undef DO_
}

void FooResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.FooResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.FooResponse)
}

::google::protobuf::uint8* FooResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.FooResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.FooResponse)
  return target;
}

size_t FooResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.FooResponse)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void FooResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.FooResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const FooResponse* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const FooResponse>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.FooResponse)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.FooResponse)
    MergeFrom(*source);
  }
}

void FooResponse::MergeFrom(const FooResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.FooResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

void FooResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.FooResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FooResponse::CopyFrom(const FooResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.FooResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool FooResponse::IsInitialized() const {
  return true;
}

void FooResponse::Swap(FooResponse* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    FooResponse* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void FooResponse::UnsafeArenaSwap(FooResponse* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void FooResponse::InternalSwap(FooResponse* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata FooResponse::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void FooClientMessage::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

FooClientMessage::FooClientMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooClientMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.FooClientMessage)
}
FooClientMessage::FooClientMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooClientMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.FooClientMessage)
}
FooClientMessage::FooClientMessage(const FooClientMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.FooClientMessage)
}

void FooClientMessage::SharedCtor() {
}

FooClientMessage::~FooClientMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.FooClientMessage)
  SharedDtor();
}

void FooClientMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void FooClientMessage::ArenaDtor(void* object) {
  FooClientMessage* _this = reinterpret_cast< FooClientMessage* >(object);
  (void)_this;
}
void FooClientMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void FooClientMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* FooClientMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const FooClientMessage& FooClientMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooClientMessage.base);
  return *internal_default_instance();
}


void FooClientMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.FooClientMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool FooClientMessage::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:protobuf_unittest.FooClientMessage)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.FooClientMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.FooClientMessage)
  return false;
#undef DO_
}

void FooClientMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.FooClientMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.FooClientMessage)
}

::google::protobuf::uint8* FooClientMessage::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.FooClientMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.FooClientMessage)
  return target;
}

size_t FooClientMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.FooClientMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void FooClientMessage::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.FooClientMessage)
  GOOGLE_DCHECK_NE(&from, this);
  const FooClientMessage* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const FooClientMessage>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.FooClientMessage)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.FooClientMessage)
    MergeFrom(*source);
  }
}

void FooClientMessage::MergeFrom(const FooClientMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.FooClientMessage)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

void FooClientMessage::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.FooClientMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FooClientMessage::CopyFrom(const FooClientMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.FooClientMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool FooClientMessage::IsInitialized() const {
  return true;
}

void FooClientMessage::Swap(FooClientMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    FooClientMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void FooClientMessage::UnsafeArenaSwap(FooClientMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void FooClientMessage::InternalSwap(FooClientMessage* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata FooClientMessage::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void FooServerMessage::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

FooServerMessage::FooServerMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooServerMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.FooServerMessage)
}
FooServerMessage::FooServerMessage(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooServerMessage.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.FooServerMessage)
}
FooServerMessage::FooServerMessage(const FooServerMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.FooServerMessage)
}

void FooServerMessage::SharedCtor() {
}

FooServerMessage::~FooServerMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.FooServerMessage)
  SharedDtor();
}

void FooServerMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void FooServerMessage::ArenaDtor(void* object) {
  FooServerMessage* _this = reinterpret_cast< FooServerMessage* >(object);
  (void)_this;
}
void FooServerMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void FooServerMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* FooServerMessage::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const FooServerMessage& FooServerMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooServerMessage.base);
  return *internal_default_instance();
}


void FooServerMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.FooServerMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool FooServerMessage::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:protobuf_unittest.FooServerMessage)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.FooServerMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.FooServerMessage)
  return false;
#undef DO_
}

void FooServerMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.FooServerMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.FooServerMessage)
}

::google::protobuf::uint8* FooServerMessage::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.FooServerMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.FooServerMessage)
  return target;
}

size_t FooServerMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.FooServerMessage)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void FooServerMessage::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.FooServerMessage)
  GOOGLE_DCHECK_NE(&from, this);
  const FooServerMessage* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const FooServerMessage>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.FooServerMessage)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.FooServerMessage)
    MergeFrom(*source);
  }
}

void FooServerMessage::MergeFrom(const FooServerMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.FooServerMessage)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

void FooServerMessage::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.FooServerMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FooServerMessage::CopyFrom(const FooServerMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.FooServerMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool FooServerMessage::IsInitialized() const {
  return true;
}

void FooServerMessage::Swap(FooServerMessage* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    FooServerMessage* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void FooServerMessage::UnsafeArenaSwap(FooServerMessage* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void FooServerMessage::InternalSwap(FooServerMessage* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata FooServerMessage::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void BarRequest::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

BarRequest::BarRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarRequest.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.BarRequest)
}
BarRequest::BarRequest(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarRequest.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.BarRequest)
}
BarRequest::BarRequest(const BarRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.BarRequest)
}

void BarRequest::SharedCtor() {
}

BarRequest::~BarRequest() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.BarRequest)
  SharedDtor();
}

void BarRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void BarRequest::ArenaDtor(void* object) {
  BarRequest* _this = reinterpret_cast< BarRequest* >(object);
  (void)_this;
}
void BarRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void BarRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* BarRequest::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const BarRequest& BarRequest::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarRequest.base);
  return *internal_default_instance();
}


void BarRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.BarRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool BarRequest::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:protobuf_unittest.BarRequest)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.BarRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.BarRequest)
  return false;
#undef DO_
}

void BarRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.BarRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.BarRequest)
}

::google::protobuf::uint8* BarRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.BarRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.BarRequest)
  return target;
}

size_t BarRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.BarRequest)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void BarRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.BarRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const BarRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const BarRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.BarRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.BarRequest)
    MergeFrom(*source);
  }
}

void BarRequest::MergeFrom(const BarRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.BarRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

void BarRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.BarRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BarRequest::CopyFrom(const BarRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.BarRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BarRequest::IsInitialized() const {
  return true;
}

void BarRequest::Swap(BarRequest* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    BarRequest* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void BarRequest::UnsafeArenaSwap(BarRequest* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void BarRequest::InternalSwap(BarRequest* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata BarRequest::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void BarResponse::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

BarResponse::BarResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarResponse.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.BarResponse)
}
BarResponse::BarResponse(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarResponse.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.BarResponse)
}
BarResponse::BarResponse(const BarResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.BarResponse)
}

void BarResponse::SharedCtor() {
}

BarResponse::~BarResponse() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.BarResponse)
  SharedDtor();
}

void BarResponse::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void BarResponse::ArenaDtor(void* object) {
  BarResponse* _this = reinterpret_cast< BarResponse* >(object);
  (void)_this;
}
void BarResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void BarResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* BarResponse::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const BarResponse& BarResponse::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarResponse.base);
  return *internal_default_instance();
}


void BarResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.BarResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool BarResponse::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:protobuf_unittest.BarResponse)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.BarResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.BarResponse)
  return false;
#undef DO_
}

void BarResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.BarResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.BarResponse)
}

::google::protobuf::uint8* BarResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.BarResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.BarResponse)
  return target;
}

size_t BarResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.BarResponse)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void BarResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.BarResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const BarResponse* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const BarResponse>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.BarResponse)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.BarResponse)
    MergeFrom(*source);
  }
}

void BarResponse::MergeFrom(const BarResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.BarResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

void BarResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.BarResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BarResponse::CopyFrom(const BarResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.BarResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BarResponse::IsInitialized() const {
  return true;
}

void BarResponse::Swap(BarResponse* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    BarResponse* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void BarResponse::UnsafeArenaSwap(BarResponse* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void BarResponse::InternalSwap(BarResponse* other) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata BarResponse::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void TestJsonName::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestJsonName::kFieldName1FieldNumber;
const int TestJsonName::kFieldName2FieldNumber;
const int TestJsonName::kFieldName3FieldNumber;
const int TestJsonName::kFieldName4FieldNumber;
const int TestJsonName::kFIELDNAME5FieldNumber;
const int TestJsonName::kFieldName6FieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestJsonName::TestJsonName()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestJsonName.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestJsonName)
}
TestJsonName::TestJsonName(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestJsonName.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestJsonName)
}
TestJsonName::TestJsonName(const TestJsonName& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&field_name1_, &from.field_name1_,
    static_cast<size_t>(reinterpret_cast<char*>(&field_name6_) -
    reinterpret_cast<char*>(&field_name1_)) + sizeof(field_name6_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestJsonName)
}

void TestJsonName::SharedCtor() {
  ::memset(&field_name1_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&field_name6_) -
      reinterpret_cast<char*>(&field_name1_)) + sizeof(field_name6_));
}

TestJsonName::~TestJsonName() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestJsonName)
  SharedDtor();
}

void TestJsonName::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestJsonName::ArenaDtor(void* object) {
  TestJsonName* _this = reinterpret_cast< TestJsonName* >(object);
  (void)_this;
}
void TestJsonName::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestJsonName::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestJsonName::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestJsonName& TestJsonName::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestJsonName.base);
  return *internal_default_instance();
}


void TestJsonName::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestJsonName)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 63u) {
    ::memset(&field_name1_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&field_name6_) -
        reinterpret_cast<char*>(&field_name1_)) + sizeof(field_name6_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestJsonName::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:protobuf_unittest.TestJsonName)
  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)) {
      // optional int32 field_name1 = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_field_name1();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field_name1_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 fieldName2 = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          set_has_fieldname2();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &fieldname2_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 FieldName3 = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          set_has_fieldname3();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &fieldname3_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 _field_name4 = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
          set_has__field_name4();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &_field_name4_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 FIELD_NAME5 = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
          set_has_field_name5();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field_name5_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 field_name6 = 6[json_name = "@type"];
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
          set_has_field_name6();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field_name6_)));
        } 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:protobuf_unittest.TestJsonName)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestJsonName)
  return false;
#undef DO_
}

void TestJsonName::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestJsonName)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 field_name1 = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->field_name1(), output);
  }

  // optional int32 fieldName2 = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->fieldname2(), output);
  }

  // optional int32 FieldName3 = 3;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->fieldname3(), output);
  }

  // optional int32 _field_name4 = 4;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->_field_name4(), output);
  }

  // optional int32 FIELD_NAME5 = 5;
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->field_name5(), output);
  }

  // optional int32 field_name6 = 6[json_name = "@type"];
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->field_name6(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestJsonName)
}

::google::protobuf::uint8* TestJsonName::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestJsonName)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 field_name1 = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->field_name1(), target);
  }

  // optional int32 fieldName2 = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->fieldname2(), target);
  }

  // optional int32 FieldName3 = 3;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->fieldname3(), target);
  }

  // optional int32 _field_name4 = 4;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->_field_name4(), target);
  }

  // optional int32 FIELD_NAME5 = 5;
  if (cached_has_bits & 0x00000010u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->field_name5(), target);
  }

  // optional int32 field_name6 = 6[json_name = "@type"];
  if (cached_has_bits & 0x00000020u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->field_name6(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestJsonName)
  return target;
}

size_t TestJsonName::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestJsonName)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 63u) {
    // optional int32 field_name1 = 1;
    if (has_field_name1()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field_name1());
    }

    // optional int32 fieldName2 = 2;
    if (has_fieldname2()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->fieldname2());
    }

    // optional int32 FieldName3 = 3;
    if (has_fieldname3()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->fieldname3());
    }

    // optional int32 _field_name4 = 4;
    if (has__field_name4()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->_field_name4());
    }

    // optional int32 FIELD_NAME5 = 5;
    if (has_field_name5()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field_name5());
    }

    // optional int32 field_name6 = 6[json_name = "@type"];
    if (has_field_name6()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field_name6());
    }

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TestJsonName::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestJsonName)
  GOOGLE_DCHECK_NE(&from, this);
  const TestJsonName* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const TestJsonName>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestJsonName)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestJsonName)
    MergeFrom(*source);
  }
}

void TestJsonName::MergeFrom(const TestJsonName& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestJsonName)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 63u) {
    if (cached_has_bits & 0x00000001u) {
      field_name1_ = from.field_name1_;
    }
    if (cached_has_bits & 0x00000002u) {
      fieldname2_ = from.fieldname2_;
    }
    if (cached_has_bits & 0x00000004u) {
      fieldname3_ = from.fieldname3_;
    }
    if (cached_has_bits & 0x00000008u) {
      _field_name4_ = from._field_name4_;
    }
    if (cached_has_bits & 0x00000010u) {
      field_name5_ = from.field_name5_;
    }
    if (cached_has_bits & 0x00000020u) {
      field_name6_ = from.field_name6_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void TestJsonName::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestJsonName)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestJsonName::CopyFrom(const TestJsonName& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestJsonName)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestJsonName::IsInitialized() const {
  return true;
}

void TestJsonName::Swap(TestJsonName* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestJsonName* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestJsonName::UnsafeArenaSwap(TestJsonName* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestJsonName::InternalSwap(TestJsonName* other) {
  using std::swap;
  swap(field_name1_, other->field_name1_);
  swap(fieldname2_, other->fieldname2_);
  swap(fieldname3_, other->fieldname3_);
  swap(_field_name4_, other->_field_name4_);
  swap(field_name5_, other->field_name5_);
  swap(field_name6_, other->field_name6_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata TestJsonName::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void TestHugeFieldNumbers_OptionalGroup::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestHugeFieldNumbers_OptionalGroup::kGroupAFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestHugeFieldNumbers_OptionalGroup::TestHugeFieldNumbers_OptionalGroup()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers_OptionalGroup.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
}
TestHugeFieldNumbers_OptionalGroup::TestHugeFieldNumbers_OptionalGroup(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers_OptionalGroup.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
}
TestHugeFieldNumbers_OptionalGroup::TestHugeFieldNumbers_OptionalGroup(const TestHugeFieldNumbers_OptionalGroup& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  group_a_ = from.group_a_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
}

void TestHugeFieldNumbers_OptionalGroup::SharedCtor() {
  group_a_ = 0;
}

TestHugeFieldNumbers_OptionalGroup::~TestHugeFieldNumbers_OptionalGroup() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  SharedDtor();
}

void TestHugeFieldNumbers_OptionalGroup::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestHugeFieldNumbers_OptionalGroup::ArenaDtor(void* object) {
  TestHugeFieldNumbers_OptionalGroup* _this = reinterpret_cast< TestHugeFieldNumbers_OptionalGroup* >(object);
  (void)_this;
}
void TestHugeFieldNumbers_OptionalGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestHugeFieldNumbers_OptionalGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestHugeFieldNumbers_OptionalGroup::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestHugeFieldNumbers_OptionalGroup& TestHugeFieldNumbers_OptionalGroup::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers_OptionalGroup.base);
  return *internal_default_instance();
}


void TestHugeFieldNumbers_OptionalGroup::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  group_a_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestHugeFieldNumbers_OptionalGroup::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:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(4294960077u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 group_a = 536870009;
      case 536870009: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(200u /* 4294960072 & 0xFF */)) {
          set_has_group_a();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &group_a_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  return false;
#undef DO_
}

void TestHugeFieldNumbers_OptionalGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 group_a = 536870009;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(536870009, this->group_a(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
}

::google::protobuf::uint8* TestHugeFieldNumbers_OptionalGroup::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 group_a = 536870009;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(536870009, this->group_a(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  return target;
}

size_t TestHugeFieldNumbers_OptionalGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // optional int32 group_a = 536870009;
  if (has_group_a()) {
    total_size += 5 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->group_a());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TestHugeFieldNumbers_OptionalGroup::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  GOOGLE_DCHECK_NE(&from, this);
  const TestHugeFieldNumbers_OptionalGroup* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const TestHugeFieldNumbers_OptionalGroup>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
    MergeFrom(*source);
  }
}

void TestHugeFieldNumbers_OptionalGroup::MergeFrom(const TestHugeFieldNumbers_OptionalGroup& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  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_group_a()) {
    set_group_a(from.group_a());
  }
}

void TestHugeFieldNumbers_OptionalGroup::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestHugeFieldNumbers_OptionalGroup::CopyFrom(const TestHugeFieldNumbers_OptionalGroup& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestHugeFieldNumbers_OptionalGroup::IsInitialized() const {
  return true;
}

void TestHugeFieldNumbers_OptionalGroup::Swap(TestHugeFieldNumbers_OptionalGroup* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestHugeFieldNumbers_OptionalGroup* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestHugeFieldNumbers_OptionalGroup::UnsafeArenaSwap(TestHugeFieldNumbers_OptionalGroup* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestHugeFieldNumbers_OptionalGroup::InternalSwap(TestHugeFieldNumbers_OptionalGroup* other) {
  using std::swap;
  swap(group_a_, other->group_a_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata TestHugeFieldNumbers_OptionalGroup::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse() {}
TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
void TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::MergeFrom(const TestHugeFieldNumbers_StringStringMapEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::google::protobuf::Metadata TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::GetMetadata() const {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[88];
}
void TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::MergeFrom(
    const ::google::protobuf::Message& other) {
  ::google::protobuf::Message::MergeFrom(other);
}


// ===================================================================

void TestHugeFieldNumbers::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_._instance.get_mutable()->optional_message_ = const_cast< ::protobuf_unittest::ForeignMessage*>(
      ::protobuf_unittest::ForeignMessage::internal_default_instance());
  ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup*>(
      ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup::internal_default_instance());
  ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_.oneof_uint32_ = 0u;
  ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_.oneof_test_all_types_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
      ::protobuf_unittest::TestAllTypes::internal_default_instance());
  ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_.oneof_string_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_.oneof_bytes_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void TestHugeFieldNumbers::unsafe_arena_set_allocated_optional_message(
    ::protobuf_unittest::ForeignMessage* optional_message) {
  if (GetArenaNoVirtual() == NULL) {
    delete optional_message_;
  }
  optional_message_ = optional_message;
  if (optional_message) {
    set_has_optional_message();
  } else {
    clear_has_optional_message();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestHugeFieldNumbers.optional_message)
}
void TestHugeFieldNumbers::unsafe_arena_set_allocated_optionalgroup(
    ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup* optionalgroup) {
  if (GetArenaNoVirtual() == NULL) {
    delete optionalgroup_;
  }
  optionalgroup_ = optionalgroup;
  if (optionalgroup) {
    set_has_optionalgroup();
  } else {
    clear_has_optionalgroup();
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestHugeFieldNumbers.optionalgroup)
}
void TestHugeFieldNumbers::set_allocated_oneof_test_all_types(::protobuf_unittest::TestAllTypes* oneof_test_all_types) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_oneof_field();
  if (oneof_test_all_types) {
    ::google::protobuf::Arena* submessage_arena =
      ::google::protobuf::Arena::GetArena(oneof_test_all_types);
    if (message_arena != submessage_arena) {
      oneof_test_all_types = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, oneof_test_all_types, submessage_arena);
    }
    set_has_oneof_test_all_types();
    oneof_field_.oneof_test_all_types_ = oneof_test_all_types;
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestHugeFieldNumbers.oneof_test_all_types)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestHugeFieldNumbers::kOptionalInt32FieldNumber;
const int TestHugeFieldNumbers::kFixed32FieldNumber;
const int TestHugeFieldNumbers::kRepeatedInt32FieldNumber;
const int TestHugeFieldNumbers::kPackedInt32FieldNumber;
const int TestHugeFieldNumbers::kOptionalEnumFieldNumber;
const int TestHugeFieldNumbers::kOptionalStringFieldNumber;
const int TestHugeFieldNumbers::kOptionalBytesFieldNumber;
const int TestHugeFieldNumbers::kOptionalMessageFieldNumber;
const int TestHugeFieldNumbers::kOptionalgroupFieldNumber;
const int TestHugeFieldNumbers::kStringStringMapFieldNumber;
const int TestHugeFieldNumbers::kOneofUint32FieldNumber;
const int TestHugeFieldNumbers::kOneofTestAllTypesFieldNumber;
const int TestHugeFieldNumbers::kOneofStringFieldNumber;
const int TestHugeFieldNumbers::kOneofBytesFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestHugeFieldNumbers::TestHugeFieldNumbers()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestHugeFieldNumbers)
}
TestHugeFieldNumbers::TestHugeFieldNumbers(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _extensions_(arena),
  _internal_metadata_(arena),
  repeated_int32_(arena),
  packed_int32_(arena),
  string_string_map_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestHugeFieldNumbers)
}
TestHugeFieldNumbers::TestHugeFieldNumbers(const TestHugeFieldNumbers& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      repeated_int32_(from.repeated_int32_),
      packed_int32_(from.packed_int32_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  string_string_map_.MergeFrom(from.string_string_map_);
  optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_optional_string()) {
    optional_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string(),
      GetArenaNoVirtual());
  }
  optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_optional_bytes()) {
    optional_bytes_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes(),
      GetArenaNoVirtual());
  }
  if (from.has_optional_message()) {
    optional_message_ = new ::protobuf_unittest::ForeignMessage(*from.optional_message_);
  } else {
    optional_message_ = NULL;
  }
  if (from.has_optionalgroup()) {
    optionalgroup_ = new ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup(*from.optionalgroup_);
  } else {
    optionalgroup_ = NULL;
  }
  ::memcpy(&optional_int32_, &from.optional_int32_,
    static_cast<size_t>(reinterpret_cast<char*>(&optional_enum_) -
    reinterpret_cast<char*>(&optional_int32_)) + sizeof(optional_enum_));
  clear_has_oneof_field();
  switch (from.oneof_field_case()) {
    case kOneofUint32: {
      set_oneof_uint32(from.oneof_uint32());
      break;
    }
    case kOneofTestAllTypes: {
      mutable_oneof_test_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.oneof_test_all_types());
      break;
    }
    case kOneofString: {
      set_oneof_string(from.oneof_string());
      break;
    }
    case kOneofBytes: {
      set_oneof_bytes(from.oneof_bytes());
      break;
    }
    case ONEOF_FIELD_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestHugeFieldNumbers)
}

void TestHugeFieldNumbers::SharedCtor() {
  optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&optional_message_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&fixed_32_) -
      reinterpret_cast<char*>(&optional_message_)) + sizeof(fixed_32_));
  optional_enum_ = 4;
  clear_has_oneof_field();
}

TestHugeFieldNumbers::~TestHugeFieldNumbers() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestHugeFieldNumbers)
  SharedDtor();
}

void TestHugeFieldNumbers::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  optional_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  optional_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete optional_message_;
  if (this != internal_default_instance()) delete optionalgroup_;
  if (has_oneof_field()) {
    clear_oneof_field();
  }
}

void TestHugeFieldNumbers::ArenaDtor(void* object) {
  TestHugeFieldNumbers* _this = reinterpret_cast< TestHugeFieldNumbers* >(object);
  (void)_this;
}
void TestHugeFieldNumbers::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestHugeFieldNumbers::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestHugeFieldNumbers::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestHugeFieldNumbers& TestHugeFieldNumbers::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers.base);
  return *internal_default_instance();
}


void TestHugeFieldNumbers::clear_oneof_field() {
// @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestHugeFieldNumbers)
  switch (oneof_field_case()) {
    case kOneofUint32: {
      // No need to clear
      break;
    }
    case kOneofTestAllTypes: {
      if (GetArenaNoVirtual() == NULL) {
        delete oneof_field_.oneof_test_all_types_;
      }
      break;
    }
    case kOneofString: {
      oneof_field_.oneof_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
          GetArenaNoVirtual());
      break;
    }
    case kOneofBytes: {
      oneof_field_.oneof_bytes_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
          GetArenaNoVirtual());
      break;
    }
    case ONEOF_FIELD_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
}


void TestHugeFieldNumbers::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestHugeFieldNumbers)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _extensions_.Clear();
  repeated_int32_.Clear();
  packed_int32_.Clear();
  string_string_map_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 15u) {
    if (cached_has_bits & 0x00000001u) {
      optional_string_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      optional_bytes_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(optional_message_ != NULL);
      optional_message_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(optionalgroup_ != NULL);
      optionalgroup_->Clear();
    }
  }
  if (cached_has_bits & 112u) {
    ::memset(&optional_int32_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&fixed_32_) -
        reinterpret_cast<char*>(&optional_int32_)) + sizeof(fixed_32_));
    optional_enum_ = 4;
  }
  clear_oneof_field();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestHugeFieldNumbers::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:protobuf_unittest.TestHugeFieldNumbers)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(4294960117u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 optional_int32 = 536870000;
      case 536870000: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(128u /* 4294960000 & 0xFF */)) {
          set_has_optional_int32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &optional_int32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 fixed_32 = 536870001;
      case 536870001: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(136u /* 4294960008 & 0xFF */)) {
          set_has_fixed_32();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &fixed_32_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 repeated_int32 = 536870002 [packed = false];
      case 536870002: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(144u /* 4294960016 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 5, 4294960016u, input, this->mutable_repeated_int32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(146u /* 4294960018 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_repeated_int32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 packed_int32 = 536870003 [packed = true];
      case 536870003: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(154u /* 4294960026 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_packed_int32())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(152u /* 4294960024 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 5, 4294960026u, input, this->mutable_packed_int32())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ForeignEnum optional_enum = 536870004;
      case 536870004: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(160u /* 4294960032 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
            set_optional_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                536870004, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string optional_string = 536870005;
      case 536870005: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(170u /* 4294960042 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_optional_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->optional_string().data(), static_cast<int>(this->optional_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestHugeFieldNumbers.optional_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bytes optional_bytes = 536870006;
      case 536870006: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(178u /* 4294960050 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_optional_bytes()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ForeignMessage optional_message = 536870007;
      case 536870007: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(186u /* 4294960058 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_optional_message()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional group OptionalGroup = 536870008 { ... };
      case 536870008: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(195u /* 4294960067 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                536870008, input, mutable_optionalgroup()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // map<string, string> string_string_map = 536870010;
      case 536870010: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(210u /* 4294960082 & 0xFF */)) {
          TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
              TestHugeFieldNumbers_StringStringMapEntry_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(&string_string_map_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            parser.key().data(), static_cast<int>(parser.key().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.key");
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            parser.value().data(), static_cast<int>(parser.value().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.value");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint32 oneof_uint32 = 536870011;
      case 536870011: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(216u /* 4294960088 & 0xFF */)) {
          clear_oneof_field();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &oneof_field_.oneof_uint32_)));
          set_has_oneof_uint32();
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.TestAllTypes oneof_test_all_types = 536870012;
      case 536870012: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(226u /* 4294960098 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_oneof_test_all_types()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string oneof_string = 536870013;
      case 536870013: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(234u /* 4294960106 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_oneof_string()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestHugeFieldNumbers.oneof_string");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bytes oneof_bytes = 536870014;
      case 536870014: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(242u /* 4294960114 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_oneof_bytes()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        if ((4294880000u <= tag && tag < 4294960000u)) {
          DO_(_extensions_.ParseField(tag, input,
              internal_default_instance(),
              _internal_metadata_.mutable_unknown_fields()));
          continue;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestHugeFieldNumbers)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestHugeFieldNumbers)
  return false;
#undef DO_
}

void TestHugeFieldNumbers::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestHugeFieldNumbers)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // Extension range [536860000, 536870000)
  _extensions_.SerializeWithCachedSizes(
      536860000, 536870000, output);

  cached_has_bits = _has_bits_[0];
  // optional int32 optional_int32 = 536870000;
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(536870000, this->optional_int32(), output);
  }

  // optional int32 fixed_32 = 536870001;
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(536870001, this->fixed_32(), output);
  }

  // repeated int32 repeated_int32 = 536870002 [packed = false];
  for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      536870002, this->repeated_int32(i), output);
  }

  // repeated int32 packed_int32 = 536870003 [packed = true];
  if (this->packed_int32_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(536870003, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _packed_int32_cached_byte_size_));
  }
  for (int i = 0, n = this->packed_int32_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
      this->packed_int32(i), output);
  }

  // optional .protobuf_unittest.ForeignEnum optional_enum = 536870004;
  if (cached_has_bits & 0x00000040u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      536870004, this->optional_enum(), output);
  }

  // optional string optional_string = 536870005;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->optional_string().data(), static_cast<int>(this->optional_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestHugeFieldNumbers.optional_string");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      536870005, this->optional_string(), output);
  }

  // optional bytes optional_bytes = 536870006;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      536870006, this->optional_bytes(), output);
  }

  // optional .protobuf_unittest.ForeignMessage optional_message = 536870007;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      536870007, this->_internal_optional_message(), output);
  }

  // optional group OptionalGroup = 536870008 { ... };
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      536870008, this->_internal_optionalgroup(), output);
  }

  // map<string, string> string_string_map = 536870010;
  if (!this->string_string_map().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::WireFormat::VerifyUTF8StringNamedField(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormat::SERIALIZE,
          "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.key");
        ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormat::SERIALIZE,
          "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.value");
      }
    };

    if (output->IsSerializationDeterministic() &&
        this->string_string_map().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->string_string_map().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->string_string_map().begin();
          it != this->string_string_map().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(string_string_map_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            536870010, *entry, output);
        if (entry->GetArena() != NULL) {
          entry.release();
        }
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::std::unique_ptr<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->string_string_map().begin();
          it != this->string_string_map().end(); ++it) {
        entry.reset(string_string_map_.NewEntryWrapper(
            it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            536870010, *entry, output);
        if (entry->GetArena() != NULL) {
          entry.release();
        }
        Utf8Check::Check(&*it);
      }
    }
  }

  switch (oneof_field_case()) {
    case kOneofUint32:
      ::google::protobuf::internal::WireFormatLite::WriteUInt32(536870011, this->oneof_uint32(), output);
      break;
    case kOneofTestAllTypes:
      ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
        536870012, this->_internal_oneof_test_all_types(), output);
      break;
    case kOneofString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestHugeFieldNumbers.oneof_string");
      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
        536870013, this->oneof_string(), output);
      break;
    case kOneofBytes:
      ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
        536870014, this->oneof_bytes(), output);
      break;
    default: ;
  }
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestHugeFieldNumbers)
}

::google::protobuf::uint8* TestHugeFieldNumbers::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestHugeFieldNumbers)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // Extension range [536860000, 536870000)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      536860000, 536870000, deterministic, target);

  cached_has_bits = _has_bits_[0];
  // optional int32 optional_int32 = 536870000;
  if (cached_has_bits & 0x00000010u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(536870000, this->optional_int32(), target);
  }

  // optional int32 fixed_32 = 536870001;
  if (cached_has_bits & 0x00000020u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(536870001, this->fixed_32(), target);
  }

  // repeated int32 repeated_int32 = 536870002 [packed = false];
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt32ToArray(536870002, this->repeated_int32_, target);

  // repeated int32 packed_int32 = 536870003 [packed = true];
  if (this->packed_int32_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      536870003,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _packed_int32_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32NoTagToArray(this->packed_int32_, target);
  }

  // optional .protobuf_unittest.ForeignEnum optional_enum = 536870004;
  if (cached_has_bits & 0x00000040u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      536870004, this->optional_enum(), target);
  }

  // optional string optional_string = 536870005;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->optional_string().data(), static_cast<int>(this->optional_string().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestHugeFieldNumbers.optional_string");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        536870005, this->optional_string(), target);
  }

  // optional bytes optional_bytes = 536870006;
  if (cached_has_bits & 0x00000002u) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        536870006, this->optional_bytes(), target);
  }

  // optional .protobuf_unittest.ForeignMessage optional_message = 536870007;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        536870007, this->_internal_optional_message(), deterministic, target);
  }

  // optional group OptionalGroup = 536870008 { ... };
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        536870008, this->_internal_optionalgroup(), deterministic, target);
  }

  // map<string, string> string_string_map = 536870010;
  if (!this->string_string_map().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::WireFormat::VerifyUTF8StringNamedField(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormat::SERIALIZE,
          "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.key");
        ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormat::SERIALIZE,
          "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.value");
      }
    };

    if (deterministic &&
        this->string_string_map().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->string_string_map().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->string_string_map().begin();
          it != this->string_string_map().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(string_string_map_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       536870010, *entry, deterministic, target);
;
        if (entry->GetArena() != NULL) {
          entry.release();
        }
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::std::unique_ptr<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->string_string_map().begin();
          it != this->string_string_map().end(); ++it) {
        entry.reset(string_string_map_.NewEntryWrapper(
            it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       536870010, *entry, deterministic, target);
;
        if (entry->GetArena() != NULL) {
          entry.release();
        }
        Utf8Check::Check(&*it);
      }
    }
  }

  switch (oneof_field_case()) {
    case kOneofUint32:
      target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(536870011, this->oneof_uint32(), target);
      break;
    case kOneofTestAllTypes:
      target = ::google::protobuf::internal::WireFormatLite::
        InternalWriteMessageToArray(
          536870012, this->_internal_oneof_test_all_types(), deterministic, target);
      break;
    case kOneofString:
      ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
        this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
        ::google::protobuf::internal::WireFormat::SERIALIZE,
        "protobuf_unittest.TestHugeFieldNumbers.oneof_string");
      target =
        ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
          536870013, this->oneof_string(), target);
      break;
    case kOneofBytes:
      target =
        ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
          536870014, this->oneof_bytes(), target);
      break;
    default: ;
  }
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestHugeFieldNumbers)
  return target;
}

size_t TestHugeFieldNumbers::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestHugeFieldNumbers)
  size_t total_size = 0;

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated int32 repeated_int32 = 536870002 [packed = false];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->repeated_int32_);
    total_size += 5 *
                  ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
    total_size += data_size;
  }

  // repeated int32 packed_int32 = 536870003 [packed = true];
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->packed_int32_);
    if (data_size > 0) {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _packed_int32_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // map<string, string> string_string_map = 536870010;
  total_size += 5 *
      ::google::protobuf::internal::FromIntSize(this->string_string_map_size());
  {
    ::std::unique_ptr<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse> entry;
    for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
        it = this->string_string_map().begin();
        it != this->string_string_map().end(); ++it) {
      if (entry.get() != NULL && entry->GetArena() != NULL) {
        entry.release();
      }
      entry.reset(string_string_map_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
    if (entry.get() != NULL && entry->GetArena() != NULL) {
      entry.release();
    }
  }

  if (_has_bits_[0 / 32] & 127u) {
    // optional string optional_string = 536870005;
    if (has_optional_string()) {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->optional_string());
    }

    // optional bytes optional_bytes = 536870006;
    if (has_optional_bytes()) {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->optional_bytes());
    }

    // optional .protobuf_unittest.ForeignMessage optional_message = 536870007;
    if (has_optional_message()) {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *optional_message_);
    }

    // optional group OptionalGroup = 536870008 { ... };
    if (has_optionalgroup()) {
      total_size += 10 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *optionalgroup_);
    }

    // optional int32 optional_int32 = 536870000;
    if (has_optional_int32()) {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->optional_int32());
    }

    // optional int32 fixed_32 = 536870001;
    if (has_fixed_32()) {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->fixed_32());
    }

    // optional .protobuf_unittest.ForeignEnum optional_enum = 536870004;
    if (has_optional_enum()) {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_enum());
    }

  }
  switch (oneof_field_case()) {
    // optional uint32 oneof_uint32 = 536870011;
    case kOneofUint32: {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->oneof_uint32());
      break;
    }
    // optional .protobuf_unittest.TestAllTypes oneof_test_all_types = 536870012;
    case kOneofTestAllTypes: {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *oneof_field_.oneof_test_all_types_);
      break;
    }
    // optional string oneof_string = 536870013;
    case kOneofString: {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->oneof_string());
      break;
    }
    // optional bytes oneof_bytes = 536870014;
    case kOneofBytes: {
      total_size += 5 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->oneof_bytes());
      break;
    }
    case ONEOF_FIELD_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TestHugeFieldNumbers::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestHugeFieldNumbers)
  GOOGLE_DCHECK_NE(&from, this);
  const TestHugeFieldNumbers* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const TestHugeFieldNumbers>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestHugeFieldNumbers)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestHugeFieldNumbers)
    MergeFrom(*source);
  }
}

void TestHugeFieldNumbers::MergeFrom(const TestHugeFieldNumbers& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestHugeFieldNumbers)
  GOOGLE_DCHECK_NE(&from, this);
  _extensions_.MergeFrom(from._extensions_);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  repeated_int32_.MergeFrom(from.repeated_int32_);
  packed_int32_.MergeFrom(from.packed_int32_);
  string_string_map_.MergeFrom(from.string_string_map_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 127u) {
    if (cached_has_bits & 0x00000001u) {
      set_optional_string(from.optional_string());
    }
    if (cached_has_bits & 0x00000002u) {
      set_optional_bytes(from.optional_bytes());
    }
    if (cached_has_bits & 0x00000004u) {
      mutable_optional_message()->::protobuf_unittest::ForeignMessage::MergeFrom(from.optional_message());
    }
    if (cached_has_bits & 0x00000008u) {
      mutable_optionalgroup()->::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup::MergeFrom(from.optionalgroup());
    }
    if (cached_has_bits & 0x00000010u) {
      optional_int32_ = from.optional_int32_;
    }
    if (cached_has_bits & 0x00000020u) {
      fixed_32_ = from.fixed_32_;
    }
    if (cached_has_bits & 0x00000040u) {
      optional_enum_ = from.optional_enum_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  switch (from.oneof_field_case()) {
    case kOneofUint32: {
      set_oneof_uint32(from.oneof_uint32());
      break;
    }
    case kOneofTestAllTypes: {
      mutable_oneof_test_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.oneof_test_all_types());
      break;
    }
    case kOneofString: {
      set_oneof_string(from.oneof_string());
      break;
    }
    case kOneofBytes: {
      set_oneof_bytes(from.oneof_bytes());
      break;
    }
    case ONEOF_FIELD_NOT_SET: {
      break;
    }
  }
}

void TestHugeFieldNumbers::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestHugeFieldNumbers)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestHugeFieldNumbers::CopyFrom(const TestHugeFieldNumbers& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestHugeFieldNumbers)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestHugeFieldNumbers::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

void TestHugeFieldNumbers::Swap(TestHugeFieldNumbers* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestHugeFieldNumbers* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestHugeFieldNumbers::UnsafeArenaSwap(TestHugeFieldNumbers* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestHugeFieldNumbers::InternalSwap(TestHugeFieldNumbers* other) {
  using std::swap;
  repeated_int32_.InternalSwap(&other->repeated_int32_);
  packed_int32_.InternalSwap(&other->packed_int32_);
  string_string_map_.Swap(&other->string_string_map_);
  optional_string_.Swap(&other->optional_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  optional_bytes_.Swap(&other->optional_bytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(optional_message_, other->optional_message_);
  swap(optionalgroup_, other->optionalgroup_);
  swap(optional_int32_, other->optional_int32_);
  swap(fixed_32_, other->fixed_32_);
  swap(optional_enum_, other->optional_enum_);
  swap(oneof_field_, other->oneof_field_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _extensions_.Swap(&other->_extensions_);
}

::google::protobuf::Metadata TestHugeFieldNumbers::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void TestExtensionInsideTable::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestExtensionInsideTable::kField1FieldNumber;
const int TestExtensionInsideTable::kField2FieldNumber;
const int TestExtensionInsideTable::kField3FieldNumber;
const int TestExtensionInsideTable::kField4FieldNumber;
const int TestExtensionInsideTable::kField6FieldNumber;
const int TestExtensionInsideTable::kField7FieldNumber;
const int TestExtensionInsideTable::kField8FieldNumber;
const int TestExtensionInsideTable::kField9FieldNumber;
const int TestExtensionInsideTable::kField10FieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestExtensionInsideTable::TestExtensionInsideTable()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionInsideTable.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestExtensionInsideTable)
}
TestExtensionInsideTable::TestExtensionInsideTable(::google::protobuf::Arena* arena)
  : ::google::protobuf::Message(),
  _extensions_(arena),
  _internal_metadata_(arena) {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionInsideTable.base);
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestExtensionInsideTable)
}
TestExtensionInsideTable::TestExtensionInsideTable(const TestExtensionInsideTable& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  ::memcpy(&field1_, &from.field1_,
    static_cast<size_t>(reinterpret_cast<char*>(&field10_) -
    reinterpret_cast<char*>(&field1_)) + sizeof(field10_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestExtensionInsideTable)
}

void TestExtensionInsideTable::SharedCtor() {
  ::memset(&field1_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&field10_) -
      reinterpret_cast<char*>(&field1_)) + sizeof(field10_));
}

TestExtensionInsideTable::~TestExtensionInsideTable() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.TestExtensionInsideTable)
  SharedDtor();
}

void TestExtensionInsideTable::SharedDtor() {
  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}

void TestExtensionInsideTable::ArenaDtor(void* object) {
  TestExtensionInsideTable* _this = reinterpret_cast< TestExtensionInsideTable* >(object);
  (void)_this;
}
void TestExtensionInsideTable::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void TestExtensionInsideTable::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TestExtensionInsideTable::descriptor() {
  ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TestExtensionInsideTable& TestExtensionInsideTable::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionInsideTable.base);
  return *internal_default_instance();
}


void TestExtensionInsideTable::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestExtensionInsideTable)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _extensions_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 255u) {
    ::memset(&field1_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&field9_) -
        reinterpret_cast<char*>(&field1_)) + sizeof(field9_));
  }
  field10_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestExtensionInsideTable::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:protobuf_unittest.TestExtensionInsideTable)
  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)) {
      // optional int32 field1 = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_field1();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field1_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 field2 = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          set_has_field2();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field2_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 field3 = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          set_has_field3();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field3_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 field4 = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
          set_has_field4();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field4_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 field6 = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
          set_has_field6();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field6_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 field7 = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
          set_has_field7();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field7_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 field8 = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
          set_has_field8();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field8_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 field9 = 9;
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
          set_has_field9();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field9_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 field10 = 10;
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) {
          set_has_field10();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &field10_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        if ((40u <= tag && tag < 48u)) {
          DO_(_extensions_.ParseField(tag, input,
              internal_default_instance(),
              _internal_metadata_.mutable_unknown_fields()));
          continue;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestExtensionInsideTable)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestExtensionInsideTable)
  return false;
#undef DO_
}

void TestExtensionInsideTable::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestExtensionInsideTable)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 field1 = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->field1(), output);
  }

  // optional int32 field2 = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->field2(), output);
  }

  // optional int32 field3 = 3;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->field3(), output);
  }

  // optional int32 field4 = 4;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->field4(), output);
  }

  // Extension range [5, 6)
  _extensions_.SerializeWithCachedSizes(
      5, 6, output);

  // optional int32 field6 = 6;
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->field6(), output);
  }

  // optional int32 field7 = 7;
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->field7(), output);
  }

  // optional int32 field8 = 8;
  if (cached_has_bits & 0x00000040u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->field8(), output);
  }

  // optional int32 field9 = 9;
  if (cached_has_bits & 0x00000080u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->field9(), output);
  }

  // optional int32 field10 = 10;
  if (cached_has_bits & 0x00000100u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->field10(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestExtensionInsideTable)
}

::google::protobuf::uint8* TestExtensionInsideTable::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestExtensionInsideTable)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 field1 = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->field1(), target);
  }

  // optional int32 field2 = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->field2(), target);
  }

  // optional int32 field3 = 3;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->field3(), target);
  }

  // optional int32 field4 = 4;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->field4(), target);
  }

  // Extension range [5, 6)
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
      5, 6, deterministic, target);

  // optional int32 field6 = 6;
  if (cached_has_bits & 0x00000010u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->field6(), target);
  }

  // optional int32 field7 = 7;
  if (cached_has_bits & 0x00000020u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->field7(), target);
  }

  // optional int32 field8 = 8;
  if (cached_has_bits & 0x00000040u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->field8(), target);
  }

  // optional int32 field9 = 9;
  if (cached_has_bits & 0x00000080u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->field9(), target);
  }

  // optional int32 field10 = 10;
  if (cached_has_bits & 0x00000100u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(10, this->field10(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestExtensionInsideTable)
  return target;
}

size_t TestExtensionInsideTable::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestExtensionInsideTable)
  size_t total_size = 0;

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 255u) {
    // optional int32 field1 = 1;
    if (has_field1()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field1());
    }

    // optional int32 field2 = 2;
    if (has_field2()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field2());
    }

    // optional int32 field3 = 3;
    if (has_field3()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field3());
    }

    // optional int32 field4 = 4;
    if (has_field4()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field4());
    }

    // optional int32 field6 = 6;
    if (has_field6()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field6());
    }

    // optional int32 field7 = 7;
    if (has_field7()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field7());
    }

    // optional int32 field8 = 8;
    if (has_field8()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field8());
    }

    // optional int32 field9 = 9;
    if (has_field9()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->field9());
    }

  }
  // optional int32 field10 = 10;
  if (has_field10()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->field10());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TestExtensionInsideTable::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestExtensionInsideTable)
  GOOGLE_DCHECK_NE(&from, this);
  const TestExtensionInsideTable* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const TestExtensionInsideTable>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestExtensionInsideTable)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestExtensionInsideTable)
    MergeFrom(*source);
  }
}

void TestExtensionInsideTable::MergeFrom(const TestExtensionInsideTable& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestExtensionInsideTable)
  GOOGLE_DCHECK_NE(&from, this);
  _extensions_.MergeFrom(from._extensions_);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 255u) {
    if (cached_has_bits & 0x00000001u) {
      field1_ = from.field1_;
    }
    if (cached_has_bits & 0x00000002u) {
      field2_ = from.field2_;
    }
    if (cached_has_bits & 0x00000004u) {
      field3_ = from.field3_;
    }
    if (cached_has_bits & 0x00000008u) {
      field4_ = from.field4_;
    }
    if (cached_has_bits & 0x00000010u) {
      field6_ = from.field6_;
    }
    if (cached_has_bits & 0x00000020u) {
      field7_ = from.field7_;
    }
    if (cached_has_bits & 0x00000040u) {
      field8_ = from.field8_;
    }
    if (cached_has_bits & 0x00000080u) {
      field9_ = from.field9_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000100u) {
    set_field10(from.field10());
  }
}

void TestExtensionInsideTable::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestExtensionInsideTable)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestExtensionInsideTable::CopyFrom(const TestExtensionInsideTable& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestExtensionInsideTable)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TestExtensionInsideTable::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

void TestExtensionInsideTable::Swap(TestExtensionInsideTable* other) {
  if (other == this) return;
  if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
    InternalSwap(other);
  } else {
    TestExtensionInsideTable* temp = New(GetArenaNoVirtual());
    temp->MergeFrom(*other);
    other->CopyFrom(*this);
    InternalSwap(temp);
    if (GetArenaNoVirtual() == NULL) {
      delete temp;
    }
  }
}
void TestExtensionInsideTable::UnsafeArenaSwap(TestExtensionInsideTable* other) {
  if (other == this) return;
  GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  InternalSwap(other);
}
void TestExtensionInsideTable::InternalSwap(TestExtensionInsideTable* other) {
  using std::swap;
  swap(field1_, other->field1_);
  swap(field2_, other->field2_);
  swap(field3_, other->field3_);
  swap(field4_, other->field4_);
  swap(field6_, other->field6_);
  swap(field7_, other->field7_);
  swap(field8_, other->field8_);
  swap(field9_, other->field9_);
  swap(field10_, other->field10_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _extensions_.Swap(&other->_extensions_);
}

::google::protobuf::Metadata TestExtensionInsideTable::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

TestService::~TestService() {}

const ::google::protobuf::ServiceDescriptor* TestService::descriptor() {
  protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_service_descriptors[0];
}

const ::google::protobuf::ServiceDescriptor* TestService::GetDescriptor() {
  return descriptor();
}

void TestService::Foo(::google::protobuf::RpcController* controller,
                         const ::protobuf_unittest::FooRequest*,
                         ::protobuf_unittest::FooResponse*,
                         ::google::protobuf::Closure* done) {
  controller->SetFailed("Method Foo() not implemented.");
  done->Run();
}

void TestService::Bar(::google::protobuf::RpcController* controller,
                         const ::protobuf_unittest::BarRequest*,
                         ::protobuf_unittest::BarResponse*,
                         ::google::protobuf::Closure* done) {
  controller->SetFailed("Method Bar() not implemented.");
  done->Run();
}

void TestService::CallMethod(const ::google::protobuf::MethodDescriptor* method,
                             ::google::protobuf::RpcController* controller,
                             const ::google::protobuf::Message* request,
                             ::google::protobuf::Message* response,
                             ::google::protobuf::Closure* done) {
  GOOGLE_DCHECK_EQ(method->service(), protobuf_google_2fprotobuf_2funittest_2eproto::file_level_service_descriptors[0]);
  switch(method->index()) {
    case 0:
      Foo(controller,
             ::google::protobuf::down_cast<const ::protobuf_unittest::FooRequest*>(request),
             ::google::protobuf::down_cast< ::protobuf_unittest::FooResponse*>(response),
             done);
      break;
    case 1:
      Bar(controller,
             ::google::protobuf::down_cast<const ::protobuf_unittest::BarRequest*>(request),
             ::google::protobuf::down_cast< ::protobuf_unittest::BarResponse*>(response),
             done);
      break;
    default:
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
      break;
  }
}

const ::google::protobuf::Message& TestService::GetRequestPrototype(
    const ::google::protobuf::MethodDescriptor* method) const {
  GOOGLE_DCHECK_EQ(method->service(), descriptor());
  switch(method->index()) {
    case 0:
      return ::protobuf_unittest::FooRequest::default_instance();
    case 1:
      return ::protobuf_unittest::BarRequest::default_instance();
    default:
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
      return *::google::protobuf::MessageFactory::generated_factory()
          ->GetPrototype(method->input_type());
  }
}

const ::google::protobuf::Message& TestService::GetResponsePrototype(
    const ::google::protobuf::MethodDescriptor* method) const {
  GOOGLE_DCHECK_EQ(method->service(), descriptor());
  switch(method->index()) {
    case 0:
      return ::protobuf_unittest::FooResponse::default_instance();
    case 1:
      return ::protobuf_unittest::BarResponse::default_instance();
    default:
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
      return *::google::protobuf::MessageFactory::generated_factory()
          ->GetPrototype(method->output_type());
  }
}

TestService_Stub::TestService_Stub(::google::protobuf::RpcChannel* channel)
  : channel_(channel), owns_channel_(false) {}
TestService_Stub::TestService_Stub(
    ::google::protobuf::RpcChannel* channel,
    ::google::protobuf::Service::ChannelOwnership ownership)
  : channel_(channel),
    owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {}
TestService_Stub::~TestService_Stub() {
  if (owns_channel_) delete channel_;
}

void TestService_Stub::Foo(::google::protobuf::RpcController* controller,
                              const ::protobuf_unittest::FooRequest* request,
                              ::protobuf_unittest::FooResponse* response,
                              ::google::protobuf::Closure* done) {
  channel_->CallMethod(descriptor()->method(0),
                       controller, request, response, done);
}
void TestService_Stub::Bar(::google::protobuf::RpcController* controller,
                              const ::protobuf_unittest::BarRequest* request,
                              ::protobuf_unittest::BarResponse* response,
                              ::google::protobuf::Closure* done) {
  channel_->CallMethod(descriptor()->method(1),
                       controller, request, response, done);
}
const ::std::string TestNestedExtension_test_default("test");
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestNestedExtension::kTestFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  TestNestedExtension::test(kTestFieldNumber, TestNestedExtension_test_default);
const ::std::string TestNestedExtension_nested_string_extension_default("");
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestNestedExtension::kNestedStringExtensionFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  TestNestedExtension::nested_string_extension(kNestedStringExtensionFieldNumber, TestNestedExtension_nested_string_extension_default);
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestNestedExtension::kOptionalgroupExtensionFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestGroupExtension,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension >, 10, false >
  TestNestedExtension::optionalgroup_extension(kOptionalgroupExtensionFieldNumber, *::protobuf_unittest::TestNestedExtension_OptionalGroup_extension::internal_default_instance());
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestNestedExtension::kOptionalForeignEnumExtensionFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestGroupExtension,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, false >
  TestNestedExtension::optional_foreign_enum_extension(kOptionalForeignEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(4));
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestRequired::kSingleFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestRequired >, 11, false >
  TestRequired::single(kSingleFieldNumber, *::protobuf_unittest::TestRequired::internal_default_instance());
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestRequired::kMultiFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestRequired >, 11, false >
  TestRequired::multi(kMultiFieldNumber, *::protobuf_unittest::TestRequired::internal_default_instance());
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestExtensionOrderings1::kTestExtOrderings1FieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestFieldOrderings,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestExtensionOrderings1 >, 11, false >
  TestExtensionOrderings1::test_ext_orderings1(kTestExtOrderings1FieldNumber, *::protobuf_unittest::TestExtensionOrderings1::internal_default_instance());
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestExtensionOrderings2_TestExtensionOrderings3::kTestExtOrderings3FieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestFieldOrderings,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3 >, 11, false >
  TestExtensionOrderings2_TestExtensionOrderings3::test_ext_orderings3(kTestExtOrderings3FieldNumber, *::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3::internal_default_instance());
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestExtensionOrderings2::kTestExtOrderings2FieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestFieldOrderings,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestExtensionOrderings2 >, 11, false >
  TestExtensionOrderings2::test_ext_orderings2(kTestExtOrderings2FieldNumber, *::protobuf_unittest::TestExtensionOrderings2::internal_default_instance());
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestParsingMerge::kOptionalExtFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestParsingMerge,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypes >, 11, false >
  TestParsingMerge::optional_ext(kOptionalExtFieldNumber, *::protobuf_unittest::TestAllTypes::internal_default_instance());
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestParsingMerge::kRepeatedExtFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestParsingMerge,
    ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestAllTypes >, 11, false >
  TestParsingMerge::repeated_ext(kRepeatedExtFieldNumber, *::protobuf_unittest::TestAllTypes::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  optional_int32_extension(kOptionalInt32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  optional_int64_extension(kOptionalInt64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  optional_uint32_extension(kOptionalUint32ExtensionFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  optional_uint64_extension(kOptionalUint64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  optional_sint32_extension(kOptionalSint32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  optional_sint64_extension(kOptionalSint64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  optional_fixed32_extension(kOptionalFixed32ExtensionFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  optional_fixed64_extension(kOptionalFixed64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  optional_sfixed32_extension(kOptionalSfixed32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  optional_sfixed64_extension(kOptionalSfixed64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< float >, 2, false >
  optional_float_extension(kOptionalFloatExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< double >, 1, false >
  optional_double_extension(kOptionalDoubleExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< bool >, 8, false >
  optional_bool_extension(kOptionalBoolExtensionFieldNumber, false);
const ::std::string optional_string_extension_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  optional_string_extension(kOptionalStringExtensionFieldNumber, optional_string_extension_default);
const ::std::string optional_bytes_extension_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 12, false >
  optional_bytes_extension(kOptionalBytesExtensionFieldNumber, optional_bytes_extension_default);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::OptionalGroup_extension >, 10, false >
  optionalgroup_extension(kOptionalgroupExtensionFieldNumber, *::protobuf_unittest::OptionalGroup_extension::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypes_NestedMessage >, 11, false >
  optional_nested_message_extension(kOptionalNestedMessageExtensionFieldNumber, *::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ForeignMessage >, 11, false >
  optional_foreign_message_extension(kOptionalForeignMessageExtensionFieldNumber, *::protobuf_unittest::ForeignMessage::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest_import::ImportMessage >, 11, false >
  optional_import_message_extension(kOptionalImportMessageExtensionFieldNumber, *::protobuf_unittest_import::ImportMessage::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::TestAllTypes_NestedEnum, ::protobuf_unittest::TestAllTypes_NestedEnum_IsValid>, 14, false >
  optional_nested_enum_extension(kOptionalNestedEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(1));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, false >
  optional_foreign_enum_extension(kOptionalForeignEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(4));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest_import::ImportEnum, ::protobuf_unittest_import::ImportEnum_IsValid>, 14, false >
  optional_import_enum_extension(kOptionalImportEnumExtensionFieldNumber, static_cast< ::protobuf_unittest_import::ImportEnum >(7));
const ::std::string optional_string_piece_extension_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  optional_string_piece_extension(kOptionalStringPieceExtensionFieldNumber, optional_string_piece_extension_default);
const ::std::string optional_cord_extension_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  optional_cord_extension(kOptionalCordExtensionFieldNumber, optional_cord_extension_default);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest_import::PublicImportMessage >, 11, false >
  optional_public_import_message_extension(kOptionalPublicImportMessageExtensionFieldNumber, *::protobuf_unittest_import::PublicImportMessage::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypes_NestedMessage >, 11, false >
  optional_lazy_message_extension(kOptionalLazyMessageExtensionFieldNumber, *::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  repeated_int32_extension(kRepeatedInt32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  repeated_int64_extension(kRepeatedInt64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  repeated_uint32_extension(kRepeatedUint32ExtensionFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  repeated_uint64_extension(kRepeatedUint64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  repeated_sint32_extension(kRepeatedSint32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  repeated_sint64_extension(kRepeatedSint64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  repeated_fixed32_extension(kRepeatedFixed32ExtensionFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  repeated_fixed64_extension(kRepeatedFixed64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  repeated_sfixed32_extension(kRepeatedSfixed32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  repeated_sfixed64_extension(kRepeatedSfixed64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< float >, 2, false >
  repeated_float_extension(kRepeatedFloatExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< double >, 1, false >
  repeated_double_extension(kRepeatedDoubleExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< bool >, 8, false >
  repeated_bool_extension(kRepeatedBoolExtensionFieldNumber, false);
const ::std::string repeated_string_extension_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedStringTypeTraits, 9, false >
  repeated_string_extension(kRepeatedStringExtensionFieldNumber, repeated_string_extension_default);
const ::std::string repeated_bytes_extension_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedStringTypeTraits, 12, false >
  repeated_bytes_extension(kRepeatedBytesExtensionFieldNumber, repeated_bytes_extension_default);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::RepeatedGroup_extension >, 10, false >
  repeatedgroup_extension(kRepeatedgroupExtensionFieldNumber, *::protobuf_unittest::RepeatedGroup_extension::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestAllTypes_NestedMessage >, 11, false >
  repeated_nested_message_extension(kRepeatedNestedMessageExtensionFieldNumber, *::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::ForeignMessage >, 11, false >
  repeated_foreign_message_extension(kRepeatedForeignMessageExtensionFieldNumber, *::protobuf_unittest::ForeignMessage::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest_import::ImportMessage >, 11, false >
  repeated_import_message_extension(kRepeatedImportMessageExtensionFieldNumber, *::protobuf_unittest_import::ImportMessage::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::TestAllTypes_NestedEnum, ::protobuf_unittest::TestAllTypes_NestedEnum_IsValid>, 14, false >
  repeated_nested_enum_extension(kRepeatedNestedEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(1));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, false >
  repeated_foreign_enum_extension(kRepeatedForeignEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(4));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest_import::ImportEnum, ::protobuf_unittest_import::ImportEnum_IsValid>, 14, false >
  repeated_import_enum_extension(kRepeatedImportEnumExtensionFieldNumber, static_cast< ::protobuf_unittest_import::ImportEnum >(7));
const ::std::string repeated_string_piece_extension_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedStringTypeTraits, 9, false >
  repeated_string_piece_extension(kRepeatedStringPieceExtensionFieldNumber, repeated_string_piece_extension_default);
const ::std::string repeated_cord_extension_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedStringTypeTraits, 9, false >
  repeated_cord_extension(kRepeatedCordExtensionFieldNumber, repeated_cord_extension_default);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestAllTypes_NestedMessage >, 11, false >
  repeated_lazy_message_extension(kRepeatedLazyMessageExtensionFieldNumber, *::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  default_int32_extension(kDefaultInt32ExtensionFieldNumber, 41);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  default_int64_extension(kDefaultInt64ExtensionFieldNumber, GOOGLE_LONGLONG(42));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  default_uint32_extension(kDefaultUint32ExtensionFieldNumber, 43u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  default_uint64_extension(kDefaultUint64ExtensionFieldNumber, GOOGLE_ULONGLONG(44));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  default_sint32_extension(kDefaultSint32ExtensionFieldNumber, -45);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  default_sint64_extension(kDefaultSint64ExtensionFieldNumber, GOOGLE_LONGLONG(46));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  default_fixed32_extension(kDefaultFixed32ExtensionFieldNumber, 47u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  default_fixed64_extension(kDefaultFixed64ExtensionFieldNumber, GOOGLE_ULONGLONG(48));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  default_sfixed32_extension(kDefaultSfixed32ExtensionFieldNumber, 49);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  default_sfixed64_extension(kDefaultSfixed64ExtensionFieldNumber, GOOGLE_LONGLONG(-50));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< float >, 2, false >
  default_float_extension(kDefaultFloatExtensionFieldNumber, 51.5f);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< double >, 1, false >
  default_double_extension(kDefaultDoubleExtensionFieldNumber, 52000);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< bool >, 8, false >
  default_bool_extension(kDefaultBoolExtensionFieldNumber, true);
const ::std::string default_string_extension_default("hello");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  default_string_extension(kDefaultStringExtensionFieldNumber, default_string_extension_default);
const ::std::string default_bytes_extension_default("world");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 12, false >
  default_bytes_extension(kDefaultBytesExtensionFieldNumber, default_bytes_extension_default);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::TestAllTypes_NestedEnum, ::protobuf_unittest::TestAllTypes_NestedEnum_IsValid>, 14, false >
  default_nested_enum_extension(kDefaultNestedEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(2));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, false >
  default_foreign_enum_extension(kDefaultForeignEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(5));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest_import::ImportEnum, ::protobuf_unittest_import::ImportEnum_IsValid>, 14, false >
  default_import_enum_extension(kDefaultImportEnumExtensionFieldNumber, static_cast< ::protobuf_unittest_import::ImportEnum >(8));
const ::std::string default_string_piece_extension_default("abc");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  default_string_piece_extension(kDefaultStringPieceExtensionFieldNumber, default_string_piece_extension_default);
const ::std::string default_cord_extension_default("123");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  default_cord_extension(kDefaultCordExtensionFieldNumber, default_cord_extension_default);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  oneof_uint32_extension(kOneofUint32ExtensionFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypes_NestedMessage >, 11, false >
  oneof_nested_message_extension(kOneofNestedMessageExtensionFieldNumber, *::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
const ::std::string oneof_string_extension_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  oneof_string_extension(kOneofStringExtensionFieldNumber, oneof_string_extension_default);
const ::std::string oneof_bytes_extension_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 12, false >
  oneof_bytes_extension(kOneofBytesExtensionFieldNumber, oneof_bytes_extension_default);
const ::std::string my_extension_string_default("");
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestFieldOrderings,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  my_extension_string(kMyExtensionStringFieldNumber, my_extension_string_default);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestFieldOrderings,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  my_extension_int(kMyExtensionIntFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 5, true >
  packed_int32_extension(kPackedInt32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 3, true >
  packed_int64_extension(kPackedInt64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, true >
  packed_uint32_extension(kPackedUint32ExtensionFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, true >
  packed_uint64_extension(kPackedUint64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 17, true >
  packed_sint32_extension(kPackedSint32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 18, true >
  packed_sint64_extension(kPackedSint64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, true >
  packed_fixed32_extension(kPackedFixed32ExtensionFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, true >
  packed_fixed64_extension(kPackedFixed64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 15, true >
  packed_sfixed32_extension(kPackedSfixed32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 16, true >
  packed_sfixed64_extension(kPackedSfixed64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< float >, 2, true >
  packed_float_extension(kPackedFloatExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< double >, 1, true >
  packed_double_extension(kPackedDoubleExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< bool >, 8, true >
  packed_bool_extension(kPackedBoolExtensionFieldNumber, false);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
    ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, true >
  packed_enum_extension(kPackedEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(4));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  unpacked_int32_extension(kUnpackedInt32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  unpacked_int64_extension(kUnpackedInt64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  unpacked_uint32_extension(kUnpackedUint32ExtensionFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  unpacked_uint64_extension(kUnpackedUint64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  unpacked_sint32_extension(kUnpackedSint32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  unpacked_sint64_extension(kUnpackedSint64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  unpacked_fixed32_extension(kUnpackedFixed32ExtensionFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  unpacked_fixed64_extension(kUnpackedFixed64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  unpacked_sfixed32_extension(kUnpackedSfixed32ExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  unpacked_sfixed64_extension(kUnpackedSfixed64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< float >, 2, false >
  unpacked_float_extension(kUnpackedFloatExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< double >, 1, false >
  unpacked_double_extension(kUnpackedDoubleExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< bool >, 8, false >
  unpacked_bool_extension(kUnpackedBoolExtensionFieldNumber, false);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
    ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, false >
  unpacked_enum_extension(kUnpackedEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(4));
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestHugeFieldNumbers,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypes >, 11, false >
  test_all_types(kTestAllTypesFieldNumber, *::protobuf_unittest::TestAllTypes::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestExtensionInsideTable,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  test_extension_inside_table_extension(kTestExtensionInsideTableExtensionFieldNumber, 0);

// @@protoc_insertion_point(namespace_scope)
}  // namespace protobuf_unittest
namespace google {
namespace protobuf {
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypes_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypes_NestedMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestAllTypes_NestedMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypes_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypes_OptionalGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestAllTypes_OptionalGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypes_RepeatedGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypes_RepeatedGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestAllTypes_RepeatedGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypes* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypes >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestAllTypes >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::NestedTestAllTypes* Arena::CreateMaybeMessage< ::protobuf_unittest::NestedTestAllTypes >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::NestedTestAllTypes >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDeprecatedFields* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDeprecatedFields >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestDeprecatedFields >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDeprecatedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDeprecatedMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestDeprecatedMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::ForeignMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::ForeignMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::ForeignMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestReservedFields* Arena::CreateMaybeMessage< ::protobuf_unittest::TestReservedFields >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestReservedFields >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllExtensions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllExtensions >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestAllExtensions >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::OptionalGroup_extension* Arena::CreateMaybeMessage< ::protobuf_unittest::OptionalGroup_extension >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::OptionalGroup_extension >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::RepeatedGroup_extension* Arena::CreateMaybeMessage< ::protobuf_unittest::RepeatedGroup_extension >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::RepeatedGroup_extension >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestGroup_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestGroup_OptionalGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestGroup_OptionalGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestGroupExtension* Arena::CreateMaybeMessage< ::protobuf_unittest::TestGroupExtension >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestGroupExtension >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension* Arena::CreateMaybeMessage< ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestNestedExtension* Arena::CreateMaybeMessage< ::protobuf_unittest::TestNestedExtension >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestNestedExtension >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRequired* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRequired >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestRequired >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRequiredForeign* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRequiredForeign >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestRequiredForeign >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRequiredMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRequiredMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestRequiredMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestForeignNested* Arena::CreateMaybeMessage< ::protobuf_unittest::TestForeignNested >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestForeignNested >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEmptyMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEmptyMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestEmptyMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEmptyMessageWithExtensions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEmptyMessageWithExtensions >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestEmptyMessageWithExtensions >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMultipleExtensionRanges* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMultipleExtensionRanges >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestMultipleExtensionRanges >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestReallyLargeTagNumber* Arena::CreateMaybeMessage< ::protobuf_unittest::TestReallyLargeTagNumber >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestReallyLargeTagNumber >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRecursiveMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRecursiveMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestRecursiveMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMutualRecursionA_SubMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMutualRecursionA_SubMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestMutualRecursionA_SubMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMutualRecursionA_SubGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMutualRecursionA_SubGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestMutualRecursionA_SubGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMutualRecursionA* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMutualRecursionA >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestMutualRecursionA >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMutualRecursionB* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMutualRecursionB >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestMutualRecursionB >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestIsInitialized_SubMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestIsInitialized_SubMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestIsInitialized_SubMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestIsInitialized* Arena::CreateMaybeMessage< ::protobuf_unittest::TestIsInitialized >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestIsInitialized >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDupFieldNumber_Foo* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDupFieldNumber_Foo >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestDupFieldNumber_Foo >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDupFieldNumber_Bar* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDupFieldNumber_Bar >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestDupFieldNumber_Bar >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDupFieldNumber* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDupFieldNumber >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestDupFieldNumber >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEagerMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEagerMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestEagerMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestLazyMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestLazyMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestLazyMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestNestedMessageHasBits* Arena::CreateMaybeMessage< ::protobuf_unittest::TestNestedMessageHasBits >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestNestedMessageHasBits >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestCamelCaseFieldNames* Arena::CreateMaybeMessage< ::protobuf_unittest::TestCamelCaseFieldNames >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestCamelCaseFieldNames >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestFieldOrderings_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestFieldOrderings_NestedMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestFieldOrderings_NestedMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestFieldOrderings* Arena::CreateMaybeMessage< ::protobuf_unittest::TestFieldOrderings >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestFieldOrderings >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestExtensionOrderings1* Arena::CreateMaybeMessage< ::protobuf_unittest::TestExtensionOrderings1 >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestExtensionOrderings1 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3* Arena::CreateMaybeMessage< ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3 >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestExtensionOrderings2* Arena::CreateMaybeMessage< ::protobuf_unittest::TestExtensionOrderings2 >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestExtensionOrderings2 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestExtremeDefaultValues* Arena::CreateMaybeMessage< ::protobuf_unittest::TestExtremeDefaultValues >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestExtremeDefaultValues >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::SparseEnumMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::SparseEnumMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::SparseEnumMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::OneString* Arena::CreateMaybeMessage< ::protobuf_unittest::OneString >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::OneString >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::MoreString* Arena::CreateMaybeMessage< ::protobuf_unittest::MoreString >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::MoreString >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::OneBytes* Arena::CreateMaybeMessage< ::protobuf_unittest::OneBytes >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::OneBytes >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::MoreBytes* Arena::CreateMaybeMessage< ::protobuf_unittest::MoreBytes >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::MoreBytes >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::Int32Message* Arena::CreateMaybeMessage< ::protobuf_unittest::Int32Message >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::Int32Message >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::Uint32Message* Arena::CreateMaybeMessage< ::protobuf_unittest::Uint32Message >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::Uint32Message >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::Int64Message* Arena::CreateMaybeMessage< ::protobuf_unittest::Int64Message >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::Int64Message >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::Uint64Message* Arena::CreateMaybeMessage< ::protobuf_unittest::Uint64Message >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::Uint64Message >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::BoolMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::BoolMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::BoolMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneof_FooGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneof_FooGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneof_FooGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneof* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneof >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneof >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneofBackwardsCompatible* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneofBackwardsCompatible >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneofBackwardsCompatible >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneof2_FooGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneof2_FooGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneof2_FooGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneof2_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneof2_NestedMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneof2_NestedMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneof2* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneof2 >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneof2 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRequiredOneof_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRequiredOneof_NestedMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestRequiredOneof_NestedMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRequiredOneof* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRequiredOneof >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestRequiredOneof >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestPackedTypes* Arena::CreateMaybeMessage< ::protobuf_unittest::TestPackedTypes >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestPackedTypes >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestUnpackedTypes* Arena::CreateMaybeMessage< ::protobuf_unittest::TestUnpackedTypes >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestUnpackedTypes >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestPackedExtensions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestPackedExtensions >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestPackedExtensions >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestUnpackedExtensions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestUnpackedExtensions >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestUnpackedExtensions >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDynamicExtensions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDynamicExtensions >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestDynamicExtensions >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRepeatedScalarDifferentTagSizes* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRepeatedScalarDifferentTagSizes >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestRepeatedScalarDifferentTagSizes >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1 >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2 >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge_OptionalGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge_OptionalGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge_RepeatedGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge_RepeatedGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge_RepeatedGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestCommentInjectionMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestCommentInjectionMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestCommentInjectionMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::FooRequest* Arena::CreateMaybeMessage< ::protobuf_unittest::FooRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::FooRequest >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::FooResponse* Arena::CreateMaybeMessage< ::protobuf_unittest::FooResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::FooResponse >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::FooClientMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::FooClientMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::FooClientMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::FooServerMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::FooServerMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::FooServerMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::BarRequest* Arena::CreateMaybeMessage< ::protobuf_unittest::BarRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::BarRequest >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::BarResponse* Arena::CreateMaybeMessage< ::protobuf_unittest::BarResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::BarResponse >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestJsonName* Arena::CreateMaybeMessage< ::protobuf_unittest::TestJsonName >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestJsonName >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestHugeFieldNumbers* Arena::CreateMaybeMessage< ::protobuf_unittest::TestHugeFieldNumbers >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestHugeFieldNumbers >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestExtensionInsideTable* Arena::CreateMaybeMessage< ::protobuf_unittest::TestExtensionInsideTable >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_unittest::TestExtensionInsideTable >(arena);
}
}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)
