text:
namespace protobuf_unittest {

namespace {

const ::google::protobuf::Descriptor* TestAllTypes_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestAllTypes_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestAllTypes_NestedMessage_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestAllTypes_NestedMessage_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestAllTypes_OptionalGroup_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestAllTypes_OptionalGroup_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestAllTypes_RepeatedGroup_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestAllTypes_RepeatedGroup_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* TestAllTypes_NestedEnum_descriptor_ = NULL;
const ::google::protobuf::Descriptor* ForeignMessage_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ForeignMessage_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestAllExtensions_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestAllExtensions_reflection_ = NULL;
const ::google::protobuf::Descriptor* OptionalGroup_extension_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  OptionalGroup_extension_reflection_ = NULL;
const ::google::protobuf::Descriptor* RepeatedGroup_extension_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  RepeatedGroup_extension_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestNestedExtension_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestNestedExtension_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestRequired_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestRequired_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestRequiredForeign_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestRequiredForeign_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestForeignNested_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestForeignNested_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestEmptyMessage_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestEmptyMessage_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestEmptyMessageWithExtensions_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestEmptyMessageWithExtensions_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestReallyLargeTagNumber_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestReallyLargeTagNumber_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestRecursiveMessage_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestRecursiveMessage_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestMutualRecursionA_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestMutualRecursionA_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestMutualRecursionB_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestMutualRecursionB_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestDupFieldNumber_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestDupFieldNumber_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestDupFieldNumber_Foo_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestDupFieldNumber_Foo_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestDupFieldNumber_Bar_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestDupFieldNumber_Bar_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestNestedMessageHasBits_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestNestedMessageHasBits_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestNestedMessageHasBits_NestedMessage_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestNestedMessageHasBits_NestedMessage_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestCamelCaseFieldNames_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestCamelCaseFieldNames_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestFieldOrderings_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestFieldOrderings_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestExtremeDefaultValues_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestExtremeDefaultValues_reflection_ = NULL;
const ::google::protobuf::Descriptor* OneString_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  OneString_reflection_ = NULL;
const ::google::protobuf::Descriptor* OneBytes_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  OneBytes_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestPackedTypes_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestPackedTypes_reflection_ = NULL;
const ::google::protobuf::Descriptor* TestPackedExtensions_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TestPackedExtensions_reflection_ = NULL;
const ::google::protobuf::Descriptor* FooRequest_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  FooRequest_reflection_ = NULL;
const ::google::protobuf::Descriptor* FooResponse_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  FooResponse_reflection_ = NULL;
const ::google::protobuf::Descriptor* BarRequest_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  BarRequest_reflection_ = NULL;
const ::google::protobuf::Descriptor* BarResponse_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  BarResponse_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* ForeignEnum_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* TestEnumWithDupValue_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* TestSparseEnum_descriptor_ = NULL;
const ::google::protobuf::ServiceDescriptor* TestService_descriptor_ = NULL;

}  // namespace

void protobuf_AssignDesc_google_2fprotobuf_2funittest_2eproto() {
  protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "google/protobuf/unittest.proto");
  GOOGLE_CHECK(file != NULL);
  TestAllTypes_descriptor_ = file->message_type(0);
  static const int TestAllTypes_offsets_[68] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_int32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_int64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_uint32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_uint64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_sint32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_sint64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_fixed32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_fixed64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_sfixed32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_sfixed64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_float_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_double_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_bool_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_string_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_bytes_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optionalgroup_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_nested_message_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_foreign_message_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_import_message_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_nested_enum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_foreign_enum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_import_enum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_string_piece_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, optional_cord_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_int32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_int64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_uint32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_uint64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_sint32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_sint64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_fixed32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_fixed64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_sfixed32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_sfixed64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_float_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_double_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_bool_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_string_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_bytes_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeatedgroup_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_nested_message_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_foreign_message_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_import_message_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_nested_enum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_foreign_enum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_import_enum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_string_piece_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, repeated_cord_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_int32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_int64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_uint32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_uint64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_sint32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_sint64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_fixed32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_fixed64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_sfixed32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_sfixed64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_float_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_double_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_bool_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_string_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_bytes_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_nested_enum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_foreign_enum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_import_enum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_string_piece_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, default_cord_),
  };
  TestAllTypes_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestAllTypes_descriptor_,
      TestAllTypes::default_instance_,
      TestAllTypes_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestAllTypes));
  TestAllTypes_NestedMessage_descriptor_ = TestAllTypes_descriptor_->nested_type(0);
  static const int TestAllTypes_NestedMessage_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes_NestedMessage, bb_),
  };
  TestAllTypes_NestedMessage_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestAllTypes_NestedMessage_descriptor_,
      TestAllTypes_NestedMessage::default_instance_,
      TestAllTypes_NestedMessage_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes_NestedMessage, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes_NestedMessage, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestAllTypes_NestedMessage));
  TestAllTypes_OptionalGroup_descriptor_ = TestAllTypes_descriptor_->nested_type(1);
  static const int TestAllTypes_OptionalGroup_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes_OptionalGroup, a_),
  };
  TestAllTypes_OptionalGroup_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestAllTypes_OptionalGroup_descriptor_,
      TestAllTypes_OptionalGroup::default_instance_,
      TestAllTypes_OptionalGroup_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes_OptionalGroup, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes_OptionalGroup, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestAllTypes_OptionalGroup));
  TestAllTypes_RepeatedGroup_descriptor_ = TestAllTypes_descriptor_->nested_type(2);
  static const int TestAllTypes_RepeatedGroup_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes_RepeatedGroup, a_),
  };
  TestAllTypes_RepeatedGroup_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestAllTypes_RepeatedGroup_descriptor_,
      TestAllTypes_RepeatedGroup::default_instance_,
      TestAllTypes_RepeatedGroup_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes_RepeatedGroup, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllTypes_RepeatedGroup, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestAllTypes_RepeatedGroup));
  TestAllTypes_NestedEnum_descriptor_ = TestAllTypes_descriptor_->enum_type(0);
  ForeignMessage_descriptor_ = file->message_type(1);
  static const int ForeignMessage_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ForeignMessage, c_),
  };
  ForeignMessage_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      ForeignMessage_descriptor_,
      ForeignMessage::default_instance_,
      ForeignMessage_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ForeignMessage, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ForeignMessage, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(ForeignMessage));
  TestAllExtensions_descriptor_ = file->message_type(2);
  static const int TestAllExtensions_offsets_[1] = {
  };
  TestAllExtensions_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestAllExtensions_descriptor_,
      TestAllExtensions::default_instance_,
      TestAllExtensions_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllExtensions, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllExtensions, _unknown_fields_),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestAllExtensions, _extensions_),
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestAllExtensions));
  OptionalGroup_extension_descriptor_ = file->message_type(3);
  static const int OptionalGroup_extension_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OptionalGroup_extension, a_),
  };
  OptionalGroup_extension_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      OptionalGroup_extension_descriptor_,
      OptionalGroup_extension::default_instance_,
      OptionalGroup_extension_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OptionalGroup_extension, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OptionalGroup_extension, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(OptionalGroup_extension));
  RepeatedGroup_extension_descriptor_ = file->message_type(4);
  static const int RepeatedGroup_extension_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RepeatedGroup_extension, a_),
  };
  RepeatedGroup_extension_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      RepeatedGroup_extension_descriptor_,
      RepeatedGroup_extension::default_instance_,
      RepeatedGroup_extension_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RepeatedGroup_extension, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RepeatedGroup_extension, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(RepeatedGroup_extension));
  TestNestedExtension_descriptor_ = file->message_type(5);
  static const int TestNestedExtension_offsets_[1] = {
  };
  TestNestedExtension_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestNestedExtension_descriptor_,
      TestNestedExtension::default_instance_,
      TestNestedExtension_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestNestedExtension, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestNestedExtension, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestNestedExtension));
  TestRequired_descriptor_ = file->message_type(6);
  static const int TestRequired_offsets_[33] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, a_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy2_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, b_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy4_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy5_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy6_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy7_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy8_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy9_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy10_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy11_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy12_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy13_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy14_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy15_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy16_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy17_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy18_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy19_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy20_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy21_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy22_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy23_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy24_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy25_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy26_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy27_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy28_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy29_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy30_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy31_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, dummy32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, c_),
  };
  TestRequired_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestRequired_descriptor_,
      TestRequired::default_instance_,
      TestRequired_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequired, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestRequired));
  TestRequiredForeign_descriptor_ = file->message_type(7);
  static const int TestRequiredForeign_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequiredForeign, optional_message_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequiredForeign, repeated_message_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequiredForeign, dummy_),
  };
  TestRequiredForeign_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestRequiredForeign_descriptor_,
      TestRequiredForeign::default_instance_,
      TestRequiredForeign_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequiredForeign, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRequiredForeign, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestRequiredForeign));
  TestForeignNested_descriptor_ = file->message_type(8);
  static const int TestForeignNested_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestForeignNested, foreign_nested_),
  };
  TestForeignNested_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestForeignNested_descriptor_,
      TestForeignNested::default_instance_,
      TestForeignNested_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestForeignNested, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestForeignNested, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestForeignNested));
  TestEmptyMessage_descriptor_ = file->message_type(9);
  static const int TestEmptyMessage_offsets_[1] = {
  };
  TestEmptyMessage_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestEmptyMessage_descriptor_,
      TestEmptyMessage::default_instance_,
      TestEmptyMessage_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestEmptyMessage, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestEmptyMessage, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestEmptyMessage));
  TestEmptyMessageWithExtensions_descriptor_ = file->message_type(10);
  static const int TestEmptyMessageWithExtensions_offsets_[1] = {
  };
  TestEmptyMessageWithExtensions_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestEmptyMessageWithExtensions_descriptor_,
      TestEmptyMessageWithExtensions::default_instance_,
      TestEmptyMessageWithExtensions_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestEmptyMessageWithExtensions, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestEmptyMessageWithExtensions, _unknown_fields_),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestEmptyMessageWithExtensions, _extensions_),
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestEmptyMessageWithExtensions));
  TestReallyLargeTagNumber_descriptor_ = file->message_type(11);
  static const int TestReallyLargeTagNumber_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestReallyLargeTagNumber, a_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestReallyLargeTagNumber, bb_),
  };
  TestReallyLargeTagNumber_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestReallyLargeTagNumber_descriptor_,
      TestReallyLargeTagNumber::default_instance_,
      TestReallyLargeTagNumber_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestReallyLargeTagNumber, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestReallyLargeTagNumber, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestReallyLargeTagNumber));
  TestRecursiveMessage_descriptor_ = file->message_type(12);
  static const int TestRecursiveMessage_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRecursiveMessage, a_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRecursiveMessage, i_),
  };
  TestRecursiveMessage_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestRecursiveMessage_descriptor_,
      TestRecursiveMessage::default_instance_,
      TestRecursiveMessage_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRecursiveMessage, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestRecursiveMessage, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestRecursiveMessage));
  TestMutualRecursionA_descriptor_ = file->message_type(13);
  static const int TestMutualRecursionA_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMutualRecursionA, bb_),
  };
  TestMutualRecursionA_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestMutualRecursionA_descriptor_,
      TestMutualRecursionA::default_instance_,
      TestMutualRecursionA_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMutualRecursionA, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMutualRecursionA, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestMutualRecursionA));
  TestMutualRecursionB_descriptor_ = file->message_type(14);
  static const int TestMutualRecursionB_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMutualRecursionB, a_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMutualRecursionB, optional_int32_),
  };
  TestMutualRecursionB_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestMutualRecursionB_descriptor_,
      TestMutualRecursionB::default_instance_,
      TestMutualRecursionB_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMutualRecursionB, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMutualRecursionB, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestMutualRecursionB));
  TestDupFieldNumber_descriptor_ = file->message_type(15);
  static const int TestDupFieldNumber_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber, a_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber, foo_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber, bar_),
  };
  TestDupFieldNumber_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestDupFieldNumber_descriptor_,
      TestDupFieldNumber::default_instance_,
      TestDupFieldNumber_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestDupFieldNumber));
  TestDupFieldNumber_Foo_descriptor_ = TestDupFieldNumber_descriptor_->nested_type(0);
  static const int TestDupFieldNumber_Foo_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber_Foo, a_),
  };
  TestDupFieldNumber_Foo_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestDupFieldNumber_Foo_descriptor_,
      TestDupFieldNumber_Foo::default_instance_,
      TestDupFieldNumber_Foo_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber_Foo, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber_Foo, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestDupFieldNumber_Foo));
  TestDupFieldNumber_Bar_descriptor_ = TestDupFieldNumber_descriptor_->nested_type(1);
  static const int TestDupFieldNumber_Bar_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber_Bar, a_),
  };
  TestDupFieldNumber_Bar_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestDupFieldNumber_Bar_descriptor_,
      TestDupFieldNumber_Bar::default_instance_,
      TestDupFieldNumber_Bar_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber_Bar, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestDupFieldNumber_Bar, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestDupFieldNumber_Bar));
  TestNestedMessageHasBits_descriptor_ = file->message_type(16);
  static const int TestNestedMessageHasBits_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestNestedMessageHasBits, optional_nested_message_),
  };
  TestNestedMessageHasBits_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestNestedMessageHasBits_descriptor_,
      TestNestedMessageHasBits::default_instance_,
      TestNestedMessageHasBits_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestNestedMessageHasBits, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestNestedMessageHasBits, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestNestedMessageHasBits));
  TestNestedMessageHasBits_NestedMessage_descriptor_ = TestNestedMessageHasBits_descriptor_->nested_type(0);
  static const int TestNestedMessageHasBits_NestedMessage_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestNestedMessageHasBits_NestedMessage, nestedmessage_repeated_int32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestNestedMessageHasBits_NestedMessage, nestedmessage_repeated_foreignmessage_),
  };
  TestNestedMessageHasBits_NestedMessage_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestNestedMessageHasBits_NestedMessage_descriptor_,
      TestNestedMessageHasBits_NestedMessage::default_instance_,
      TestNestedMessageHasBits_NestedMessage_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestNestedMessageHasBits_NestedMessage, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestNestedMessageHasBits_NestedMessage, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestNestedMessageHasBits_NestedMessage));
  TestCamelCaseFieldNames_descriptor_ = file->message_type(17);
  static const int TestCamelCaseFieldNames_offsets_[12] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, primitivefield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, stringfield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, enumfield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, messagefield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, stringpiecefield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, cordfield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, repeatedprimitivefield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, repeatedstringfield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, repeatedenumfield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, repeatedmessagefield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, repeatedstringpiecefield_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, repeatedcordfield_),
  };
  TestCamelCaseFieldNames_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestCamelCaseFieldNames_descriptor_,
      TestCamelCaseFieldNames::default_instance_,
      TestCamelCaseFieldNames_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestCamelCaseFieldNames, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestCamelCaseFieldNames));
  TestFieldOrderings_descriptor_ = file->message_type(18);
  static const int TestFieldOrderings_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestFieldOrderings, my_string_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestFieldOrderings, my_int_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestFieldOrderings, my_float_),
  };
  TestFieldOrderings_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestFieldOrderings_descriptor_,
      TestFieldOrderings::default_instance_,
      TestFieldOrderings_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestFieldOrderings, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestFieldOrderings, _unknown_fields_),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestFieldOrderings, _extensions_),
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestFieldOrderings));
  TestExtremeDefaultValues_descriptor_ = file->message_type(19);
  static const int TestExtremeDefaultValues_offsets_[6] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestExtremeDefaultValues, escaped_bytes_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestExtremeDefaultValues, large_uint32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestExtremeDefaultValues, large_uint64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestExtremeDefaultValues, small_int32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestExtremeDefaultValues, small_int64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestExtremeDefaultValues, utf8_string_),
  };
  TestExtremeDefaultValues_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestExtremeDefaultValues_descriptor_,
      TestExtremeDefaultValues::default_instance_,
      TestExtremeDefaultValues_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestExtremeDefaultValues, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestExtremeDefaultValues, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestExtremeDefaultValues));
  OneString_descriptor_ = file->message_type(20);
  static const int OneString_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneString, data_),
  };
  OneString_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      OneString_descriptor_,
      OneString::default_instance_,
      OneString_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneString, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneString, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(OneString));
  OneBytes_descriptor_ = file->message_type(21);
  static const int OneBytes_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneBytes, data_),
  };
  OneBytes_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      OneBytes_descriptor_,
      OneBytes::default_instance_,
      OneBytes_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneBytes, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneBytes, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(OneBytes));
  TestPackedTypes_descriptor_ = file->message_type(22);
  static const int TestPackedTypes_offsets_[14] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_int32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_int64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_uint32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_uint64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_sint32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_sint64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_fixed32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_fixed64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_sfixed32_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_sfixed64_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_float_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_double_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_bool_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, packed_enum_),
  };
  TestPackedTypes_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestPackedTypes_descriptor_,
      TestPackedTypes::default_instance_,
      TestPackedTypes_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedTypes, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestPackedTypes));
  TestPackedExtensions_descriptor_ = file->message_type(23);
  static const int TestPackedExtensions_offsets_[1] = {
  };
  TestPackedExtensions_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TestPackedExtensions_descriptor_,
      TestPackedExtensions::default_instance_,
      TestPackedExtensions_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedExtensions, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedExtensions, _unknown_fields_),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestPackedExtensions, _extensions_),
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TestPackedExtensions));
  FooRequest_descriptor_ = file->message_type(24);
  static const int FooRequest_offsets_[1] = {
  };
  FooRequest_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      FooRequest_descriptor_,
      FooRequest::default_instance_,
      FooRequest_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FooRequest, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FooRequest, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(FooRequest));
  FooResponse_descriptor_ = file->message_type(25);
  static const int FooResponse_offsets_[1] = {
  };
  FooResponse_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      FooResponse_descriptor_,
      FooResponse::default_instance_,
      FooResponse_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FooResponse, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FooResponse, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(FooResponse));
  BarRequest_descriptor_ = file->message_type(26);
  static const int BarRequest_offsets_[1] = {
  };
  BarRequest_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      BarRequest_descriptor_,
      BarRequest::default_instance_,
      BarRequest_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BarRequest, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BarRequest, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(BarRequest));
  BarResponse_descriptor_ = file->message_type(27);
  static const int BarResponse_offsets_[1] = {
  };
  BarResponse_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      BarResponse_descriptor_,
      BarResponse::default_instance_,
      BarResponse_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BarResponse, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BarResponse, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(BarResponse));
  ForeignEnum_descriptor_ = file->enum_type(0);
  TestEnumWithDupValue_descriptor_ = file->enum_type(1);
  TestSparseEnum_descriptor_ = file->enum_type(2);
  TestService_descriptor_ = file->service(0);
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_google_2fprotobuf_2funittest_2eproto);
}

void protobuf_RegisterTypes() {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestAllTypes_descriptor_, &TestAllTypes::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestAllTypes_NestedMessage_descriptor_, &TestAllTypes_NestedMessage::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestAllTypes_OptionalGroup_descriptor_, &TestAllTypes_OptionalGroup::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestAllTypes_RepeatedGroup_descriptor_, &TestAllTypes_RepeatedGroup::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    ForeignMessage_descriptor_, &ForeignMessage::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestAllExtensions_descriptor_, &TestAllExtensions::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    OptionalGroup_extension_descriptor_, &OptionalGroup_extension::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    RepeatedGroup_extension_descriptor_, &RepeatedGroup_extension::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestNestedExtension_descriptor_, &TestNestedExtension::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestRequired_descriptor_, &TestRequired::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestRequiredForeign_descriptor_, &TestRequiredForeign::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestForeignNested_descriptor_, &TestForeignNested::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestEmptyMessage_descriptor_, &TestEmptyMessage::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestEmptyMessageWithExtensions_descriptor_, &TestEmptyMessageWithExtensions::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestReallyLargeTagNumber_descriptor_, &TestReallyLargeTagNumber::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestRecursiveMessage_descriptor_, &TestRecursiveMessage::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestMutualRecursionA_descriptor_, &TestMutualRecursionA::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestMutualRecursionB_descriptor_, &TestMutualRecursionB::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestDupFieldNumber_descriptor_, &TestDupFieldNumber::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestDupFieldNumber_Foo_descriptor_, &TestDupFieldNumber_Foo::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestDupFieldNumber_Bar_descriptor_, &TestDupFieldNumber_Bar::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestNestedMessageHasBits_descriptor_, &TestNestedMessageHasBits::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestNestedMessageHasBits_NestedMessage_descriptor_, &TestNestedMessageHasBits_NestedMessage::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestCamelCaseFieldNames_descriptor_, &TestCamelCaseFieldNames::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestFieldOrderings_descriptor_, &TestFieldOrderings::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestExtremeDefaultValues_descriptor_, &TestExtremeDefaultValues::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    OneString_descriptor_, &OneString::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    OneBytes_descriptor_, &OneBytes::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestPackedTypes_descriptor_, &TestPackedTypes::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TestPackedExtensions_descriptor_, &TestPackedExtensions::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    FooRequest_descriptor_, &FooRequest::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    FooResponse_descriptor_, &FooResponse::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    BarRequest_descriptor_, &BarRequest::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    BarResponse_descriptor_, &BarResponse::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_google_2fprotobuf_2funittest_2eproto() {
  delete TestAllTypes::default_instance_;
  delete TestAllTypes_reflection_;
  delete TestAllTypes_NestedMessage::default_instance_;
  delete TestAllTypes_NestedMessage_reflection_;
  delete TestAllTypes_OptionalGroup::default_instance_;
  delete TestAllTypes_OptionalGroup_reflection_;
  delete TestAllTypes_RepeatedGroup::default_instance_;
  delete TestAllTypes_RepeatedGroup_reflection_;
  delete ForeignMessage::default_instance_;
  delete ForeignMessage_reflection_;
  delete TestAllExtensions::default_instance_;
  delete TestAllExtensions_reflection_;
  delete OptionalGroup_extension::default_instance_;
  delete OptionalGroup_extension_reflection_;
  delete RepeatedGroup_extension::default_instance_;
  delete RepeatedGroup_extension_reflection_;
  delete TestNestedExtension::default_instance_;
  delete TestNestedExtension_reflection_;
  delete TestRequired::default_instance_;
  delete TestRequired_reflection_;
  delete TestRequiredForeign::default_instance_;
  delete TestRequiredForeign_reflection_;
  delete TestForeignNested::default_instance_;
  delete TestForeignNested_reflection_;
  delete TestEmptyMessage::default_instance_;
  delete TestEmptyMessage_reflection_;
  delete TestEmptyMessageWithExtensions::default_instance_;
  delete TestEmptyMessageWithExtensions_reflection_;
  delete TestReallyLargeTagNumber::default_instance_;
  delete TestReallyLargeTagNumber_reflection_;
  delete TestRecursiveMessage::default_instance_;
  delete TestRecursiveMessage_reflection_;
  delete TestMutualRecursionA::default_instance_;
  delete TestMutualRecursionA_reflection_;
  delete TestMutualRecursionB::default_instance_;
  delete TestMutualRecursionB_reflection_;
  delete TestDupFieldNumber::default_instance_;
  delete TestDupFieldNumber_reflection_;
  delete TestDupFieldNumber_Foo::default_instance_;
  delete TestDupFieldNumber_Foo_reflection_;
  delete TestDupFieldNumber_Bar::default_instance_;
  delete TestDupFieldNumber_Bar_reflection_;
  delete TestNestedMessageHasBits::default_instance_;
  delete TestNestedMessageHasBits_reflection_;
  delete TestNestedMessageHasBits_NestedMessage::default_instance_;
  delete TestNestedMessageHasBits_NestedMessage_reflection_;
  delete TestCamelCaseFieldNames::default_instance_;
  delete TestCamelCaseFieldNames_reflection_;
  delete TestFieldOrderings::default_instance_;
  delete TestFieldOrderings_reflection_;
  delete TestExtremeDefaultValues::default_instance_;
  delete TestExtremeDefaultValues_reflection_;
  delete OneString::default_instance_;
  delete OneString_reflection_;
  delete OneBytes::default_instance_;
  delete OneBytes_reflection_;
  delete TestPackedTypes::default_instance_;
  delete TestPackedTypes_reflection_;
  delete TestPackedExtensions::default_instance_;
  delete TestPackedExtensions_reflection_;
  delete FooRequest::default_instance_;
  delete FooRequest_reflection_;
  delete FooResponse::default_instance_;
  delete FooResponse_reflection_;
  delete BarRequest::default_instance_;
  delete BarRequest_reflection_;
  delete BarResponse::default_instance_;
  delete BarResponse_reflection_;
}

void protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto() {
  static bool already_here = false;
  if (already_here) return;
  already_here = true;
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::protobuf_unittest_import::protobuf_AddDesc_google_2fprotobuf_2funittest_5fimport_2eproto();
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\036google/protobuf/unittest.proto\022\021protob"
    "uf_unittest\032%google/protobuf/unittest_im"
    "port.proto\"\273\025\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\022\026\n\016repeated_int32\030\037 \003(\005\022\026\n\016repeated_i"
    "nt64\030  \003(\003\022\027\n\017repeated_uint32\030! \003(\r\022\027\n\017r"
    "epeated_uint64\030\" \003(\004\022\027\n\017repeated_sint32\030"
    "# \003(\021\022\027\n\017repeated_sint64\030$ \003(\022\022\030\n\020repeat"
    "ed_fixed32\030% \003(\007\022\030\n\020repeated_fixed64\030& \003"
    "(\006\022\031\n\021repeated_sfixed32\030\' \003(\017\022\031\n\021repeate"
    "d_sfixed64\030( \003(\020\022\026\n\016repeated_float\030) \003(\002"
    "\022\027\n\017repeated_double\030* \003(\001\022\025\n\rrepeated_bo"
    "ol\030+ \003(\010\022\027\n\017repeated_string\030, \003(\t\022\026\n\016rep"
    "eated_bytes\030- \003(\014\022D\n\rrepeatedgroup\030. \003(\n"
    "2-.protobuf_unittest.TestAllTypes.Repeat"
    "edGroup\022N\n\027repeated_nested_message\0300 \003(\013"
    "2-.protobuf_unittest.TestAllTypes.Nested"
    "Message\022C\n\030repeated_foreign_message\0301 \003("
    "\0132!.protobuf_unittest.ForeignMessage\022H\n\027"
    "repeated_import_message\0302 \003(\0132\'.protobuf"
    "_unittest_import.ImportMessage\022H\n\024repeat"
    "ed_nested_enum\0303 \003(\0162*.protobuf_unittest"
    ".TestAllTypes.NestedEnum\022=\n\025repeated_for"
    "eign_enum\0304 \003(\0162\036.protobuf_unittest.Fore"
    "ignEnum\022B\n\024repeated_import_enum\0305 \003(\0162$."
    "protobuf_unittest_import.ImportEnum\022!\n\025r"
    "epeated_string_piece\0306 \003(\tB\002\010\002\022\031\n\rrepeat"
    "ed_cord\0307 \003(\tB\002\010\001\022\031\n\rdefault_int32\030= \001(\005"
    ":\00241\022\031\n\rdefault_int64\030> \001(\003:\00242\022\032\n\016defau"
    "lt_uint32\030? \001(\r:\00243\022\032\n\016default_uint64\030@ "
    "\001(\004:\00244\022\033\n\016default_sint32\030A \001(\021:\003-45\022\032\n\016"
    "default_sint64\030B \001(\022:\00246\022\033\n\017default_fixe"
    "d32\030C \001(\007:\00247\022\033\n\017default_fixed64\030D \001(\006:\002"
    "48\022\034\n\020default_sfixed32\030E \001(\017:\00249\022\035\n\020defa"
    "ult_sfixed64\030F \001(\020:\003-50\022\033\n\rdefault_float"
    "\030G \001(\002:\00451.5\022\035\n\016default_double\030H \001(\001:\00552"
    "000\022\032\n\014default_bool\030I \001(\010:\004true\022\035\n\016defau"
    "lt_string\030J \001(\t:\005hello\022\034\n\rdefault_bytes\030"
    "K \001(\014:\005world\022L\n\023default_nested_enum\030Q \001("
    "\0162*.protobuf_unittest.TestAllTypes.Neste"
    "dEnum:\003BAR\022I\n\024default_foreign_enum\030R \001(\016"
    "2\036.protobuf_unittest.ForeignEnum:\013FOREIG"
    "N_BAR\022M\n\023default_import_enum\030S \001(\0162$.pro"
    "tobuf_unittest_import.ImportEnum:\nIMPORT"
    "_BAR\022%\n\024default_string_piece\030T \001(\t:\003abcB"
    "\002\010\002\022\035\n\014default_cord\030U \001(\t:\003123B\002\010\001\032\033\n\rNe"
    "stedMessage\022\n\n\002bb\030\001 \001(\005\032\032\n\rOptionalGroup"
    "\022\t\n\001a\030\021 \001(\005\032\032\n\rRepeatedGroup\022\t\n\001a\030/ \001(\005\""
    "\'\n\nNestedEnum\022\007\n\003FOO\020\001\022\007\n\003BAR\020\002\022\007\n\003BAZ\020\003"
    "\"\033\n\016ForeignMessage\022\t\n\001c\030\001 \001(\005\"\035\n\021TestAll"
    "Extensions*\010\010\001\020\200\200\200\200\002\"$\n\027OptionalGroup_ex"
    "tension\022\t\n\001a\030\021 \001(\005\"$\n\027RepeatedGroup_exte"
    "nsion\022\t\n\001a\030/ \001(\005\"P\n\023TestNestedExtension2"
    "9\n\004test\022$.protobuf_unittest.TestAllExten"
    "sions\030\352\007 \001(\t:\004test\"\325\005\n\014TestRequired\022\t\n\001a"
    "\030\001 \002(\005\022\016\n\006dummy2\030\002 \001(\005\022\t\n\001b\030\003 \002(\005\022\016\n\006dum"
    "my4\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\006dum"
    "my9\030\t \001(\005\022\017\n\007dummy10\030\n \001(\005\022\017\n\007dummy11\030\013 "
    "\001(\005\022\017\n\007dummy12\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\007dummy"
    "16\030\020 \001(\005\022\017\n\007dummy17\030\021 \001(\005\022\017\n\007dummy18\030\022 \001"
    "(\005\022\017\n\007dummy19\030\023 \001(\005\022\017\n\007dummy20\030\024 \001(\005\022\017\n\007"
    "dummy21\030\025 \001(\005\022\017\n\007dummy22\030\026 \001(\005\022\017\n\007dummy2"
    "3\030\027 \001(\005\022\017\n\007dummy24\030\030 \001(\005\022\017\n\007dummy25\030\031 \001("
    "\005\022\017\n\007dummy26\030\032 \001(\005\022\017\n\007dummy27\030\033 \001(\005\022\017\n\007d"
    "ummy28\030\034 \001(\005\022\017\n\007dummy29\030\035 \001(\005\022\017\n\007dummy30"
    "\030\036 \001(\005\022\017\n\007dummy31\030\037 \001(\005\022\017\n\007dummy32\030  \001(\005"
    "\022\t\n\001c\030! \002(\0052V\n\006single\022$.protobuf_unittes"
    "t.TestAllExtensions\030\350\007 \001(\0132\037.protobuf_un"
    "ittest.TestRequired2U\n\005multi\022$.protobuf_"
    "unittest.TestAllExtensions\030\351\007 \003(\0132\037.prot"
    "obuf_unittest.TestRequired\"\232\001\n\023TestRequi"
    "redForeign\0229\n\020optional_message\030\001 \001(\0132\037.p"
    "rotobuf_unittest.TestRequired\0229\n\020repeate"
    "d_message\030\002 \003(\0132\037.protobuf_unittest.Test"
    "Required\022\r\n\005dummy\030\003 \001(\005\"Z\n\021TestForeignNe"
    "sted\022E\n\016foreign_nested\030\001 \001(\0132-.protobuf_"
    "unittest.TestAllTypes.NestedMessage\"\022\n\020T"
    "estEmptyMessage\"*\n\036TestEmptyMessageWithE"
    "xtensions*\010\010\001\020\200\200\200\200\002\"4\n\030TestReallyLargeTa"
    "gNumber\022\t\n\001a\030\001 \001(\005\022\r\n\002bb\030\377\377\377\177 \001(\005\"U\n\024Tes"
    "tRecursiveMessage\0222\n\001a\030\001 \001(\0132\'.protobuf_"
    "unittest.TestRecursiveMessage\022\t\n\001i\030\002 \001(\005"
    "\"K\n\024TestMutualRecursionA\0223\n\002bb\030\001 \001(\0132\'.p"
    "rotobuf_unittest.TestMutualRecursionB\"b\n"
    "\024TestMutualRecursionB\0222\n\001a\030\001 \001(\0132\'.proto"
    "buf_unittest.TestMutualRecursionA\022\026\n\016opt"
    "ional_int32\030\002 \001(\005\"\263\001\n\022TestDupFieldNumber"
    "\022\t\n\001a\030\001 \001(\005\0226\n\003foo\030\002 \001(\n2).protobuf_unit"
    "test.TestDupFieldNumber.Foo\0226\n\003bar\030\003 \001(\n"
    "2).protobuf_unittest.TestDupFieldNumber."
    "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\""
    "\200\002\n\030TestNestedMessageHasBits\022Z\n\027optional"
    "_nested_message\030\001 \001(\01329.protobuf_unittes"
    "t.TestNestedMessageHasBits.NestedMessage"
    "\032\207\001\n\rNestedMessage\022$\n\034nestedmessage_repe"
    "ated_int32\030\001 \003(\005\022P\n%nestedmessage_repeat"
    "ed_foreignmessage\030\002 \003(\0132!.protobuf_unitt"
    "est.ForeignMessage\"\345\003\n\027TestCamelCaseFiel"
    "dNames\022\026\n\016PrimitiveField\030\001 \001(\005\022\023\n\013String"
    "Field\030\002 \001(\t\0221\n\tEnumField\030\003 \001(\0162\036.protobu"
    "f_unittest.ForeignEnum\0227\n\014MessageField\030\004"
    " \001(\0132!.protobuf_unittest.ForeignMessage\022"
    "\034\n\020StringPieceField\030\005 \001(\tB\002\010\002\022\025\n\tCordFie"
    "ld\030\006 \001(\tB\002\010\001\022\036\n\026RepeatedPrimitiveField\030\007"
    " \003(\005\022\033\n\023RepeatedStringField\030\010 \003(\t\0229\n\021Rep"
    "eatedEnumField\030\t \003(\0162\036.protobuf_unittest"
    ".ForeignEnum\022?\n\024RepeatedMessageField\030\n \003"
    "(\0132!.protobuf_unittest.ForeignMessage\022$\n"
    "\030RepeatedStringPieceField\030\013 \003(\tB\002\010\002\022\035\n\021R"
    "epeatedCordField\030\014 \003(\tB\002\010\001\"U\n\022TestFieldO"
    "rderings\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*\004\010\002\020\013*\004\010\014\020e\"\220\002\n\030Te"
    "stExtremeDefaultValues\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:\n429496729"
    "5\022*\n\014large_uint64\030\003 \001(\004:\024184467440737095"
    "51615\022 \n\013small_int32\030\004 \001(\005:\013-2147483647\022"
    ")\n\013small_int64\030\005 \001(\003:\024-92233720368547758"
    "07\022\030\n\013utf8_string\030\006 \001(\t:\003\341\210\264\"\031\n\tOneStrin"
    "g\022\014\n\004data\030\001 \001(\t\"\030\n\010OneBytes\022\014\n\004data\030\001 \001("
    "\014\"\252\003\n\017TestPackedTypes\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\rpac"
    "ked_uint32\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\rpa"
    "cked_sint64\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_sfixed32\030b \003(\017B\002\020\001\022\033\n\017packed_sfi"
    "xed64\030c \003(\020B\002\020\001\022\030\n\014packed_float\030d \003(\002B\002\020"
    "\001\022\031\n\rpacked_double\030e \003(\001B\002\020\001\022\027\n\013packed_b"
    "ool\030f \003(\010B\002\020\001\0227\n\013packed_enum\030g \003(\0162\036.pro"
    "tobuf_unittest.ForeignEnumB\002\020\001\" \n\024TestPa"
    "ckedExtensions*\010\010\001\020\200\200\200\200\002\"\014\n\nFooRequest\"\r"
    "\n\013FooResponse\"\014\n\nBarRequest\"\r\n\013BarRespon"
    "se*@\n\013ForeignEnum\022\017\n\013FOREIGN_FOO\020\004\022\017\n\013FO"
    "REIGN_BAR\020\005\022\017\n\013FOREIGN_BAZ\020\006*G\n\024TestEnum"
    "WithDupValue\022\010\n\004FOO1\020\001\022\010\n\004BAR1\020\002\022\007\n\003BAZ\020"
    "\003\022\010\n\004FOO2\020\001\022\010\n\004BAR2\020\002*\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\010SPARSE_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\013TestService\022D\n\003Foo\022\035.protobuf_unit"
    "test.FooRequest\032\036.protobuf_unittest.FooR"
    "esponse\022D\n\003Bar\022\035.protobuf_unittest.BarRe"
    "quest\032\036.protobuf_unittest.BarResponse:F\n"
    "\030optional_int32_extension\022$.protobuf_uni"
    "ttest.TestAllExtensions\030\001 \001(\005:F\n\030optiona"
    "l_int64_extension\022$.protobuf_unittest.Te"
    "stAllExtensions\030\002 \001(\003:G\n\031optional_uint32"
    "_extension\022$.protobuf_unittest.TestAllEx"
    "tensions\030\003 \001(\r:G\n\031optional_uint64_extens"
    "ion\022$.protobuf_unittest.TestAllExtension"
    "s\030\004 \001(\004:G\n\031optional_sint32_extension\022$.p"
    "rotobuf_unittest.TestAllExtensions\030\005 \001(\021"
    ":G\n\031optional_sint64_extension\022$.protobuf"
    "_unittest.TestAllExtensions\030\006 \001(\022:H\n\032opt"
    "ional_fixed32_extension\022$.protobuf_unitt"
    "est.TestAllExtensions\030\007 \001(\007:H\n\032optional_"
    "fixed64_extension\022$.protobuf_unittest.Te"
    "stAllExtensions\030\010 \001(\006:I\n\033optional_sfixed"
    "32_extension\022$.protobuf_unittest.TestAll"
    "Extensions\030\t \001(\017:I\n\033optional_sfixed64_ex"
    "tension\022$.protobuf_unittest.TestAllExten"
    "sions\030\n \001(\020:F\n\030optional_float_extension\022"
    "$.protobuf_unittest.TestAllExtensions\030\013 "
    "\001(\002:G\n\031optional_double_extension\022$.proto"
    "buf_unittest.TestAllExtensions\030\014 \001(\001:E\n\027"
    "optional_bool_extension\022$.protobuf_unitt"
    "est.TestAllExtensions\030\r \001(\010:G\n\031optional_"
    "string_extension\022$.protobuf_unittest.Tes"
    "tAllExtensions\030\016 \001(\t:F\n\030optional_bytes_e"
    "xtension\022$.protobuf_unittest.TestAllExte"
    "nsions\030\017 \001(\014:q\n\027optionalgroup_extension\022"
    "$.protobuf_unittest.TestAllExtensions\030\020 "
    "\001(\n2*.protobuf_unittest.OptionalGroup_ex"
    "tension:~\n!optional_nested_message_exten"
    "sion\022$.protobuf_unittest.TestAllExtensio"
    "ns\030\022 \001(\0132-.protobuf_unittest.TestAllType"
    "s.NestedMessage:s\n\"optional_foreign_mess"
    "age_extension\022$.protobuf_unittest.TestAl"
    "lExtensions\030\023 \001(\0132!.protobuf_unittest.Fo"
    "reignMessage:x\n!optional_import_message_"
    "extension\022$.protobuf_unittest.TestAllExt"
    "ensions\030\024 \001(\0132\'.protobuf_unittest_import"
    ".ImportMessage:x\n\036optional_nested_enum_e"
    "xtension\022$.protobuf_unittest.TestAllExte"
    "nsions\030\025 \001(\0162*.protobuf_unittest.TestAll"
    "Types.NestedEnum:m\n\037optional_foreign_enu"
    "m_extension\022$.protobuf_unittest.TestAllE"
    "xtensions\030\026 \001(\0162\036.protobuf_unittest.Fore"
    "ignEnum:r\n\036optional_import_enum_extensio"
    "n\022$.protobuf_unittest.TestAllExtensions\030"
    "\027 \001(\0162$.protobuf_unittest_import.ImportE"
    "num:Q\n\037optional_string_piece_extension\022$"
    ".protobuf_unittest.TestAllExtensions\030\030 \001"
    "(\tB\002\010\002:I\n\027optional_cord_extension\022$.prot"
    "obuf_unittest.TestAllExtensions\030\031 \001(\tB\002\010"
    "\001:F\n\030repeated_int32_extension\022$.protobuf"
    "_unittest.TestAllExtensions\030\037 \003(\005:F\n\030rep"
    "eated_int64_extension\022$.protobuf_unittes"
    "t.TestAllExtensions\030  \003(\003:G\n\031repeated_ui"
    "nt32_extension\022$.protobuf_unittest.TestA"
    "llExtensions\030! \003(\r:G\n\031repeated_uint64_ex"
    "tension\022$.protobuf_unittest.TestAllExten"
    "sions\030\" \003(\004:G\n\031repeated_sint32_extension"
    "\022$.protobuf_unittest.TestAllExtensions\030#"
    " \003(\021:G\n\031repeated_sint64_extension\022$.prot"
    "obuf_unittest.TestAllExtensions\030$ \003(\022:H\n"
    "\032repeated_fixed32_extension\022$.protobuf_u"
    "nittest.TestAllExtensions\030% \003(\007:H\n\032repea"
    "ted_fixed64_extension\022$.protobuf_unittes"
    "t.TestAllExtensions\030& \003(\006:I\n\033repeated_sf"
    "ixed32_extension\022$.protobuf_unittest.Tes"
    "tAllExtensions\030\' \003(\017:I\n\033repeated_sfixed6"
    "4_extension\022$.protobuf_unittest.TestAllE"
    "xtensions\030( \003(\020:F\n\030repeated_float_extens"
    "ion\022$.protobuf_unittest.TestAllExtension"
    "s\030) \003(\002:G\n\031repeated_double_extension\022$.p"
    "rotobuf_unittest.TestAllExtensions\030* \003(\001"
    ":E\n\027repeated_bool_extension\022$.protobuf_u"
    "nittest.TestAllExtensions\030+ \003(\010:G\n\031repea"
    "ted_string_extension\022$.protobuf_unittest"
    ".TestAllExtensions\030, \003(\t:F\n\030repeated_byt"
    "es_extension\022$.protobuf_unittest.TestAll"
    "Extensions\030- \003(\014:q\n\027repeatedgroup_extens"
    "ion\022$.protobuf_unittest.TestAllExtension"
    "s\030. \003(\n2*.protobuf_unittest.RepeatedGrou"
    "p_extension:~\n!repeated_nested_message_e"
    "xtension\022$.protobuf_unittest.TestAllExte"
    "nsions\0300 \003(\0132-.protobuf_unittest.TestAll"
    "Types.NestedMessage:s\n\"repeated_foreign_"
    "message_extension\022$.protobuf_unittest.Te"
    "stAllExtensions\0301 \003(\0132!.protobuf_unittes"
    "t.ForeignMessage:x\n!repeated_import_mess"
    "age_extension\022$.protobuf_unittest.TestAl"
    "lExtensions\0302 \003(\0132\'.protobuf_unittest_im"
    "port.ImportMessage:x\n\036repeated_nested_en"
    "um_extension\022$.protobuf_unittest.TestAll"
    "Extensions\0303 \003(\0162*.protobuf_unittest.Tes"
    "tAllTypes.NestedEnum:m\n\037repeated_foreign"
    "_enum_extension\022$.protobuf_unittest.Test"
    "AllExtensions\0304 \003(\0162\036.protobuf_unittest."
    "ForeignEnum:r\n\036repeated_import_enum_exte"
    "nsion\022$.protobuf_unittest.TestAllExtensi"
    "ons\0305 \003(\0162$.protobuf_unittest_import.Imp"
    "ortEnum:Q\n\037repeated_string_piece_extensi"
    "on\022$.protobuf_unittest.TestAllExtensions"
    "\0306 \003(\tB\002\010\002:I\n\027repeated_cord_extension\022$."
    "protobuf_unittest.TestAllExtensions\0307 \003("
    "\tB\002\010\001:I\n\027default_int32_extension\022$.proto"
    "buf_unittest.TestAllExtensions\030= \001(\005:\00241"
    ":I\n\027default_int64_extension\022$.protobuf_u"
    "nittest.TestAllExtensions\030> \001(\003:\00242:J\n\030d"
    "efault_uint32_extension\022$.protobuf_unitt"
    "est.TestAllExtensions\030? \001(\r:\00243:J\n\030defau"
    "lt_uint64_extension\022$.protobuf_unittest."
    "TestAllExtensions\030@ \001(\004:\00244:K\n\030default_s"
    "int32_extension\022$.protobuf_unittest.Test"
    "AllExtensions\030A \001(\021:\003-45:J\n\030default_sint"
    "64_extension\022$.protobuf_unittest.TestAll"
    "Extensions\030B \001(\022:\00246:K\n\031default_fixed32_"
    "extension\022$.protobuf_unittest.TestAllExt"
    "ensions\030C \001(\007:\00247:K\n\031default_fixed64_ext"
    "ension\022$.protobuf_unittest.TestAllExtens"
    "ions\030D \001(\006:\00248:L\n\032default_sfixed32_exten"
    "sion\022$.protobuf_unittest.TestAllExtensio"
    "ns\030E \001(\017:\00249:M\n\032default_sfixed64_extensi"
    "on\022$.protobuf_unittest.TestAllExtensions"
    "\030F \001(\020:\003-50:K\n\027default_float_extension\022$"
    ".protobuf_unittest.TestAllExtensions\030G \001"
    "(\002:\00451.5:M\n\030default_double_extension\022$.p"
    "rotobuf_unittest.TestAllExtensions\030H \001(\001"
    ":\00552000:J\n\026default_bool_extension\022$.prot"
    "obuf_unittest.TestAllExtensions\030I \001(\010:\004t"
    "rue:M\n\030default_string_extension\022$.protob"
    "uf_unittest.TestAllExtensions\030J \001(\t:\005hel"
    "lo:L\n\027default_bytes_extension\022$.protobuf"
    "_unittest.TestAllExtensions\030K \001(\014:\005world"
    ":|\n\035default_nested_enum_extension\022$.prot"
    "obuf_unittest.TestAllExtensions\030Q \001(\0162*."
    "protobuf_unittest.TestAllTypes.NestedEnu"
    "m:\003BAR:y\n\036default_foreign_enum_extension"
    "\022$.protobuf_unittest.TestAllExtensions\030R"
    " \001(\0162\036.protobuf_unittest.ForeignEnum:\013FO"
    "REIGN_BAR:}\n\035default_import_enum_extensi"
    "on\022$.protobuf_unittest.TestAllExtensions"
    "\030S \001(\0162$.protobuf_unittest_import.Import"
    "Enum:\nIMPORT_BAR:U\n\036default_string_piece"
    "_extension\022$.protobuf_unittest.TestAllEx"
    "tensions\030T \001(\t:\003abcB\002\010\002:M\n\026default_cord_"
    "extension\022$.protobuf_unittest.TestAllExt"
    "ensions\030U \001(\t:\003123B\002\010\001:B\n\023my_extension_s"
    "tring\022%.protobuf_unittest.TestFieldOrder"
    "ings\0302 \001(\t:?\n\020my_extension_int\022%.protobu"
    "f_unittest.TestFieldOrderings\030\005 \001(\005:K\n\026p"
    "acked_int32_extension\022\'.protobuf_unittes"
    "t.TestPackedExtensions\030Z \003(\005B\002\020\001:K\n\026pack"
    "ed_int64_extension\022\'.protobuf_unittest.T"
    "estPackedExtensions\030[ \003(\003B\002\020\001:L\n\027packed_"
    "uint32_extension\022\'.protobuf_unittest.Tes"
    "tPackedExtensions\030\\ \003(\rB\002\020\001:L\n\027packed_ui"
    "nt64_extension\022\'.protobuf_unittest.TestP"
    "ackedExtensions\030] \003(\004B\002\020\001:L\n\027packed_sint"
    "32_extension\022\'.protobuf_unittest.TestPac"
    "kedExtensions\030^ \003(\021B\002\020\001:L\n\027packed_sint64"
    "_extension\022\'.protobuf_unittest.TestPacke"
    "dExtensions\030_ \003(\022B\002\020\001:M\n\030packed_fixed32_"
    "extension\022\'.protobuf_unittest.TestPacked"
    "Extensions\030` \003(\007B\002\020\001:M\n\030packed_fixed64_e"
    "xtension\022\'.protobuf_unittest.TestPackedE"
    "xtensions\030a \003(\006B\002\020\001:N\n\031packed_sfixed32_e"
    "xtension\022\'.protobuf_unittest.TestPackedE"
    "xtensions\030b \003(\017B\002\020\001:N\n\031packed_sfixed64_e"
    "xtension\022\'.protobuf_unittest.TestPackedE"
    "xtensions\030c \003(\020B\002\020\001:K\n\026packed_float_exte"
    "nsion\022\'.protobuf_unittest.TestPackedExte"
    "nsions\030d \003(\002B\002\020\001:L\n\027packed_double_extens"
    "ion\022\'.protobuf_unittest.TestPackedExtens"
    "ions\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\'.pr"
    "otobuf_unittest.TestPackedExtensions\030g \003"
    "(\0162\036.protobuf_unittest.ForeignEnumB\002\020\001B\021"
    "B\rUnittestProtoH\001", 13857);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "google/protobuf/unittest.proto", &protobuf_RegisterTypes);
  TestAllTypes::default_instance_ = new TestAllTypes();
  TestAllTypes_NestedMessage::default_instance_ = new TestAllTypes_NestedMessage();
  TestAllTypes_OptionalGroup::default_instance_ = new TestAllTypes_OptionalGroup();
  TestAllTypes_RepeatedGroup::default_instance_ = new TestAllTypes_RepeatedGroup();
  ForeignMessage::default_instance_ = new ForeignMessage();
  TestAllExtensions::default_instance_ = new TestAllExtensions();
  OptionalGroup_extension::default_instance_ = new OptionalGroup_extension();
  RepeatedGroup_extension::default_instance_ = new RepeatedGroup_extension();
  TestNestedExtension::default_instance_ = new TestNestedExtension();
  TestRequired::default_instance_ = new TestRequired();
  TestRequiredForeign::default_instance_ = new TestRequiredForeign();
  TestForeignNested::default_instance_ = new TestForeignNested();
  TestEmptyMessage::default_instance_ = new TestEmptyMessage();
  TestEmptyMessageWithExtensions::default_instance_ = new TestEmptyMessageWithExtensions();
  TestReallyLargeTagNumber::default_instance_ = new TestReallyLargeTagNumber();
  TestRecursiveMessage::default_instance_ = new TestRecursiveMessage();
  TestMutualRecursionA::default_instance_ = new TestMutualRecursionA();
  TestMutualRecursionB::default_instance_ = new TestMutualRecursionB();
  TestDupFieldNumber::default_instance_ = new TestDupFieldNumber();
  TestDupFieldNumber_Foo::default_instance_ = new TestDupFieldNumber_Foo();
  TestDupFieldNumber_Bar::default_instance_ = new TestDupFieldNumber_Bar();
  TestNestedMessageHasBits::default_instance_ = new TestNestedMessageHasBits();
  TestNestedMessageHasBits_NestedMessage::default_instance_ = new TestNestedMessageHasBits_NestedMessage();
  TestCamelCaseFieldNames::default_instance_ = new TestCamelCaseFieldNames();
  TestFieldOrderings::default_instance_ = new TestFieldOrderings();
  TestExtremeDefaultValues::default_instance_ = new TestExtremeDefaultValues();
  OneString::default_instance_ = new OneString();
  OneBytes::default_instance_ = new OneBytes();
  TestPackedTypes::default_instance_ = new TestPackedTypes();
  TestPackedExtensions::default_instance_ = new TestPackedExtensions();
  FooRequest::default_instance_ = new FooRequest();
  FooResponse::default_instance_ = new FooResponse();
  BarRequest::default_instance_ = new BarRequest();
  BarResponse::default_instance_ = new BarResponse();
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    1, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    2, 3, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    3, 13, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    4, 4, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    5, 17, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    6, 18, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    7, 7, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    8, 6, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    9, 15, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    10, 16, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    11, 2, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    12, 1, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    13, 8, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    14, 9, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    15, 12, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    16, 10, false, false,
    &::protobuf_unittest::OptionalGroup_extension::default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    18, 11, false, false,
    &::protobuf_unittest::TestAllTypes_NestedMessage::default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    19, 11, false, false,
    &::protobuf_unittest::ForeignMessage::default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    20, 11, false, false,
    &::protobuf_unittest_import::ImportMessage::default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    21, 14, false, false,
    &::protobuf_unittest::TestAllTypes_NestedEnum_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    22, 14, false, false,
    &protobuf_unittest::ForeignEnum_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    23, 14, false, false,
    &protobuf_unittest_import::ImportEnum_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    24, 9, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    25, 9, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    31, 5, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    32, 3, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    33, 13, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    34, 4, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    35, 17, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    36, 18, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    37, 7, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    38, 6, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    39, 15, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    40, 16, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    41, 2, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    42, 1, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    43, 8, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    44, 9, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    45, 12, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    46, 10, true, false,
    &::protobuf_unittest::RepeatedGroup_extension::default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    48, 11, true, false,
    &::protobuf_unittest::TestAllTypes_NestedMessage::default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    49, 11, true, false,
    &::protobuf_unittest::ForeignMessage::default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    50, 11, true, false,
    &::protobuf_unittest_import::ImportMessage::default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    51, 14, true, false,
    &::protobuf_unittest::TestAllTypes_NestedEnum_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    52, 14, true, false,
    &protobuf_unittest::ForeignEnum_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    53, 14, true, false,
    &protobuf_unittest_import::ImportEnum_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    54, 9, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    55, 9, true, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    61, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    62, 3, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    63, 13, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    64, 4, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    65, 17, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    66, 18, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    67, 7, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    68, 6, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    69, 15, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    70, 16, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    71, 2, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    72, 1, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    73, 8, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    74, 9, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    75, 12, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    81, 14, false, false,
    &::protobuf_unittest::TestAllTypes_NestedEnum_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    82, 14, false, false,
    &protobuf_unittest::ForeignEnum_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    83, 14, false, false,
    &protobuf_unittest_import::ImportEnum_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    84, 9, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    85, 9, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestFieldOrderings::default_instance(),
    50, 9, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestFieldOrderings::default_instance(),
    5, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    90, 5, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    91, 3, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    92, 13, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    93, 4, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    94, 17, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    95, 18, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    96, 7, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    97, 6, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    98, 15, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    99, 16, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    100, 2, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    101, 1, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    102, 8, true, true);
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    &::protobuf_unittest::TestPackedExtensions::default_instance(),
    103, 14, true, true,
    &protobuf_unittest::ForeignEnum_IsValid);
  TestAllTypes::default_instance_->InitAsDefaultInstance();
  TestAllTypes_NestedMessage::default_instance_->InitAsDefaultInstance();
  TestAllTypes_OptionalGroup::default_instance_->InitAsDefaultInstance();
  TestAllTypes_RepeatedGroup::default_instance_->InitAsDefaultInstance();
  ForeignMessage::default_instance_->InitAsDefaultInstance();
  TestAllExtensions::default_instance_->InitAsDefaultInstance();
  OptionalGroup_extension::default_instance_->InitAsDefaultInstance();
  RepeatedGroup_extension::default_instance_->InitAsDefaultInstance();
  TestNestedExtension::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    1002, 9, false, false);
  TestRequired::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    1000, 11, false, false,
    &::protobuf_unittest::TestRequired::default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::protobuf_unittest::TestAllExtensions::default_instance(),
    1001, 11, true, false,
    &::protobuf_unittest::TestRequired::default_instance());
  TestRequiredForeign::default_instance_->InitAsDefaultInstance();
  TestForeignNested::default_instance_->InitAsDefaultInstance();
  TestEmptyMessage::default_instance_->InitAsDefaultInstance();
  TestEmptyMessageWithExtensions::default_instance_->InitAsDefaultInstance();
  TestReallyLargeTagNumber::default_instance_->InitAsDefaultInstance();
  TestRecursiveMessage::default_instance_->InitAsDefaultInstance();
  TestMutualRecursionA::default_instance_->InitAsDefaultInstance();
  TestMutualRecursionB::default_instance_->InitAsDefaultInstance();
  TestDupFieldNumber::default_instance_->InitAsDefaultInstance();
  TestDupFieldNumber_Foo::default_instance_->InitAsDefaultInstance();
  TestDupFieldNumber_Bar::default_instance_->InitAsDefaultInstance();
  TestNestedMessageHasBits::default_instance_->InitAsDefaultInstance();
  TestNestedMessageHasBits_NestedMessage::default_instance_->InitAsDefaultInstance();
  TestCamelCaseFieldNames::default_instance_->InitAsDefaultInstance();
  TestFieldOrderings::default_instance_->InitAsDefaultInstance();
  TestExtremeDefaultValues::default_instance_->InitAsDefaultInstance();
  OneString::default_instance_->InitAsDefaultInstance();
  OneBytes::default_instance_->InitAsDefaultInstance();
  TestPackedTypes::default_instance_->InitAsDefaultInstance();
  TestPackedExtensions::default_instance_->InitAsDefaultInstance();
  FooRequest::default_instance_->InitAsDefaultInstance();
  FooResponse::default_instance_->InitAsDefaultInstance();
  BarRequest::default_instance_->InitAsDefaultInstance();
  BarResponse::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2funittest_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_google_2fprotobuf_2funittest_2eproto {
  StaticDescriptorInitializer_google_2fprotobuf_2funittest_2eproto() {
    protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();
  }
} static_descriptor_initializer_google_2fprotobuf_2funittest_2eproto_;

const ::google::protobuf::EnumDescriptor* ForeignEnum_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ForeignEnum_descriptor_;
}
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_AssignDescriptorsOnce();
  return TestEnumWithDupValue_descriptor_;
}
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_AssignDescriptorsOnce();
  return TestSparseEnum_descriptor_;
}
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;
  }
}

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

const ::google::protobuf::EnumDescriptor* TestAllTypes_NestedEnum_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestAllTypes_NestedEnum_descriptor_;
}
bool TestAllTypes_NestedEnum_IsValid(int value) {
  switch(value) {
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
const TestAllTypes_NestedEnum TestAllTypes::FOO;
const TestAllTypes_NestedEnum TestAllTypes::BAR;
const TestAllTypes_NestedEnum TestAllTypes::BAZ;
const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MIN;
const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MAX;
#endif  // _MSC_VER
#ifndef _MSC_VER
const int TestAllTypes_NestedMessage::kBbFieldNumber;
#endif  // !_MSC_VER

TestAllTypes_NestedMessage::TestAllTypes_NestedMessage()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestAllTypes_NestedMessage::InitAsDefaultInstance() {}

TestAllTypes_NestedMessage::TestAllTypes_NestedMessage(const TestAllTypes_NestedMessage& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestAllTypes_NestedMessage::SharedCtor() {
  _cached_size_ = 0;
  bb_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestAllTypes_NestedMessage::~TestAllTypes_NestedMessage() {
  SharedDtor();
}

void TestAllTypes_NestedMessage::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestAllTypes_NestedMessage::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestAllTypes_NestedMessage_descriptor_;
}

const TestAllTypes_NestedMessage& TestAllTypes_NestedMessage::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestAllTypes_NestedMessage* TestAllTypes_NestedMessage::default_instance_ = NULL;

TestAllTypes_NestedMessage* TestAllTypes_NestedMessage::New() const {
  return new TestAllTypes_NestedMessage;
}

void TestAllTypes_NestedMessage::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    bb_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestAllTypes_NestedMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 bb = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &bb_));
        _set_bit(0);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestAllTypes_NestedMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestAllTypes_NestedMessage::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 bb = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(1, this->bb(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestAllTypes_NestedMessage::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 bb = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->bb(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestAllTypes_NestedMessage::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 bb = 1;
    if (has_bb()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->bb());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestAllTypes_NestedMessage::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestAllTypes_NestedMessage* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestAllTypes_NestedMessage*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestAllTypes_NestedMessage::MergeFrom(const TestAllTypes_NestedMessage& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_bb(from.bb());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestAllTypes_NestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestAllTypes_NestedMessage::CopyFrom(const TestAllTypes_NestedMessage& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestAllTypes_NestedMessage::Swap(TestAllTypes_NestedMessage* other) {
  if (other != this) {
    std::swap(bb_, other->bb_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestAllTypes_NestedMessage::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestAllTypes_NestedMessage::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestAllTypes_NestedMessage::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestAllTypes_NestedMessage_reflection_;
}

// -------------------------------------------------------------------

#ifndef _MSC_VER
const int TestAllTypes_OptionalGroup::kAFieldNumber;
#endif  // !_MSC_VER

TestAllTypes_OptionalGroup::TestAllTypes_OptionalGroup()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestAllTypes_OptionalGroup::InitAsDefaultInstance() {}

TestAllTypes_OptionalGroup::TestAllTypes_OptionalGroup(const TestAllTypes_OptionalGroup& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestAllTypes_OptionalGroup::SharedCtor() {
  _cached_size_ = 0;
  a_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestAllTypes_OptionalGroup::~TestAllTypes_OptionalGroup() {
  SharedDtor();
}

void TestAllTypes_OptionalGroup::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestAllTypes_OptionalGroup::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestAllTypes_OptionalGroup_descriptor_;
}

const TestAllTypes_OptionalGroup& TestAllTypes_OptionalGroup::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestAllTypes_OptionalGroup* TestAllTypes_OptionalGroup::default_instance_ = NULL;

TestAllTypes_OptionalGroup* TestAllTypes_OptionalGroup::New() const {
  return new TestAllTypes_OptionalGroup;
}

void TestAllTypes_OptionalGroup::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    a_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestAllTypes_OptionalGroup::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 a = 17;
      case 17: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &a_));
        _set_bit(0);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestAllTypes_OptionalGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestAllTypes_OptionalGroup::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 a = 17;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(17, this->a(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestAllTypes_OptionalGroup::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 a = 17;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(17, this->a(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestAllTypes_OptionalGroup::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 a = 17;
    if (has_a()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->a());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestAllTypes_OptionalGroup::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestAllTypes_OptionalGroup* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestAllTypes_OptionalGroup*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestAllTypes_OptionalGroup::MergeFrom(const TestAllTypes_OptionalGroup& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_a(from.a());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestAllTypes_OptionalGroup::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestAllTypes_OptionalGroup::CopyFrom(const TestAllTypes_OptionalGroup& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestAllTypes_OptionalGroup::Swap(TestAllTypes_OptionalGroup* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestAllTypes_OptionalGroup::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestAllTypes_OptionalGroup::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestAllTypes_OptionalGroup::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestAllTypes_OptionalGroup_reflection_;
}

// -------------------------------------------------------------------

#ifndef _MSC_VER
const int TestAllTypes_RepeatedGroup::kAFieldNumber;
#endif  // !_MSC_VER

TestAllTypes_RepeatedGroup::TestAllTypes_RepeatedGroup()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestAllTypes_RepeatedGroup::InitAsDefaultInstance() {}

TestAllTypes_RepeatedGroup::TestAllTypes_RepeatedGroup(const TestAllTypes_RepeatedGroup& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestAllTypes_RepeatedGroup::SharedCtor() {
  _cached_size_ = 0;
  a_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestAllTypes_RepeatedGroup::~TestAllTypes_RepeatedGroup() {
  SharedDtor();
}

void TestAllTypes_RepeatedGroup::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestAllTypes_RepeatedGroup::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestAllTypes_RepeatedGroup_descriptor_;
}

const TestAllTypes_RepeatedGroup& TestAllTypes_RepeatedGroup::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestAllTypes_RepeatedGroup* TestAllTypes_RepeatedGroup::default_instance_ = NULL;

TestAllTypes_RepeatedGroup* TestAllTypes_RepeatedGroup::New() const {
  return new TestAllTypes_RepeatedGroup;
}

void TestAllTypes_RepeatedGroup::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    a_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestAllTypes_RepeatedGroup::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 a = 47;
      case 47: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &a_));
        _set_bit(0);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestAllTypes_RepeatedGroup::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestAllTypes_RepeatedGroup::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 a = 47;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(47, this->a(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestAllTypes_RepeatedGroup::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 a = 47;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(47, this->a(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestAllTypes_RepeatedGroup::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 a = 47;
    if (has_a()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->a());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestAllTypes_RepeatedGroup::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestAllTypes_RepeatedGroup* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestAllTypes_RepeatedGroup*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestAllTypes_RepeatedGroup::MergeFrom(const TestAllTypes_RepeatedGroup& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_a(from.a());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestAllTypes_RepeatedGroup::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestAllTypes_RepeatedGroup::CopyFrom(const TestAllTypes_RepeatedGroup& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestAllTypes_RepeatedGroup::Swap(TestAllTypes_RepeatedGroup* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestAllTypes_RepeatedGroup::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestAllTypes_RepeatedGroup::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestAllTypes_RepeatedGroup::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestAllTypes_RepeatedGroup_reflection_;
}

// -------------------------------------------------------------------

const ::std::string TestAllTypes::_default_optional_string_;
const ::std::string TestAllTypes::_default_optional_bytes_;
const ::std::string TestAllTypes::_default_optional_string_piece_;
const ::std::string TestAllTypes::_default_optional_cord_;
const ::std::string TestAllTypes::_default_default_string_("hello");
const ::std::string TestAllTypes::_default_default_bytes_("world");
const ::std::string TestAllTypes::_default_default_string_piece_("abc");
const ::std::string TestAllTypes::_default_default_cord_("123");
#ifndef _MSC_VER
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::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::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;
#endif  // !_MSC_VER

TestAllTypes::TestAllTypes()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestAllTypes::InitAsDefaultInstance() {  optionalgroup_ = const_cast< ::protobuf_unittest::TestAllTypes_OptionalGroup*>(&::protobuf_unittest::TestAllTypes_OptionalGroup::default_instance());
  optional_nested_message_ = const_cast< ::protobuf_unittest::TestAllTypes_NestedMessage*>(&::protobuf_unittest::TestAllTypes_NestedMessage::default_instance());
  optional_foreign_message_ = const_cast< ::protobuf_unittest::ForeignMessage*>(&::protobuf_unittest::ForeignMessage::default_instance());
  optional_import_message_ = const_cast< ::protobuf_unittest_import::ImportMessage*>(&::protobuf_unittest_import::ImportMessage::default_instance());
}

TestAllTypes::TestAllTypes(const TestAllTypes& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestAllTypes::SharedCtor() {
  _cached_size_ = 0;
  optional_int32_ = 0;
  optional_int64_ = GOOGLE_LONGLONG(0);
  optional_uint32_ = 0u;
  optional_uint64_ = GOOGLE_ULONGLONG(0);
  optional_sint32_ = 0;
  optional_sint64_ = GOOGLE_LONGLONG(0);
  optional_fixed32_ = 0u;
  optional_fixed64_ = GOOGLE_ULONGLONG(0);
  optional_sfixed32_ = 0;
  optional_sfixed64_ = GOOGLE_LONGLONG(0);
  optional_float_ = 0;
  optional_double_ = 0;
  optional_bool_ = false;
  optional_string_ = const_cast< ::std::string*>(&_default_optional_string_);
  optional_bytes_ = const_cast< ::std::string*>(&_default_optional_bytes_);
  optionalgroup_ = NULL;
  optional_nested_message_ = NULL;
  optional_foreign_message_ = NULL;
  optional_import_message_ = NULL;
  optional_nested_enum_ = 1;
  optional_foreign_enum_ = 4;
  optional_import_enum_ = 7;
  optional_string_piece_ = const_cast< ::std::string*>(&_default_optional_string_piece_);
  optional_cord_ = const_cast< ::std::string*>(&_default_optional_cord_);
  default_int32_ = 41;
  default_int64_ = GOOGLE_LONGLONG(42);
  default_uint32_ = 43u;
  default_uint64_ = GOOGLE_ULONGLONG(44);
  default_sint32_ = -45;
  default_sint64_ = GOOGLE_LONGLONG(46);
  default_fixed32_ = 47u;
  default_fixed64_ = GOOGLE_ULONGLONG(48);
  default_sfixed32_ = 49;
  default_sfixed64_ = GOOGLE_LONGLONG(-50);
  default_float_ = 51.5;
  default_double_ = 52000;
  default_bool_ = true;
  default_string_ = const_cast< ::std::string*>(&_default_default_string_);
  default_bytes_ = const_cast< ::std::string*>(&_default_default_bytes_);
  default_nested_enum_ = 2;
  default_foreign_enum_ = 5;
  default_import_enum_ = 8;
  default_string_piece_ = const_cast< ::std::string*>(&_default_default_string_piece_);
  default_cord_ = const_cast< ::std::string*>(&_default_default_cord_);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestAllTypes::~TestAllTypes() {
  SharedDtor();
}

void TestAllTypes::SharedDtor() {
  if (optional_string_ != &_default_optional_string_) {
    delete optional_string_;
  }
  if (optional_bytes_ != &_default_optional_bytes_) {
    delete optional_bytes_;
  }
  if (optional_string_piece_ != &_default_optional_string_piece_) {
    delete optional_string_piece_;
  }
  if (optional_cord_ != &_default_optional_cord_) {
    delete optional_cord_;
  }
  if (default_string_ != &_default_default_string_) {
    delete default_string_;
  }
  if (default_bytes_ != &_default_default_bytes_) {
    delete default_bytes_;
  }
  if (default_string_piece_ != &_default_default_string_piece_) {
    delete default_string_piece_;
  }
  if (default_cord_ != &_default_default_cord_) {
    delete default_cord_;
  }
  if (this != default_instance_) {
    delete optionalgroup_;
    delete optional_nested_message_;
    delete optional_foreign_message_;
    delete optional_import_message_;
  }
}

const ::google::protobuf::Descriptor* TestAllTypes::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestAllTypes_descriptor_;
}

const TestAllTypes& TestAllTypes::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestAllTypes* TestAllTypes::default_instance_ = NULL;

TestAllTypes* TestAllTypes::New() const {
  return new TestAllTypes;
}

void TestAllTypes::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    optional_int32_ = 0;
    optional_int64_ = GOOGLE_LONGLONG(0);
    optional_uint32_ = 0u;
    optional_uint64_ = GOOGLE_ULONGLONG(0);
    optional_sint32_ = 0;
    optional_sint64_ = GOOGLE_LONGLONG(0);
    optional_fixed32_ = 0u;
    optional_fixed64_ = GOOGLE_ULONGLONG(0);
  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    optional_sfixed32_ = 0;
    optional_sfixed64_ = GOOGLE_LONGLONG(0);
    optional_float_ = 0;
    optional_double_ = 0;
    optional_bool_ = false;
    if (_has_bit(13)) {
      if (optional_string_ != &_default_optional_string_) {
        optional_string_->clear();
      }
    }
    if (_has_bit(14)) {
      if (optional_bytes_ != &_default_optional_bytes_) {
        optional_bytes_->clear();
      }
    }
    if (_has_bit(15)) {
      if (optionalgroup_ != NULL) optionalgroup_->::protobuf_unittest::TestAllTypes_OptionalGroup::Clear();
    }
  }
  if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    if (_has_bit(16)) {
      if (optional_nested_message_ != NULL) optional_nested_message_->::protobuf_unittest::TestAllTypes_NestedMessage::Clear();
    }
    if (_has_bit(17)) {
      if (optional_foreign_message_ != NULL) optional_foreign_message_->::protobuf_unittest::ForeignMessage::Clear();
    }
    if (_has_bit(18)) {
      if (optional_import_message_ != NULL) optional_import_message_->::protobuf_unittest_import::ImportMessage::Clear();
    }
    optional_nested_enum_ = 1;
    optional_foreign_enum_ = 4;
    optional_import_enum_ = 7;
    if (_has_bit(22)) {
      if (optional_string_piece_ != &_default_optional_string_piece_) {
        optional_string_piece_->clear();
      }
    }
    if (_has_bit(23)) {
      if (optional_cord_ != &_default_optional_cord_) {
        optional_cord_->clear();
      }
    }
  }
  if (_has_bits_[48 / 32] & (0xffu << (48 % 32))) {
    default_int32_ = 41;
    default_int64_ = GOOGLE_LONGLONG(42);
    default_uint32_ = 43u;
    default_uint64_ = GOOGLE_ULONGLONG(44);
    default_sint32_ = -45;
    default_sint64_ = GOOGLE_LONGLONG(46);
    default_fixed32_ = 47u;
    default_fixed64_ = GOOGLE_ULONGLONG(48);
  }
  if (_has_bits_[56 / 32] & (0xffu << (56 % 32))) {
    default_sfixed32_ = 49;
    default_sfixed64_ = GOOGLE_LONGLONG(-50);
    default_float_ = 51.5;
    default_double_ = 52000;
    default_bool_ = true;
    if (_has_bit(61)) {
      if (default_string_ != &_default_default_string_) {
        default_string_->assign(_default_default_string_);
      }
    }
    if (_has_bit(62)) {
      if (default_bytes_ != &_default_default_bytes_) {
        default_bytes_->assign(_default_default_bytes_);
      }
    }
    default_nested_enum_ = 2;
  }
  if (_has_bits_[64 / 32] & (0xffu << (64 % 32))) {
    default_foreign_enum_ = 5;
    default_import_enum_ = 8;
    if (_has_bit(66)) {
      if (default_string_piece_ != &_default_default_string_piece_) {
        default_string_piece_->assign(_default_default_string_piece_);
      }
    }
    if (_has_bit(67)) {
      if (default_cord_ != &_default_default_cord_) {
        default_cord_->assign(_default_default_cord_);
      }
    }
  }
  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();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestAllTypes::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 optional_int32 = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &optional_int32_));
        _set_bit(0);
        if (input->ExpectTag(16)) goto parse_optional_int64;
        break;
      }

      // optional int64 optional_int64 = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_optional_int64:
        DO_(::google::protobuf::internal::WireFormat::ReadInt64(
              input, &optional_int64_));
        _set_bit(1);
        if (input->ExpectTag(24)) goto parse_optional_uint32;
        break;
      }

      // optional uint32 optional_uint32 = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_optional_uint32:
        DO_(::google::protobuf::internal::WireFormat::ReadUInt32(
              input, &optional_uint32_));
        _set_bit(2);
        if (input->ExpectTag(32)) goto parse_optional_uint64;
        break;
      }

      // optional uint64 optional_uint64 = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_optional_uint64:
        DO_(::google::protobuf::internal::WireFormat::ReadUInt64(
              input, &optional_uint64_));
        _set_bit(3);
        if (input->ExpectTag(40)) goto parse_optional_sint32;
        break;
      }

      // optional sint32 optional_sint32 = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_optional_sint32:
        DO_(::google::protobuf::internal::WireFormat::ReadSInt32(
              input, &optional_sint32_));
        _set_bit(4);
        if (input->ExpectTag(48)) goto parse_optional_sint64;
        break;
      }

      // optional sint64 optional_sint64 = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_optional_sint64:
        DO_(::google::protobuf::internal::WireFormat::ReadSInt64(
              input, &optional_sint64_));
        _set_bit(5);
        if (input->ExpectTag(61)) goto parse_optional_fixed32;
        break;
      }

      // optional fixed32 optional_fixed32 = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED32) {
          goto handle_uninterpreted;
        }
       parse_optional_fixed32:
        DO_(::google::protobuf::internal::WireFormat::ReadFixed32(
              input, &optional_fixed32_));
        _set_bit(6);
        if (input->ExpectTag(65)) goto parse_optional_fixed64;
        break;
      }

      // optional fixed64 optional_fixed64 = 8;
      case 8: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED64) {
          goto handle_uninterpreted;
        }
       parse_optional_fixed64:
        DO_(::google::protobuf::internal::WireFormat::ReadFixed64(
              input, &optional_fixed64_));
        _set_bit(7);
        if (input->ExpectTag(77)) goto parse_optional_sfixed32;
        break;
      }

      // optional sfixed32 optional_sfixed32 = 9;
      case 9: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED32) {
          goto handle_uninterpreted;
        }
       parse_optional_sfixed32:
        DO_(::google::protobuf::internal::WireFormat::ReadSFixed32(
              input, &optional_sfixed32_));
        _set_bit(8);
        if (input->ExpectTag(81)) goto parse_optional_sfixed64;
        break;
      }

      // optional sfixed64 optional_sfixed64 = 10;
      case 10: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED64) {
          goto handle_uninterpreted;
        }
       parse_optional_sfixed64:
        DO_(::google::protobuf::internal::WireFormat::ReadSFixed64(
              input, &optional_sfixed64_));
        _set_bit(9);
        if (input->ExpectTag(93)) goto parse_optional_float;
        break;
      }

      // optional float optional_float = 11;
      case 11: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED32) {
          goto handle_uninterpreted;
        }
       parse_optional_float:
        DO_(::google::protobuf::internal::WireFormat::ReadFloat(
              input, &optional_float_));
        _set_bit(10);
        if (input->ExpectTag(97)) goto parse_optional_double;
        break;
      }

      // optional double optional_double = 12;
      case 12: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED64) {
          goto handle_uninterpreted;
        }
       parse_optional_double:
        DO_(::google::protobuf::internal::WireFormat::ReadDouble(
              input, &optional_double_));
        _set_bit(11);
        if (input->ExpectTag(104)) goto parse_optional_bool;
        break;
      }

      // optional bool optional_bool = 13;
      case 13: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_optional_bool:
        DO_(::google::protobuf::internal::WireFormat::ReadBool(
              input, &optional_bool_));
        _set_bit(12);
        if (input->ExpectTag(114)) goto parse_optional_string;
        break;
      }

      // optional string optional_string = 14;
      case 14: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_optional_string:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_optional_string()));
        if (input->ExpectTag(122)) goto parse_optional_bytes;
        break;
      }

      // optional bytes optional_bytes = 15;
      case 15: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_optional_bytes:
        DO_(::google::protobuf::internal::WireFormat::ReadBytes(input, mutable_optional_bytes()));
        if (input->ExpectTag(131)) goto parse_optionalgroup;
        break;
      }

      // optional group OptionalGroup = 16 {
      case 16: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_START_GROUP) {
          goto handle_uninterpreted;
        }
       parse_optionalgroup:
        DO_(::google::protobuf::internal::WireFormat::ReadGroupNoVirtual(16, input, mutable_optionalgroup()));
        if (input->ExpectTag(146)) goto parse_optional_nested_message;
        break;
      }

      // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
      case 18: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_optional_nested_message:
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, mutable_optional_nested_message()));
        if (input->ExpectTag(154)) goto parse_optional_foreign_message;
        break;
      }

      // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
      case 19: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_optional_foreign_message:
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, mutable_optional_foreign_message()));
        if (input->ExpectTag(162)) goto parse_optional_import_message;
        break;
      }

      // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
      case 20: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_optional_import_message:
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, mutable_optional_import_message()));
        if (input->ExpectTag(168)) goto parse_optional_nested_enum;
        break;
      }

      // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
      case 21: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_optional_nested_enum:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(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, value);
        }
        if (input->ExpectTag(176)) goto parse_optional_foreign_enum;
        break;
      }

      // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
      case 22: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_optional_foreign_enum:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(input, &value));
        if (protobuf_unittest::ForeignEnum_IsValid(value)) {
          set_optional_foreign_enum(static_cast< protobuf_unittest::ForeignEnum >(value));
        } else {
          mutable_unknown_fields()->AddVarint(22, value);
        }
        if (input->ExpectTag(184)) goto parse_optional_import_enum;
        break;
      }

      // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
      case 23: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_optional_import_enum:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(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, value);
        }
        if (input->ExpectTag(194)) goto parse_optional_string_piece;
        break;
      }

      // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
      case 24: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_optional_string_piece:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_optional_string_piece()));
        if (input->ExpectTag(202)) goto parse_optional_cord;
        break;
      }

      // optional string optional_cord = 25 [ctype = CORD];
      case 25: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_optional_cord:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_optional_cord()));
        if (input->ExpectTag(248)) goto parse_repeated_int32;
        break;
      }

      // repeated int32 repeated_int32 = 31;
      case 31: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_repeated_int32:
        ::google::protobuf::int32 value;
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(input, &value));
        add_repeated_int32(value);
        if (input->ExpectTag(248)) goto parse_repeated_int32;
        if (input->ExpectTag(256)) goto parse_repeated_int64;
        break;
      }

      // repeated int64 repeated_int64 = 32;
      case 32: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_repeated_int64:
        ::google::protobuf::int64 value;
        DO_(::google::protobuf::internal::WireFormat::ReadInt64(input, &value));
        add_repeated_int64(value);
        if (input->ExpectTag(256)) goto parse_repeated_int64;
        if (input->ExpectTag(264)) goto parse_repeated_uint32;
        break;
      }

      // repeated uint32 repeated_uint32 = 33;
      case 33: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_repeated_uint32:
        ::google::protobuf::uint32 value;
        DO_(::google::protobuf::internal::WireFormat::ReadUInt32(input, &value));
        add_repeated_uint32(value);
        if (input->ExpectTag(264)) goto parse_repeated_uint32;
        if (input->ExpectTag(272)) goto parse_repeated_uint64;
        break;
      }

      // repeated uint64 repeated_uint64 = 34;
      case 34: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_repeated_uint64:
        ::google::protobuf::uint64 value;
        DO_(::google::protobuf::internal::WireFormat::ReadUInt64(input, &value));
        add_repeated_uint64(value);
        if (input->ExpectTag(272)) goto parse_repeated_uint64;
        if (input->ExpectTag(280)) goto parse_repeated_sint32;
        break;
      }

      // repeated sint32 repeated_sint32 = 35;
      case 35: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_repeated_sint32:
        ::google::protobuf::int32 value;
        DO_(::google::protobuf::internal::WireFormat::ReadSInt32(input, &value));
        add_repeated_sint32(value);
        if (input->ExpectTag(280)) goto parse_repeated_sint32;
        if (input->ExpectTag(288)) goto parse_repeated_sint64;
        break;
      }

      // repeated sint64 repeated_sint64 = 36;
      case 36: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_repeated_sint64:
        ::google::protobuf::int64 value;
        DO_(::google::protobuf::internal::WireFormat::ReadSInt64(input, &value));
        add_repeated_sint64(value);
        if (input->ExpectTag(288)) goto parse_repeated_sint64;
        if (input->ExpectTag(301)) goto parse_repeated_fixed32;
        break;
      }

      // repeated fixed32 repeated_fixed32 = 37;
      case 37: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED32) {
          goto handle_uninterpreted;
        }
       parse_repeated_fixed32:
        ::google::protobuf::uint32 value;
        DO_(::google::protobuf::internal::WireFormat::ReadFixed32(input, &value));
        add_repeated_fixed32(value);
        if (input->ExpectTag(301)) goto parse_repeated_fixed32;
        if (input->ExpectTag(305)) goto parse_repeated_fixed64;
        break;
      }

      // repeated fixed64 repeated_fixed64 = 38;
      case 38: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED64) {
          goto handle_uninterpreted;
        }
       parse_repeated_fixed64:
        ::google::protobuf::uint64 value;
        DO_(::google::protobuf::internal::WireFormat::ReadFixed64(input, &value));
        add_repeated_fixed64(value);
        if (input->ExpectTag(305)) goto parse_repeated_fixed64;
        if (input->ExpectTag(317)) goto parse_repeated_sfixed32;
        break;
      }

      // repeated sfixed32 repeated_sfixed32 = 39;
      case 39: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED32) {
          goto handle_uninterpreted;
        }
       parse_repeated_sfixed32:
        ::google::protobuf::int32 value;
        DO_(::google::protobuf::internal::WireFormat::ReadSFixed32(input, &value));
        add_repeated_sfixed32(value);
        if (input->ExpectTag(317)) goto parse_repeated_sfixed32;
        if (input->ExpectTag(321)) goto parse_repeated_sfixed64;
        break;
      }

      // repeated sfixed64 repeated_sfixed64 = 40;
      case 40: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED64) {
          goto handle_uninterpreted;
        }
       parse_repeated_sfixed64:
        ::google::protobuf::int64 value;
        DO_(::google::protobuf::internal::WireFormat::ReadSFixed64(input, &value));
        add_repeated_sfixed64(value);
        if (input->ExpectTag(321)) goto parse_repeated_sfixed64;
        if (input->ExpectTag(333)) goto parse_repeated_float;
        break;
      }

      // repeated float repeated_float = 41;
      case 41: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED32) {
          goto handle_uninterpreted;
        }
       parse_repeated_float:
        float value;
        DO_(::google::protobuf::internal::WireFormat::ReadFloat(input, &value));
        add_repeated_float(value);
        if (input->ExpectTag(333)) goto parse_repeated_float;
        if (input->ExpectTag(337)) goto parse_repeated_double;
        break;
      }

      // repeated double repeated_double = 42;
      case 42: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED64) {
          goto handle_uninterpreted;
        }
       parse_repeated_double:
        double value;
        DO_(::google::protobuf::internal::WireFormat::ReadDouble(input, &value));
        add_repeated_double(value);
        if (input->ExpectTag(337)) goto parse_repeated_double;
        if (input->ExpectTag(344)) goto parse_repeated_bool;
        break;
      }

      // repeated bool repeated_bool = 43;
      case 43: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_repeated_bool:
        bool value;
        DO_(::google::protobuf::internal::WireFormat::ReadBool(input, &value));
        add_repeated_bool(value);
        if (input->ExpectTag(344)) goto parse_repeated_bool;
        if (input->ExpectTag(354)) goto parse_repeated_string;
        break;
      }

      // repeated string repeated_string = 44;
      case 44: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_repeated_string:
        DO_(::google::protobuf::internal::WireFormat::ReadString(
             input, add_repeated_string()));
        if (input->ExpectTag(354)) goto parse_repeated_string;
        if (input->ExpectTag(362)) goto parse_repeated_bytes;
        break;
      }

      // repeated bytes repeated_bytes = 45;
      case 45: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_repeated_bytes:
        DO_(::google::protobuf::internal::WireFormat::ReadBytes(
             input, add_repeated_bytes()));
        if (input->ExpectTag(362)) goto parse_repeated_bytes;
        if (input->ExpectTag(371)) goto parse_repeatedgroup;
        break;
      }

      // repeated group RepeatedGroup = 46 {
      case 46: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_START_GROUP) {
          goto handle_uninterpreted;
        }
       parse_repeatedgroup:
        DO_(::google::protobuf::internal::WireFormat::ReadGroupNoVirtual(46, input, add_repeatedgroup()));
        if (input->ExpectTag(371)) goto parse_repeatedgroup;
        if (input->ExpectTag(386)) goto parse_repeated_nested_message;
        break;
      }

      // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
      case 48: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_repeated_nested_message:
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, add_repeated_nested_message()));
        if (input->ExpectTag(386)) goto parse_repeated_nested_message;
        if (input->ExpectTag(394)) goto parse_repeated_foreign_message;
        break;
      }

      // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
      case 49: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_repeated_foreign_message:
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, add_repeated_foreign_message()));
        if (input->ExpectTag(394)) goto parse_repeated_foreign_message;
        if (input->ExpectTag(402)) goto parse_repeated_import_message;
        break;
      }

      // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
      case 50: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_repeated_import_message:
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, add_repeated_import_message()));
        if (input->ExpectTag(402)) goto parse_repeated_import_message;
        if (input->ExpectTag(408)) goto parse_repeated_nested_enum;
        break;
      }

      // repeated .protobuf_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
      case 51: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_repeated_nested_enum:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(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, value);
        }
        if (input->ExpectTag(408)) goto parse_repeated_nested_enum;
        if (input->ExpectTag(416)) goto parse_repeated_foreign_enum;
        break;
      }

      // repeated .protobuf_unittest.ForeignEnum repeated_foreign_enum = 52;
      case 52: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_repeated_foreign_enum:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(input, &value));
        if (protobuf_unittest::ForeignEnum_IsValid(value)) {
          add_repeated_foreign_enum(static_cast< protobuf_unittest::ForeignEnum >(value));
        } else {
          mutable_unknown_fields()->AddVarint(52, value);
        }
        if (input->ExpectTag(416)) goto parse_repeated_foreign_enum;
        if (input->ExpectTag(424)) goto parse_repeated_import_enum;
        break;
      }

      // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
      case 53: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_repeated_import_enum:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(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, value);
        }
        if (input->ExpectTag(424)) goto parse_repeated_import_enum;
        if (input->ExpectTag(434)) goto parse_repeated_string_piece;
        break;
      }

      // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
      case 54: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_repeated_string_piece:
        DO_(::google::protobuf::internal::WireFormat::ReadString(
             input, add_repeated_string_piece()));
        if (input->ExpectTag(434)) goto parse_repeated_string_piece;
        if (input->ExpectTag(442)) goto parse_repeated_cord;
        break;
      }

      // repeated string repeated_cord = 55 [ctype = CORD];
      case 55: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_repeated_cord:
        DO_(::google::protobuf::internal::WireFormat::ReadString(
             input, add_repeated_cord()));
        if (input->ExpectTag(442)) goto parse_repeated_cord;
        if (input->ExpectTag(488)) goto parse_default_int32;
        break;
      }

      // optional int32 default_int32 = 61 [default = 41];
      case 61: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_default_int32:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &default_int32_));
        _set_bit(48);
        if (input->ExpectTag(496)) goto parse_default_int64;
        break;
      }

      // optional int64 default_int64 = 62 [default = 42];
      case 62: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_default_int64:
        DO_(::google::protobuf::internal::WireFormat::ReadInt64(
              input, &default_int64_));
        _set_bit(49);
        if (input->ExpectTag(504)) goto parse_default_uint32;
        break;
      }

      // optional uint32 default_uint32 = 63 [default = 43];
      case 63: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_default_uint32:
        DO_(::google::protobuf::internal::WireFormat::ReadUInt32(
              input, &default_uint32_));
        _set_bit(50);
        if (input->ExpectTag(512)) goto parse_default_uint64;
        break;
      }

      // optional uint64 default_uint64 = 64 [default = 44];
      case 64: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_default_uint64:
        DO_(::google::protobuf::internal::WireFormat::ReadUInt64(
              input, &default_uint64_));
        _set_bit(51);
        if (input->ExpectTag(520)) goto parse_default_sint32;
        break;
      }

      // optional sint32 default_sint32 = 65 [default = -45];
      case 65: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_default_sint32:
        DO_(::google::protobuf::internal::WireFormat::ReadSInt32(
              input, &default_sint32_));
        _set_bit(52);
        if (input->ExpectTag(528)) goto parse_default_sint64;
        break;
      }

      // optional sint64 default_sint64 = 66 [default = 46];
      case 66: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_default_sint64:
        DO_(::google::protobuf::internal::WireFormat::ReadSInt64(
              input, &default_sint64_));
        _set_bit(53);
        if (input->ExpectTag(541)) goto parse_default_fixed32;
        break;
      }

      // optional fixed32 default_fixed32 = 67 [default = 47];
      case 67: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED32) {
          goto handle_uninterpreted;
        }
       parse_default_fixed32:
        DO_(::google::protobuf::internal::WireFormat::ReadFixed32(
              input, &default_fixed32_));
        _set_bit(54);
        if (input->ExpectTag(545)) goto parse_default_fixed64;
        break;
      }

      // optional fixed64 default_fixed64 = 68 [default = 48];
      case 68: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED64) {
          goto handle_uninterpreted;
        }
       parse_default_fixed64:
        DO_(::google::protobuf::internal::WireFormat::ReadFixed64(
              input, &default_fixed64_));
        _set_bit(55);
        if (input->ExpectTag(557)) goto parse_default_sfixed32;
        break;
      }

      // optional sfixed32 default_sfixed32 = 69 [default = 49];
      case 69: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED32) {
          goto handle_uninterpreted;
        }
       parse_default_sfixed32:
        DO_(::google::protobuf::internal::WireFormat::ReadSFixed32(
              input, &default_sfixed32_));
        _set_bit(56);
        if (input->ExpectTag(561)) goto parse_default_sfixed64;
        break;
      }

      // optional sfixed64 default_sfixed64 = 70 [default = -50];
      case 70: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED64) {
          goto handle_uninterpreted;
        }
       parse_default_sfixed64:
        DO_(::google::protobuf::internal::WireFormat::ReadSFixed64(
              input, &default_sfixed64_));
        _set_bit(57);
        if (input->ExpectTag(573)) goto parse_default_float;
        break;
      }

      // optional float default_float = 71 [default = 51.5];
      case 71: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED32) {
          goto handle_uninterpreted;
        }
       parse_default_float:
        DO_(::google::protobuf::internal::WireFormat::ReadFloat(
              input, &default_float_));
        _set_bit(58);
        if (input->ExpectTag(577)) goto parse_default_double;
        break;
      }

      // optional double default_double = 72 [default = 52000];
      case 72: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED64) {
          goto handle_uninterpreted;
        }
       parse_default_double:
        DO_(::google::protobuf::internal::WireFormat::ReadDouble(
              input, &default_double_));
        _set_bit(59);
        if (input->ExpectTag(584)) goto parse_default_bool;
        break;
      }

      // optional bool default_bool = 73 [default = true];
      case 73: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_default_bool:
        DO_(::google::protobuf::internal::WireFormat::ReadBool(
              input, &default_bool_));
        _set_bit(60);
        if (input->ExpectTag(594)) goto parse_default_string;
        break;
      }

      // optional string default_string = 74 [default = "hello"];
      case 74: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_default_string:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_default_string()));
        if (input->ExpectTag(602)) goto parse_default_bytes;
        break;
      }

      // optional bytes default_bytes = 75 [default = "world"];
      case 75: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_default_bytes:
        DO_(::google::protobuf::internal::WireFormat::ReadBytes(input, mutable_default_bytes()));
        if (input->ExpectTag(648)) goto parse_default_nested_enum;
        break;
      }

      // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
      case 81: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_default_nested_enum:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(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, value);
        }
        if (input->ExpectTag(656)) goto parse_default_foreign_enum;
        break;
      }

      // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
      case 82: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_default_foreign_enum:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(input, &value));
        if (protobuf_unittest::ForeignEnum_IsValid(value)) {
          set_default_foreign_enum(static_cast< protobuf_unittest::ForeignEnum >(value));
        } else {
          mutable_unknown_fields()->AddVarint(82, value);
        }
        if (input->ExpectTag(664)) goto parse_default_import_enum;
        break;
      }

      // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
      case 83: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_default_import_enum:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(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, value);
        }
        if (input->ExpectTag(674)) goto parse_default_string_piece;
        break;
      }

      // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
      case 84: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_default_string_piece:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_default_string_piece()));
        if (input->ExpectTag(682)) goto parse_default_cord;
        break;
      }

      // optional string default_cord = 85 [default = "123", ctype = CORD];
      case 85: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_default_cord:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_default_cord()));
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestAllTypes::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestAllTypes::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 optional_int32 = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(1, this->optional_int32(), output);
  }

  // optional int64 optional_int64 = 2;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::WriteInt64(2, this->optional_int64(), output);
  }

  // optional uint32 optional_uint32 = 3;
  if (_has_bit(2)) {
    ::google::protobuf::internal::WireFormat::WriteUInt32(3, this->optional_uint32(), output);
  }

  // optional uint64 optional_uint64 = 4;
  if (_has_bit(3)) {
    ::google::protobuf::internal::WireFormat::WriteUInt64(4, this->optional_uint64(), output);
  }

  // optional sint32 optional_sint32 = 5;
  if (_has_bit(4)) {
    ::google::protobuf::internal::WireFormat::WriteSInt32(5, this->optional_sint32(), output);
  }

  // optional sint64 optional_sint64 = 6;
  if (_has_bit(5)) {
    ::google::protobuf::internal::WireFormat::WriteSInt64(6, this->optional_sint64(), output);
  }

  // optional fixed32 optional_fixed32 = 7;
  if (_has_bit(6)) {
    ::google::protobuf::internal::WireFormat::WriteFixed32(7, this->optional_fixed32(), output);
  }

  // optional fixed64 optional_fixed64 = 8;
  if (_has_bit(7)) {
    ::google::protobuf::internal::WireFormat::WriteFixed64(8, this->optional_fixed64(), output);
  }

  // optional sfixed32 optional_sfixed32 = 9;
  if (_has_bit(8)) {
    ::google::protobuf::internal::WireFormat::WriteSFixed32(9, this->optional_sfixed32(), output);
  }

  // optional sfixed64 optional_sfixed64 = 10;
  if (_has_bit(9)) {
    ::google::protobuf::internal::WireFormat::WriteSFixed64(10, this->optional_sfixed64(), output);
  }

  // optional float optional_float = 11;
  if (_has_bit(10)) {
    ::google::protobuf::internal::WireFormat::WriteFloat(11, this->optional_float(), output);
  }

  // optional double optional_double = 12;
  if (_has_bit(11)) {
    ::google::protobuf::internal::WireFormat::WriteDouble(12, this->optional_double(), output);
  }

  // optional bool optional_bool = 13;
  if (_has_bit(12)) {
    ::google::protobuf::internal::WireFormat::WriteBool(13, this->optional_bool(), output);
  }

  // optional string optional_string = 14;
  if (_has_bit(13)) {
    ::google::protobuf::internal::WireFormat::WriteString(14, this->optional_string(), output);
  }

  // optional bytes optional_bytes = 15;
  if (_has_bit(14)) {
    ::google::protobuf::internal::WireFormat::WriteBytes(15, this->optional_bytes(), output);
  }

  // optional group OptionalGroup = 16 {
  if (_has_bit(15)) {
    ::google::protobuf::internal::WireFormat::WriteGroupNoVirtual(16, this->optionalgroup(), output);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
  if (_has_bit(16)) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(18, this->optional_nested_message(), output);
  }

  // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
  if (_has_bit(17)) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(19, this->optional_foreign_message(), output);
  }

  // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
  if (_has_bit(18)) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(20, this->optional_import_message(), output);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
  if (_has_bit(19)) {
    ::google::protobuf::internal::WireFormat::WriteEnum(21, this->optional_nested_enum(), output);
  }

  // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  if (_has_bit(20)) {
    ::google::protobuf::internal::WireFormat::WriteEnum(22, this->optional_foreign_enum(), output);
  }

  // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
  if (_has_bit(21)) {
    ::google::protobuf::internal::WireFormat::WriteEnum(23, this->optional_import_enum(), output);
  }

  // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  if (_has_bit(22)) {
    ::google::protobuf::internal::WireFormat::WriteString(24, this->optional_string_piece(), output);
  }

  // optional string optional_cord = 25 [ctype = CORD];
  if (_has_bit(23)) {
    ::google::protobuf::internal::WireFormat::WriteString(25, this->optional_cord(), output);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

  // repeated string repeated_string = 44;
  for (int i = 0; i < this->repeated_string_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteString(44, this->repeated_string(i), output);
  }

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

  // repeated group RepeatedGroup = 46 {
  for (int i = 0; i < this->repeatedgroup_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteGroupNoVirtual(46, this->repeatedgroup(i), output);
  }

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

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

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

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

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

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

  // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  for (int i = 0; i < this->repeated_string_piece_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteString(54, this->repeated_string_piece(i), output);
  }

  // repeated string repeated_cord = 55 [ctype = CORD];
  for (int i = 0; i < this->repeated_cord_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteString(55, this->repeated_cord(i), output);
  }

  // optional int32 default_int32 = 61 [default = 41];
  if (_has_bit(48)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(61, this->default_int32(), output);
  }

  // optional int64 default_int64 = 62 [default = 42];
  if (_has_bit(49)) {
    ::google::protobuf::internal::WireFormat::WriteInt64(62, this->default_int64(), output);
  }

  // optional uint32 default_uint32 = 63 [default = 43];
  if (_has_bit(50)) {
    ::google::protobuf::internal::WireFormat::WriteUInt32(63, this->default_uint32(), output);
  }

  // optional uint64 default_uint64 = 64 [default = 44];
  if (_has_bit(51)) {
    ::google::protobuf::internal::WireFormat::WriteUInt64(64, this->default_uint64(), output);
  }

  // optional sint32 default_sint32 = 65 [default = -45];
  if (_has_bit(52)) {
    ::google::protobuf::internal::WireFormat::WriteSInt32(65, this->default_sint32(), output);
  }

  // optional sint64 default_sint64 = 66 [default = 46];
  if (_has_bit(53)) {
    ::google::protobuf::internal::WireFormat::WriteSInt64(66, this->default_sint64(), output);
  }

  // optional fixed32 default_fixed32 = 67 [default = 47];
  if (_has_bit(54)) {
    ::google::protobuf::internal::WireFormat::WriteFixed32(67, this->default_fixed32(), output);
  }

  // optional fixed64 default_fixed64 = 68 [default = 48];
  if (_has_bit(55)) {
    ::google::protobuf::internal::WireFormat::WriteFixed64(68, this->default_fixed64(), output);
  }

  // optional sfixed32 default_sfixed32 = 69 [default = 49];
  if (_has_bit(56)) {
    ::google::protobuf::internal::WireFormat::WriteSFixed32(69, this->default_sfixed32(), output);
  }

  // optional sfixed64 default_sfixed64 = 70 [default = -50];
  if (_has_bit(57)) {
    ::google::protobuf::internal::WireFormat::WriteSFixed64(70, this->default_sfixed64(), output);
  }

  // optional float default_float = 71 [default = 51.5];
  if (_has_bit(58)) {
    ::google::protobuf::internal::WireFormat::WriteFloat(71, this->default_float(), output);
  }

  // optional double default_double = 72 [default = 52000];
  if (_has_bit(59)) {
    ::google::protobuf::internal::WireFormat::WriteDouble(72, this->default_double(), output);
  }

  // optional bool default_bool = 73 [default = true];
  if (_has_bit(60)) {
    ::google::protobuf::internal::WireFormat::WriteBool(73, this->default_bool(), output);
  }

  // optional string default_string = 74 [default = "hello"];
  if (_has_bit(61)) {
    ::google::protobuf::internal::WireFormat::WriteString(74, this->default_string(), output);
  }

  // optional bytes default_bytes = 75 [default = "world"];
  if (_has_bit(62)) {
    ::google::protobuf::internal::WireFormat::WriteBytes(75, this->default_bytes(), output);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
  if (_has_bit(63)) {
    ::google::protobuf::internal::WireFormat::WriteEnum(81, this->default_nested_enum(), output);
  }

  // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
  if (_has_bit(64)) {
    ::google::protobuf::internal::WireFormat::WriteEnum(82, this->default_foreign_enum(), output);
  }

  // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
  if (_has_bit(65)) {
    ::google::protobuf::internal::WireFormat::WriteEnum(83, this->default_import_enum(), output);
  }

  // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  if (_has_bit(66)) {
    ::google::protobuf::internal::WireFormat::WriteString(84, this->default_string_piece(), output);
  }

  // optional string default_cord = 85 [default = "123", ctype = CORD];
  if (_has_bit(67)) {
    ::google::protobuf::internal::WireFormat::WriteString(85, this->default_cord(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestAllTypes::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 optional_int32 = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->optional_int32(), target);
  }

  // optional int64 optional_int64 = 2;
  if (_has_bit(1)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt64ToArray(2, this->optional_int64(), target);
  }

  // optional uint32 optional_uint32 = 3;
  if (_has_bit(2)) {
    target = ::google::protobuf::internal::WireFormat::WriteUInt32ToArray(3, this->optional_uint32(), target);
  }

  // optional uint64 optional_uint64 = 4;
  if (_has_bit(3)) {
    target = ::google::protobuf::internal::WireFormat::WriteUInt64ToArray(4, this->optional_uint64(), target);
  }

  // optional sint32 optional_sint32 = 5;
  if (_has_bit(4)) {
    target = ::google::protobuf::internal::WireFormat::WriteSInt32ToArray(5, this->optional_sint32(), target);
  }

  // optional sint64 optional_sint64 = 6;
  if (_has_bit(5)) {
    target = ::google::protobuf::internal::WireFormat::WriteSInt64ToArray(6, this->optional_sint64(), target);
  }

  // optional fixed32 optional_fixed32 = 7;
  if (_has_bit(6)) {
    target = ::google::protobuf::internal::WireFormat::WriteFixed32ToArray(7, this->optional_fixed32(), target);
  }

  // optional fixed64 optional_fixed64 = 8;
  if (_has_bit(7)) {
    target = ::google::protobuf::internal::WireFormat::WriteFixed64ToArray(8, this->optional_fixed64(), target);
  }

  // optional sfixed32 optional_sfixed32 = 9;
  if (_has_bit(8)) {
    target = ::google::protobuf::internal::WireFormat::WriteSFixed32ToArray(9, this->optional_sfixed32(), target);
  }

  // optional sfixed64 optional_sfixed64 = 10;
  if (_has_bit(9)) {
    target = ::google::protobuf::internal::WireFormat::WriteSFixed64ToArray(10, this->optional_sfixed64(), target);
  }

  // optional float optional_float = 11;
  if (_has_bit(10)) {
    target = ::google::protobuf::internal::WireFormat::WriteFloatToArray(11, this->optional_float(), target);
  }

  // optional double optional_double = 12;
  if (_has_bit(11)) {
    target = ::google::protobuf::internal::WireFormat::WriteDoubleToArray(12, this->optional_double(), target);
  }

  // optional bool optional_bool = 13;
  if (_has_bit(12)) {
    target = ::google::protobuf::internal::WireFormat::WriteBoolToArray(13, this->optional_bool(), target);
  }

  // optional string optional_string = 14;
  if (_has_bit(13)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(14, this->optional_string(), target);
  }

  // optional bytes optional_bytes = 15;
  if (_has_bit(14)) {
    target = ::google::protobuf::internal::WireFormat::WriteBytesToArray(15, this->optional_bytes(), target);
  }

  // optional group OptionalGroup = 16 {
  if (_has_bit(15)) {
    target = ::google::protobuf::internal::WireFormat::WriteGroupNoVirtualToArray(16, this->optionalgroup(), target);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
  if (_has_bit(16)) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(18, this->optional_nested_message(), target);
  }

  // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
  if (_has_bit(17)) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(19, this->optional_foreign_message(), target);
  }

  // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
  if (_has_bit(18)) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(20, this->optional_import_message(), target);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
  if (_has_bit(19)) {
    target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(21, this->optional_nested_enum(), target);
  }

  // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  if (_has_bit(20)) {
    target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(22, this->optional_foreign_enum(), target);
  }

  // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
  if (_has_bit(21)) {
    target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(23, this->optional_import_enum(), target);
  }

  // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  if (_has_bit(22)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(24, this->optional_string_piece(), target);
  }

  // optional string optional_cord = 25 [ctype = CORD];
  if (_has_bit(23)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(25, this->optional_cord(), target);
  }

  // repeated int32 repeated_int32 = 31;
  for (int i = 0; i < this->repeated_int32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(31, this->repeated_int32(i), target);
  }

  // repeated int64 repeated_int64 = 32;
  for (int i = 0; i < this->repeated_int64_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteInt64ToArray(32, this->repeated_int64(i), target);
  }

  // repeated uint32 repeated_uint32 = 33;
  for (int i = 0; i < this->repeated_uint32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteUInt32ToArray(33, this->repeated_uint32(i), target);
  }

  // repeated uint64 repeated_uint64 = 34;
  for (int i = 0; i < this->repeated_uint64_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteUInt64ToArray(34, this->repeated_uint64(i), target);
  }

  // repeated sint32 repeated_sint32 = 35;
  for (int i = 0; i < this->repeated_sint32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteSInt32ToArray(35, this->repeated_sint32(i), target);
  }

  // repeated sint64 repeated_sint64 = 36;
  for (int i = 0; i < this->repeated_sint64_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteSInt64ToArray(36, this->repeated_sint64(i), target);
  }

  // repeated fixed32 repeated_fixed32 = 37;
  for (int i = 0; i < this->repeated_fixed32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteFixed32ToArray(37, this->repeated_fixed32(i), target);
  }

  // repeated fixed64 repeated_fixed64 = 38;
  for (int i = 0; i < this->repeated_fixed64_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteFixed64ToArray(38, this->repeated_fixed64(i), target);
  }

  // repeated sfixed32 repeated_sfixed32 = 39;
  for (int i = 0; i < this->repeated_sfixed32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteSFixed32ToArray(39, this->repeated_sfixed32(i), target);
  }

  // repeated sfixed64 repeated_sfixed64 = 40;
  for (int i = 0; i < this->repeated_sfixed64_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteSFixed64ToArray(40, this->repeated_sfixed64(i), target);
  }

  // repeated float repeated_float = 41;
  for (int i = 0; i < this->repeated_float_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteFloatToArray(41, this->repeated_float(i), target);
  }

  // repeated double repeated_double = 42;
  for (int i = 0; i < this->repeated_double_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteDoubleToArray(42, this->repeated_double(i), target);
  }

  // repeated bool repeated_bool = 43;
  for (int i = 0; i < this->repeated_bool_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteBoolToArray(43, this->repeated_bool(i), target);
  }

  // repeated string repeated_string = 44;
  for (int i = 0; i < this->repeated_string_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(44, this->repeated_string(i), target);
  }

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

  // repeated group RepeatedGroup = 46 {
  for (int i = 0; i < this->repeatedgroup_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteGroupNoVirtualToArray(46, this->repeatedgroup(i), target);
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
  for (int i = 0; i < this->repeated_nested_message_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(48, this->repeated_nested_message(i), target);
  }

  // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
  for (int i = 0; i < this->repeated_foreign_message_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(49, this->repeated_foreign_message(i), target);
  }

  // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  for (int i = 0; i < this->repeated_import_message_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(50, this->repeated_import_message(i), target);
  }

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

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

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

  // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  for (int i = 0; i < this->repeated_string_piece_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(54, this->repeated_string_piece(i), target);
  }

  // repeated string repeated_cord = 55 [ctype = CORD];
  for (int i = 0; i < this->repeated_cord_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(55, this->repeated_cord(i), target);
  }

  // optional int32 default_int32 = 61 [default = 41];
  if (_has_bit(48)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(61, this->default_int32(), target);
  }

  // optional int64 default_int64 = 62 [default = 42];
  if (_has_bit(49)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt64ToArray(62, this->default_int64(), target);
  }

  // optional uint32 default_uint32 = 63 [default = 43];
  if (_has_bit(50)) {
    target = ::google::protobuf::internal::WireFormat::WriteUInt32ToArray(63, this->default_uint32(), target);
  }

  // optional uint64 default_uint64 = 64 [default = 44];
  if (_has_bit(51)) {
    target = ::google::protobuf::internal::WireFormat::WriteUInt64ToArray(64, this->default_uint64(), target);
  }

  // optional sint32 default_sint32 = 65 [default = -45];
  if (_has_bit(52)) {
    target = ::google::protobuf::internal::WireFormat::WriteSInt32ToArray(65, this->default_sint32(), target);
  }

  // optional sint64 default_sint64 = 66 [default = 46];
  if (_has_bit(53)) {
    target = ::google::protobuf::internal::WireFormat::WriteSInt64ToArray(66, this->default_sint64(), target);
  }

  // optional fixed32 default_fixed32 = 67 [default = 47];
  if (_has_bit(54)) {
    target = ::google::protobuf::internal::WireFormat::WriteFixed32ToArray(67, this->default_fixed32(), target);
  }

  // optional fixed64 default_fixed64 = 68 [default = 48];
  if (_has_bit(55)) {
    target = ::google::protobuf::internal::WireFormat::WriteFixed64ToArray(68, this->default_fixed64(), target);
  }

  // optional sfixed32 default_sfixed32 = 69 [default = 49];
  if (_has_bit(56)) {
    target = ::google::protobuf::internal::WireFormat::WriteSFixed32ToArray(69, this->default_sfixed32(), target);
  }

  // optional sfixed64 default_sfixed64 = 70 [default = -50];
  if (_has_bit(57)) {
    target = ::google::protobuf::internal::WireFormat::WriteSFixed64ToArray(70, this->default_sfixed64(), target);
  }

  // optional float default_float = 71 [default = 51.5];
  if (_has_bit(58)) {
    target = ::google::protobuf::internal::WireFormat::WriteFloatToArray(71, this->default_float(), target);
  }

  // optional double default_double = 72 [default = 52000];
  if (_has_bit(59)) {
    target = ::google::protobuf::internal::WireFormat::WriteDoubleToArray(72, this->default_double(), target);
  }

  // optional bool default_bool = 73 [default = true];
  if (_has_bit(60)) {
    target = ::google::protobuf::internal::WireFormat::WriteBoolToArray(73, this->default_bool(), target);
  }

  // optional string default_string = 74 [default = "hello"];
  if (_has_bit(61)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(74, this->default_string(), target);
  }

  // optional bytes default_bytes = 75 [default = "world"];
  if (_has_bit(62)) {
    target = ::google::protobuf::internal::WireFormat::WriteBytesToArray(75, this->default_bytes(), target);
  }

  // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
  if (_has_bit(63)) {
    target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(81, this->default_nested_enum(), target);
  }

  // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
  if (_has_bit(64)) {
    target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(82, this->default_foreign_enum(), target);
  }

  // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
  if (_has_bit(65)) {
    target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(83, this->default_import_enum(), target);
  }

  // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  if (_has_bit(66)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(84, this->default_string_piece(), target);
  }

  // optional string default_cord = 85 [default = "123", ctype = CORD];
  if (_has_bit(67)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(85, this->default_cord(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestAllTypes::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 optional_int32 = 1;
    if (has_optional_int32()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->optional_int32());
    }

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

    // optional uint32 optional_uint32 = 3;
    if (has_optional_uint32()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::UInt32Size(
          this->optional_uint32());
    }

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

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

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

    // 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;
    }

  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    // optional sfixed32 optional_sfixed32 = 9;
    if (has_optional_sfixed32()) {
      total_size += 1 + 4;
    }

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

    // 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 string optional_string = 14;
    if (has_optional_string()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::StringSize(this->optional_string());
    }

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

    // optional group OptionalGroup = 16 {
    if (has_optionalgroup()) {
      total_size += 4 +
        ::google::protobuf::internal::WireFormat::GroupSizeNoVirtual(
          this->optionalgroup());
    }

  }
  if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
    if (has_optional_nested_message()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
          this->optional_nested_message());
    }

    // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
    if (has_optional_foreign_message()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
          this->optional_foreign_message());
    }

    // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
    if (has_optional_import_message()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
          this->optional_import_message());
    }

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

    // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
    if (has_optional_foreign_enum()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::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::WireFormat::EnumSize(this->optional_import_enum());
    }

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

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

  }
  if (_has_bits_[48 / 32] & (0xffu << (48 % 32))) {
    // optional int32 default_int32 = 61 [default = 41];
    if (has_default_int32()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->default_int32());
    }

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

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

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

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

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

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

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

  }
  if (_has_bits_[56 / 32] & (0xffu << (56 % 32))) {
    // optional sfixed32 default_sfixed32 = 69 [default = 49];
    if (has_default_sfixed32()) {
      total_size += 2 + 4;
    }

    // optional sfixed64 default_sfixed64 = 70 [default = -50];
    if (has_default_sfixed64()) {
      total_size += 2 + 8;
    }

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

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

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

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

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

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

  }
  if (_has_bits_[64 / 32] & (0xffu << (64 % 32))) {
    // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
    if (has_default_foreign_enum()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::EnumSize(this->default_foreign_enum());
    }

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

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

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

  }
  // repeated int32 repeated_int32 = 31;
  {
    int data_size = 0;
    for (int i = 0; i < this->repeated_int32_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::Int32Size(
        this->repeated_int32(i));
    }
    total_size += 2 * this->repeated_int32_size() + data_size;
  }

  // repeated int64 repeated_int64 = 32;
  {
    int data_size = 0;
    for (int i = 0; i < this->repeated_int64_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::Int64Size(
        this->repeated_int64(i));
    }
    total_size += 2 * this->repeated_int64_size() + data_size;
  }

  // repeated uint32 repeated_uint32 = 33;
  {
    int data_size = 0;
    for (int i = 0; i < this->repeated_uint32_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::UInt32Size(
        this->repeated_uint32(i));
    }
    total_size += 2 * this->repeated_uint32_size() + data_size;
  }

  // repeated uint64 repeated_uint64 = 34;
  {
    int data_size = 0;
    for (int i = 0; i < this->repeated_uint64_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::UInt64Size(
        this->repeated_uint64(i));
    }
    total_size += 2 * this->repeated_uint64_size() + data_size;
  }

  // repeated sint32 repeated_sint32 = 35;
  {
    int data_size = 0;
    for (int i = 0; i < this->repeated_sint32_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::SInt32Size(
        this->repeated_sint32(i));
    }
    total_size += 2 * this->repeated_sint32_size() + data_size;
  }

  // repeated sint64 repeated_sint64 = 36;
  {
    int data_size = 0;
    for (int i = 0; i < this->repeated_sint64_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::SInt64Size(
        this->repeated_sint64(i));
    }
    total_size += 2 * this->repeated_sint64_size() + data_size;
  }

  // repeated fixed32 repeated_fixed32 = 37;
  {
    int data_size = 0;
    data_size = 4 * this->repeated_fixed32_size();
    total_size += 2 * this->repeated_fixed32_size() + data_size;
  }

  // repeated fixed64 repeated_fixed64 = 38;
  {
    int data_size = 0;
    data_size = 8 * this->repeated_fixed64_size();
    total_size += 2 * this->repeated_fixed64_size() + data_size;
  }

  // repeated sfixed32 repeated_sfixed32 = 39;
  {
    int data_size = 0;
    data_size = 4 * this->repeated_sfixed32_size();
    total_size += 2 * this->repeated_sfixed32_size() + data_size;
  }

  // repeated sfixed64 repeated_sfixed64 = 40;
  {
    int data_size = 0;
    data_size = 8 * this->repeated_sfixed64_size();
    total_size += 2 * this->repeated_sfixed64_size() + data_size;
  }

  // repeated float repeated_float = 41;
  {
    int data_size = 0;
    data_size = 4 * this->repeated_float_size();
    total_size += 2 * this->repeated_float_size() + data_size;
  }

  // repeated double repeated_double = 42;
  {
    int data_size = 0;
    data_size = 8 * this->repeated_double_size();
    total_size += 2 * this->repeated_double_size() + data_size;
  }

  // repeated bool repeated_bool = 43;
  {
    int data_size = 0;
    data_size = 1 * this->repeated_bool_size();
    total_size += 2 * this->repeated_bool_size() + data_size;
  }

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

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

  // repeated group RepeatedGroup = 46 {
  total_size += 4 * this->repeatedgroup_size();
  for (int i = 0; i < this->repeatedgroup_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormat::GroupSizeNoVirtual(
        this->repeatedgroup(i));
  }

  // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
  total_size += 2 * this->repeated_nested_message_size();
  for (int i = 0; i < this->repeated_nested_message_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
        this->repeated_nested_message(i));
  }

  // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
  total_size += 2 * this->repeated_foreign_message_size();
  for (int i = 0; i < this->repeated_foreign_message_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
        this->repeated_foreign_message(i));
  }

  // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  total_size += 2 * this->repeated_import_message_size();
  for (int i = 0; i < this->repeated_import_message_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
        this->repeated_import_message(i));
  }

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

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

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

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

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

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestAllTypes::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestAllTypes* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestAllTypes*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestAllTypes::MergeFrom(const TestAllTypes& from) {
  GOOGLE_CHECK_NE(&from, this);
  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_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_optional_int32(from.optional_int32());
    }
    if (from._has_bit(1)) {
      set_optional_int64(from.optional_int64());
    }
    if (from._has_bit(2)) {
      set_optional_uint32(from.optional_uint32());
    }
    if (from._has_bit(3)) {
      set_optional_uint64(from.optional_uint64());
    }
    if (from._has_bit(4)) {
      set_optional_sint32(from.optional_sint32());
    }
    if (from._has_bit(5)) {
      set_optional_sint64(from.optional_sint64());
    }
    if (from._has_bit(6)) {
      set_optional_fixed32(from.optional_fixed32());
    }
    if (from._has_bit(7)) {
      set_optional_fixed64(from.optional_fixed64());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from._has_bit(8)) {
      set_optional_sfixed32(from.optional_sfixed32());
    }
    if (from._has_bit(9)) {
      set_optional_sfixed64(from.optional_sfixed64());
    }
    if (from._has_bit(10)) {
      set_optional_float(from.optional_float());
    }
    if (from._has_bit(11)) {
      set_optional_double(from.optional_double());
    }
    if (from._has_bit(12)) {
      set_optional_bool(from.optional_bool());
    }
    if (from._has_bit(13)) {
      set_optional_string(from.optional_string());
    }
    if (from._has_bit(14)) {
      set_optional_bytes(from.optional_bytes());
    }
    if (from._has_bit(15)) {
      mutable_optionalgroup()->::protobuf_unittest::TestAllTypes_OptionalGroup::MergeFrom(from.optionalgroup());
    }
  }
  if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    if (from._has_bit(16)) {
      mutable_optional_nested_message()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.optional_nested_message());
    }
    if (from._has_bit(17)) {
      mutable_optional_foreign_message()->::protobuf_unittest::ForeignMessage::MergeFrom(from.optional_foreign_message());
    }
    if (from._has_bit(18)) {
      mutable_optional_import_message()->::protobuf_unittest_import::ImportMessage::MergeFrom(from.optional_import_message());
    }
    if (from._has_bit(19)) {
      set_optional_nested_enum(from.optional_nested_enum());
    }
    if (from._has_bit(20)) {
      set_optional_foreign_enum(from.optional_foreign_enum());
    }
    if (from._has_bit(21)) {
      set_optional_import_enum(from.optional_import_enum());
    }
    if (from._has_bit(22)) {
      set_optional_string_piece(from.optional_string_piece());
    }
    if (from._has_bit(23)) {
      set_optional_cord(from.optional_cord());
    }
  }
  if (from._has_bits_[48 / 32] & (0xffu << (48 % 32))) {
    if (from._has_bit(48)) {
      set_default_int32(from.default_int32());
    }
    if (from._has_bit(49)) {
      set_default_int64(from.default_int64());
    }
    if (from._has_bit(50)) {
      set_default_uint32(from.default_uint32());
    }
    if (from._has_bit(51)) {
      set_default_uint64(from.default_uint64());
    }
    if (from._has_bit(52)) {
      set_default_sint32(from.default_sint32());
    }
    if (from._has_bit(53)) {
      set_default_sint64(from.default_sint64());
    }
    if (from._has_bit(54)) {
      set_default_fixed32(from.default_fixed32());
    }
    if (from._has_bit(55)) {
      set_default_fixed64(from.default_fixed64());
    }
  }
  if (from._has_bits_[56 / 32] & (0xffu << (56 % 32))) {
    if (from._has_bit(56)) {
      set_default_sfixed32(from.default_sfixed32());
    }
    if (from._has_bit(57)) {
      set_default_sfixed64(from.default_sfixed64());
    }
    if (from._has_bit(58)) {
      set_default_float(from.default_float());
    }
    if (from._has_bit(59)) {
      set_default_double(from.default_double());
    }
    if (from._has_bit(60)) {
      set_default_bool(from.default_bool());
    }
    if (from._has_bit(61)) {
      set_default_string(from.default_string());
    }
    if (from._has_bit(62)) {
      set_default_bytes(from.default_bytes());
    }
    if (from._has_bit(63)) {
      set_default_nested_enum(from.default_nested_enum());
    }
  }
  if (from._has_bits_[64 / 32] & (0xffu << (64 % 32))) {
    if (from._has_bit(64)) {
      set_default_foreign_enum(from.default_foreign_enum());
    }
    if (from._has_bit(65)) {
      set_default_import_enum(from.default_import_enum());
    }
    if (from._has_bit(66)) {
      set_default_string_piece(from.default_string_piece());
    }
    if (from._has_bit(67)) {
      set_default_cord(from.default_cord());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestAllTypes::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestAllTypes::CopyFrom(const TestAllTypes& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestAllTypes::Swap(TestAllTypes* other) {
  if (other != this) {
    std::swap(optional_int32_, other->optional_int32_);
    std::swap(optional_int64_, other->optional_int64_);
    std::swap(optional_uint32_, other->optional_uint32_);
    std::swap(optional_uint64_, other->optional_uint64_);
    std::swap(optional_sint32_, other->optional_sint32_);
    std::swap(optional_sint64_, other->optional_sint64_);
    std::swap(optional_fixed32_, other->optional_fixed32_);
    std::swap(optional_fixed64_, other->optional_fixed64_);
    std::swap(optional_sfixed32_, other->optional_sfixed32_);
    std::swap(optional_sfixed64_, other->optional_sfixed64_);
    std::swap(optional_float_, other->optional_float_);
    std::swap(optional_double_, other->optional_double_);
    std::swap(optional_bool_, other->optional_bool_);
    std::swap(optional_string_, other->optional_string_);
    std::swap(optional_bytes_, other->optional_bytes_);
    std::swap(optionalgroup_, other->optionalgroup_);
    std::swap(optional_nested_message_, other->optional_nested_message_);
    std::swap(optional_foreign_message_, other->optional_foreign_message_);
    std::swap(optional_import_message_, other->optional_import_message_);
    std::swap(optional_nested_enum_, other->optional_nested_enum_);
    std::swap(optional_foreign_enum_, other->optional_foreign_enum_);
    std::swap(optional_import_enum_, other->optional_import_enum_);
    std::swap(optional_string_piece_, other->optional_string_piece_);
    std::swap(optional_cord_, other->optional_cord_);
    repeated_int32_.Swap(&other->repeated_int32_);
    repeated_int64_.Swap(&other->repeated_int64_);
    repeated_uint32_.Swap(&other->repeated_uint32_);
    repeated_uint64_.Swap(&other->repeated_uint64_);
    repeated_sint32_.Swap(&other->repeated_sint32_);
    repeated_sint64_.Swap(&other->repeated_sint64_);
    repeated_fixed32_.Swap(&other->repeated_fixed32_);
    repeated_fixed64_.Swap(&other->repeated_fixed64_);
    repeated_sfixed32_.Swap(&other->repeated_sfixed32_);
    repeated_sfixed64_.Swap(&other->repeated_sfixed64_);
    repeated_float_.Swap(&other->repeated_float_);
    repeated_double_.Swap(&other->repeated_double_);
    repeated_bool_.Swap(&other->repeated_bool_);
    repeated_string_.Swap(&other->repeated_string_);
    repeated_bytes_.Swap(&other->repeated_bytes_);
    repeatedgroup_.Swap(&other->repeatedgroup_);
    repeated_nested_message_.Swap(&other->repeated_nested_message_);
    repeated_foreign_message_.Swap(&other->repeated_foreign_message_);
    repeated_import_message_.Swap(&other->repeated_import_message_);
    repeated_nested_enum_.Swap(&other->repeated_nested_enum_);
    repeated_foreign_enum_.Swap(&other->repeated_foreign_enum_);
    repeated_import_enum_.Swap(&other->repeated_import_enum_);
    repeated_string_piece_.Swap(&other->repeated_string_piece_);
    repeated_cord_.Swap(&other->repeated_cord_);
    std::swap(default_int32_, other->default_int32_);
    std::swap(default_int64_, other->default_int64_);
    std::swap(default_uint32_, other->default_uint32_);
    std::swap(default_uint64_, other->default_uint64_);
    std::swap(default_sint32_, other->default_sint32_);
    std::swap(default_sint64_, other->default_sint64_);
    std::swap(default_fixed32_, other->default_fixed32_);
    std::swap(default_fixed64_, other->default_fixed64_);
    std::swap(default_sfixed32_, other->default_sfixed32_);
    std::swap(default_sfixed64_, other->default_sfixed64_);
    std::swap(default_float_, other->default_float_);
    std::swap(default_double_, other->default_double_);
    std::swap(default_bool_, other->default_bool_);
    std::swap(default_string_, other->default_string_);
    std::swap(default_bytes_, other->default_bytes_);
    std::swap(default_nested_enum_, other->default_nested_enum_);
    std::swap(default_foreign_enum_, other->default_foreign_enum_);
    std::swap(default_import_enum_, other->default_import_enum_);
    std::swap(default_string_piece_, other->default_string_piece_);
    std::swap(default_cord_, other->default_cord_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    std::swap(_has_bits_[1], other->_has_bits_[1]);
    std::swap(_has_bits_[2], other->_has_bits_[2]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestAllTypes::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestAllTypes::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestAllTypes::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestAllTypes_reflection_;
}

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

#ifndef _MSC_VER
const int ForeignMessage::kCFieldNumber;
#endif  // !_MSC_VER

ForeignMessage::ForeignMessage()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void ForeignMessage::InitAsDefaultInstance() {}

ForeignMessage::ForeignMessage(const ForeignMessage& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void ForeignMessage::SharedCtor() {
  _cached_size_ = 0;
  c_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ForeignMessage::~ForeignMessage() {
  SharedDtor();
}

void ForeignMessage::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* ForeignMessage::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ForeignMessage_descriptor_;
}

const ForeignMessage& ForeignMessage::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

ForeignMessage* ForeignMessage::default_instance_ = NULL;

ForeignMessage* ForeignMessage::New() const {
  return new ForeignMessage;
}

void ForeignMessage::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    c_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool ForeignMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 c = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &c_));
        _set_bit(0);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void ForeignMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    ForeignMessage::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 c = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(1, this->c(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* ForeignMessage::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 c = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->c(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int ForeignMessage::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 c = 1;
    if (has_c()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->c());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void ForeignMessage::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const ForeignMessage* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const ForeignMessage*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void ForeignMessage::MergeFrom(const ForeignMessage& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_c(from.c());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void ForeignMessage::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ForeignMessage::CopyFrom(const ForeignMessage& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ForeignMessage::Swap(ForeignMessage* other) {
  if (other != this) {
    std::swap(c_, other->c_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool ForeignMessage::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* ForeignMessage::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* ForeignMessage::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return ForeignMessage_reflection_;
}

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

#ifndef _MSC_VER
#endif  // !_MSC_VER

TestAllExtensions::TestAllExtensions()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestAllExtensions::InitAsDefaultInstance() {}

TestAllExtensions::TestAllExtensions(const TestAllExtensions& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestAllExtensions::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestAllExtensions::~TestAllExtensions() {
  SharedDtor();
}

void TestAllExtensions::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestAllExtensions::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestAllExtensions_descriptor_;
}

const TestAllExtensions& TestAllExtensions::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestAllExtensions* TestAllExtensions::default_instance_ = NULL;

TestAllExtensions* TestAllExtensions::New() const {
  return new TestAllExtensions;
}

void TestAllExtensions::Clear() {
  _extensions_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestAllExtensions::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
      return true;
    }
    if ((8u <= tag)) {
      DO_(_extensions_.ParseField(tag, input, default_instance_,
                                  mutable_unknown_fields()));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
  return true;
#undef DO_
}

void TestAllExtensions::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestAllExtensions::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

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

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestAllExtensions::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // Extension range [1, 536870912)
  target = _extensions_.SerializeWithCachedSizesToArray(
      1, 536870912, target);

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestAllExtensions::ByteSize() const {
  int total_size = 0;

  total_size += _extensions_.ByteSize();

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestAllExtensions::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestAllExtensions* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestAllExtensions*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestAllExtensions::MergeFrom(const TestAllExtensions& from) {
  GOOGLE_CHECK_NE(&from, this);
  _extensions_.MergeFrom(from._extensions_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestAllExtensions::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestAllExtensions::CopyFrom(const TestAllExtensions& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestAllExtensions::Swap(TestAllExtensions* other) {
  if (other != this) {
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
    _extensions_.Swap(&other->_extensions_);
  }
}

bool TestAllExtensions::IsInitialized() const {

  if (!_extensions_.IsInitialized()) return false;  return true;
}

const ::google::protobuf::Descriptor* TestAllExtensions::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestAllExtensions::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestAllExtensions_reflection_;
}

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

#ifndef _MSC_VER
const int OptionalGroup_extension::kAFieldNumber;
#endif  // !_MSC_VER

OptionalGroup_extension::OptionalGroup_extension()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void OptionalGroup_extension::InitAsDefaultInstance() {}

OptionalGroup_extension::OptionalGroup_extension(const OptionalGroup_extension& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void OptionalGroup_extension::SharedCtor() {
  _cached_size_ = 0;
  a_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

OptionalGroup_extension::~OptionalGroup_extension() {
  SharedDtor();
}

void OptionalGroup_extension::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* OptionalGroup_extension::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return OptionalGroup_extension_descriptor_;
}

const OptionalGroup_extension& OptionalGroup_extension::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

OptionalGroup_extension* OptionalGroup_extension::default_instance_ = NULL;

OptionalGroup_extension* OptionalGroup_extension::New() const {
  return new OptionalGroup_extension;
}

void OptionalGroup_extension::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    a_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool OptionalGroup_extension::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 a = 17;
      case 17: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &a_));
        _set_bit(0);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void OptionalGroup_extension::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    OptionalGroup_extension::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 a = 17;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(17, this->a(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* OptionalGroup_extension::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 a = 17;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(17, this->a(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int OptionalGroup_extension::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 a = 17;
    if (has_a()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->a());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void OptionalGroup_extension::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const OptionalGroup_extension* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const OptionalGroup_extension*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void OptionalGroup_extension::MergeFrom(const OptionalGroup_extension& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_a(from.a());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void OptionalGroup_extension::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void OptionalGroup_extension::CopyFrom(const OptionalGroup_extension& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void OptionalGroup_extension::Swap(OptionalGroup_extension* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool OptionalGroup_extension::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* OptionalGroup_extension::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* OptionalGroup_extension::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return OptionalGroup_extension_reflection_;
}

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

#ifndef _MSC_VER
const int RepeatedGroup_extension::kAFieldNumber;
#endif  // !_MSC_VER

RepeatedGroup_extension::RepeatedGroup_extension()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void RepeatedGroup_extension::InitAsDefaultInstance() {}

RepeatedGroup_extension::RepeatedGroup_extension(const RepeatedGroup_extension& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void RepeatedGroup_extension::SharedCtor() {
  _cached_size_ = 0;
  a_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

RepeatedGroup_extension::~RepeatedGroup_extension() {
  SharedDtor();
}

void RepeatedGroup_extension::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* RepeatedGroup_extension::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return RepeatedGroup_extension_descriptor_;
}

const RepeatedGroup_extension& RepeatedGroup_extension::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

RepeatedGroup_extension* RepeatedGroup_extension::default_instance_ = NULL;

RepeatedGroup_extension* RepeatedGroup_extension::New() const {
  return new RepeatedGroup_extension;
}

void RepeatedGroup_extension::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    a_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool RepeatedGroup_extension::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 a = 47;
      case 47: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &a_));
        _set_bit(0);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void RepeatedGroup_extension::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    RepeatedGroup_extension::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 a = 47;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(47, this->a(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* RepeatedGroup_extension::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 a = 47;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(47, this->a(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int RepeatedGroup_extension::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 a = 47;
    if (has_a()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->a());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void RepeatedGroup_extension::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const RepeatedGroup_extension* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const RepeatedGroup_extension*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void RepeatedGroup_extension::MergeFrom(const RepeatedGroup_extension& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_a(from.a());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void RepeatedGroup_extension::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RepeatedGroup_extension::CopyFrom(const RepeatedGroup_extension& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RepeatedGroup_extension::Swap(RepeatedGroup_extension* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool RepeatedGroup_extension::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* RepeatedGroup_extension::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* RepeatedGroup_extension::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return RepeatedGroup_extension_reflection_;
}

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

#ifndef _MSC_VER
#endif  // !_MSC_VER

const ::std::string TestNestedExtension_test_default("test");
#ifndef _MSC_VER
const int TestNestedExtension::kTestFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  TestNestedExtension::test(kTestFieldNumber, TestNestedExtension_test_default);
TestNestedExtension::TestNestedExtension()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestNestedExtension::InitAsDefaultInstance() {}

TestNestedExtension::TestNestedExtension(const TestNestedExtension& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestNestedExtension::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestNestedExtension::~TestNestedExtension() {
  SharedDtor();
}

void TestNestedExtension::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestNestedExtension::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestNestedExtension_descriptor_;
}

const TestNestedExtension& TestNestedExtension::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestNestedExtension* TestNestedExtension::default_instance_ = NULL;

TestNestedExtension* TestNestedExtension::New() const {
  return new TestNestedExtension;
}

void TestNestedExtension::Clear() {
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestNestedExtension::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
      return true;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
  return true;
#undef DO_
}

void TestNestedExtension::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestNestedExtension::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestNestedExtension::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestNestedExtension::ByteSize() const {
  int total_size = 0;

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestNestedExtension::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestNestedExtension* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestNestedExtension*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestNestedExtension::MergeFrom(const TestNestedExtension& from) {
  GOOGLE_CHECK_NE(&from, this);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestNestedExtension::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestNestedExtension::CopyFrom(const TestNestedExtension& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestNestedExtension::Swap(TestNestedExtension* other) {
  if (other != this) {
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestNestedExtension::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestNestedExtension::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestNestedExtension::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestNestedExtension_reflection_;
}

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

#ifndef _MSC_VER
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  // !_MSC_VER

#ifndef _MSC_VER
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::default_instance());
#ifndef _MSC_VER
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::default_instance());
TestRequired::TestRequired()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestRequired::InitAsDefaultInstance() {}

TestRequired::TestRequired(const TestRequired& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestRequired::SharedCtor() {
  _cached_size_ = 0;
  a_ = 0;
  dummy2_ = 0;
  b_ = 0;
  dummy4_ = 0;
  dummy5_ = 0;
  dummy6_ = 0;
  dummy7_ = 0;
  dummy8_ = 0;
  dummy9_ = 0;
  dummy10_ = 0;
  dummy11_ = 0;
  dummy12_ = 0;
  dummy13_ = 0;
  dummy14_ = 0;
  dummy15_ = 0;
  dummy16_ = 0;
  dummy17_ = 0;
  dummy18_ = 0;
  dummy19_ = 0;
  dummy20_ = 0;
  dummy21_ = 0;
  dummy22_ = 0;
  dummy23_ = 0;
  dummy24_ = 0;
  dummy25_ = 0;
  dummy26_ = 0;
  dummy27_ = 0;
  dummy28_ = 0;
  dummy29_ = 0;
  dummy30_ = 0;
  dummy31_ = 0;
  dummy32_ = 0;
  c_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestRequired::~TestRequired() {
  SharedDtor();
}

void TestRequired::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestRequired::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestRequired_descriptor_;
}

const TestRequired& TestRequired::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestRequired* TestRequired::default_instance_ = NULL;

TestRequired* TestRequired::New() const {
  return new TestRequired;
}

void TestRequired::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    a_ = 0;
    dummy2_ = 0;
    b_ = 0;
    dummy4_ = 0;
    dummy5_ = 0;
    dummy6_ = 0;
    dummy7_ = 0;
    dummy8_ = 0;
  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    dummy9_ = 0;
    dummy10_ = 0;
    dummy11_ = 0;
    dummy12_ = 0;
    dummy13_ = 0;
    dummy14_ = 0;
    dummy15_ = 0;
    dummy16_ = 0;
  }
  if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    dummy17_ = 0;
    dummy18_ = 0;
    dummy19_ = 0;
    dummy20_ = 0;
    dummy21_ = 0;
    dummy22_ = 0;
    dummy23_ = 0;
    dummy24_ = 0;
  }
  if (_has_bits_[24 / 32] & (0xffu << (24 % 32))) {
    dummy25_ = 0;
    dummy26_ = 0;
    dummy27_ = 0;
    dummy28_ = 0;
    dummy29_ = 0;
    dummy30_ = 0;
    dummy31_ = 0;
    dummy32_ = 0;
  }
  if (_has_bits_[32 / 32] & (0xffu << (32 % 32))) {
    c_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestRequired::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // required int32 a = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &a_));
        _set_bit(0);
        if (input->ExpectTag(16)) goto parse_dummy2;
        break;
      }

      // optional int32 dummy2 = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy2:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy2_));
        _set_bit(1);
        if (input->ExpectTag(24)) goto parse_b;
        break;
      }

      // required int32 b = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_b:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &b_));
        _set_bit(2);
        if (input->ExpectTag(32)) goto parse_dummy4;
        break;
      }

      // optional int32 dummy4 = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy4:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy4_));
        _set_bit(3);
        if (input->ExpectTag(40)) goto parse_dummy5;
        break;
      }

      // optional int32 dummy5 = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy5:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy5_));
        _set_bit(4);
        if (input->ExpectTag(48)) goto parse_dummy6;
        break;
      }

      // optional int32 dummy6 = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy6:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy6_));
        _set_bit(5);
        if (input->ExpectTag(56)) goto parse_dummy7;
        break;
      }

      // optional int32 dummy7 = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy7:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy7_));
        _set_bit(6);
        if (input->ExpectTag(64)) goto parse_dummy8;
        break;
      }

      // optional int32 dummy8 = 8;
      case 8: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy8:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy8_));
        _set_bit(7);
        if (input->ExpectTag(72)) goto parse_dummy9;
        break;
      }

      // optional int32 dummy9 = 9;
      case 9: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy9:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy9_));
        _set_bit(8);
        if (input->ExpectTag(80)) goto parse_dummy10;
        break;
      }

      // optional int32 dummy10 = 10;
      case 10: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy10:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy10_));
        _set_bit(9);
        if (input->ExpectTag(88)) goto parse_dummy11;
        break;
      }

      // optional int32 dummy11 = 11;
      case 11: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy11:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy11_));
        _set_bit(10);
        if (input->ExpectTag(96)) goto parse_dummy12;
        break;
      }

      // optional int32 dummy12 = 12;
      case 12: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy12:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy12_));
        _set_bit(11);
        if (input->ExpectTag(104)) goto parse_dummy13;
        break;
      }

      // optional int32 dummy13 = 13;
      case 13: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy13:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy13_));
        _set_bit(12);
        if (input->ExpectTag(112)) goto parse_dummy14;
        break;
      }

      // optional int32 dummy14 = 14;
      case 14: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy14:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy14_));
        _set_bit(13);
        if (input->ExpectTag(120)) goto parse_dummy15;
        break;
      }

      // optional int32 dummy15 = 15;
      case 15: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy15:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy15_));
        _set_bit(14);
        if (input->ExpectTag(128)) goto parse_dummy16;
        break;
      }

      // optional int32 dummy16 = 16;
      case 16: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy16:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy16_));
        _set_bit(15);
        if (input->ExpectTag(136)) goto parse_dummy17;
        break;
      }

      // optional int32 dummy17 = 17;
      case 17: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy17:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy17_));
        _set_bit(16);
        if (input->ExpectTag(144)) goto parse_dummy18;
        break;
      }

      // optional int32 dummy18 = 18;
      case 18: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy18:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy18_));
        _set_bit(17);
        if (input->ExpectTag(152)) goto parse_dummy19;
        break;
      }

      // optional int32 dummy19 = 19;
      case 19: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy19:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy19_));
        _set_bit(18);
        if (input->ExpectTag(160)) goto parse_dummy20;
        break;
      }

      // optional int32 dummy20 = 20;
      case 20: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy20:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy20_));
        _set_bit(19);
        if (input->ExpectTag(168)) goto parse_dummy21;
        break;
      }

      // optional int32 dummy21 = 21;
      case 21: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy21:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy21_));
        _set_bit(20);
        if (input->ExpectTag(176)) goto parse_dummy22;
        break;
      }

      // optional int32 dummy22 = 22;
      case 22: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy22:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy22_));
        _set_bit(21);
        if (input->ExpectTag(184)) goto parse_dummy23;
        break;
      }

      // optional int32 dummy23 = 23;
      case 23: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy23:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy23_));
        _set_bit(22);
        if (input->ExpectTag(192)) goto parse_dummy24;
        break;
      }

      // optional int32 dummy24 = 24;
      case 24: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy24:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy24_));
        _set_bit(23);
        if (input->ExpectTag(200)) goto parse_dummy25;
        break;
      }

      // optional int32 dummy25 = 25;
      case 25: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy25:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy25_));
        _set_bit(24);
        if (input->ExpectTag(208)) goto parse_dummy26;
        break;
      }

      // optional int32 dummy26 = 26;
      case 26: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy26:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy26_));
        _set_bit(25);
        if (input->ExpectTag(216)) goto parse_dummy27;
        break;
      }

      // optional int32 dummy27 = 27;
      case 27: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy27:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy27_));
        _set_bit(26);
        if (input->ExpectTag(224)) goto parse_dummy28;
        break;
      }

      // optional int32 dummy28 = 28;
      case 28: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy28:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy28_));
        _set_bit(27);
        if (input->ExpectTag(232)) goto parse_dummy29;
        break;
      }

      // optional int32 dummy29 = 29;
      case 29: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy29:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy29_));
        _set_bit(28);
        if (input->ExpectTag(240)) goto parse_dummy30;
        break;
      }

      // optional int32 dummy30 = 30;
      case 30: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy30:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy30_));
        _set_bit(29);
        if (input->ExpectTag(248)) goto parse_dummy31;
        break;
      }

      // optional int32 dummy31 = 31;
      case 31: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy31:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy31_));
        _set_bit(30);
        if (input->ExpectTag(256)) goto parse_dummy32;
        break;
      }

      // optional int32 dummy32 = 32;
      case 32: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy32:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy32_));
        _set_bit(31);
        if (input->ExpectTag(264)) goto parse_c;
        break;
      }

      // required int32 c = 33;
      case 33: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_c:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &c_));
        _set_bit(32);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestRequired::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestRequired::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // required int32 a = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(1, this->a(), output);
  }

  // optional int32 dummy2 = 2;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(2, this->dummy2(), output);
  }

  // required int32 b = 3;
  if (_has_bit(2)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(3, this->b(), output);
  }

  // optional int32 dummy4 = 4;
  if (_has_bit(3)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(4, this->dummy4(), output);
  }

  // optional int32 dummy5 = 5;
  if (_has_bit(4)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(5, this->dummy5(), output);
  }

  // optional int32 dummy6 = 6;
  if (_has_bit(5)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(6, this->dummy6(), output);
  }

  // optional int32 dummy7 = 7;
  if (_has_bit(6)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(7, this->dummy7(), output);
  }

  // optional int32 dummy8 = 8;
  if (_has_bit(7)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(8, this->dummy8(), output);
  }

  // optional int32 dummy9 = 9;
  if (_has_bit(8)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(9, this->dummy9(), output);
  }

  // optional int32 dummy10 = 10;
  if (_has_bit(9)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(10, this->dummy10(), output);
  }

  // optional int32 dummy11 = 11;
  if (_has_bit(10)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(11, this->dummy11(), output);
  }

  // optional int32 dummy12 = 12;
  if (_has_bit(11)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(12, this->dummy12(), output);
  }

  // optional int32 dummy13 = 13;
  if (_has_bit(12)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(13, this->dummy13(), output);
  }

  // optional int32 dummy14 = 14;
  if (_has_bit(13)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(14, this->dummy14(), output);
  }

  // optional int32 dummy15 = 15;
  if (_has_bit(14)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(15, this->dummy15(), output);
  }

  // optional int32 dummy16 = 16;
  if (_has_bit(15)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(16, this->dummy16(), output);
  }

  // optional int32 dummy17 = 17;
  if (_has_bit(16)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(17, this->dummy17(), output);
  }

  // optional int32 dummy18 = 18;
  if (_has_bit(17)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(18, this->dummy18(), output);
  }

  // optional int32 dummy19 = 19;
  if (_has_bit(18)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(19, this->dummy19(), output);
  }

  // optional int32 dummy20 = 20;
  if (_has_bit(19)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(20, this->dummy20(), output);
  }

  // optional int32 dummy21 = 21;
  if (_has_bit(20)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(21, this->dummy21(), output);
  }

  // optional int32 dummy22 = 22;
  if (_has_bit(21)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(22, this->dummy22(), output);
  }

  // optional int32 dummy23 = 23;
  if (_has_bit(22)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(23, this->dummy23(), output);
  }

  // optional int32 dummy24 = 24;
  if (_has_bit(23)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(24, this->dummy24(), output);
  }

  // optional int32 dummy25 = 25;
  if (_has_bit(24)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(25, this->dummy25(), output);
  }

  // optional int32 dummy26 = 26;
  if (_has_bit(25)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(26, this->dummy26(), output);
  }

  // optional int32 dummy27 = 27;
  if (_has_bit(26)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(27, this->dummy27(), output);
  }

  // optional int32 dummy28 = 28;
  if (_has_bit(27)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(28, this->dummy28(), output);
  }

  // optional int32 dummy29 = 29;
  if (_has_bit(28)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(29, this->dummy29(), output);
  }

  // optional int32 dummy30 = 30;
  if (_has_bit(29)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(30, this->dummy30(), output);
  }

  // optional int32 dummy31 = 31;
  if (_has_bit(30)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(31, this->dummy31(), output);
  }

  // optional int32 dummy32 = 32;
  if (_has_bit(31)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(32, this->dummy32(), output);
  }

  // required int32 c = 33;
  if (_has_bit(32)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(33, this->c(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestRequired::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required int32 a = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->a(), target);
  }

  // optional int32 dummy2 = 2;
  if (_has_bit(1)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(2, this->dummy2(), target);
  }

  // required int32 b = 3;
  if (_has_bit(2)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(3, this->b(), target);
  }

  // optional int32 dummy4 = 4;
  if (_has_bit(3)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(4, this->dummy4(), target);
  }

  // optional int32 dummy5 = 5;
  if (_has_bit(4)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(5, this->dummy5(), target);
  }

  // optional int32 dummy6 = 6;
  if (_has_bit(5)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(6, this->dummy6(), target);
  }

  // optional int32 dummy7 = 7;
  if (_has_bit(6)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(7, this->dummy7(), target);
  }

  // optional int32 dummy8 = 8;
  if (_has_bit(7)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(8, this->dummy8(), target);
  }

  // optional int32 dummy9 = 9;
  if (_has_bit(8)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(9, this->dummy9(), target);
  }

  // optional int32 dummy10 = 10;
  if (_has_bit(9)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(10, this->dummy10(), target);
  }

  // optional int32 dummy11 = 11;
  if (_has_bit(10)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(11, this->dummy11(), target);
  }

  // optional int32 dummy12 = 12;
  if (_has_bit(11)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(12, this->dummy12(), target);
  }

  // optional int32 dummy13 = 13;
  if (_has_bit(12)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(13, this->dummy13(), target);
  }

  // optional int32 dummy14 = 14;
  if (_has_bit(13)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(14, this->dummy14(), target);
  }

  // optional int32 dummy15 = 15;
  if (_has_bit(14)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(15, this->dummy15(), target);
  }

  // optional int32 dummy16 = 16;
  if (_has_bit(15)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(16, this->dummy16(), target);
  }

  // optional int32 dummy17 = 17;
  if (_has_bit(16)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(17, this->dummy17(), target);
  }

  // optional int32 dummy18 = 18;
  if (_has_bit(17)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(18, this->dummy18(), target);
  }

  // optional int32 dummy19 = 19;
  if (_has_bit(18)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(19, this->dummy19(), target);
  }

  // optional int32 dummy20 = 20;
  if (_has_bit(19)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(20, this->dummy20(), target);
  }

  // optional int32 dummy21 = 21;
  if (_has_bit(20)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(21, this->dummy21(), target);
  }

  // optional int32 dummy22 = 22;
  if (_has_bit(21)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(22, this->dummy22(), target);
  }

  // optional int32 dummy23 = 23;
  if (_has_bit(22)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(23, this->dummy23(), target);
  }

  // optional int32 dummy24 = 24;
  if (_has_bit(23)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(24, this->dummy24(), target);
  }

  // optional int32 dummy25 = 25;
  if (_has_bit(24)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(25, this->dummy25(), target);
  }

  // optional int32 dummy26 = 26;
  if (_has_bit(25)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(26, this->dummy26(), target);
  }

  // optional int32 dummy27 = 27;
  if (_has_bit(26)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(27, this->dummy27(), target);
  }

  // optional int32 dummy28 = 28;
  if (_has_bit(27)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(28, this->dummy28(), target);
  }

  // optional int32 dummy29 = 29;
  if (_has_bit(28)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(29, this->dummy29(), target);
  }

  // optional int32 dummy30 = 30;
  if (_has_bit(29)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(30, this->dummy30(), target);
  }

  // optional int32 dummy31 = 31;
  if (_has_bit(30)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(31, this->dummy31(), target);
  }

  // optional int32 dummy32 = 32;
  if (_has_bit(31)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(32, this->dummy32(), target);
  }

  // required int32 c = 33;
  if (_has_bit(32)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(33, this->c(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestRequired::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required int32 a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->a());
    }

    // optional int32 dummy2 = 2;
    if (has_dummy2()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy2());
    }

    // required int32 b = 3;
    if (has_b()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->b());
    }

    // optional int32 dummy4 = 4;
    if (has_dummy4()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy4());
    }

    // optional int32 dummy5 = 5;
    if (has_dummy5()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy5());
    }

    // optional int32 dummy6 = 6;
    if (has_dummy6()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy6());
    }

    // optional int32 dummy7 = 7;
    if (has_dummy7()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy7());
    }

    // optional int32 dummy8 = 8;
    if (has_dummy8()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy8());
    }

  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    // optional int32 dummy9 = 9;
    if (has_dummy9()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy9());
    }

    // optional int32 dummy10 = 10;
    if (has_dummy10()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy10());
    }

    // optional int32 dummy11 = 11;
    if (has_dummy11()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy11());
    }

    // optional int32 dummy12 = 12;
    if (has_dummy12()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy12());
    }

    // optional int32 dummy13 = 13;
    if (has_dummy13()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy13());
    }

    // optional int32 dummy14 = 14;
    if (has_dummy14()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy14());
    }

    // optional int32 dummy15 = 15;
    if (has_dummy15()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy15());
    }

    // optional int32 dummy16 = 16;
    if (has_dummy16()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy16());
    }

  }
  if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    // optional int32 dummy17 = 17;
    if (has_dummy17()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy17());
    }

    // optional int32 dummy18 = 18;
    if (has_dummy18()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy18());
    }

    // optional int32 dummy19 = 19;
    if (has_dummy19()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy19());
    }

    // optional int32 dummy20 = 20;
    if (has_dummy20()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy20());
    }

    // optional int32 dummy21 = 21;
    if (has_dummy21()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy21());
    }

    // optional int32 dummy22 = 22;
    if (has_dummy22()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy22());
    }

    // optional int32 dummy23 = 23;
    if (has_dummy23()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy23());
    }

    // optional int32 dummy24 = 24;
    if (has_dummy24()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy24());
    }

  }
  if (_has_bits_[24 / 32] & (0xffu << (24 % 32))) {
    // optional int32 dummy25 = 25;
    if (has_dummy25()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy25());
    }

    // optional int32 dummy26 = 26;
    if (has_dummy26()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy26());
    }

    // optional int32 dummy27 = 27;
    if (has_dummy27()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy27());
    }

    // optional int32 dummy28 = 28;
    if (has_dummy28()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy28());
    }

    // optional int32 dummy29 = 29;
    if (has_dummy29()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy29());
    }

    // optional int32 dummy30 = 30;
    if (has_dummy30()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy30());
    }

    // optional int32 dummy31 = 31;
    if (has_dummy31()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy31());
    }

    // optional int32 dummy32 = 32;
    if (has_dummy32()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy32());
    }

  }
  if (_has_bits_[32 / 32] & (0xffu << (32 % 32))) {
    // required int32 c = 33;
    if (has_c()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->c());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestRequired::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestRequired* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestRequired*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestRequired::MergeFrom(const TestRequired& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_a(from.a());
    }
    if (from._has_bit(1)) {
      set_dummy2(from.dummy2());
    }
    if (from._has_bit(2)) {
      set_b(from.b());
    }
    if (from._has_bit(3)) {
      set_dummy4(from.dummy4());
    }
    if (from._has_bit(4)) {
      set_dummy5(from.dummy5());
    }
    if (from._has_bit(5)) {
      set_dummy6(from.dummy6());
    }
    if (from._has_bit(6)) {
      set_dummy7(from.dummy7());
    }
    if (from._has_bit(7)) {
      set_dummy8(from.dummy8());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from._has_bit(8)) {
      set_dummy9(from.dummy9());
    }
    if (from._has_bit(9)) {
      set_dummy10(from.dummy10());
    }
    if (from._has_bit(10)) {
      set_dummy11(from.dummy11());
    }
    if (from._has_bit(11)) {
      set_dummy12(from.dummy12());
    }
    if (from._has_bit(12)) {
      set_dummy13(from.dummy13());
    }
    if (from._has_bit(13)) {
      set_dummy14(from.dummy14());
    }
    if (from._has_bit(14)) {
      set_dummy15(from.dummy15());
    }
    if (from._has_bit(15)) {
      set_dummy16(from.dummy16());
    }
  }
  if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    if (from._has_bit(16)) {
      set_dummy17(from.dummy17());
    }
    if (from._has_bit(17)) {
      set_dummy18(from.dummy18());
    }
    if (from._has_bit(18)) {
      set_dummy19(from.dummy19());
    }
    if (from._has_bit(19)) {
      set_dummy20(from.dummy20());
    }
    if (from._has_bit(20)) {
      set_dummy21(from.dummy21());
    }
    if (from._has_bit(21)) {
      set_dummy22(from.dummy22());
    }
    if (from._has_bit(22)) {
      set_dummy23(from.dummy23());
    }
    if (from._has_bit(23)) {
      set_dummy24(from.dummy24());
    }
  }
  if (from._has_bits_[24 / 32] & (0xffu << (24 % 32))) {
    if (from._has_bit(24)) {
      set_dummy25(from.dummy25());
    }
    if (from._has_bit(25)) {
      set_dummy26(from.dummy26());
    }
    if (from._has_bit(26)) {
      set_dummy27(from.dummy27());
    }
    if (from._has_bit(27)) {
      set_dummy28(from.dummy28());
    }
    if (from._has_bit(28)) {
      set_dummy29(from.dummy29());
    }
    if (from._has_bit(29)) {
      set_dummy30(from.dummy30());
    }
    if (from._has_bit(30)) {
      set_dummy31(from.dummy31());
    }
    if (from._has_bit(31)) {
      set_dummy32(from.dummy32());
    }
  }
  if (from._has_bits_[32 / 32] & (0xffu << (32 % 32))) {
    if (from._has_bit(32)) {
      set_c(from.c());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestRequired::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestRequired::CopyFrom(const TestRequired& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestRequired::Swap(TestRequired* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(dummy2_, other->dummy2_);
    std::swap(b_, other->b_);
    std::swap(dummy4_, other->dummy4_);
    std::swap(dummy5_, other->dummy5_);
    std::swap(dummy6_, other->dummy6_);
    std::swap(dummy7_, other->dummy7_);
    std::swap(dummy8_, other->dummy8_);
    std::swap(dummy9_, other->dummy9_);
    std::swap(dummy10_, other->dummy10_);
    std::swap(dummy11_, other->dummy11_);
    std::swap(dummy12_, other->dummy12_);
    std::swap(dummy13_, other->dummy13_);
    std::swap(dummy14_, other->dummy14_);
    std::swap(dummy15_, other->dummy15_);
    std::swap(dummy16_, other->dummy16_);
    std::swap(dummy17_, other->dummy17_);
    std::swap(dummy18_, other->dummy18_);
    std::swap(dummy19_, other->dummy19_);
    std::swap(dummy20_, other->dummy20_);
    std::swap(dummy21_, other->dummy21_);
    std::swap(dummy22_, other->dummy22_);
    std::swap(dummy23_, other->dummy23_);
    std::swap(dummy24_, other->dummy24_);
    std::swap(dummy25_, other->dummy25_);
    std::swap(dummy26_, other->dummy26_);
    std::swap(dummy27_, other->dummy27_);
    std::swap(dummy28_, other->dummy28_);
    std::swap(dummy29_, other->dummy29_);
    std::swap(dummy30_, other->dummy30_);
    std::swap(dummy31_, other->dummy31_);
    std::swap(dummy32_, other->dummy32_);
    std::swap(c_, other->c_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    std::swap(_has_bits_[1], other->_has_bits_[1]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestRequired::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000005) != 0x00000005) return false;
  if ((_has_bits_[1] & 0x00000001) != 0x00000001) return false;

  return true;
}

const ::google::protobuf::Descriptor* TestRequired::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestRequired::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestRequired_reflection_;
}

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

#ifndef _MSC_VER
const int TestRequiredForeign::kOptionalMessageFieldNumber;
const int TestRequiredForeign::kRepeatedMessageFieldNumber;
const int TestRequiredForeign::kDummyFieldNumber;
#endif  // !_MSC_VER

TestRequiredForeign::TestRequiredForeign()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestRequiredForeign::InitAsDefaultInstance() {  optional_message_ = const_cast< ::protobuf_unittest::TestRequired*>(&::protobuf_unittest::TestRequired::default_instance());
}

TestRequiredForeign::TestRequiredForeign(const TestRequiredForeign& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestRequiredForeign::SharedCtor() {
  _cached_size_ = 0;
  optional_message_ = NULL;
  dummy_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestRequiredForeign::~TestRequiredForeign() {
  SharedDtor();
}

void TestRequiredForeign::SharedDtor() {
  if (this != default_instance_) {
    delete optional_message_;
  }
}

const ::google::protobuf::Descriptor* TestRequiredForeign::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestRequiredForeign_descriptor_;
}

const TestRequiredForeign& TestRequiredForeign::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestRequiredForeign* TestRequiredForeign::default_instance_ = NULL;

TestRequiredForeign* TestRequiredForeign::New() const {
  return new TestRequiredForeign;
}

void TestRequiredForeign::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (optional_message_ != NULL) optional_message_->::protobuf_unittest::TestRequired::Clear();
    }
    dummy_ = 0;
  }
  repeated_message_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestRequiredForeign::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional .protobuf_unittest.TestRequired optional_message = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, mutable_optional_message()));
        if (input->ExpectTag(18)) goto parse_repeated_message;
        break;
      }

      // repeated .protobuf_unittest.TestRequired repeated_message = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_repeated_message:
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, add_repeated_message()));
        if (input->ExpectTag(18)) goto parse_repeated_message;
        if (input->ExpectTag(24)) goto parse_dummy;
        break;
      }

      // optional int32 dummy = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_dummy:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &dummy_));
        _set_bit(2);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestRequiredForeign::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestRequiredForeign::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional .protobuf_unittest.TestRequired optional_message = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(1, this->optional_message(), output);
  }

  // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  for (int i = 0; i < this->repeated_message_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->repeated_message(i), output);
  }

  // optional int32 dummy = 3;
  if (_has_bit(2)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(3, this->dummy(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestRequiredForeign::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .protobuf_unittest.TestRequired optional_message = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(1, this->optional_message(), target);
  }

  // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  for (int i = 0; i < this->repeated_message_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(2, this->repeated_message(i), target);
  }

  // optional int32 dummy = 3;
  if (_has_bit(2)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(3, this->dummy(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestRequiredForeign::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .protobuf_unittest.TestRequired optional_message = 1;
    if (has_optional_message()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
          this->optional_message());
    }

    // optional int32 dummy = 3;
    if (has_dummy()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->dummy());
    }

  }
  // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  total_size += 1 * this->repeated_message_size();
  for (int i = 0; i < this->repeated_message_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
        this->repeated_message(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestRequiredForeign::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestRequiredForeign* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestRequiredForeign*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestRequiredForeign::MergeFrom(const TestRequiredForeign& from) {
  GOOGLE_CHECK_NE(&from, this);
  repeated_message_.MergeFrom(from.repeated_message_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      mutable_optional_message()->::protobuf_unittest::TestRequired::MergeFrom(from.optional_message());
    }
    if (from._has_bit(2)) {
      set_dummy(from.dummy());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestRequiredForeign::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestRequiredForeign::CopyFrom(const TestRequiredForeign& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestRequiredForeign::Swap(TestRequiredForeign* other) {
  if (other != this) {
    std::swap(optional_message_, other->optional_message_);
    repeated_message_.Swap(&other->repeated_message_);
    std::swap(dummy_, other->dummy_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestRequiredForeign::IsInitialized() const {

  if (has_optional_message()) {
    if (!this->optional_message().IsInitialized()) return false;
  }
  for (int i = 0; i < repeated_message_size(); i++) {
    if (!this->repeated_message(i).IsInitialized()) return false;
  }
  return true;
}

const ::google::protobuf::Descriptor* TestRequiredForeign::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestRequiredForeign::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestRequiredForeign_reflection_;
}

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

#ifndef _MSC_VER
const int TestForeignNested::kForeignNestedFieldNumber;
#endif  // !_MSC_VER

TestForeignNested::TestForeignNested()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestForeignNested::InitAsDefaultInstance() {  foreign_nested_ = const_cast< ::protobuf_unittest::TestAllTypes_NestedMessage*>(&::protobuf_unittest::TestAllTypes_NestedMessage::default_instance());
}

TestForeignNested::TestForeignNested(const TestForeignNested& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestForeignNested::SharedCtor() {
  _cached_size_ = 0;
  foreign_nested_ = NULL;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestForeignNested::~TestForeignNested() {
  SharedDtor();
}

void TestForeignNested::SharedDtor() {
  if (this != default_instance_) {
    delete foreign_nested_;
  }
}

const ::google::protobuf::Descriptor* TestForeignNested::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestForeignNested_descriptor_;
}

const TestForeignNested& TestForeignNested::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestForeignNested* TestForeignNested::default_instance_ = NULL;

TestForeignNested* TestForeignNested::New() const {
  return new TestForeignNested;
}

void TestForeignNested::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (foreign_nested_ != NULL) foreign_nested_->::protobuf_unittest::TestAllTypes_NestedMessage::Clear();
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestForeignNested::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, mutable_foreign_nested()));
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestForeignNested::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestForeignNested::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(1, this->foreign_nested(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestForeignNested::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(1, this->foreign_nested(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestForeignNested::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
    if (has_foreign_nested()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
          this->foreign_nested());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestForeignNested::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestForeignNested* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestForeignNested*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestForeignNested::MergeFrom(const TestForeignNested& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      mutable_foreign_nested()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.foreign_nested());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestForeignNested::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestForeignNested::CopyFrom(const TestForeignNested& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestForeignNested::Swap(TestForeignNested* other) {
  if (other != this) {
    std::swap(foreign_nested_, other->foreign_nested_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestForeignNested::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestForeignNested::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestForeignNested::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestForeignNested_reflection_;
}

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

#ifndef _MSC_VER
#endif  // !_MSC_VER

TestEmptyMessage::TestEmptyMessage()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestEmptyMessage::InitAsDefaultInstance() {}

TestEmptyMessage::TestEmptyMessage(const TestEmptyMessage& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestEmptyMessage::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestEmptyMessage::~TestEmptyMessage() {
  SharedDtor();
}

void TestEmptyMessage::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestEmptyMessage::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestEmptyMessage_descriptor_;
}

const TestEmptyMessage& TestEmptyMessage::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestEmptyMessage* TestEmptyMessage::default_instance_ = NULL;

TestEmptyMessage* TestEmptyMessage::New() const {
  return new TestEmptyMessage;
}

void TestEmptyMessage::Clear() {
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestEmptyMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
      return true;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
  return true;
#undef DO_
}

void TestEmptyMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestEmptyMessage::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestEmptyMessage::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestEmptyMessage::ByteSize() const {
  int total_size = 0;

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestEmptyMessage::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestEmptyMessage* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestEmptyMessage*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestEmptyMessage::MergeFrom(const TestEmptyMessage& from) {
  GOOGLE_CHECK_NE(&from, this);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestEmptyMessage::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestEmptyMessage::CopyFrom(const TestEmptyMessage& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestEmptyMessage::Swap(TestEmptyMessage* other) {
  if (other != this) {
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestEmptyMessage::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestEmptyMessage::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestEmptyMessage::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestEmptyMessage_reflection_;
}

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

#ifndef _MSC_VER
#endif  // !_MSC_VER

TestEmptyMessageWithExtensions::TestEmptyMessageWithExtensions()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestEmptyMessageWithExtensions::InitAsDefaultInstance() {}

TestEmptyMessageWithExtensions::TestEmptyMessageWithExtensions(const TestEmptyMessageWithExtensions& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestEmptyMessageWithExtensions::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestEmptyMessageWithExtensions::~TestEmptyMessageWithExtensions() {
  SharedDtor();
}

void TestEmptyMessageWithExtensions::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestEmptyMessageWithExtensions::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestEmptyMessageWithExtensions_descriptor_;
}

const TestEmptyMessageWithExtensions& TestEmptyMessageWithExtensions::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestEmptyMessageWithExtensions* TestEmptyMessageWithExtensions::default_instance_ = NULL;

TestEmptyMessageWithExtensions* TestEmptyMessageWithExtensions::New() const {
  return new TestEmptyMessageWithExtensions;
}

void TestEmptyMessageWithExtensions::Clear() {
  _extensions_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestEmptyMessageWithExtensions::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
      return true;
    }
    if ((8u <= tag)) {
      DO_(_extensions_.ParseField(tag, input, default_instance_,
                                  mutable_unknown_fields()));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
  return true;
#undef DO_
}

void TestEmptyMessageWithExtensions::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestEmptyMessageWithExtensions::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

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

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestEmptyMessageWithExtensions::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // Extension range [1, 536870912)
  target = _extensions_.SerializeWithCachedSizesToArray(
      1, 536870912, target);

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestEmptyMessageWithExtensions::ByteSize() const {
  int total_size = 0;

  total_size += _extensions_.ByteSize();

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestEmptyMessageWithExtensions::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestEmptyMessageWithExtensions* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestEmptyMessageWithExtensions*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestEmptyMessageWithExtensions::MergeFrom(const TestEmptyMessageWithExtensions& from) {
  GOOGLE_CHECK_NE(&from, this);
  _extensions_.MergeFrom(from._extensions_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestEmptyMessageWithExtensions::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestEmptyMessageWithExtensions::CopyFrom(const TestEmptyMessageWithExtensions& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestEmptyMessageWithExtensions::Swap(TestEmptyMessageWithExtensions* other) {
  if (other != this) {
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
    _extensions_.Swap(&other->_extensions_);
  }
}

bool TestEmptyMessageWithExtensions::IsInitialized() const {

  if (!_extensions_.IsInitialized()) return false;  return true;
}

const ::google::protobuf::Descriptor* TestEmptyMessageWithExtensions::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestEmptyMessageWithExtensions::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestEmptyMessageWithExtensions_reflection_;
}

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

#ifndef _MSC_VER
const int TestReallyLargeTagNumber::kAFieldNumber;
const int TestReallyLargeTagNumber::kBbFieldNumber;
#endif  // !_MSC_VER

TestReallyLargeTagNumber::TestReallyLargeTagNumber()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestReallyLargeTagNumber::InitAsDefaultInstance() {}

TestReallyLargeTagNumber::TestReallyLargeTagNumber(const TestReallyLargeTagNumber& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestReallyLargeTagNumber::SharedCtor() {
  _cached_size_ = 0;
  a_ = 0;
  bb_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestReallyLargeTagNumber::~TestReallyLargeTagNumber() {
  SharedDtor();
}

void TestReallyLargeTagNumber::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestReallyLargeTagNumber::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestReallyLargeTagNumber_descriptor_;
}

const TestReallyLargeTagNumber& TestReallyLargeTagNumber::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestReallyLargeTagNumber* TestReallyLargeTagNumber::default_instance_ = NULL;

TestReallyLargeTagNumber* TestReallyLargeTagNumber::New() const {
  return new TestReallyLargeTagNumber;
}

void TestReallyLargeTagNumber::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    a_ = 0;
    bb_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestReallyLargeTagNumber::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 a = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &a_));
        _set_bit(0);
        if (input->ExpectTag(2147483640)) goto parse_bb;
        break;
      }

      // optional int32 bb = 268435455;
      case 268435455: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_bb:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &bb_));
        _set_bit(1);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestReallyLargeTagNumber::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestReallyLargeTagNumber::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 a = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(1, this->a(), output);
  }

  // optional int32 bb = 268435455;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(268435455, this->bb(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestReallyLargeTagNumber::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 a = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->a(), target);
  }

  // optional int32 bb = 268435455;
  if (_has_bit(1)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(268435455, this->bb(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestReallyLargeTagNumber::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->a());
    }

    // optional int32 bb = 268435455;
    if (has_bb()) {
      total_size += 5 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->bb());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestReallyLargeTagNumber::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestReallyLargeTagNumber* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestReallyLargeTagNumber*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestReallyLargeTagNumber::MergeFrom(const TestReallyLargeTagNumber& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_a(from.a());
    }
    if (from._has_bit(1)) {
      set_bb(from.bb());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestReallyLargeTagNumber::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestReallyLargeTagNumber::CopyFrom(const TestReallyLargeTagNumber& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestReallyLargeTagNumber::Swap(TestReallyLargeTagNumber* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(bb_, other->bb_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestReallyLargeTagNumber::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestReallyLargeTagNumber::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestReallyLargeTagNumber::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestReallyLargeTagNumber_reflection_;
}

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

#ifndef _MSC_VER
const int TestRecursiveMessage::kAFieldNumber;
const int TestRecursiveMessage::kIFieldNumber;
#endif  // !_MSC_VER

TestRecursiveMessage::TestRecursiveMessage()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestRecursiveMessage::InitAsDefaultInstance() {  a_ = const_cast< ::protobuf_unittest::TestRecursiveMessage*>(&::protobuf_unittest::TestRecursiveMessage::default_instance());
}

TestRecursiveMessage::TestRecursiveMessage(const TestRecursiveMessage& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestRecursiveMessage::SharedCtor() {
  _cached_size_ = 0;
  a_ = NULL;
  i_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestRecursiveMessage::~TestRecursiveMessage() {
  SharedDtor();
}

void TestRecursiveMessage::SharedDtor() {
  if (this != default_instance_) {
    delete a_;
  }
}

const ::google::protobuf::Descriptor* TestRecursiveMessage::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestRecursiveMessage_descriptor_;
}

const TestRecursiveMessage& TestRecursiveMessage::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestRecursiveMessage* TestRecursiveMessage::default_instance_ = NULL;

TestRecursiveMessage* TestRecursiveMessage::New() const {
  return new TestRecursiveMessage;
}

void TestRecursiveMessage::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (a_ != NULL) a_->::protobuf_unittest::TestRecursiveMessage::Clear();
    }
    i_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestRecursiveMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional .protobuf_unittest.TestRecursiveMessage a = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, mutable_a()));
        if (input->ExpectTag(16)) goto parse_i;
        break;
      }

      // optional int32 i = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_i:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &i_));
        _set_bit(1);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestRecursiveMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestRecursiveMessage::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional .protobuf_unittest.TestRecursiveMessage a = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(1, this->a(), output);
  }

  // optional int32 i = 2;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(2, this->i(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestRecursiveMessage::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .protobuf_unittest.TestRecursiveMessage a = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(1, this->a(), target);
  }

  // optional int32 i = 2;
  if (_has_bit(1)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(2, this->i(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestRecursiveMessage::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .protobuf_unittest.TestRecursiveMessage a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
          this->a());
    }

    // optional int32 i = 2;
    if (has_i()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->i());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestRecursiveMessage::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestRecursiveMessage* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestRecursiveMessage*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestRecursiveMessage::MergeFrom(const TestRecursiveMessage& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      mutable_a()->::protobuf_unittest::TestRecursiveMessage::MergeFrom(from.a());
    }
    if (from._has_bit(1)) {
      set_i(from.i());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestRecursiveMessage::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestRecursiveMessage::CopyFrom(const TestRecursiveMessage& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestRecursiveMessage::Swap(TestRecursiveMessage* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(i_, other->i_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestRecursiveMessage::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestRecursiveMessage::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestRecursiveMessage::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestRecursiveMessage_reflection_;
}

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

#ifndef _MSC_VER
const int TestMutualRecursionA::kBbFieldNumber;
#endif  // !_MSC_VER

TestMutualRecursionA::TestMutualRecursionA()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestMutualRecursionA::InitAsDefaultInstance() {  bb_ = const_cast< ::protobuf_unittest::TestMutualRecursionB*>(&::protobuf_unittest::TestMutualRecursionB::default_instance());
}

TestMutualRecursionA::TestMutualRecursionA(const TestMutualRecursionA& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestMutualRecursionA::SharedCtor() {
  _cached_size_ = 0;
  bb_ = NULL;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestMutualRecursionA::~TestMutualRecursionA() {
  SharedDtor();
}

void TestMutualRecursionA::SharedDtor() {
  if (this != default_instance_) {
    delete bb_;
  }
}

const ::google::protobuf::Descriptor* TestMutualRecursionA::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestMutualRecursionA_descriptor_;
}

const TestMutualRecursionA& TestMutualRecursionA::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestMutualRecursionA* TestMutualRecursionA::default_instance_ = NULL;

TestMutualRecursionA* TestMutualRecursionA::New() const {
  return new TestMutualRecursionA;
}

void TestMutualRecursionA::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (bb_ != NULL) bb_->::protobuf_unittest::TestMutualRecursionB::Clear();
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestMutualRecursionA::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, mutable_bb()));
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestMutualRecursionA::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestMutualRecursionA::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(1, this->bb(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestMutualRecursionA::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(1, this->bb(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestMutualRecursionA::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
    if (has_bb()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
          this->bb());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestMutualRecursionA::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestMutualRecursionA* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestMutualRecursionA*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestMutualRecursionA::MergeFrom(const TestMutualRecursionA& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      mutable_bb()->::protobuf_unittest::TestMutualRecursionB::MergeFrom(from.bb());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestMutualRecursionA::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestMutualRecursionA::CopyFrom(const TestMutualRecursionA& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestMutualRecursionA::Swap(TestMutualRecursionA* other) {
  if (other != this) {
    std::swap(bb_, other->bb_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestMutualRecursionA::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestMutualRecursionA::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestMutualRecursionA::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestMutualRecursionA_reflection_;
}

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

#ifndef _MSC_VER
const int TestMutualRecursionB::kAFieldNumber;
const int TestMutualRecursionB::kOptionalInt32FieldNumber;
#endif  // !_MSC_VER

TestMutualRecursionB::TestMutualRecursionB()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestMutualRecursionB::InitAsDefaultInstance() {  a_ = const_cast< ::protobuf_unittest::TestMutualRecursionA*>(&::protobuf_unittest::TestMutualRecursionA::default_instance());
}

TestMutualRecursionB::TestMutualRecursionB(const TestMutualRecursionB& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestMutualRecursionB::SharedCtor() {
  _cached_size_ = 0;
  a_ = NULL;
  optional_int32_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestMutualRecursionB::~TestMutualRecursionB() {
  SharedDtor();
}

void TestMutualRecursionB::SharedDtor() {
  if (this != default_instance_) {
    delete a_;
  }
}

const ::google::protobuf::Descriptor* TestMutualRecursionB::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestMutualRecursionB_descriptor_;
}

const TestMutualRecursionB& TestMutualRecursionB::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestMutualRecursionB* TestMutualRecursionB::default_instance_ = NULL;

TestMutualRecursionB* TestMutualRecursionB::New() const {
  return new TestMutualRecursionB;
}

void TestMutualRecursionB::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (a_ != NULL) a_->::protobuf_unittest::TestMutualRecursionA::Clear();
    }
    optional_int32_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestMutualRecursionB::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional .protobuf_unittest.TestMutualRecursionA a = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, mutable_a()));
        if (input->ExpectTag(16)) goto parse_optional_int32;
        break;
      }

      // optional int32 optional_int32 = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_optional_int32:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &optional_int32_));
        _set_bit(1);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestMutualRecursionB::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestMutualRecursionB::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional .protobuf_unittest.TestMutualRecursionA a = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(1, this->a(), output);
  }

  // optional int32 optional_int32 = 2;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(2, this->optional_int32(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestMutualRecursionB::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .protobuf_unittest.TestMutualRecursionA a = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(1, this->a(), target);
  }

  // optional int32 optional_int32 = 2;
  if (_has_bit(1)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(2, this->optional_int32(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestMutualRecursionB::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .protobuf_unittest.TestMutualRecursionA a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
          this->a());
    }

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

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestMutualRecursionB::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestMutualRecursionB* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestMutualRecursionB*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestMutualRecursionB::MergeFrom(const TestMutualRecursionB& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      mutable_a()->::protobuf_unittest::TestMutualRecursionA::MergeFrom(from.a());
    }
    if (from._has_bit(1)) {
      set_optional_int32(from.optional_int32());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestMutualRecursionB::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestMutualRecursionB::CopyFrom(const TestMutualRecursionB& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestMutualRecursionB::Swap(TestMutualRecursionB* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(optional_int32_, other->optional_int32_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestMutualRecursionB::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestMutualRecursionB::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestMutualRecursionB::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestMutualRecursionB_reflection_;
}

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

#ifndef _MSC_VER
const int TestDupFieldNumber_Foo::kAFieldNumber;
#endif  // !_MSC_VER

TestDupFieldNumber_Foo::TestDupFieldNumber_Foo()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestDupFieldNumber_Foo::InitAsDefaultInstance() {}

TestDupFieldNumber_Foo::TestDupFieldNumber_Foo(const TestDupFieldNumber_Foo& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestDupFieldNumber_Foo::SharedCtor() {
  _cached_size_ = 0;
  a_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestDupFieldNumber_Foo::~TestDupFieldNumber_Foo() {
  SharedDtor();
}

void TestDupFieldNumber_Foo::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestDupFieldNumber_Foo::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestDupFieldNumber_Foo_descriptor_;
}

const TestDupFieldNumber_Foo& TestDupFieldNumber_Foo::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestDupFieldNumber_Foo* TestDupFieldNumber_Foo::default_instance_ = NULL;

TestDupFieldNumber_Foo* TestDupFieldNumber_Foo::New() const {
  return new TestDupFieldNumber_Foo;
}

void TestDupFieldNumber_Foo::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    a_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestDupFieldNumber_Foo::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 a = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &a_));
        _set_bit(0);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestDupFieldNumber_Foo::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestDupFieldNumber_Foo::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 a = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(1, this->a(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestDupFieldNumber_Foo::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 a = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->a(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestDupFieldNumber_Foo::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->a());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestDupFieldNumber_Foo::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestDupFieldNumber_Foo* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestDupFieldNumber_Foo*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestDupFieldNumber_Foo::MergeFrom(const TestDupFieldNumber_Foo& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_a(from.a());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestDupFieldNumber_Foo::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestDupFieldNumber_Foo::CopyFrom(const TestDupFieldNumber_Foo& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestDupFieldNumber_Foo::Swap(TestDupFieldNumber_Foo* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestDupFieldNumber_Foo::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestDupFieldNumber_Foo::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestDupFieldNumber_Foo::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestDupFieldNumber_Foo_reflection_;
}

// -------------------------------------------------------------------

#ifndef _MSC_VER
const int TestDupFieldNumber_Bar::kAFieldNumber;
#endif  // !_MSC_VER

TestDupFieldNumber_Bar::TestDupFieldNumber_Bar()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestDupFieldNumber_Bar::InitAsDefaultInstance() {}

TestDupFieldNumber_Bar::TestDupFieldNumber_Bar(const TestDupFieldNumber_Bar& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestDupFieldNumber_Bar::SharedCtor() {
  _cached_size_ = 0;
  a_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestDupFieldNumber_Bar::~TestDupFieldNumber_Bar() {
  SharedDtor();
}

void TestDupFieldNumber_Bar::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestDupFieldNumber_Bar::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestDupFieldNumber_Bar_descriptor_;
}

const TestDupFieldNumber_Bar& TestDupFieldNumber_Bar::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestDupFieldNumber_Bar* TestDupFieldNumber_Bar::default_instance_ = NULL;

TestDupFieldNumber_Bar* TestDupFieldNumber_Bar::New() const {
  return new TestDupFieldNumber_Bar;
}

void TestDupFieldNumber_Bar::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    a_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestDupFieldNumber_Bar::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 a = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &a_));
        _set_bit(0);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestDupFieldNumber_Bar::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestDupFieldNumber_Bar::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 a = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(1, this->a(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestDupFieldNumber_Bar::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 a = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->a(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestDupFieldNumber_Bar::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->a());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestDupFieldNumber_Bar::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestDupFieldNumber_Bar* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestDupFieldNumber_Bar*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestDupFieldNumber_Bar::MergeFrom(const TestDupFieldNumber_Bar& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_a(from.a());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestDupFieldNumber_Bar::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestDupFieldNumber_Bar::CopyFrom(const TestDupFieldNumber_Bar& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestDupFieldNumber_Bar::Swap(TestDupFieldNumber_Bar* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestDupFieldNumber_Bar::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestDupFieldNumber_Bar::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestDupFieldNumber_Bar::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestDupFieldNumber_Bar_reflection_;
}

// -------------------------------------------------------------------

#ifndef _MSC_VER
const int TestDupFieldNumber::kAFieldNumber;
const int TestDupFieldNumber::kFooFieldNumber;
const int TestDupFieldNumber::kBarFieldNumber;
#endif  // !_MSC_VER

TestDupFieldNumber::TestDupFieldNumber()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestDupFieldNumber::InitAsDefaultInstance() {  foo_ = const_cast< ::protobuf_unittest::TestDupFieldNumber_Foo*>(&::protobuf_unittest::TestDupFieldNumber_Foo::default_instance());
  bar_ = const_cast< ::protobuf_unittest::TestDupFieldNumber_Bar*>(&::protobuf_unittest::TestDupFieldNumber_Bar::default_instance());
}

TestDupFieldNumber::TestDupFieldNumber(const TestDupFieldNumber& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestDupFieldNumber::SharedCtor() {
  _cached_size_ = 0;
  a_ = 0;
  foo_ = NULL;
  bar_ = NULL;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestDupFieldNumber::~TestDupFieldNumber() {
  SharedDtor();
}

void TestDupFieldNumber::SharedDtor() {
  if (this != default_instance_) {
    delete foo_;
    delete bar_;
  }
}

const ::google::protobuf::Descriptor* TestDupFieldNumber::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestDupFieldNumber_descriptor_;
}

const TestDupFieldNumber& TestDupFieldNumber::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestDupFieldNumber* TestDupFieldNumber::default_instance_ = NULL;

TestDupFieldNumber* TestDupFieldNumber::New() const {
  return new TestDupFieldNumber;
}

void TestDupFieldNumber::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    a_ = 0;
    if (_has_bit(1)) {
      if (foo_ != NULL) foo_->::protobuf_unittest::TestDupFieldNumber_Foo::Clear();
    }
    if (_has_bit(2)) {
      if (bar_ != NULL) bar_->::protobuf_unittest::TestDupFieldNumber_Bar::Clear();
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestDupFieldNumber::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 a = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &a_));
        _set_bit(0);
        if (input->ExpectTag(19)) goto parse_foo;
        break;
      }

      // optional group Foo = 2 {
      case 2: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_START_GROUP) {
          goto handle_uninterpreted;
        }
       parse_foo:
        DO_(::google::protobuf::internal::WireFormat::ReadGroupNoVirtual(2, input, mutable_foo()));
        if (input->ExpectTag(27)) goto parse_bar;
        break;
      }

      // optional group Bar = 3 {
      case 3: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_START_GROUP) {
          goto handle_uninterpreted;
        }
       parse_bar:
        DO_(::google::protobuf::internal::WireFormat::ReadGroupNoVirtual(3, input, mutable_bar()));
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestDupFieldNumber::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestDupFieldNumber::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 a = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(1, this->a(), output);
  }

  // optional group Foo = 2 {
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::WriteGroupNoVirtual(2, this->foo(), output);
  }

  // optional group Bar = 3 {
  if (_has_bit(2)) {
    ::google::protobuf::internal::WireFormat::WriteGroupNoVirtual(3, this->bar(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestDupFieldNumber::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 a = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->a(), target);
  }

  // optional group Foo = 2 {
  if (_has_bit(1)) {
    target = ::google::protobuf::internal::WireFormat::WriteGroupNoVirtualToArray(2, this->foo(), target);
  }

  // optional group Bar = 3 {
  if (_has_bit(2)) {
    target = ::google::protobuf::internal::WireFormat::WriteGroupNoVirtualToArray(3, this->bar(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestDupFieldNumber::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 a = 1;
    if (has_a()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->a());
    }

    // optional group Foo = 2 {
    if (has_foo()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::GroupSizeNoVirtual(
          this->foo());
    }

    // optional group Bar = 3 {
    if (has_bar()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormat::GroupSizeNoVirtual(
          this->bar());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestDupFieldNumber::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestDupFieldNumber* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestDupFieldNumber*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestDupFieldNumber::MergeFrom(const TestDupFieldNumber& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_a(from.a());
    }
    if (from._has_bit(1)) {
      mutable_foo()->::protobuf_unittest::TestDupFieldNumber_Foo::MergeFrom(from.foo());
    }
    if (from._has_bit(2)) {
      mutable_bar()->::protobuf_unittest::TestDupFieldNumber_Bar::MergeFrom(from.bar());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestDupFieldNumber::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestDupFieldNumber::CopyFrom(const TestDupFieldNumber& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestDupFieldNumber::Swap(TestDupFieldNumber* other) {
  if (other != this) {
    std::swap(a_, other->a_);
    std::swap(foo_, other->foo_);
    std::swap(bar_, other->bar_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestDupFieldNumber::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestDupFieldNumber::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestDupFieldNumber::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestDupFieldNumber_reflection_;
}

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

#ifndef _MSC_VER
const int TestNestedMessageHasBits_NestedMessage::kNestedmessageRepeatedInt32FieldNumber;
const int TestNestedMessageHasBits_NestedMessage::kNestedmessageRepeatedForeignmessageFieldNumber;
#endif  // !_MSC_VER

TestNestedMessageHasBits_NestedMessage::TestNestedMessageHasBits_NestedMessage()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestNestedMessageHasBits_NestedMessage::InitAsDefaultInstance() {}

TestNestedMessageHasBits_NestedMessage::TestNestedMessageHasBits_NestedMessage(const TestNestedMessageHasBits_NestedMessage& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestNestedMessageHasBits_NestedMessage::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestNestedMessageHasBits_NestedMessage::~TestNestedMessageHasBits_NestedMessage() {
  SharedDtor();
}

void TestNestedMessageHasBits_NestedMessage::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestNestedMessageHasBits_NestedMessage::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestNestedMessageHasBits_NestedMessage_descriptor_;
}

const TestNestedMessageHasBits_NestedMessage& TestNestedMessageHasBits_NestedMessage::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestNestedMessageHasBits_NestedMessage* TestNestedMessageHasBits_NestedMessage::default_instance_ = NULL;

TestNestedMessageHasBits_NestedMessage* TestNestedMessageHasBits_NestedMessage::New() const {
  return new TestNestedMessageHasBits_NestedMessage;
}

void TestNestedMessageHasBits_NestedMessage::Clear() {
  nestedmessage_repeated_int32_.Clear();
  nestedmessage_repeated_foreignmessage_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestNestedMessageHasBits_NestedMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // repeated int32 nestedmessage_repeated_int32 = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_nestedmessage_repeated_int32:
        ::google::protobuf::int32 value;
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(input, &value));
        add_nestedmessage_repeated_int32(value);
        if (input->ExpectTag(8)) goto parse_nestedmessage_repeated_int32;
        if (input->ExpectTag(18)) goto parse_nestedmessage_repeated_foreignmessage;
        break;
      }

      // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_nestedmessage_repeated_foreignmessage:
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, add_nestedmessage_repeated_foreignmessage()));
        if (input->ExpectTag(18)) goto parse_nestedmessage_repeated_foreignmessage;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestNestedMessageHasBits_NestedMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestNestedMessageHasBits_NestedMessage::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // repeated int32 nestedmessage_repeated_int32 = 1;
  for (int i = 0; i < this->nestedmessage_repeated_int32_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteInt32(1, this->nestedmessage_repeated_int32(i), output);
  }

  // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
  for (int i = 0; i < this->nestedmessage_repeated_foreignmessage_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(2, this->nestedmessage_repeated_foreignmessage(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestNestedMessageHasBits_NestedMessage::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated int32 nestedmessage_repeated_int32 = 1;
  for (int i = 0; i < this->nestedmessage_repeated_int32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->nestedmessage_repeated_int32(i), target);
  }

  // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
  for (int i = 0; i < this->nestedmessage_repeated_foreignmessage_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(2, this->nestedmessage_repeated_foreignmessage(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestNestedMessageHasBits_NestedMessage::ByteSize() const {
  int total_size = 0;

  // repeated int32 nestedmessage_repeated_int32 = 1;
  {
    int data_size = 0;
    for (int i = 0; i < this->nestedmessage_repeated_int32_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::Int32Size(
        this->nestedmessage_repeated_int32(i));
    }
    total_size += 1 * this->nestedmessage_repeated_int32_size() + data_size;
  }

  // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
  total_size += 1 * this->nestedmessage_repeated_foreignmessage_size();
  for (int i = 0; i < this->nestedmessage_repeated_foreignmessage_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
        this->nestedmessage_repeated_foreignmessage(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestNestedMessageHasBits_NestedMessage::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestNestedMessageHasBits_NestedMessage* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestNestedMessageHasBits_NestedMessage*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestNestedMessageHasBits_NestedMessage::MergeFrom(const TestNestedMessageHasBits_NestedMessage& from) {
  GOOGLE_CHECK_NE(&from, this);
  nestedmessage_repeated_int32_.MergeFrom(from.nestedmessage_repeated_int32_);
  nestedmessage_repeated_foreignmessage_.MergeFrom(from.nestedmessage_repeated_foreignmessage_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestNestedMessageHasBits_NestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestNestedMessageHasBits_NestedMessage::CopyFrom(const TestNestedMessageHasBits_NestedMessage& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestNestedMessageHasBits_NestedMessage::Swap(TestNestedMessageHasBits_NestedMessage* other) {
  if (other != this) {
    nestedmessage_repeated_int32_.Swap(&other->nestedmessage_repeated_int32_);
    nestedmessage_repeated_foreignmessage_.Swap(&other->nestedmessage_repeated_foreignmessage_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestNestedMessageHasBits_NestedMessage::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestNestedMessageHasBits_NestedMessage::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestNestedMessageHasBits_NestedMessage::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestNestedMessageHasBits_NestedMessage_reflection_;
}

// -------------------------------------------------------------------

#ifndef _MSC_VER
const int TestNestedMessageHasBits::kOptionalNestedMessageFieldNumber;
#endif  // !_MSC_VER

TestNestedMessageHasBits::TestNestedMessageHasBits()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestNestedMessageHasBits::InitAsDefaultInstance() {  optional_nested_message_ = const_cast< ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage*>(&::protobuf_unittest::TestNestedMessageHasBits_NestedMessage::default_instance());
}

TestNestedMessageHasBits::TestNestedMessageHasBits(const TestNestedMessageHasBits& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestNestedMessageHasBits::SharedCtor() {
  _cached_size_ = 0;
  optional_nested_message_ = NULL;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestNestedMessageHasBits::~TestNestedMessageHasBits() {
  SharedDtor();
}

void TestNestedMessageHasBits::SharedDtor() {
  if (this != default_instance_) {
    delete optional_nested_message_;
  }
}

const ::google::protobuf::Descriptor* TestNestedMessageHasBits::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestNestedMessageHasBits_descriptor_;
}

const TestNestedMessageHasBits& TestNestedMessageHasBits::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestNestedMessageHasBits* TestNestedMessageHasBits::default_instance_ = NULL;

TestNestedMessageHasBits* TestNestedMessageHasBits::New() const {
  return new TestNestedMessageHasBits;
}

void TestNestedMessageHasBits::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (optional_nested_message_ != NULL) optional_nested_message_->::protobuf_unittest::TestNestedMessageHasBits_NestedMessage::Clear();
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestNestedMessageHasBits::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, mutable_optional_nested_message()));
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestNestedMessageHasBits::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestNestedMessageHasBits::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(1, this->optional_nested_message(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestNestedMessageHasBits::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(1, this->optional_nested_message(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestNestedMessageHasBits::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
    if (has_optional_nested_message()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
          this->optional_nested_message());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestNestedMessageHasBits::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestNestedMessageHasBits* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestNestedMessageHasBits*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestNestedMessageHasBits::MergeFrom(const TestNestedMessageHasBits& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      mutable_optional_nested_message()->::protobuf_unittest::TestNestedMessageHasBits_NestedMessage::MergeFrom(from.optional_nested_message());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestNestedMessageHasBits::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestNestedMessageHasBits::CopyFrom(const TestNestedMessageHasBits& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestNestedMessageHasBits::Swap(TestNestedMessageHasBits* other) {
  if (other != this) {
    std::swap(optional_nested_message_, other->optional_nested_message_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestNestedMessageHasBits::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestNestedMessageHasBits::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestNestedMessageHasBits::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestNestedMessageHasBits_reflection_;
}

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

const ::std::string TestCamelCaseFieldNames::_default_stringfield_;
const ::std::string TestCamelCaseFieldNames::_default_stringpiecefield_;
const ::std::string TestCamelCaseFieldNames::_default_cordfield_;
#ifndef _MSC_VER
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  // !_MSC_VER

TestCamelCaseFieldNames::TestCamelCaseFieldNames()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestCamelCaseFieldNames::InitAsDefaultInstance() {  messagefield_ = const_cast< ::protobuf_unittest::ForeignMessage*>(&::protobuf_unittest::ForeignMessage::default_instance());
}

TestCamelCaseFieldNames::TestCamelCaseFieldNames(const TestCamelCaseFieldNames& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestCamelCaseFieldNames::SharedCtor() {
  _cached_size_ = 0;
  primitivefield_ = 0;
  stringfield_ = const_cast< ::std::string*>(&_default_stringfield_);
  enumfield_ = 4;
  messagefield_ = NULL;
  stringpiecefield_ = const_cast< ::std::string*>(&_default_stringpiecefield_);
  cordfield_ = const_cast< ::std::string*>(&_default_cordfield_);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestCamelCaseFieldNames::~TestCamelCaseFieldNames() {
  SharedDtor();
}

void TestCamelCaseFieldNames::SharedDtor() {
  if (stringfield_ != &_default_stringfield_) {
    delete stringfield_;
  }
  if (stringpiecefield_ != &_default_stringpiecefield_) {
    delete stringpiecefield_;
  }
  if (cordfield_ != &_default_cordfield_) {
    delete cordfield_;
  }
  if (this != default_instance_) {
    delete messagefield_;
  }
}

const ::google::protobuf::Descriptor* TestCamelCaseFieldNames::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestCamelCaseFieldNames_descriptor_;
}

const TestCamelCaseFieldNames& TestCamelCaseFieldNames::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestCamelCaseFieldNames* TestCamelCaseFieldNames::default_instance_ = NULL;

TestCamelCaseFieldNames* TestCamelCaseFieldNames::New() const {
  return new TestCamelCaseFieldNames;
}

void TestCamelCaseFieldNames::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    primitivefield_ = 0;
    if (_has_bit(1)) {
      if (stringfield_ != &_default_stringfield_) {
        stringfield_->clear();
      }
    }
    enumfield_ = 4;
    if (_has_bit(3)) {
      if (messagefield_ != NULL) messagefield_->::protobuf_unittest::ForeignMessage::Clear();
    }
    if (_has_bit(4)) {
      if (stringpiecefield_ != &_default_stringpiecefield_) {
        stringpiecefield_->clear();
      }
    }
    if (_has_bit(5)) {
      if (cordfield_ != &_default_cordfield_) {
        cordfield_->clear();
      }
    }
  }
  repeatedprimitivefield_.Clear();
  repeatedstringfield_.Clear();
  repeatedenumfield_.Clear();
  repeatedmessagefield_.Clear();
  repeatedstringpiecefield_.Clear();
  repeatedcordfield_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestCamelCaseFieldNames::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int32 PrimitiveField = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &primitivefield_));
        _set_bit(0);
        if (input->ExpectTag(18)) goto parse_StringField;
        break;
      }

      // optional string StringField = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_StringField:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_stringfield()));
        if (input->ExpectTag(24)) goto parse_EnumField;
        break;
      }

      // optional .protobuf_unittest.ForeignEnum EnumField = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_EnumField:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(input, &value));
        if (protobuf_unittest::ForeignEnum_IsValid(value)) {
          set_enumfield(static_cast< protobuf_unittest::ForeignEnum >(value));
        } else {
          mutable_unknown_fields()->AddVarint(3, value);
        }
        if (input->ExpectTag(34)) goto parse_MessageField;
        break;
      }

      // optional .protobuf_unittest.ForeignMessage MessageField = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_MessageField:
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, mutable_messagefield()));
        if (input->ExpectTag(42)) goto parse_StringPieceField;
        break;
      }

      // optional string StringPieceField = 5 [ctype = STRING_PIECE];
      case 5: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_StringPieceField:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_stringpiecefield()));
        if (input->ExpectTag(50)) goto parse_CordField;
        break;
      }

      // optional string CordField = 6 [ctype = CORD];
      case 6: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_CordField:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_cordfield()));
        if (input->ExpectTag(56)) goto parse_RepeatedPrimitiveField;
        break;
      }

      // repeated int32 RepeatedPrimitiveField = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_RepeatedPrimitiveField:
        ::google::protobuf::int32 value;
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(input, &value));
        add_repeatedprimitivefield(value);
        if (input->ExpectTag(56)) goto parse_RepeatedPrimitiveField;
        if (input->ExpectTag(66)) goto parse_RepeatedStringField;
        break;
      }

      // repeated string RepeatedStringField = 8;
      case 8: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_RepeatedStringField:
        DO_(::google::protobuf::internal::WireFormat::ReadString(
             input, add_repeatedstringfield()));
        if (input->ExpectTag(66)) goto parse_RepeatedStringField;
        if (input->ExpectTag(72)) goto parse_RepeatedEnumField;
        break;
      }

      // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
      case 9: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_RepeatedEnumField:
        int value;
        DO_(::google::protobuf::internal::WireFormat::ReadEnum(input, &value));
        if (protobuf_unittest::ForeignEnum_IsValid(value)) {
          add_repeatedenumfield(static_cast< protobuf_unittest::ForeignEnum >(value));
        } else {
          mutable_unknown_fields()->AddVarint(9, value);
        }
        if (input->ExpectTag(72)) goto parse_RepeatedEnumField;
        if (input->ExpectTag(82)) goto parse_RepeatedMessageField;
        break;
      }

      // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
      case 10: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_RepeatedMessageField:
        DO_(::google::protobuf::internal::WireFormat::ReadMessageNoVirtual(
             input, add_repeatedmessagefield()));
        if (input->ExpectTag(82)) goto parse_RepeatedMessageField;
        if (input->ExpectTag(90)) goto parse_RepeatedStringPieceField;
        break;
      }

      // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
      case 11: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_RepeatedStringPieceField:
        DO_(::google::protobuf::internal::WireFormat::ReadString(
             input, add_repeatedstringpiecefield()));
        if (input->ExpectTag(90)) goto parse_RepeatedStringPieceField;
        if (input->ExpectTag(98)) goto parse_RepeatedCordField;
        break;
      }

      // repeated string RepeatedCordField = 12 [ctype = CORD];
      case 12: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_RepeatedCordField:
        DO_(::google::protobuf::internal::WireFormat::ReadString(
             input, add_repeatedcordfield()));
        if (input->ExpectTag(98)) goto parse_RepeatedCordField;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestCamelCaseFieldNames::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestCamelCaseFieldNames::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int32 PrimitiveField = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(1, this->primitivefield(), output);
  }

  // optional string StringField = 2;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::WriteString(2, this->stringfield(), output);
  }

  // optional .protobuf_unittest.ForeignEnum EnumField = 3;
  if (_has_bit(2)) {
    ::google::protobuf::internal::WireFormat::WriteEnum(3, this->enumfield(), output);
  }

  // optional .protobuf_unittest.ForeignMessage MessageField = 4;
  if (_has_bit(3)) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(4, this->messagefield(), output);
  }

  // optional string StringPieceField = 5 [ctype = STRING_PIECE];
  if (_has_bit(4)) {
    ::google::protobuf::internal::WireFormat::WriteString(5, this->stringpiecefield(), output);
  }

  // optional string CordField = 6 [ctype = CORD];
  if (_has_bit(5)) {
    ::google::protobuf::internal::WireFormat::WriteString(6, this->cordfield(), output);
  }

  // repeated int32 RepeatedPrimitiveField = 7;
  for (int i = 0; i < this->repeatedprimitivefield_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteInt32(7, this->repeatedprimitivefield(i), output);
  }

  // repeated string RepeatedStringField = 8;
  for (int i = 0; i < this->repeatedstringfield_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteString(8, this->repeatedstringfield(i), output);
  }

  // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
  for (int i = 0; i < this->repeatedenumfield_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteEnum(9, this->repeatedenumfield(i), output);
  }

  // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
  for (int i = 0; i < this->repeatedmessagefield_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteMessageNoVirtual(10, this->repeatedmessagefield(i), output);
  }

  // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
  for (int i = 0; i < this->repeatedstringpiecefield_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteString(11, this->repeatedstringpiecefield(i), output);
  }

  // repeated string RepeatedCordField = 12 [ctype = CORD];
  for (int i = 0; i < this->repeatedcordfield_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteString(12, this->repeatedcordfield(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestCamelCaseFieldNames::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 PrimitiveField = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(1, this->primitivefield(), target);
  }

  // optional string StringField = 2;
  if (_has_bit(1)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(2, this->stringfield(), target);
  }

  // optional .protobuf_unittest.ForeignEnum EnumField = 3;
  if (_has_bit(2)) {
    target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(3, this->enumfield(), target);
  }

  // optional .protobuf_unittest.ForeignMessage MessageField = 4;
  if (_has_bit(3)) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(4, this->messagefield(), target);
  }

  // optional string StringPieceField = 5 [ctype = STRING_PIECE];
  if (_has_bit(4)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(5, this->stringpiecefield(), target);
  }

  // optional string CordField = 6 [ctype = CORD];
  if (_has_bit(5)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(6, this->cordfield(), target);
  }

  // repeated int32 RepeatedPrimitiveField = 7;
  for (int i = 0; i < this->repeatedprimitivefield_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(7, this->repeatedprimitivefield(i), target);
  }

  // repeated string RepeatedStringField = 8;
  for (int i = 0; i < this->repeatedstringfield_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(8, this->repeatedstringfield(i), target);
  }

  // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
  for (int i = 0; i < this->repeatedenumfield_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteEnumToArray(9, this->repeatedenumfield(i), target);
  }

  // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
  for (int i = 0; i < this->repeatedmessagefield_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteMessageNoVirtualToArray(10, this->repeatedmessagefield(i), target);
  }

  // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
  for (int i = 0; i < this->repeatedstringpiecefield_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(11, this->repeatedstringpiecefield(i), target);
  }

  // repeated string RepeatedCordField = 12 [ctype = CORD];
  for (int i = 0; i < this->repeatedcordfield_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(12, this->repeatedcordfield(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestCamelCaseFieldNames::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 PrimitiveField = 1;
    if (has_primitivefield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->primitivefield());
    }

    // optional string StringField = 2;
    if (has_stringfield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::StringSize(this->stringfield());
    }

    // optional .protobuf_unittest.ForeignEnum EnumField = 3;
    if (has_enumfield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::EnumSize(this->enumfield());
    }

    // optional .protobuf_unittest.ForeignMessage MessageField = 4;
    if (has_messagefield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
          this->messagefield());
    }

    // optional string StringPieceField = 5 [ctype = STRING_PIECE];
    if (has_stringpiecefield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::StringSize(this->stringpiecefield());
    }

    // optional string CordField = 6 [ctype = CORD];
    if (has_cordfield()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::StringSize(this->cordfield());
    }

  }
  // repeated int32 RepeatedPrimitiveField = 7;
  {
    int data_size = 0;
    for (int i = 0; i < this->repeatedprimitivefield_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::Int32Size(
        this->repeatedprimitivefield(i));
    }
    total_size += 1 * this->repeatedprimitivefield_size() + data_size;
  }

  // repeated string RepeatedStringField = 8;
  total_size += 1 * this->repeatedstringfield_size();
  for (int i = 0; i < this->repeatedstringfield_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormat::StringSize(
      this->repeatedstringfield(i));
  }

  // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
  {
    int data_size = 0;
    for (int i = 0; i < this->repeatedenumfield_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::EnumSize(
        this->repeatedenumfield(i));
    }
    total_size += 1 * this->repeatedenumfield_size() + data_size;
  }

  // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
  total_size += 1 * this->repeatedmessagefield_size();
  for (int i = 0; i < this->repeatedmessagefield_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormat::MessageSizeNoVirtual(
        this->repeatedmessagefield(i));
  }

  // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
  total_size += 1 * this->repeatedstringpiecefield_size();
  for (int i = 0; i < this->repeatedstringpiecefield_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormat::StringSize(
      this->repeatedstringpiecefield(i));
  }

  // repeated string RepeatedCordField = 12 [ctype = CORD];
  total_size += 1 * this->repeatedcordfield_size();
  for (int i = 0; i < this->repeatedcordfield_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormat::StringSize(
      this->repeatedcordfield(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestCamelCaseFieldNames::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestCamelCaseFieldNames* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestCamelCaseFieldNames*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestCamelCaseFieldNames::MergeFrom(const TestCamelCaseFieldNames& from) {
  GOOGLE_CHECK_NE(&from, this);
  repeatedprimitivefield_.MergeFrom(from.repeatedprimitivefield_);
  repeatedstringfield_.MergeFrom(from.repeatedstringfield_);
  repeatedenumfield_.MergeFrom(from.repeatedenumfield_);
  repeatedmessagefield_.MergeFrom(from.repeatedmessagefield_);
  repeatedstringpiecefield_.MergeFrom(from.repeatedstringpiecefield_);
  repeatedcordfield_.MergeFrom(from.repeatedcordfield_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_primitivefield(from.primitivefield());
    }
    if (from._has_bit(1)) {
      set_stringfield(from.stringfield());
    }
    if (from._has_bit(2)) {
      set_enumfield(from.enumfield());
    }
    if (from._has_bit(3)) {
      mutable_messagefield()->::protobuf_unittest::ForeignMessage::MergeFrom(from.messagefield());
    }
    if (from._has_bit(4)) {
      set_stringpiecefield(from.stringpiecefield());
    }
    if (from._has_bit(5)) {
      set_cordfield(from.cordfield());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestCamelCaseFieldNames::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestCamelCaseFieldNames::CopyFrom(const TestCamelCaseFieldNames& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestCamelCaseFieldNames::Swap(TestCamelCaseFieldNames* other) {
  if (other != this) {
    std::swap(primitivefield_, other->primitivefield_);
    std::swap(stringfield_, other->stringfield_);
    std::swap(enumfield_, other->enumfield_);
    std::swap(messagefield_, other->messagefield_);
    std::swap(stringpiecefield_, other->stringpiecefield_);
    std::swap(cordfield_, other->cordfield_);
    repeatedprimitivefield_.Swap(&other->repeatedprimitivefield_);
    repeatedstringfield_.Swap(&other->repeatedstringfield_);
    repeatedenumfield_.Swap(&other->repeatedenumfield_);
    repeatedmessagefield_.Swap(&other->repeatedmessagefield_);
    repeatedstringpiecefield_.Swap(&other->repeatedstringpiecefield_);
    repeatedcordfield_.Swap(&other->repeatedcordfield_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestCamelCaseFieldNames::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestCamelCaseFieldNames::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestCamelCaseFieldNames::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestCamelCaseFieldNames_reflection_;
}

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

const ::std::string TestFieldOrderings::_default_my_string_;
#ifndef _MSC_VER
const int TestFieldOrderings::kMyStringFieldNumber;
const int TestFieldOrderings::kMyIntFieldNumber;
const int TestFieldOrderings::kMyFloatFieldNumber;
#endif  // !_MSC_VER

TestFieldOrderings::TestFieldOrderings()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestFieldOrderings::InitAsDefaultInstance() {}

TestFieldOrderings::TestFieldOrderings(const TestFieldOrderings& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestFieldOrderings::SharedCtor() {
  _cached_size_ = 0;
  my_string_ = const_cast< ::std::string*>(&_default_my_string_);
  my_int_ = GOOGLE_LONGLONG(0);
  my_float_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestFieldOrderings::~TestFieldOrderings() {
  SharedDtor();
}

void TestFieldOrderings::SharedDtor() {
  if (my_string_ != &_default_my_string_) {
    delete my_string_;
  }
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestFieldOrderings::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestFieldOrderings_descriptor_;
}

const TestFieldOrderings& TestFieldOrderings::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestFieldOrderings* TestFieldOrderings::default_instance_ = NULL;

TestFieldOrderings* TestFieldOrderings::New() const {
  return new TestFieldOrderings;
}

void TestFieldOrderings::Clear() {
  _extensions_.Clear();
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (my_string_ != &_default_my_string_) {
        my_string_->clear();
      }
    }
    my_int_ = GOOGLE_LONGLONG(0);
    my_float_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestFieldOrderings::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional int64 my_int = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadInt64(
              input, &my_int_));
        _set_bit(1);
        if (input->ExpectTag(90)) goto parse_my_string;
        break;
      }

      // optional string my_string = 11;
      case 11: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_my_string:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_my_string()));
        if (input->ExpectTag(813)) goto parse_my_float;
        break;
      }

      // optional float my_float = 101;
      case 101: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_FIXED32) {
          goto handle_uninterpreted;
        }
       parse_my_float:
        DO_(::google::protobuf::internal::WireFormat::ReadFloat(
              input, &my_float_));
        _set_bit(2);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        if ((16u <= tag && tag < 88u) ||
            (96u <= tag && tag < 808u)) {
          DO_(_extensions_.ParseField(tag, input, default_instance_,
                                      mutable_unknown_fields()));
          continue;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestFieldOrderings::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestFieldOrderings::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional int64 my_int = 1;
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::WriteInt64(1, this->my_int(), output);
  }

  // Extension range [2, 11)
  _extensions_.SerializeWithCachedSizes(
      2, 11, output);

  // optional string my_string = 11;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteString(11, this->my_string(), output);
  }

  // Extension range [12, 101)
  _extensions_.SerializeWithCachedSizes(
      12, 101, output);

  // optional float my_float = 101;
  if (_has_bit(2)) {
    ::google::protobuf::internal::WireFormat::WriteFloat(101, this->my_float(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestFieldOrderings::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int64 my_int = 1;
  if (_has_bit(1)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt64ToArray(1, this->my_int(), target);
  }

  // Extension range [2, 11)
  target = _extensions_.SerializeWithCachedSizesToArray(
      2, 11, target);

  // optional string my_string = 11;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(11, this->my_string(), target);
  }

  // Extension range [12, 101)
  target = _extensions_.SerializeWithCachedSizesToArray(
      12, 101, target);

  // optional float my_float = 101;
  if (_has_bit(2)) {
    target = ::google::protobuf::internal::WireFormat::WriteFloatToArray(101, this->my_float(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestFieldOrderings::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string my_string = 11;
    if (has_my_string()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::StringSize(this->my_string());
    }

    // optional int64 my_int = 1;
    if (has_my_int()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int64Size(
          this->my_int());
    }

    // optional float my_float = 101;
    if (has_my_float()) {
      total_size += 2 + 4;
    }

  }
  total_size += _extensions_.ByteSize();

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestFieldOrderings::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestFieldOrderings* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestFieldOrderings*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestFieldOrderings::MergeFrom(const TestFieldOrderings& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_my_string(from.my_string());
    }
    if (from._has_bit(1)) {
      set_my_int(from.my_int());
    }
    if (from._has_bit(2)) {
      set_my_float(from.my_float());
    }
  }
  _extensions_.MergeFrom(from._extensions_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestFieldOrderings::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestFieldOrderings::CopyFrom(const TestFieldOrderings& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestFieldOrderings::Swap(TestFieldOrderings* other) {
  if (other != this) {
    std::swap(my_string_, other->my_string_);
    std::swap(my_int_, other->my_int_);
    std::swap(my_float_, other->my_float_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
    _extensions_.Swap(&other->_extensions_);
  }
}

bool TestFieldOrderings::IsInitialized() const {

  if (!_extensions_.IsInitialized()) return false;  return true;
}

const ::google::protobuf::Descriptor* TestFieldOrderings::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestFieldOrderings::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestFieldOrderings_reflection_;
}

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

const ::std::string TestExtremeDefaultValues::_default_escaped_bytes_("\000\001\007\010\014\n\r\t\013\\\'\"\376");
const ::std::string TestExtremeDefaultValues::_default_utf8_string_("\341\210\264");
#ifndef _MSC_VER
const int TestExtremeDefaultValues::kEscapedBytesFieldNumber;
const int TestExtremeDefaultValues::kLargeUint32FieldNumber;
const int TestExtremeDefaultValues::kLargeUint64FieldNumber;
const int TestExtremeDefaultValues::kSmallInt32FieldNumber;
const int TestExtremeDefaultValues::kSmallInt64FieldNumber;
const int TestExtremeDefaultValues::kUtf8StringFieldNumber;
#endif  // !_MSC_VER

TestExtremeDefaultValues::TestExtremeDefaultValues()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestExtremeDefaultValues::InitAsDefaultInstance() {}

TestExtremeDefaultValues::TestExtremeDefaultValues(const TestExtremeDefaultValues& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestExtremeDefaultValues::SharedCtor() {
  _cached_size_ = 0;
  escaped_bytes_ = const_cast< ::std::string*>(&_default_escaped_bytes_);
  large_uint32_ = 4294967295u;
  large_uint64_ = GOOGLE_ULONGLONG(18446744073709551615);
  small_int32_ = -2147483647;
  small_int64_ = GOOGLE_LONGLONG(-9223372036854775807);
  utf8_string_ = const_cast< ::std::string*>(&_default_utf8_string_);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestExtremeDefaultValues::~TestExtremeDefaultValues() {
  SharedDtor();
}

void TestExtremeDefaultValues::SharedDtor() {
  if (escaped_bytes_ != &_default_escaped_bytes_) {
    delete escaped_bytes_;
  }
  if (utf8_string_ != &_default_utf8_string_) {
    delete utf8_string_;
  }
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestExtremeDefaultValues::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestExtremeDefaultValues_descriptor_;
}

const TestExtremeDefaultValues& TestExtremeDefaultValues::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestExtremeDefaultValues* TestExtremeDefaultValues::default_instance_ = NULL;

TestExtremeDefaultValues* TestExtremeDefaultValues::New() const {
  return new TestExtremeDefaultValues;
}

void TestExtremeDefaultValues::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (escaped_bytes_ != &_default_escaped_bytes_) {
        escaped_bytes_->assign(_default_escaped_bytes_);
      }
    }
    large_uint32_ = 4294967295u;
    large_uint64_ = GOOGLE_ULONGLONG(18446744073709551615);
    small_int32_ = -2147483647;
    small_int64_ = GOOGLE_LONGLONG(-9223372036854775807);
    if (_has_bit(5)) {
      if (utf8_string_ != &_default_utf8_string_) {
        utf8_string_->assign(_default_utf8_string_);
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestExtremeDefaultValues::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadBytes(input, mutable_escaped_bytes()));
        if (input->ExpectTag(16)) goto parse_large_uint32;
        break;
      }

      // optional uint32 large_uint32 = 2 [default = 4294967295];
      case 2: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_large_uint32:
        DO_(::google::protobuf::internal::WireFormat::ReadUInt32(
              input, &large_uint32_));
        _set_bit(1);
        if (input->ExpectTag(24)) goto parse_large_uint64;
        break;
      }

      // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
      case 3: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_large_uint64:
        DO_(::google::protobuf::internal::WireFormat::ReadUInt64(
              input, &large_uint64_));
        _set_bit(2);
        if (input->ExpectTag(32)) goto parse_small_int32;
        break;
      }

      // optional int32 small_int32 = 4 [default = -2147483647];
      case 4: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_small_int32:
        DO_(::google::protobuf::internal::WireFormat::ReadInt32(
              input, &small_int32_));
        _set_bit(3);
        if (input->ExpectTag(40)) goto parse_small_int64;
        break;
      }

      // optional int64 small_int64 = 5 [default = -9223372036854775807];
      case 5: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_VARINT) {
          goto handle_uninterpreted;
        }
       parse_small_int64:
        DO_(::google::protobuf::internal::WireFormat::ReadInt64(
              input, &small_int64_));
        _set_bit(4);
        if (input->ExpectTag(50)) goto parse_utf8_string;
        break;
      }

      // optional string utf8_string = 6 [default = "\341\210\264"];
      case 6: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_utf8_string:
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_utf8_string()));
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestExtremeDefaultValues::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestExtremeDefaultValues::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteBytes(1, this->escaped_bytes(), output);
  }

  // optional uint32 large_uint32 = 2 [default = 4294967295];
  if (_has_bit(1)) {
    ::google::protobuf::internal::WireFormat::WriteUInt32(2, this->large_uint32(), output);
  }

  // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
  if (_has_bit(2)) {
    ::google::protobuf::internal::WireFormat::WriteUInt64(3, this->large_uint64(), output);
  }

  // optional int32 small_int32 = 4 [default = -2147483647];
  if (_has_bit(3)) {
    ::google::protobuf::internal::WireFormat::WriteInt32(4, this->small_int32(), output);
  }

  // optional int64 small_int64 = 5 [default = -9223372036854775807];
  if (_has_bit(4)) {
    ::google::protobuf::internal::WireFormat::WriteInt64(5, this->small_int64(), output);
  }

  // optional string utf8_string = 6 [default = "\341\210\264"];
  if (_has_bit(5)) {
    ::google::protobuf::internal::WireFormat::WriteString(6, this->utf8_string(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestExtremeDefaultValues::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteBytesToArray(1, this->escaped_bytes(), target);
  }

  // optional uint32 large_uint32 = 2 [default = 4294967295];
  if (_has_bit(1)) {
    target = ::google::protobuf::internal::WireFormat::WriteUInt32ToArray(2, this->large_uint32(), target);
  }

  // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
  if (_has_bit(2)) {
    target = ::google::protobuf::internal::WireFormat::WriteUInt64ToArray(3, this->large_uint64(), target);
  }

  // optional int32 small_int32 = 4 [default = -2147483647];
  if (_has_bit(3)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32ToArray(4, this->small_int32(), target);
  }

  // optional int64 small_int64 = 5 [default = -9223372036854775807];
  if (_has_bit(4)) {
    target = ::google::protobuf::internal::WireFormat::WriteInt64ToArray(5, this->small_int64(), target);
  }

  // optional string utf8_string = 6 [default = "\341\210\264"];
  if (_has_bit(5)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(6, this->utf8_string(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestExtremeDefaultValues::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // 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::WireFormat::BytesSize(this->escaped_bytes());
    }

    // optional uint32 large_uint32 = 2 [default = 4294967295];
    if (has_large_uint32()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::UInt32Size(
          this->large_uint32());
    }

    // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
    if (has_large_uint64()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::UInt64Size(
          this->large_uint64());
    }

    // optional int32 small_int32 = 4 [default = -2147483647];
    if (has_small_int32()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int32Size(
          this->small_int32());
    }

    // optional int64 small_int64 = 5 [default = -9223372036854775807];
    if (has_small_int64()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::Int64Size(
          this->small_int64());
    }

    // optional string utf8_string = 6 [default = "\341\210\264"];
    if (has_utf8_string()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::StringSize(this->utf8_string());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestExtremeDefaultValues::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestExtremeDefaultValues* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestExtremeDefaultValues*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestExtremeDefaultValues::MergeFrom(const TestExtremeDefaultValues& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_escaped_bytes(from.escaped_bytes());
    }
    if (from._has_bit(1)) {
      set_large_uint32(from.large_uint32());
    }
    if (from._has_bit(2)) {
      set_large_uint64(from.large_uint64());
    }
    if (from._has_bit(3)) {
      set_small_int32(from.small_int32());
    }
    if (from._has_bit(4)) {
      set_small_int64(from.small_int64());
    }
    if (from._has_bit(5)) {
      set_utf8_string(from.utf8_string());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestExtremeDefaultValues::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestExtremeDefaultValues::CopyFrom(const TestExtremeDefaultValues& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestExtremeDefaultValues::Swap(TestExtremeDefaultValues* other) {
  if (other != this) {
    std::swap(escaped_bytes_, other->escaped_bytes_);
    std::swap(large_uint32_, other->large_uint32_);
    std::swap(large_uint64_, other->large_uint64_);
    std::swap(small_int32_, other->small_int32_);
    std::swap(small_int64_, other->small_int64_);
    std::swap(utf8_string_, other->utf8_string_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestExtremeDefaultValues::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestExtremeDefaultValues::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestExtremeDefaultValues::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestExtremeDefaultValues_reflection_;
}

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

const ::std::string OneString::_default_data_;
#ifndef _MSC_VER
const int OneString::kDataFieldNumber;
#endif  // !_MSC_VER

OneString::OneString()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void OneString::InitAsDefaultInstance() {}

OneString::OneString(const OneString& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void OneString::SharedCtor() {
  _cached_size_ = 0;
  data_ = const_cast< ::std::string*>(&_default_data_);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

OneString::~OneString() {
  SharedDtor();
}

void OneString::SharedDtor() {
  if (data_ != &_default_data_) {
    delete data_;
  }
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* OneString::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return OneString_descriptor_;
}

const OneString& OneString::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

OneString* OneString::default_instance_ = NULL;

OneString* OneString::New() const {
  return new OneString;
}

void OneString::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (data_ != &_default_data_) {
        data_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool OneString::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional string data = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadString(input, mutable_data()));
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void OneString::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    OneString::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional string data = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteString(1, this->data(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* OneString::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string data = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteStringToArray(1, this->data(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int OneString::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string data = 1;
    if (has_data()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::StringSize(this->data());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void OneString::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const OneString* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const OneString*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void OneString::MergeFrom(const OneString& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_data(from.data());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void OneString::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void OneString::CopyFrom(const OneString& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void OneString::Swap(OneString* other) {
  if (other != this) {
    std::swap(data_, other->data_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool OneString::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* OneString::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* OneString::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return OneString_reflection_;
}

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

const ::std::string OneBytes::_default_data_;
#ifndef _MSC_VER
const int OneBytes::kDataFieldNumber;
#endif  // !_MSC_VER

OneBytes::OneBytes()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void OneBytes::InitAsDefaultInstance() {}

OneBytes::OneBytes(const OneBytes& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void OneBytes::SharedCtor() {
  _cached_size_ = 0;
  data_ = const_cast< ::std::string*>(&_default_data_);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

OneBytes::~OneBytes() {
  SharedDtor();
}

void OneBytes::SharedDtor() {
  if (data_ != &_default_data_) {
    delete data_;
  }
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* OneBytes::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return OneBytes_descriptor_;
}

const OneBytes& OneBytes::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

OneBytes* OneBytes::default_instance_ = NULL;

OneBytes* OneBytes::New() const {
  return new OneBytes;
}

void OneBytes::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (_has_bit(0)) {
      if (data_ != &_default_data_) {
        data_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool OneBytes::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // optional bytes data = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
        DO_(::google::protobuf::internal::WireFormat::ReadBytes(input, mutable_data()));
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void OneBytes::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    OneBytes::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // optional bytes data = 1;
  if (_has_bit(0)) {
    ::google::protobuf::internal::WireFormat::WriteBytes(1, this->data(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* OneBytes::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional bytes data = 1;
  if (_has_bit(0)) {
    target = ::google::protobuf::internal::WireFormat::WriteBytesToArray(1, this->data(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int OneBytes::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional bytes data = 1;
    if (has_data()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormat::BytesSize(this->data());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void OneBytes::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const OneBytes* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const OneBytes*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void OneBytes::MergeFrom(const OneBytes& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from._has_bit(0)) {
      set_data(from.data());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void OneBytes::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void OneBytes::CopyFrom(const OneBytes& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void OneBytes::Swap(OneBytes* other) {
  if (other != this) {
    std::swap(data_, other->data_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool OneBytes::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* OneBytes::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* OneBytes::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return OneBytes_reflection_;
}

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

#ifndef _MSC_VER
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  // !_MSC_VER

TestPackedTypes::TestPackedTypes()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestPackedTypes::InitAsDefaultInstance() {}

TestPackedTypes::TestPackedTypes(const TestPackedTypes& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestPackedTypes::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestPackedTypes::~TestPackedTypes() {
  SharedDtor();
}

void TestPackedTypes::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestPackedTypes::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestPackedTypes_descriptor_;
}

const TestPackedTypes& TestPackedTypes::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestPackedTypes* TestPackedTypes::default_instance_ = NULL;

TestPackedTypes* TestPackedTypes::New() const {
  return new TestPackedTypes;
}

void TestPackedTypes::Clear() {
  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();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestPackedTypes::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormat::GetTagFieldNumber(tag)) {
      // repeated int32 packed_int32 = 90 [packed = true];
      case 90: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            ::google::protobuf::int32 value;
            DO_(::google::protobuf::internal::WireFormat::ReadInt32(input, &value));
            add_packed_int32(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(730)) goto parse_packed_int64;
        break;
      }

      // repeated int64 packed_int64 = 91 [packed = true];
      case 91: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_int64:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            ::google::protobuf::int64 value;
            DO_(::google::protobuf::internal::WireFormat::ReadInt64(input, &value));
            add_packed_int64(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(738)) goto parse_packed_uint32;
        break;
      }

      // repeated uint32 packed_uint32 = 92 [packed = true];
      case 92: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_uint32:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            ::google::protobuf::uint32 value;
            DO_(::google::protobuf::internal::WireFormat::ReadUInt32(input, &value));
            add_packed_uint32(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(746)) goto parse_packed_uint64;
        break;
      }

      // repeated uint64 packed_uint64 = 93 [packed = true];
      case 93: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_uint64:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            ::google::protobuf::uint64 value;
            DO_(::google::protobuf::internal::WireFormat::ReadUInt64(input, &value));
            add_packed_uint64(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(754)) goto parse_packed_sint32;
        break;
      }

      // repeated sint32 packed_sint32 = 94 [packed = true];
      case 94: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_sint32:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            ::google::protobuf::int32 value;
            DO_(::google::protobuf::internal::WireFormat::ReadSInt32(input, &value));
            add_packed_sint32(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(762)) goto parse_packed_sint64;
        break;
      }

      // repeated sint64 packed_sint64 = 95 [packed = true];
      case 95: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_sint64:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            ::google::protobuf::int64 value;
            DO_(::google::protobuf::internal::WireFormat::ReadSInt64(input, &value));
            add_packed_sint64(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(770)) goto parse_packed_fixed32;
        break;
      }

      // repeated fixed32 packed_fixed32 = 96 [packed = true];
      case 96: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_fixed32:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            ::google::protobuf::uint32 value;
            DO_(::google::protobuf::internal::WireFormat::ReadFixed32(input, &value));
            add_packed_fixed32(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(778)) goto parse_packed_fixed64;
        break;
      }

      // repeated fixed64 packed_fixed64 = 97 [packed = true];
      case 97: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_fixed64:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            ::google::protobuf::uint64 value;
            DO_(::google::protobuf::internal::WireFormat::ReadFixed64(input, &value));
            add_packed_fixed64(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(786)) goto parse_packed_sfixed32;
        break;
      }

      // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
      case 98: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_sfixed32:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            ::google::protobuf::int32 value;
            DO_(::google::protobuf::internal::WireFormat::ReadSFixed32(input, &value));
            add_packed_sfixed32(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(794)) goto parse_packed_sfixed64;
        break;
      }

      // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
      case 99: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_sfixed64:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            ::google::protobuf::int64 value;
            DO_(::google::protobuf::internal::WireFormat::ReadSFixed64(input, &value));
            add_packed_sfixed64(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(802)) goto parse_packed_float;
        break;
      }

      // repeated float packed_float = 100 [packed = true];
      case 100: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_float:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            float value;
            DO_(::google::protobuf::internal::WireFormat::ReadFloat(input, &value));
            add_packed_float(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(810)) goto parse_packed_double;
        break;
      }

      // repeated double packed_double = 101 [packed = true];
      case 101: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_double:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            double value;
            DO_(::google::protobuf::internal::WireFormat::ReadDouble(input, &value));
            add_packed_double(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(818)) goto parse_packed_bool;
        break;
      }

      // repeated bool packed_bool = 102 [packed = true];
      case 102: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_bool:
        {
          ::google::protobuf::uint32 length;
          DO_(input->ReadVarint32(&length));
          ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
          while (input->BytesUntilLimit() > 0) {
            bool value;
            DO_(::google::protobuf::internal::WireFormat::ReadBool(input, &value));
            add_packed_bool(value);
          }
          input->PopLimit(limit);
        }
        if (input->ExpectTag(826)) goto parse_packed_enum;
        break;
      }

      // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
      case 103: {
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) !=
            ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED) {
          goto handle_uninterpreted;
        }
       parse_packed_enum:
        ::google::protobuf::uint32 length;
        DO_(input->ReadVarint32(&length));
        ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length);
        while (input->BytesUntilLimit() > 0) {
          int value;
          DO_(::google::protobuf::internal::WireFormat::ReadEnum(input, &value));
          if (protobuf_unittest::ForeignEnum_IsValid(value)) {
            add_packed_enum(static_cast< protobuf_unittest::ForeignEnum >(value));
          }
        }
        input->PopLimit(limit);
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TestPackedTypes::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestPackedTypes::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  // repeated int32 packed_int32 = 90 [packed = true];
  if (this->packed_int32_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(90, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_int32_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_int32_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteInt32NoTag(this->packed_int32(i), output);
  }

  // repeated int64 packed_int64 = 91 [packed = true];
  if (this->packed_int64_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(91, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_int64_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_int64_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteInt64NoTag(this->packed_int64(i), output);
  }

  // repeated uint32 packed_uint32 = 92 [packed = true];
  if (this->packed_uint32_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(92, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_uint32_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_uint32_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteUInt32NoTag(this->packed_uint32(i), output);
  }

  // repeated uint64 packed_uint64 = 93 [packed = true];
  if (this->packed_uint64_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(93, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_uint64_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_uint64_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteUInt64NoTag(this->packed_uint64(i), output);
  }

  // repeated sint32 packed_sint32 = 94 [packed = true];
  if (this->packed_sint32_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(94, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_sint32_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_sint32_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteSInt32NoTag(this->packed_sint32(i), output);
  }

  // repeated sint64 packed_sint64 = 95 [packed = true];
  if (this->packed_sint64_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(95, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_sint64_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_sint64_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteSInt64NoTag(this->packed_sint64(i), output);
  }

  // repeated fixed32 packed_fixed32 = 96 [packed = true];
  if (this->packed_fixed32_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(96, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_fixed32_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_fixed32_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteFixed32NoTag(this->packed_fixed32(i), output);
  }

  // repeated fixed64 packed_fixed64 = 97 [packed = true];
  if (this->packed_fixed64_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(97, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_fixed64_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_fixed64_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteFixed64NoTag(this->packed_fixed64(i), output);
  }

  // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  if (this->packed_sfixed32_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(98, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_sfixed32_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_sfixed32_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteSFixed32NoTag(this->packed_sfixed32(i), output);
  }

  // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  if (this->packed_sfixed64_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(99, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_sfixed64_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_sfixed64_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteSFixed64NoTag(this->packed_sfixed64(i), output);
  }

  // repeated float packed_float = 100 [packed = true];
  if (this->packed_float_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(100, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_float_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_float_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteFloatNoTag(this->packed_float(i), output);
  }

  // repeated double packed_double = 101 [packed = true];
  if (this->packed_double_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(101, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_double_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_double_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteDoubleNoTag(this->packed_double(i), output);
  }

  // repeated bool packed_bool = 102 [packed = true];
  if (this->packed_bool_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(102, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_bool_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_bool_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteBoolNoTag(this->packed_bool(i), output);
  }

  // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
  if (this->packed_enum_size() > 0) {
    ::google::protobuf::internal::WireFormat::WriteTag(103, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_packed_enum_cached_byte_size_);
  }
  for (int i = 0; i < this->packed_enum_size(); i++) {
    ::google::protobuf::internal::WireFormat::WriteEnumNoTag(this->packed_enum(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestPackedTypes::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated int32 packed_int32 = 90 [packed = true];
  if (this->packed_int32_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(90, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_int32_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_int32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteInt32NoTagToArray(this->packed_int32(i), target);
  }

  // repeated int64 packed_int64 = 91 [packed = true];
  if (this->packed_int64_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(91, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_int64_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_int64_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteInt64NoTagToArray(this->packed_int64(i), target);
  }

  // repeated uint32 packed_uint32 = 92 [packed = true];
  if (this->packed_uint32_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(92, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_uint32_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_uint32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteUInt32NoTagToArray(this->packed_uint32(i), target);
  }

  // repeated uint64 packed_uint64 = 93 [packed = true];
  if (this->packed_uint64_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(93, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_uint64_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_uint64_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteUInt64NoTagToArray(this->packed_uint64(i), target);
  }

  // repeated sint32 packed_sint32 = 94 [packed = true];
  if (this->packed_sint32_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(94, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_sint32_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_sint32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteSInt32NoTagToArray(this->packed_sint32(i), target);
  }

  // repeated sint64 packed_sint64 = 95 [packed = true];
  if (this->packed_sint64_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(95, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_sint64_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_sint64_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteSInt64NoTagToArray(this->packed_sint64(i), target);
  }

  // repeated fixed32 packed_fixed32 = 96 [packed = true];
  if (this->packed_fixed32_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(96, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_fixed32_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_fixed32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteFixed32NoTagToArray(this->packed_fixed32(i), target);
  }

  // repeated fixed64 packed_fixed64 = 97 [packed = true];
  if (this->packed_fixed64_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(97, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_fixed64_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_fixed64_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteFixed64NoTagToArray(this->packed_fixed64(i), target);
  }

  // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  if (this->packed_sfixed32_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(98, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_sfixed32_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_sfixed32_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteSFixed32NoTagToArray(this->packed_sfixed32(i), target);
  }

  // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  if (this->packed_sfixed64_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(99, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_sfixed64_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_sfixed64_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteSFixed64NoTagToArray(this->packed_sfixed64(i), target);
  }

  // repeated float packed_float = 100 [packed = true];
  if (this->packed_float_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(100, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_float_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_float_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteFloatNoTagToArray(this->packed_float(i), target);
  }

  // repeated double packed_double = 101 [packed = true];
  if (this->packed_double_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(101, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_double_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_double_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteDoubleNoTagToArray(this->packed_double(i), target);
  }

  // repeated bool packed_bool = 102 [packed = true];
  if (this->packed_bool_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(102, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_bool_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_bool_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteBoolNoTagToArray(this->packed_bool(i), target);
  }

  // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
  if (this->packed_enum_size() > 0) {
    target = ::google::protobuf::internal::WireFormat::WriteTagToArray(103, ::google::protobuf::internal::WireFormat::WIRETYPE_LENGTH_DELIMITED, target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(_packed_enum_cached_byte_size_, target);
  }
  for (int i = 0; i < this->packed_enum_size(); i++) {
    target = ::google::protobuf::internal::WireFormat::WriteEnumNoTagToArray(this->packed_enum(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestPackedTypes::ByteSize() const {
  int total_size = 0;

  // repeated int32 packed_int32 = 90 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->packed_int32_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::Int32Size(
        this->packed_int32(i));
    }
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_int32_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated int64 packed_int64 = 91 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->packed_int64_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::Int64Size(
        this->packed_int64(i));
    }
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_int64_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated uint32 packed_uint32 = 92 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->packed_uint32_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::UInt32Size(
        this->packed_uint32(i));
    }
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_uint32_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated uint64 packed_uint64 = 93 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->packed_uint64_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::UInt64Size(
        this->packed_uint64(i));
    }
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_uint64_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated sint32 packed_sint32 = 94 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->packed_sint32_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::SInt32Size(
        this->packed_sint32(i));
    }
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_sint32_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated sint64 packed_sint64 = 95 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->packed_sint64_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::SInt64Size(
        this->packed_sint64(i));
    }
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_sint64_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated fixed32 packed_fixed32 = 96 [packed = true];
  {
    int data_size = 0;
    data_size = 4 * this->packed_fixed32_size();
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_fixed32_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated fixed64 packed_fixed64 = 97 [packed = true];
  {
    int data_size = 0;
    data_size = 8 * this->packed_fixed64_size();
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_fixed64_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  {
    int data_size = 0;
    data_size = 4 * this->packed_sfixed32_size();
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_sfixed32_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  {
    int data_size = 0;
    data_size = 8 * this->packed_sfixed64_size();
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_sfixed64_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated float packed_float = 100 [packed = true];
  {
    int data_size = 0;
    data_size = 4 * this->packed_float_size();
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_float_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated double packed_double = 101 [packed = true];
  {
    int data_size = 0;
    data_size = 8 * this->packed_double_size();
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_double_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated bool packed_bool = 102 [packed = true];
  {
    int data_size = 0;
    data_size = 1 * this->packed_bool_size();
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_bool_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->packed_enum_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormat::EnumSize(
        this->packed_enum(i));
    }
    if (data_size > 0) {
      total_size += 2 + ::google::protobuf::internal::WireFormat::Int32Size(data_size);
    }
    _packed_enum_cached_byte_size_ = data_size;
    total_size += data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestPackedTypes::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestPackedTypes* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestPackedTypes*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestPackedTypes::MergeFrom(const TestPackedTypes& from) {
  GOOGLE_CHECK_NE(&from, this);
  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_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestPackedTypes::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestPackedTypes::CopyFrom(const TestPackedTypes& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestPackedTypes::Swap(TestPackedTypes* other) {
  if (other != this) {
    packed_int32_.Swap(&other->packed_int32_);
    packed_int64_.Swap(&other->packed_int64_);
    packed_uint32_.Swap(&other->packed_uint32_);
    packed_uint64_.Swap(&other->packed_uint64_);
    packed_sint32_.Swap(&other->packed_sint32_);
    packed_sint64_.Swap(&other->packed_sint64_);
    packed_fixed32_.Swap(&other->packed_fixed32_);
    packed_fixed64_.Swap(&other->packed_fixed64_);
    packed_sfixed32_.Swap(&other->packed_sfixed32_);
    packed_sfixed64_.Swap(&other->packed_sfixed64_);
    packed_float_.Swap(&other->packed_float_);
    packed_double_.Swap(&other->packed_double_);
    packed_bool_.Swap(&other->packed_bool_);
    packed_enum_.Swap(&other->packed_enum_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool TestPackedTypes::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* TestPackedTypes::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestPackedTypes::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestPackedTypes_reflection_;
}

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

#ifndef _MSC_VER
#endif  // !_MSC_VER

TestPackedExtensions::TestPackedExtensions()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TestPackedExtensions::InitAsDefaultInstance() {}

TestPackedExtensions::TestPackedExtensions(const TestPackedExtensions& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TestPackedExtensions::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TestPackedExtensions::~TestPackedExtensions() {
  SharedDtor();
}

void TestPackedExtensions::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* TestPackedExtensions::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestPackedExtensions_descriptor_;
}

const TestPackedExtensions& TestPackedExtensions::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

TestPackedExtensions* TestPackedExtensions::default_instance_ = NULL;

TestPackedExtensions* TestPackedExtensions::New() const {
  return new TestPackedExtensions;
}

void TestPackedExtensions::Clear() {
  _extensions_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TestPackedExtensions::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
      return true;
    }
    if ((8u <= tag)) {
      DO_(_extensions_.ParseField(tag, input, default_instance_,
                                  mutable_unknown_fields()));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
  return true;
#undef DO_
}

void TestPackedExtensions::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    TestPackedExtensions::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

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

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TestPackedExtensions::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // Extension range [1, 536870912)
  target = _extensions_.SerializeWithCachedSizesToArray(
      1, 536870912, target);

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TestPackedExtensions::ByteSize() const {
  int total_size = 0;

  total_size += _extensions_.ByteSize();

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void TestPackedExtensions::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TestPackedExtensions* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TestPackedExtensions*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TestPackedExtensions::MergeFrom(const TestPackedExtensions& from) {
  GOOGLE_CHECK_NE(&from, this);
  _extensions_.MergeFrom(from._extensions_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TestPackedExtensions::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestPackedExtensions::CopyFrom(const TestPackedExtensions& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TestPackedExtensions::Swap(TestPackedExtensions* other) {
  if (other != this) {
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
    _extensions_.Swap(&other->_extensions_);
  }
}

bool TestPackedExtensions::IsInitialized() const {

  if (!_extensions_.IsInitialized()) return false;  return true;
}

const ::google::protobuf::Descriptor* TestPackedExtensions::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* TestPackedExtensions::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return TestPackedExtensions_reflection_;
}

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

#ifndef _MSC_VER
#endif  // !_MSC_VER

FooRequest::FooRequest()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void FooRequest::InitAsDefaultInstance() {}

FooRequest::FooRequest(const FooRequest& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void FooRequest::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

FooRequest::~FooRequest() {
  SharedDtor();
}

void FooRequest::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* FooRequest::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return FooRequest_descriptor_;
}

const FooRequest& FooRequest::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

FooRequest* FooRequest::default_instance_ = NULL;

FooRequest* FooRequest::New() const {
  return new FooRequest;
}

void FooRequest::Clear() {
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool FooRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
      return true;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
  return true;
#undef DO_
}

void FooRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    FooRequest::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* FooRequest::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int FooRequest::ByteSize() const {
  int total_size = 0;

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void FooRequest::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const FooRequest* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const FooRequest*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void FooRequest::MergeFrom(const FooRequest& from) {
  GOOGLE_CHECK_NE(&from, this);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void FooRequest::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FooRequest::CopyFrom(const FooRequest& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FooRequest::Swap(FooRequest* other) {
  if (other != this) {
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool FooRequest::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* FooRequest::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* FooRequest::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return FooRequest_reflection_;
}

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

#ifndef _MSC_VER
#endif  // !_MSC_VER

FooResponse::FooResponse()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void FooResponse::InitAsDefaultInstance() {}

FooResponse::FooResponse(const FooResponse& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void FooResponse::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

FooResponse::~FooResponse() {
  SharedDtor();
}

void FooResponse::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* FooResponse::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return FooResponse_descriptor_;
}

const FooResponse& FooResponse::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

FooResponse* FooResponse::default_instance_ = NULL;

FooResponse* FooResponse::New() const {
  return new FooResponse;
}

void FooResponse::Clear() {
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool FooResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
      return true;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
  return true;
#undef DO_
}

void FooResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    FooResponse::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* FooResponse::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int FooResponse::ByteSize() const {
  int total_size = 0;

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void FooResponse::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const FooResponse* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const FooResponse*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void FooResponse::MergeFrom(const FooResponse& from) {
  GOOGLE_CHECK_NE(&from, this);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void FooResponse::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FooResponse::CopyFrom(const FooResponse& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FooResponse::Swap(FooResponse* other) {
  if (other != this) {
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool FooResponse::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* FooResponse::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* FooResponse::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return FooResponse_reflection_;
}

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

#ifndef _MSC_VER
#endif  // !_MSC_VER

BarRequest::BarRequest()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void BarRequest::InitAsDefaultInstance() {}

BarRequest::BarRequest(const BarRequest& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void BarRequest::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

BarRequest::~BarRequest() {
  SharedDtor();
}

void BarRequest::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* BarRequest::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return BarRequest_descriptor_;
}

const BarRequest& BarRequest::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

BarRequest* BarRequest::default_instance_ = NULL;

BarRequest* BarRequest::New() const {
  return new BarRequest;
}

void BarRequest::Clear() {
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool BarRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
      return true;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
  return true;
#undef DO_
}

void BarRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    BarRequest::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* BarRequest::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int BarRequest::ByteSize() const {
  int total_size = 0;

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void BarRequest::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const BarRequest* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const BarRequest*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void BarRequest::MergeFrom(const BarRequest& from) {
  GOOGLE_CHECK_NE(&from, this);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void BarRequest::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BarRequest::CopyFrom(const BarRequest& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BarRequest::Swap(BarRequest* other) {
  if (other != this) {
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool BarRequest::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* BarRequest::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* BarRequest::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return BarRequest_reflection_;
}

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

#ifndef _MSC_VER
#endif  // !_MSC_VER

BarResponse::BarResponse()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void BarResponse::InitAsDefaultInstance() {}

BarResponse::BarResponse(const BarResponse& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void BarResponse::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

BarResponse::~BarResponse() {
  SharedDtor();
}

void BarResponse::SharedDtor() {
  if (this != default_instance_) {
  }
}

const ::google::protobuf::Descriptor* BarResponse::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return BarResponse_descriptor_;
}

const BarResponse& BarResponse::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2funittest_2eproto();  return *default_instance_;
}

BarResponse* BarResponse::default_instance_ = NULL;

BarResponse* BarResponse::New() const {
  return new BarResponse;
}

void BarResponse::Clear() {
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool BarResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormat::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormat::WIRETYPE_END_GROUP) {
      return true;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
  return true;
#undef DO_
}

void BarResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
  if (raw_buffer != NULL) {
    BarResponse::SerializeWithCachedSizesToArray(raw_buffer);
    return;
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* BarResponse::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int BarResponse::ByteSize() const {
  int total_size = 0;

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}

void BarResponse::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const BarResponse* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const BarResponse*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void BarResponse::MergeFrom(const BarResponse& from) {
  GOOGLE_CHECK_NE(&from, this);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void BarResponse::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BarResponse::CopyFrom(const BarResponse& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BarResponse::Swap(BarResponse* other) {
  if (other != this) {
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

bool BarResponse::IsInitialized() const {

  return true;
}

const ::google::protobuf::Descriptor* BarResponse::GetDescriptor() const {
  return descriptor();
}

const ::google::protobuf::Reflection* BarResponse::GetReflection() const {
  protobuf_AssignDescriptorsOnce();
  return BarResponse_reflection_;
}

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

TestService::~TestService() {}

const ::google::protobuf::ServiceDescriptor* TestService::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestService_descriptor_;
}

const ::google::protobuf::ServiceDescriptor* TestService::GetDescriptor() {
  protobuf_AssignDescriptorsOnce();
  return TestService_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(), TestService_descriptor_);
  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 *reinterpret_cast< ::google::protobuf::Message*>(NULL);
  }
}

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 *reinterpret_cast< ::google::protobuf::Message*>(NULL);
  }
}

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);
}
::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::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::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::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::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::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::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::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::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::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::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.5);
::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);
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));

}  // namespace protobuf_unittest