text:
namespace protobuf_unittest {
class TestMessageWithCustomOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<TestMessageWithCustomOptions> {
  public:
  ::google::protobuf::int32 oneof_field_;
} _TestMessageWithCustomOptions_default_instance_;
class CustomOptionFooRequestDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionFooRequest> {
} _CustomOptionFooRequest_default_instance_;
class CustomOptionFooResponseDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionFooResponse> {
} _CustomOptionFooResponse_default_instance_;
class CustomOptionFooClientMessageDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionFooClientMessage> {
} _CustomOptionFooClientMessage_default_instance_;
class CustomOptionFooServerMessageDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionFooServerMessage> {
} _CustomOptionFooServerMessage_default_instance_;
class DummyMessageContainingEnumDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DummyMessageContainingEnum> {
} _DummyMessageContainingEnum_default_instance_;
class DummyMessageInvalidAsOptionTypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DummyMessageInvalidAsOptionType> {
} _DummyMessageInvalidAsOptionType_default_instance_;
class CustomOptionMinIntegerValuesDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionMinIntegerValues> {
} _CustomOptionMinIntegerValues_default_instance_;
class CustomOptionMaxIntegerValuesDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionMaxIntegerValues> {
} _CustomOptionMaxIntegerValues_default_instance_;
class CustomOptionOtherValuesDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionOtherValues> {
} _CustomOptionOtherValues_default_instance_;
class SettingRealsFromPositiveIntsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<SettingRealsFromPositiveInts> {
} _SettingRealsFromPositiveInts_default_instance_;
class SettingRealsFromNegativeIntsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<SettingRealsFromNegativeInts> {
} _SettingRealsFromNegativeInts_default_instance_;
class ComplexOptionType1DefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ComplexOptionType1> {
} _ComplexOptionType1_default_instance_;
class ComplexOptionType2_ComplexOptionType4DefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ComplexOptionType2_ComplexOptionType4> {
} _ComplexOptionType2_ComplexOptionType4_default_instance_;
class ComplexOptionType2DefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ComplexOptionType2> {
} _ComplexOptionType2_default_instance_;
class ComplexOptionType3_ComplexOptionType5DefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ComplexOptionType3_ComplexOptionType5> {
} _ComplexOptionType3_ComplexOptionType5_default_instance_;
class ComplexOptionType3DefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ComplexOptionType3> {
} _ComplexOptionType3_default_instance_;
class ComplexOpt6DefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ComplexOpt6> {
} _ComplexOpt6_default_instance_;
class VariousComplexOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<VariousComplexOptions> {
} _VariousComplexOptions_default_instance_;
class AggregateMessageSetDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<AggregateMessageSet> {
} _AggregateMessageSet_default_instance_;
class AggregateMessageSetElementDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<AggregateMessageSetElement> {
} _AggregateMessageSetElement_default_instance_;
class AggregateDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Aggregate> {
} _Aggregate_default_instance_;
class AggregateMessageDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<AggregateMessage> {
} _AggregateMessage_default_instance_;
class NestedOptionType_NestedMessageDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<NestedOptionType_NestedMessage> {
} _NestedOptionType_NestedMessage_default_instance_;
class NestedOptionTypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<NestedOptionType> {
} _NestedOptionType_default_instance_;
class OldOptionTypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<OldOptionType> {
} _OldOptionType_default_instance_;
class NewOptionTypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<NewOptionType> {
} _NewOptionType_default_instance_;
class TestMessageWithRequiredEnumOptionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<TestMessageWithRequiredEnumOption> {
} _TestMessageWithRequiredEnumOption_default_instance_;

namespace protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto {

namespace {

::google::protobuf::Metadata file_level_metadata[28];
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[7];
const ::google::protobuf::ServiceDescriptor* file_level_service_descriptors[2];

}  // namespace

const ::google::protobuf::uint32 TableStruct::offsets[] = {
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMessageWithCustomOptions, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMessageWithCustomOptions, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMessageWithCustomOptions, _oneof_case_[0]),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMessageWithCustomOptions, field1_),
  PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&_TestMessageWithCustomOptions_default_instance_), oneof_field_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMessageWithCustomOptions, AnOneof_),
  0,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionFooRequest, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionFooRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionFooResponse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionFooResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionFooClientMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionFooClientMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionFooServerMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionFooServerMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyMessageContainingEnum, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyMessageContainingEnum, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyMessageInvalidAsOptionType, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyMessageInvalidAsOptionType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionMinIntegerValues, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionMinIntegerValues, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionMaxIntegerValues, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionMaxIntegerValues, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionOtherValues, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomOptionOtherValues, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SettingRealsFromPositiveInts, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SettingRealsFromPositiveInts, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SettingRealsFromNegativeInts, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SettingRealsFromNegativeInts, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType1, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType1, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType1, _extensions_),
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType1, foo_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType1, foo2_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType1, foo3_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType1, foo4_),
  0,
  1,
  2,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType2_ComplexOptionType4, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType2_ComplexOptionType4, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType2_ComplexOptionType4, waldo_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType2, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType2, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType2, _extensions_),
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType2, bar_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType2, baz_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType2, fred_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType2, barney_),
  0,
  2,
  1,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType3_ComplexOptionType5, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType3_ComplexOptionType5, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType3_ComplexOptionType5, plugh_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType3, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType3, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType3, qux_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOptionType3, complexoptiontype5_),
  1,
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOpt6, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOpt6, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ComplexOpt6, xyzzy_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VariousComplexOptions, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VariousComplexOptions, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AggregateMessageSet, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AggregateMessageSet, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AggregateMessageSet, _extensions_),
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AggregateMessageSetElement, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AggregateMessageSetElement, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AggregateMessageSetElement, s_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Aggregate, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Aggregate, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Aggregate, i_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Aggregate, s_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Aggregate, sub_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Aggregate, file_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Aggregate, mset_),
  4,
  0,
  1,
  2,
  3,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AggregateMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AggregateMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AggregateMessage, fieldname_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NestedOptionType_NestedMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NestedOptionType_NestedMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NestedOptionType_NestedMessage, nested_field_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NestedOptionType, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NestedOptionType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OldOptionType, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OldOptionType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OldOptionType, value_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NewOptionType, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NewOptionType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NewOptionType, value_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMessageWithRequiredEnumOption, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestMessageWithRequiredEnumOption, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
};

static const ::google::protobuf::internal::MigrationSchema schemas[] = {
  { 0, 7, sizeof(TestMessageWithCustomOptions)},
  { 9, 13, sizeof(CustomOptionFooRequest)},
  { 13, 17, sizeof(CustomOptionFooResponse)},
  { 17, 21, sizeof(CustomOptionFooClientMessage)},
  { 21, 25, sizeof(CustomOptionFooServerMessage)},
  { 25, 29, sizeof(DummyMessageContainingEnum)},
  { 29, 33, sizeof(DummyMessageInvalidAsOptionType)},
  { 33, 37, sizeof(CustomOptionMinIntegerValues)},
  { 37, 41, sizeof(CustomOptionMaxIntegerValues)},
  { 41, 45, sizeof(CustomOptionOtherValues)},
  { 45, 49, sizeof(SettingRealsFromPositiveInts)},
  { 49, 53, sizeof(SettingRealsFromNegativeInts)},
  { 53, 61, sizeof(ComplexOptionType1)},
  { 65, 70, sizeof(ComplexOptionType2_ComplexOptionType4)},
  { 71, 79, sizeof(ComplexOptionType2)},
  { 83, 88, sizeof(ComplexOptionType3_ComplexOptionType5)},
  { 89, 95, sizeof(ComplexOptionType3)},
  { 97, 102, sizeof(ComplexOpt6)},
  { 103, 107, sizeof(VariousComplexOptions)},
  { 107, 111, sizeof(AggregateMessageSet)},
  { 111, 116, sizeof(AggregateMessageSetElement)},
  { 117, 126, sizeof(Aggregate)},
  { 131, 136, sizeof(AggregateMessage)},
  { 137, 142, sizeof(NestedOptionType_NestedMessage)},
  { 143, 147, sizeof(NestedOptionType)},
  { 147, 152, sizeof(OldOptionType)},
  { 153, 158, sizeof(NewOptionType)},
  { 159, 163, sizeof(TestMessageWithRequiredEnumOption)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&_TestMessageWithCustomOptions_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_CustomOptionFooRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_CustomOptionFooResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_CustomOptionFooClientMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_CustomOptionFooServerMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_DummyMessageContainingEnum_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_DummyMessageInvalidAsOptionType_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_CustomOptionMinIntegerValues_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_CustomOptionMaxIntegerValues_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_CustomOptionOtherValues_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_SettingRealsFromPositiveInts_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_SettingRealsFromNegativeInts_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_ComplexOptionType1_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_ComplexOptionType2_ComplexOptionType4_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_ComplexOptionType2_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_ComplexOptionType3_ComplexOptionType5_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_ComplexOptionType3_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_ComplexOpt6_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_VariousComplexOptions_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_AggregateMessageSet_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_AggregateMessageSetElement_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_Aggregate_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_AggregateMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_NestedOptionType_NestedMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_NestedOptionType_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_OldOptionType_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_NewOptionType_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&_TestMessageWithRequiredEnumOption_default_instance_),
};

namespace {

void protobuf_AssignDescriptors() {
  AddDescriptors();
  ::google::protobuf::MessageFactory* factory = NULL;
  AssignDescriptors(
      "google/protobuf/unittest_custom_options.proto", schemas, file_default_instances, TableStruct::offsets, factory,
      file_level_metadata, file_level_enum_descriptors, file_level_service_descriptors);
}

void protobuf_AssignDescriptorsOnce() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
}

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

}  // namespace

void TableStruct::Shutdown() {
  _TestMessageWithCustomOptions_default_instance_.Shutdown();
  delete file_level_metadata[0].reflection;
  _CustomOptionFooRequest_default_instance_.Shutdown();
  delete file_level_metadata[1].reflection;
  _CustomOptionFooResponse_default_instance_.Shutdown();
  delete file_level_metadata[2].reflection;
  _CustomOptionFooClientMessage_default_instance_.Shutdown();
  delete file_level_metadata[3].reflection;
  _CustomOptionFooServerMessage_default_instance_.Shutdown();
  delete file_level_metadata[4].reflection;
  _DummyMessageContainingEnum_default_instance_.Shutdown();
  delete file_level_metadata[5].reflection;
  _DummyMessageInvalidAsOptionType_default_instance_.Shutdown();
  delete file_level_metadata[6].reflection;
  _CustomOptionMinIntegerValues_default_instance_.Shutdown();
  delete file_level_metadata[7].reflection;
  _CustomOptionMaxIntegerValues_default_instance_.Shutdown();
  delete file_level_metadata[8].reflection;
  _CustomOptionOtherValues_default_instance_.Shutdown();
  delete file_level_metadata[9].reflection;
  _SettingRealsFromPositiveInts_default_instance_.Shutdown();
  delete file_level_metadata[10].reflection;
  _SettingRealsFromNegativeInts_default_instance_.Shutdown();
  delete file_level_metadata[11].reflection;
  _ComplexOptionType1_default_instance_.Shutdown();
  delete file_level_metadata[12].reflection;
  _ComplexOptionType2_ComplexOptionType4_default_instance_.Shutdown();
  delete file_level_metadata[13].reflection;
  _ComplexOptionType2_default_instance_.Shutdown();
  delete file_level_metadata[14].reflection;
  _ComplexOptionType3_ComplexOptionType5_default_instance_.Shutdown();
  delete file_level_metadata[15].reflection;
  _ComplexOptionType3_default_instance_.Shutdown();
  delete file_level_metadata[16].reflection;
  _ComplexOpt6_default_instance_.Shutdown();
  delete file_level_metadata[17].reflection;
  _VariousComplexOptions_default_instance_.Shutdown();
  delete file_level_metadata[18].reflection;
  _AggregateMessageSet_default_instance_.Shutdown();
  delete file_level_metadata[19].reflection;
  _AggregateMessageSetElement_default_instance_.Shutdown();
  delete file_level_metadata[20].reflection;
  _Aggregate_default_instance_.Shutdown();
  delete file_level_metadata[21].reflection;
  _AggregateMessage_default_instance_.Shutdown();
  delete file_level_metadata[22].reflection;
  _NestedOptionType_NestedMessage_default_instance_.Shutdown();
  delete file_level_metadata[23].reflection;
  _NestedOptionType_default_instance_.Shutdown();
  delete file_level_metadata[24].reflection;
  _OldOptionType_default_instance_.Shutdown();
  delete file_level_metadata[25].reflection;
  _NewOptionType_default_instance_.Shutdown();
  delete file_level_metadata[26].reflection;
  _TestMessageWithRequiredEnumOption_default_instance_.Shutdown();
  delete file_level_metadata[27].reflection;
}

void TableStruct::InitDefaultsImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::protobuf::internal::InitProtobufDefaults();
  ::google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::InitDefaults();
  _TestMessageWithCustomOptions_default_instance_.DefaultConstruct();
  _CustomOptionFooRequest_default_instance_.DefaultConstruct();
  _CustomOptionFooResponse_default_instance_.DefaultConstruct();
  _CustomOptionFooClientMessage_default_instance_.DefaultConstruct();
  _CustomOptionFooServerMessage_default_instance_.DefaultConstruct();
  _DummyMessageContainingEnum_default_instance_.DefaultConstruct();
  _DummyMessageInvalidAsOptionType_default_instance_.DefaultConstruct();
  _CustomOptionMinIntegerValues_default_instance_.DefaultConstruct();
  _CustomOptionMaxIntegerValues_default_instance_.DefaultConstruct();
  _CustomOptionOtherValues_default_instance_.DefaultConstruct();
  _SettingRealsFromPositiveInts_default_instance_.DefaultConstruct();
  _SettingRealsFromNegativeInts_default_instance_.DefaultConstruct();
  _ComplexOptionType1_default_instance_.DefaultConstruct();
  _ComplexOptionType2_ComplexOptionType4_default_instance_.DefaultConstruct();
  _ComplexOptionType2_default_instance_.DefaultConstruct();
  _ComplexOptionType3_ComplexOptionType5_default_instance_.DefaultConstruct();
  _ComplexOptionType3_default_instance_.DefaultConstruct();
  _ComplexOpt6_default_instance_.DefaultConstruct();
  _VariousComplexOptions_default_instance_.DefaultConstruct();
  _AggregateMessageSet_default_instance_.DefaultConstruct();
  _AggregateMessageSetElement_default_instance_.DefaultConstruct();
  _Aggregate_default_instance_.DefaultConstruct();
  _AggregateMessage_default_instance_.DefaultConstruct();
  _NestedOptionType_NestedMessage_default_instance_.DefaultConstruct();
  _NestedOptionType_default_instance_.DefaultConstruct();
  _OldOptionType_default_instance_.DefaultConstruct();
  _NewOptionType_default_instance_.DefaultConstruct();
  _TestMessageWithRequiredEnumOption_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7633546, 11, false, false,
    ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::protobuf_unittest::AggregateMessageSet::internal_default_instance(),
    15447542, 11, false, false,
    ::protobuf_unittest::AggregateMessageSetElement::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::FileOptions::internal_default_instance(),
    15476903, 11, false, false,
    ::protobuf_unittest::Aggregate::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::FileOptions::internal_default_instance(),
    7912573, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::FileOptions::internal_default_instance(),
    7736974, 4, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7739036, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::FieldOptions::internal_default_instance(),
    7740936, 6, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::FieldOptions::internal_default_instance(),
    7753913, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::OneofOptions::internal_default_instance(),
    7740111, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::EnumOptions::internal_default_instance(),
    7753576, 15, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::EnumValueOptions::internal_default_instance(),
    1560678, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::ServiceOptions::internal_default_instance(),
    7887650, 18, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    ::google::protobuf::MethodOptions::internal_default_instance(),
    7890860, 14, false, false,
    &::protobuf_unittest::MethodOpt1_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7706090, 8, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7705709, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7705542, 3, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7704880, 13, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7702367, 4, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7701568, 17, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7700863, 18, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7700307, 7, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7700194, 6, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7698645, 15, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7685475, 16, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7675390, 2, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7673293, 1, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7673285, 9, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7673238, 12, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7673233, 14, false, false,
    &::protobuf_unittest::DummyMessageContainingEnum_TestEnumType_IsValid);
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7665967, 11, false, false,
    ::protobuf_unittest::DummyMessageInvalidAsOptionType::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::protobuf_unittest::ComplexOptionType1::internal_default_instance(),
    7663707, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::protobuf_unittest::ComplexOptionType1::internal_default_instance(),
    7663442, 11, false, false,
    ::protobuf_unittest::ComplexOptionType3::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterExtension(
    ::protobuf_unittest::ComplexOptionType2::internal_default_instance(),
    7650927, 5, false, false);
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::protobuf_unittest::ComplexOptionType2::internal_default_instance(),
    7649992, 11, false, false,
    ::protobuf_unittest::ComplexOptionType1::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7646756, 11, false, false,
    ::protobuf_unittest::ComplexOptionType1::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7636949, 11, false, false,
    ::protobuf_unittest::ComplexOptionType2::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7636463, 11, false, false,
    ::protobuf_unittest::ComplexOptionType3::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    7595468, 10, false, false,
    ::protobuf_unittest::ComplexOpt6::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::FileOptions::internal_default_instance(),
    15478479, 11, false, false,
    ::protobuf_unittest::Aggregate::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    15480088, 11, false, false,
    ::protobuf_unittest::Aggregate::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::FieldOptions::internal_default_instance(),
    15481374, 11, false, false,
    ::protobuf_unittest::Aggregate::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::EnumOptions::internal_default_instance(),
    15483218, 11, false, false,
    ::protobuf_unittest::Aggregate::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::EnumValueOptions::internal_default_instance(),
    15486921, 11, false, false,
    ::protobuf_unittest::Aggregate::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::ServiceOptions::internal_default_instance(),
    15497145, 11, false, false,
    ::protobuf_unittest::Aggregate::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::MethodOptions::internal_default_instance(),
    15512713, 11, false, false,
    ::protobuf_unittest::Aggregate::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::google::protobuf::MessageOptions::internal_default_instance(),
    106161807, 11, false, false,
    ::protobuf_unittest::OldOptionType::internal_default_instance());
  _TestMessageWithCustomOptions_default_instance_.oneof_field_ = 0;
  _ComplexOptionType2_default_instance_.get_mutable()->bar_ = const_cast< ::protobuf_unittest::ComplexOptionType1*>(
      ::protobuf_unittest::ComplexOptionType1::internal_default_instance());
  _ComplexOptionType2_default_instance_.get_mutable()->fred_ = const_cast< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4*>(
      ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4::internal_default_instance());
  _ComplexOptionType3_default_instance_.get_mutable()->complexoptiontype5_ = const_cast< ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5*>(
      ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5::internal_default_instance());
  _Aggregate_default_instance_.get_mutable()->sub_ = const_cast< ::protobuf_unittest::Aggregate*>(
      ::protobuf_unittest::Aggregate::internal_default_instance());
  _Aggregate_default_instance_.get_mutable()->file_ = const_cast< ::google::protobuf::FileOptions*>(
      ::google::protobuf::FileOptions::internal_default_instance());
  _Aggregate_default_instance_.get_mutable()->mset_ = const_cast< ::protobuf_unittest::AggregateMessageSet*>(
      ::protobuf_unittest::AggregateMessageSet::internal_default_instance());
}

void InitDefaults() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl);
}
void AddDescriptorsImpl() {
  InitDefaults();
  static const char descriptor[] = {
      "\n-google/protobuf/unittest_custom_option"
      "s.proto\022\021protobuf_unittest\032 google/proto"
      "buf/descriptor.proto\"\277\001\n\034TestMessageWith"
      "CustomOptions\022\036\n\006field1\030\001 \001(\tB\016\010\001\301\340\303\035-\341u"
      "\n\002\000\000\000\022\025\n\013oneof_field\030\002 \001(\005H\000\";\n\006AnEnum\022\017"
      "\n\013ANENUM_VAL1\020\001\022\026\n\013ANENUM_VAL2\020\002\032\005\260\206\372\005{\032"
      "\010\305\366\311\035\353\374\377\377:\020\010\000\340\351\302\035\310\377\377\377\377\377\377\377\377\001B\031\n\007AnOneof\022\016"
      "\370\254\303\035\235\377\377\377\377\377\377\377\377\001\"\030\n\026CustomOptionFooRequest"
      "\"\031\n\027CustomOptionFooResponse\"\036\n\034CustomOpt"
      "ionFooClientMessage\"\036\n\034CustomOptionFooSe"
      "rverMessage\"m\n\032DummyMessageContainingEnu"
      "m\"O\n\014TestEnumType\022\032\n\026TEST_OPTION_ENUM_TY"
      "PE1\020\026\022#\n\026TEST_OPTION_ENUM_TYPE2\020\351\377\377\377\377\377\377\377"
      "\377\001\"!\n\037DummyMessageInvalidAsOptionType\"\212\001"
      "\n\034CustomOptionMinIntegerValues:j\320\336\262\035\000\350\306\262"
      "\035\200\200\200\200\370\377\377\377\377\001\260\274\262\035\200\200\200\200\200\200\200\200\200\001\200\223\262\035\000\370\365\260\035\000\200\304\260\035\377"
      "\377\377\377\017\370\227\260\035\377\377\377\377\377\377\377\377\377\001\235\365\257\035\000\000\000\000\221\356\257\035\000\000\000\000\000\000\000\000\255\215"
      "\257\035\000\000\000\200\231\326\250\035\000\000\000\000\000\000\000\200\"\221\001\n\034CustomOptionMaxIn"
      "tegerValues:q\320\336\262\035\001\350\306\262\035\377\377\377\377\007\260\274\262\035\377\377\377\377\377\377\377\377\177"
      "\200\223\262\035\377\377\377\377\017\370\365\260\035\377\377\377\377\377\377\377\377\377\001\200\304\260\035\376\377\377\377\017\370\227\260\035\376\377\377\377"
      "\377\377\377\377\377\001\235\365\257\035\377\377\377\377\221\356\257\035\377\377\377\377\377\377\377\377\255\215\257\035\377\377\377\177\231\326\250\035\377\377"
      "\377\377\377\377\377\177\"n\n\027CustomOptionOtherValues:S\350\306\262\035\234"
      "\377\377\377\377\377\377\377\377\001\365\337\243\035\347\207EA\351\334\242\035\373Y\214B\312\300\363\?\252\334\242\035\016Hello,"
      " \"World\"\262\331\242\035\013Hello\000World\210\331\242\035\351\377\377\377\377\377\377\377\377\001\"4"
      "\n\034SettingRealsFromPositiveInts:\024\365\337\243\035\000\000@A"
      "\351\334\242\035\000\000\000\000\000@c@\"4\n\034SettingRealsFromNegative"
      "Ints:\024\365\337\243\035\000\000@\301\351\334\242\035\000\000\000\000\000@c\300\"U\n\022ComplexOpt"
      "ionType1\022\013\n\003foo\030\001 \001(\005\022\014\n\004foo2\030\002 \001(\005\022\014\n\004f"
      "oo3\030\003 \001(\005\022\014\n\004foo4\030\004 \003(\005*\010\010d\020\200\200\200\200\002\"\213\003\n\022Co"
      "mplexOptionType2\0222\n\003bar\030\001 \001(\0132%.protobuf"
      "_unittest.ComplexOptionType1\022\013\n\003baz\030\002 \001("
      "\005\022F\n\004fred\030\003 \001(\01328.protobuf_unittest.Comp"
      "lexOptionType2.ComplexOptionType4\022H\n\006bar"
      "ney\030\004 \003(\01328.protobuf_unittest.ComplexOpt"
      "ionType2.ComplexOptionType4\032\227\001\n\022ComplexO"
      "ptionType4\022\r\n\005waldo\030\001 \001(\0052r\n\014complex_opt"
      "4\022\037.google.protobuf.MessageOptions\030\212\365\321\003 "
      "\001(\01328.protobuf_unittest.ComplexOptionTyp"
      "e2.ComplexOptionType4*\010\010d\020\200\200\200\200\002\"\234\001\n\022Comp"
      "lexOptionType3\022\013\n\003qux\030\001 \001(\005\022T\n\022complexop"
      "tiontype5\030\002 \001(\n28.protobuf_unittest.Comp"
      "lexOptionType3.ComplexOptionType5\032#\n\022Com"
      "plexOptionType5\022\r\n\005plugh\030\003 \001(\005\"\037\n\013Comple"
      "xOpt6\022\020\n\005xyzzy\030\337\277\317\003 \001(\005\"\361\001\n\025VariousCompl"
      "exOptions:\327\001\242\342\225\035\002\010*\242\342\225\035\006\330\205\236\035\304\002\242\342\225\035\010\222\365\235\035\003"
      "\010\354\006\242\342\225\035\002 c\242\342\225\035\002 X\252\375\220\035\003\020\333\007\252\375\220\035\006\370\346\227\035\216\005\252\375\220\035"
      "\005\n\003\010\347\005\252\375\220\035\010\n\006\330\205\236\035\317\017\252\375\220\035\n\n\010\222\365\235\035\003\010\330\017\252\375\220\035\010\302"
      "\254\227\035\003\010\345\005\252\375\220\035\013\302\254\227\035\006\330\205\236\035\316\017\252\375\220\035\r\302\254\227\035\010\222\365\235\035\003\010\311"
      "\020\322\250\217\035\003\010\263\017\252\375\220\035\005\032\003\010\301\002\252\375\220\035\004\"\002\010e\252\375\220\035\005\"\003\010\324\001\372\336"
      "\220\035\002\010\t\372\336\220\035\004\023\030\026\024\343\334\374\034\370\375\373\034\030\344\334\374\034\"#\n\023Aggregate"
      "MessageSet*\010\010\004\020\377\377\377\377\007:\002\010\001\"\240\001\n\032AggregateMe"
      "ssageSetElement\022\t\n\001s\030\001 \001(\t2w\n\025message_se"
      "t_extension\022&.protobuf_unittest.Aggregat"
      "eMessageSet\030\366\353\256\007 \001(\0132-.protobuf_unittest"
      ".AggregateMessageSetElement\"\375\001\n\tAggregat"
      "e\022\t\n\001i\030\001 \001(\005\022\t\n\001s\030\002 \001(\t\022)\n\003sub\030\003 \001(\0132\034.p"
      "rotobuf_unittest.Aggregate\022*\n\004file\030\004 \001(\013"
      "2\034.google.protobuf.FileOptions\0224\n\004mset\030\005"
      " \001(\0132&.protobuf_unittest.AggregateMessag"
      "eSet2M\n\006nested\022\034.google.protobuf.FileOpt"
      "ions\030\247\321\260\007 \001(\0132\034.protobuf_unittest.Aggreg"
      "ate\"Y\n\020AggregateMessage\022)\n\tfieldname\030\001 \001"
      "(\005B\026\362\241\207;\021\022\017FieldAnnotation:\032\302\321\206;\025\010e\022\021Mes"
      "sageAnnotation\"\311\001\n\020NestedOptionType\032;\n\rN"
      "estedMessage\022\"\n\014nested_field\030\001 \001(\005B\014\301\340\303\035"
      "\352\003\000\000\000\000\000\000:\006\340\351\302\035\351\007\"5\n\nNestedEnum\022\035\n\021NESTED"
      "_ENUM_VALUE\020\001\032\006\260\206\372\005\354\007\032\010\305\366\311\035\353\003\000\0002A\n\020neste"
      "d_extension\022\034.google.protobuf.FileOption"
      "s\030\375\370\342\003 \001(\005B\006\310\213\312\035\355\007\"d\n\rOldOptionType\0228\n\005v"
      "alue\030\001 \002(\0162).protobuf_unittest.OldOption"
      "Type.TestEnum\"\031\n\010TestEnum\022\r\n\tOLD_VALUE\020\000"
      "\"s\n\rNewOptionType\0228\n\005value\030\001 \002(\0162).proto"
      "buf_unittest.NewOptionType.TestEnum\"(\n\010T"
      "estEnum\022\r\n\tOLD_VALUE\020\000\022\r\n\tNEW_VALUE\020\001\"-\n"
      "!TestMessageWithRequiredEnumOption:\010\372\350\374\224"
      "\003\002\010\000*6\n\nMethodOpt1\022\023\n\017METHODOPT1_VAL1\020\001\022"
      "\023\n\017METHODOPT1_VAL2\020\002*M\n\rAggregateEnum\022%\n"
      "\005VALUE\020\001\032\032\312\374\211;\025\022\023EnumValueAnnotation\032\025\222\225"
      "\210;\020\022\016EnumAnnotation2\216\001\n\034TestServiceWithC"
      "ustomOptions\022c\n\003Foo\022).protobuf_unittest."
      "CustomOptionFooRequest\032*.protobuf_unitte"
      "st.CustomOptionFooResponse\"\005\340\372\214\036\002\032\t\220\262\213\036\323"
      "\333\200\313I2\231\001\n\020AggregateService\022k\n\006Method\022#.pr"
      "otobuf_unittest.AggregateMessage\032#.proto"
      "buf_unittest.AggregateMessage\"\027\312\310\226;\022\022\020Me"
      "thodAnnotation\032\030\312\373\216;\023\022\021ServiceAnnotation"
      ":2\n\tfile_opt1\022\034.google.protobuf.FileOpti"
      "ons\030\216\235\330\003 \001(\004:8\n\014message_opt1\022\037.google.pr"
      "otobuf.MessageOptions\030\234\255\330\003 \001(\005:4\n\nfield_"
      "opt1\022\035.google.protobuf.FieldOptions\030\210\274\330\003"
      " \001(\006:8\n\nfield_opt2\022\035.google.protobuf.Fie"
      "ldOptions\030\271\241\331\003 \001(\005:\00242:4\n\noneof_opt1\022\035.g"
      "oogle.protobuf.OneofOptions\030\317\265\330\003 \001(\005:2\n\t"
      "enum_opt1\022\034.google.protobuf.EnumOptions\030"
      "\350\236\331\003 \001(\017:<\n\017enum_value_opt1\022!.google.pro"
      "tobuf.EnumValueOptions\030\346\240_ \001(\005:8\n\014servic"
      "e_opt1\022\037.google.protobuf.ServiceOptions\030"
      "\242\266\341\003 \001(\022:U\n\013method_opt1\022\036.google.protobu"
      "f.MethodOptions\030\254\317\341\003 \001(\0162\035.protobuf_unit"
      "test.MethodOpt1:4\n\010bool_opt\022\037.google.pro"
      "tobuf.MessageOptions\030\352\253\326\003 \001(\010:5\n\tint32_o"
      "pt\022\037.google.protobuf.MessageOptions\030\355\250\326\003"
      " \001(\005:5\n\tint64_opt\022\037.google.protobuf.Mess"
      "ageOptions\030\306\247\326\003 \001(\003:6\n\nuint32_opt\022\037.goog"
      "le.protobuf.MessageOptions\030\260\242\326\003 \001(\r:6\n\nu"
      "int64_opt\022\037.google.protobuf.MessageOptio"
      "ns\030\337\216\326\003 \001(\004:6\n\nsint32_opt\022\037.google.proto"
      "buf.MessageOptions\030\300\210\326\003 \001(\021:6\n\nsint64_op"
      "t\022\037.google.protobuf.MessageOptions\030\377\202\326\003 "
      "\001(\022:7\n\013fixed32_opt\022\037.google.protobuf.Mes"
      "sageOptions\030\323\376\325\003 \001(\007:7\n\013fixed64_opt\022\037.go"
      "ogle.protobuf.MessageOptions\030\342\375\325\003 \001(\006:8\n"
      "\014sfixed32_opt\022\037.google.protobuf.MessageO"
      "ptions\030\325\361\325\003 \001(\017:8\n\014sfixed64_opt\022\037.google"
      ".protobuf.MessageOptions\030\343\212\325\003 \001(\020:5\n\tflo"
      "at_opt\022\037.google.protobuf.MessageOptions\030"
      "\376\273\324\003 \001(\002:6\n\ndouble_opt\022\037.google.protobuf"
      ".MessageOptions\030\315\253\324\003 \001(\001:6\n\nstring_opt\022\037"
      ".google.protobuf.MessageOptions\030\305\253\324\003 \001(\t"
      ":5\n\tbytes_opt\022\037.google.protobuf.MessageO"
      "ptions\030\226\253\324\003 \001(\014:p\n\010enum_opt\022\037.google.pro"
      "tobuf.MessageOptions\030\221\253\324\003 \001(\0162:.protobuf"
      "_unittest.DummyMessageContainingEnum.Tes"
      "tEnumType:p\n\020message_type_opt\022\037.google.p"
      "rotobuf.MessageOptions\030\257\362\323\003 \001(\01322.protob"
      "uf_unittest.DummyMessageInvalidAsOptionT"
      "ype:6\n\004quux\022%.protobuf_unittest.ComplexO"
      "ptionType1\030\333\340\323\003 \001(\005:^\n\005corge\022%.protobuf_"
      "unittest.ComplexOptionType1\030\322\336\323\003 \001(\0132%.p"
      "rotobuf_unittest.ComplexOptionType3:8\n\006g"
      "rault\022%.protobuf_unittest.ComplexOptionT"
      "ype2\030\357\374\322\003 \001(\005:_\n\006garply\022%.protobuf_unitt"
      "est.ComplexOptionType2\030\310\365\322\003 \001(\0132%.protob"
      "uf_unittest.ComplexOptionType1:_\n\014comple"
      "x_opt1\022\037.google.protobuf.MessageOptions\030"
      "\244\334\322\003 \001(\0132%.protobuf_unittest.ComplexOpti"
      "onType1:_\n\014complex_opt2\022\037.google.protobu"
      "f.MessageOptions\030\325\217\322\003 \001(\0132%.protobuf_uni"
      "ttest.ComplexOptionType2:_\n\014complex_opt3"
      "\022\037.google.protobuf.MessageOptions\030\357\213\322\003 \001"
      "(\0132%.protobuf_unittest.ComplexOptionType"
      "3:W\n\013complexopt6\022\037.google.protobuf.Messa"
      "geOptions\030\314\313\317\003 \001(\n2\036.protobuf_unittest.C"
      "omplexOpt6:N\n\007fileopt\022\034.google.protobuf."
      "FileOptions\030\317\335\260\007 \001(\0132\034.protobuf_unittest"
      ".Aggregate:P\n\006msgopt\022\037.google.protobuf.M"
      "essageOptions\030\230\352\260\007 \001(\0132\034.protobuf_unitte"
      "st.Aggregate:P\n\010fieldopt\022\035.google.protob"
      "uf.FieldOptions\030\236\364\260\007 \001(\0132\034.protobuf_unit"
      "test.Aggregate:N\n\007enumopt\022\034.google.proto"
      "buf.EnumOptions\030\322\202\261\007 \001(\0132\034.protobuf_unit"
      "test.Aggregate:V\n\nenumvalopt\022!.google.pr"
      "otobuf.EnumValueOptions\030\311\237\261\007 \001(\0132\034.proto"
      "buf_unittest.Aggregate:T\n\nserviceopt\022\037.g"
      "oogle.protobuf.ServiceOptions\030\271\357\261\007 \001(\0132\034"
      ".protobuf_unittest.Aggregate:R\n\tmethodop"
      "t\022\036.google.protobuf.MethodOptions\030\211\351\262\007 \001"
      "(\0132\034.protobuf_unittest.Aggregate:_\n\021requ"
      "ired_enum_opt\022\037.google.protobuf.MessageO"
      "ptions\030\217\315\3172 \001(\0132 .protobuf_unittest.OldO"
      "ptionTypeB\207\001\200\001\001\210\001\001\220\001\001\360\350\301\035\352\255\300\345$\372\354\205;p\010d\022\016F"
      "ileAnnotation\032\026\022\024NestedFileAnnotation\"\036\372"
      "\354\205;\031\022\027FileExtensionAnnotation*$\013\020\366\353\256\007\032\033\n"
      "\031EmbeddedMessageSetElement\014"
  };
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
      descriptor, 6547);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "google/protobuf/unittest_custom_options.proto", &protobuf_RegisterTypes);
  ::google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::AddDescriptors();
  ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown);
}

void AddDescriptors() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer {
  StaticDescriptorInitializer() {
    AddDescriptors();
  }
} static_descriptor_initializer;

}  // namespace protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto

const ::google::protobuf::EnumDescriptor* TestMessageWithCustomOptions_AnEnum_descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_enum_descriptors[0];
}
bool TestMessageWithCustomOptions_AnEnum_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const TestMessageWithCustomOptions_AnEnum TestMessageWithCustomOptions::ANENUM_VAL1;
const TestMessageWithCustomOptions_AnEnum TestMessageWithCustomOptions::ANENUM_VAL2;
const TestMessageWithCustomOptions_AnEnum TestMessageWithCustomOptions::AnEnum_MIN;
const TestMessageWithCustomOptions_AnEnum TestMessageWithCustomOptions::AnEnum_MAX;
const int TestMessageWithCustomOptions::AnEnum_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* DummyMessageContainingEnum_TestEnumType_descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_enum_descriptors[1];
}
bool DummyMessageContainingEnum_TestEnumType_IsValid(int value) {
  switch (value) {
    case -23:
    case 22:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const DummyMessageContainingEnum_TestEnumType DummyMessageContainingEnum::TEST_OPTION_ENUM_TYPE1;
const DummyMessageContainingEnum_TestEnumType DummyMessageContainingEnum::TEST_OPTION_ENUM_TYPE2;
const DummyMessageContainingEnum_TestEnumType DummyMessageContainingEnum::TestEnumType_MIN;
const DummyMessageContainingEnum_TestEnumType DummyMessageContainingEnum::TestEnumType_MAX;
const int DummyMessageContainingEnum::TestEnumType_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* NestedOptionType_NestedEnum_descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_enum_descriptors[2];
}
bool NestedOptionType_NestedEnum_IsValid(int value) {
  switch (value) {
    case 1:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const NestedOptionType_NestedEnum NestedOptionType::NESTED_ENUM_VALUE;
const NestedOptionType_NestedEnum NestedOptionType::NestedEnum_MIN;
const NestedOptionType_NestedEnum NestedOptionType::NestedEnum_MAX;
const int NestedOptionType::NestedEnum_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* OldOptionType_TestEnum_descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_enum_descriptors[3];
}
bool OldOptionType_TestEnum_IsValid(int value) {
  switch (value) {
    case 0:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const OldOptionType_TestEnum OldOptionType::OLD_VALUE;
const OldOptionType_TestEnum OldOptionType::TestEnum_MIN;
const OldOptionType_TestEnum OldOptionType::TestEnum_MAX;
const int OldOptionType::TestEnum_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* NewOptionType_TestEnum_descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_enum_descriptors[4];
}
bool NewOptionType_TestEnum_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const NewOptionType_TestEnum NewOptionType::OLD_VALUE;
const NewOptionType_TestEnum NewOptionType::NEW_VALUE;
const NewOptionType_TestEnum NewOptionType::TestEnum_MIN;
const NewOptionType_TestEnum NewOptionType::TestEnum_MAX;
const int NewOptionType::TestEnum_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* MethodOpt1_descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_enum_descriptors[5];
}
bool MethodOpt1_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

const ::google::protobuf::EnumDescriptor* AggregateEnum_descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_enum_descriptors[6];
}
bool AggregateEnum_IsValid(int value) {
  switch (value) {
    case 1:
      return true;
    default:
      return false;
  }
}

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TestMessageWithCustomOptions::kField1FieldNumber;
const int TestMessageWithCustomOptions::kOneofFieldFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestMessageWithCustomOptions::TestMessageWithCustomOptions()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestMessageWithCustomOptions)
}
TestMessageWithCustomOptions::TestMessageWithCustomOptions(const TestMessageWithCustomOptions& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  field1_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_field1()) {
    field1_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.field1_);
  }
  clear_has_AnOneof();
  switch (from.AnOneof_case()) {
    case kOneofField: {
      set_oneof_field(from.oneof_field());
      break;
    }
    case ANONEOF_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMessageWithCustomOptions)
}

void TestMessageWithCustomOptions::SharedCtor() {
  _cached_size_ = 0;
  field1_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_AnOneof();
}

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

void TestMessageWithCustomOptions::SharedDtor() {
  field1_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (has_AnOneof()) {
    clear_AnOneof();
  }
}

void TestMessageWithCustomOptions::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TestMessageWithCustomOptions::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[0].descriptor;
}

const TestMessageWithCustomOptions& TestMessageWithCustomOptions::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

TestMessageWithCustomOptions* TestMessageWithCustomOptions::New(::google::protobuf::Arena* arena) const {
  TestMessageWithCustomOptions* n = new TestMessageWithCustomOptions;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void TestMessageWithCustomOptions::clear_AnOneof() {
// @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestMessageWithCustomOptions)
  switch (AnOneof_case()) {
    case kOneofField: {
      // No need to clear
      break;
    }
    case ANONEOF_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = ANONEOF_NOT_SET;
}

void TestMessageWithCustomOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestMessageWithCustomOptions)
  if (has_field1()) {
    GOOGLE_DCHECK(!field1_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
    (*field1_.UnsafeRawStringPointer())->clear();
  }
  clear_AnOneof();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestMessageWithCustomOptions::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.TestMessageWithCustomOptions)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string field1 = 1 [ctype = CORD, (.protobuf_unittest.field_opt1) = 8765432109];
      case 1: {
        if (tag == 10u) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_field1()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->field1().data(), this->field1().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.TestMessageWithCustomOptions.field1");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 oneof_field = 2;
      case 2: {
        if (tag == 16u) {
          clear_AnOneof();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &AnOneof_.oneof_field_)));
          set_has_oneof_field();
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void TestMessageWithCustomOptions::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestMessageWithCustomOptions)
  // optional string field1 = 1 [ctype = CORD, (.protobuf_unittest.field_opt1) = 8765432109];
  if (has_field1()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->field1().data(), this->field1().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestMessageWithCustomOptions.field1");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->field1(), output);
  }

  // optional int32 oneof_field = 2;
  if (has_oneof_field()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->oneof_field(), output);
  }

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

::google::protobuf::uint8* TestMessageWithCustomOptions::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestMessageWithCustomOptions)
  // optional string field1 = 1 [ctype = CORD, (.protobuf_unittest.field_opt1) = 8765432109];
  if (has_field1()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->field1().data(), this->field1().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.TestMessageWithCustomOptions.field1");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->field1(), target);
  }

  // optional int32 oneof_field = 2;
  if (has_oneof_field()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->oneof_field(), target);
  }

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

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  // optional string field1 = 1 [ctype = CORD, (.protobuf_unittest.field_opt1) = 8765432109];
  if (has_field1()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->field1());
  }

  switch (AnOneof_case()) {
    // optional int32 oneof_field = 2;
    case kOneofField: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->oneof_field());
      break;
    }
    case ANONEOF_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void TestMessageWithCustomOptions::MergeFrom(const TestMessageWithCustomOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestMessageWithCustomOptions)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_field1()) {
    set_has_field1();
    field1_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.field1_);
  }
  switch (from.AnOneof_case()) {
    case kOneofField: {
      set_oneof_field(from.oneof_field());
      break;
    }
    case ANONEOF_NOT_SET: {
      break;
    }
  }
}

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

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

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

void TestMessageWithCustomOptions::Swap(TestMessageWithCustomOptions* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TestMessageWithCustomOptions::InternalSwap(TestMessageWithCustomOptions* other) {
  field1_.Swap(&other->field1_);
  std::swap(AnOneof_, other->AnOneof_);
  std::swap(_oneof_case_[0], other->_oneof_case_[0]);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata TestMessageWithCustomOptions::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[0];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// TestMessageWithCustomOptions

// optional string field1 = 1 [ctype = CORD, (.protobuf_unittest.field_opt1) = 8765432109];
bool TestMessageWithCustomOptions::has_field1() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void TestMessageWithCustomOptions::set_has_field1() {
  _has_bits_[0] |= 0x00000001u;
}
void TestMessageWithCustomOptions::clear_has_field1() {
  _has_bits_[0] &= ~0x00000001u;
}
void TestMessageWithCustomOptions::clear_field1() {
  field1_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_field1();
}
const ::std::string& TestMessageWithCustomOptions::field1() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.TestMessageWithCustomOptions.field1)
  return field1_.GetNoArena();
}
void TestMessageWithCustomOptions::set_field1(const ::std::string& value) {
  set_has_field1();
  field1_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:protobuf_unittest.TestMessageWithCustomOptions.field1)
}
#if LANG_CXX11
void TestMessageWithCustomOptions::set_field1(::std::string&& value) {
  set_has_field1();
  field1_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest.TestMessageWithCustomOptions.field1)
}
#endif
void TestMessageWithCustomOptions::set_field1(const char* value) {
  set_has_field1();
  field1_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:protobuf_unittest.TestMessageWithCustomOptions.field1)
}
void TestMessageWithCustomOptions::set_field1(const char* value, size_t size) {
  set_has_field1();
  field1_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.TestMessageWithCustomOptions.field1)
}
::std::string* TestMessageWithCustomOptions::mutable_field1() {
  set_has_field1();
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestMessageWithCustomOptions.field1)
  return field1_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* TestMessageWithCustomOptions::release_field1() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.TestMessageWithCustomOptions.field1)
  clear_has_field1();
  return field1_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void TestMessageWithCustomOptions::set_allocated_field1(::std::string* field1) {
  if (field1 != NULL) {
    set_has_field1();
  } else {
    clear_has_field1();
  }
  field1_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), field1);
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestMessageWithCustomOptions.field1)
}

// optional int32 oneof_field = 2;
bool TestMessageWithCustomOptions::has_oneof_field() const {
  return AnOneof_case() == kOneofField;
}
void TestMessageWithCustomOptions::set_has_oneof_field() {
  _oneof_case_[0] = kOneofField;
}
void TestMessageWithCustomOptions::clear_oneof_field() {
  if (has_oneof_field()) {
    AnOneof_.oneof_field_ = 0;
    clear_has_AnOneof();
  }
}
::google::protobuf::int32 TestMessageWithCustomOptions::oneof_field() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.TestMessageWithCustomOptions.oneof_field)
  if (has_oneof_field()) {
    return AnOneof_.oneof_field_;
  }
  return 0;
}
void TestMessageWithCustomOptions::set_oneof_field(::google::protobuf::int32 value) {
  if (!has_oneof_field()) {
    clear_AnOneof();
    set_has_oneof_field();
  }
  AnOneof_.oneof_field_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.TestMessageWithCustomOptions.oneof_field)
}

bool TestMessageWithCustomOptions::has_AnOneof() const {
  return AnOneof_case() != ANONEOF_NOT_SET;
}
void TestMessageWithCustomOptions::clear_has_AnOneof() {
  _oneof_case_[0] = ANONEOF_NOT_SET;
}
TestMessageWithCustomOptions::AnOneofCase TestMessageWithCustomOptions::AnOneof_case() const {
  return TestMessageWithCustomOptions::AnOneofCase(_oneof_case_[0]);
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CustomOptionFooRequest::CustomOptionFooRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionFooRequest)
}
CustomOptionFooRequest::CustomOptionFooRequest(const CustomOptionFooRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionFooRequest)
}

void CustomOptionFooRequest::SharedCtor() {
  _cached_size_ = 0;
}

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

void CustomOptionFooRequest::SharedDtor() {
}

void CustomOptionFooRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CustomOptionFooRequest::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[1].descriptor;
}

const CustomOptionFooRequest& CustomOptionFooRequest::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

CustomOptionFooRequest* CustomOptionFooRequest::New(::google::protobuf::Arena* arena) const {
  CustomOptionFooRequest* n = new CustomOptionFooRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CustomOptionFooRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.CustomOptionFooRequest)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool CustomOptionFooRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.CustomOptionFooRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.CustomOptionFooRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.CustomOptionFooRequest)
  return false;
#undef DO_
}

void CustomOptionFooRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.CustomOptionFooRequest)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.CustomOptionFooRequest)
}

::google::protobuf::uint8* CustomOptionFooRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.CustomOptionFooRequest)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.CustomOptionFooRequest)
  return target;
}

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

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

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

void CustomOptionFooRequest::MergeFrom(const CustomOptionFooRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.CustomOptionFooRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void CustomOptionFooRequest::Swap(CustomOptionFooRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CustomOptionFooRequest::InternalSwap(CustomOptionFooRequest* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CustomOptionFooRequest::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[1];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// CustomOptionFooRequest

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CustomOptionFooResponse::CustomOptionFooResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionFooResponse)
}
CustomOptionFooResponse::CustomOptionFooResponse(const CustomOptionFooResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionFooResponse)
}

void CustomOptionFooResponse::SharedCtor() {
  _cached_size_ = 0;
}

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

void CustomOptionFooResponse::SharedDtor() {
}

void CustomOptionFooResponse::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CustomOptionFooResponse::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[2].descriptor;
}

const CustomOptionFooResponse& CustomOptionFooResponse::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

CustomOptionFooResponse* CustomOptionFooResponse::New(::google::protobuf::Arena* arena) const {
  CustomOptionFooResponse* n = new CustomOptionFooResponse;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CustomOptionFooResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.CustomOptionFooResponse)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool CustomOptionFooResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.CustomOptionFooResponse)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.CustomOptionFooResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.CustomOptionFooResponse)
  return false;
#undef DO_
}

void CustomOptionFooResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.CustomOptionFooResponse)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.CustomOptionFooResponse)
}

::google::protobuf::uint8* CustomOptionFooResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.CustomOptionFooResponse)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.CustomOptionFooResponse)
  return target;
}

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

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

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

void CustomOptionFooResponse::MergeFrom(const CustomOptionFooResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.CustomOptionFooResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void CustomOptionFooResponse::Swap(CustomOptionFooResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CustomOptionFooResponse::InternalSwap(CustomOptionFooResponse* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CustomOptionFooResponse::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[2];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// CustomOptionFooResponse

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CustomOptionFooClientMessage::CustomOptionFooClientMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionFooClientMessage)
}
CustomOptionFooClientMessage::CustomOptionFooClientMessage(const CustomOptionFooClientMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionFooClientMessage)
}

void CustomOptionFooClientMessage::SharedCtor() {
  _cached_size_ = 0;
}

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

void CustomOptionFooClientMessage::SharedDtor() {
}

void CustomOptionFooClientMessage::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CustomOptionFooClientMessage::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[3].descriptor;
}

const CustomOptionFooClientMessage& CustomOptionFooClientMessage::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

CustomOptionFooClientMessage* CustomOptionFooClientMessage::New(::google::protobuf::Arena* arena) const {
  CustomOptionFooClientMessage* n = new CustomOptionFooClientMessage;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CustomOptionFooClientMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.CustomOptionFooClientMessage)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool CustomOptionFooClientMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.CustomOptionFooClientMessage)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.CustomOptionFooClientMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.CustomOptionFooClientMessage)
  return false;
#undef DO_
}

void CustomOptionFooClientMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.CustomOptionFooClientMessage)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.CustomOptionFooClientMessage)
}

::google::protobuf::uint8* CustomOptionFooClientMessage::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.CustomOptionFooClientMessage)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.CustomOptionFooClientMessage)
  return target;
}

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

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

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

void CustomOptionFooClientMessage::MergeFrom(const CustomOptionFooClientMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.CustomOptionFooClientMessage)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void CustomOptionFooClientMessage::Swap(CustomOptionFooClientMessage* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CustomOptionFooClientMessage::InternalSwap(CustomOptionFooClientMessage* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CustomOptionFooClientMessage::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[3];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// CustomOptionFooClientMessage

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CustomOptionFooServerMessage::CustomOptionFooServerMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionFooServerMessage)
}
CustomOptionFooServerMessage::CustomOptionFooServerMessage(const CustomOptionFooServerMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionFooServerMessage)
}

void CustomOptionFooServerMessage::SharedCtor() {
  _cached_size_ = 0;
}

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

void CustomOptionFooServerMessage::SharedDtor() {
}

void CustomOptionFooServerMessage::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CustomOptionFooServerMessage::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[4].descriptor;
}

const CustomOptionFooServerMessage& CustomOptionFooServerMessage::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

CustomOptionFooServerMessage* CustomOptionFooServerMessage::New(::google::protobuf::Arena* arena) const {
  CustomOptionFooServerMessage* n = new CustomOptionFooServerMessage;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CustomOptionFooServerMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.CustomOptionFooServerMessage)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool CustomOptionFooServerMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.CustomOptionFooServerMessage)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.CustomOptionFooServerMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.CustomOptionFooServerMessage)
  return false;
#undef DO_
}

void CustomOptionFooServerMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.CustomOptionFooServerMessage)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.CustomOptionFooServerMessage)
}

::google::protobuf::uint8* CustomOptionFooServerMessage::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.CustomOptionFooServerMessage)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.CustomOptionFooServerMessage)
  return target;
}

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

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

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

void CustomOptionFooServerMessage::MergeFrom(const CustomOptionFooServerMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.CustomOptionFooServerMessage)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void CustomOptionFooServerMessage::Swap(CustomOptionFooServerMessage* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CustomOptionFooServerMessage::InternalSwap(CustomOptionFooServerMessage* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CustomOptionFooServerMessage::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[4];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// CustomOptionFooServerMessage

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DummyMessageContainingEnum::DummyMessageContainingEnum()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.DummyMessageContainingEnum)
}
DummyMessageContainingEnum::DummyMessageContainingEnum(const DummyMessageContainingEnum& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.DummyMessageContainingEnum)
}

void DummyMessageContainingEnum::SharedCtor() {
  _cached_size_ = 0;
}

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

void DummyMessageContainingEnum::SharedDtor() {
}

void DummyMessageContainingEnum::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DummyMessageContainingEnum::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[5].descriptor;
}

const DummyMessageContainingEnum& DummyMessageContainingEnum::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

DummyMessageContainingEnum* DummyMessageContainingEnum::New(::google::protobuf::Arena* arena) const {
  DummyMessageContainingEnum* n = new DummyMessageContainingEnum;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DummyMessageContainingEnum::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.DummyMessageContainingEnum)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool DummyMessageContainingEnum::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.DummyMessageContainingEnum)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.DummyMessageContainingEnum)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.DummyMessageContainingEnum)
  return false;
#undef DO_
}

void DummyMessageContainingEnum::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.DummyMessageContainingEnum)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.DummyMessageContainingEnum)
}

::google::protobuf::uint8* DummyMessageContainingEnum::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.DummyMessageContainingEnum)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.DummyMessageContainingEnum)
  return target;
}

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

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

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

void DummyMessageContainingEnum::MergeFrom(const DummyMessageContainingEnum& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.DummyMessageContainingEnum)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void DummyMessageContainingEnum::Swap(DummyMessageContainingEnum* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DummyMessageContainingEnum::InternalSwap(DummyMessageContainingEnum* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DummyMessageContainingEnum::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[5];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DummyMessageContainingEnum

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DummyMessageInvalidAsOptionType::DummyMessageInvalidAsOptionType()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.DummyMessageInvalidAsOptionType)
}
DummyMessageInvalidAsOptionType::DummyMessageInvalidAsOptionType(const DummyMessageInvalidAsOptionType& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.DummyMessageInvalidAsOptionType)
}

void DummyMessageInvalidAsOptionType::SharedCtor() {
  _cached_size_ = 0;
}

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

void DummyMessageInvalidAsOptionType::SharedDtor() {
}

void DummyMessageInvalidAsOptionType::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DummyMessageInvalidAsOptionType::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[6].descriptor;
}

const DummyMessageInvalidAsOptionType& DummyMessageInvalidAsOptionType::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

DummyMessageInvalidAsOptionType* DummyMessageInvalidAsOptionType::New(::google::protobuf::Arena* arena) const {
  DummyMessageInvalidAsOptionType* n = new DummyMessageInvalidAsOptionType;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DummyMessageInvalidAsOptionType::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.DummyMessageInvalidAsOptionType)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool DummyMessageInvalidAsOptionType::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.DummyMessageInvalidAsOptionType)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.DummyMessageInvalidAsOptionType)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.DummyMessageInvalidAsOptionType)
  return false;
#undef DO_
}

void DummyMessageInvalidAsOptionType::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.DummyMessageInvalidAsOptionType)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.DummyMessageInvalidAsOptionType)
}

::google::protobuf::uint8* DummyMessageInvalidAsOptionType::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.DummyMessageInvalidAsOptionType)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.DummyMessageInvalidAsOptionType)
  return target;
}

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

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

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

void DummyMessageInvalidAsOptionType::MergeFrom(const DummyMessageInvalidAsOptionType& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.DummyMessageInvalidAsOptionType)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void DummyMessageInvalidAsOptionType::Swap(DummyMessageInvalidAsOptionType* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DummyMessageInvalidAsOptionType::InternalSwap(DummyMessageInvalidAsOptionType* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DummyMessageInvalidAsOptionType::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[6];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DummyMessageInvalidAsOptionType

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CustomOptionMinIntegerValues::CustomOptionMinIntegerValues()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionMinIntegerValues)
}
CustomOptionMinIntegerValues::CustomOptionMinIntegerValues(const CustomOptionMinIntegerValues& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionMinIntegerValues)
}

void CustomOptionMinIntegerValues::SharedCtor() {
  _cached_size_ = 0;
}

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

void CustomOptionMinIntegerValues::SharedDtor() {
}

void CustomOptionMinIntegerValues::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CustomOptionMinIntegerValues::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[7].descriptor;
}

const CustomOptionMinIntegerValues& CustomOptionMinIntegerValues::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

CustomOptionMinIntegerValues* CustomOptionMinIntegerValues::New(::google::protobuf::Arena* arena) const {
  CustomOptionMinIntegerValues* n = new CustomOptionMinIntegerValues;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CustomOptionMinIntegerValues::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.CustomOptionMinIntegerValues)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool CustomOptionMinIntegerValues::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.CustomOptionMinIntegerValues)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.CustomOptionMinIntegerValues)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.CustomOptionMinIntegerValues)
  return false;
#undef DO_
}

void CustomOptionMinIntegerValues::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.CustomOptionMinIntegerValues)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.CustomOptionMinIntegerValues)
}

::google::protobuf::uint8* CustomOptionMinIntegerValues::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.CustomOptionMinIntegerValues)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.CustomOptionMinIntegerValues)
  return target;
}

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

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

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

void CustomOptionMinIntegerValues::MergeFrom(const CustomOptionMinIntegerValues& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.CustomOptionMinIntegerValues)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void CustomOptionMinIntegerValues::Swap(CustomOptionMinIntegerValues* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CustomOptionMinIntegerValues::InternalSwap(CustomOptionMinIntegerValues* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CustomOptionMinIntegerValues::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[7];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// CustomOptionMinIntegerValues

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CustomOptionMaxIntegerValues::CustomOptionMaxIntegerValues()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionMaxIntegerValues)
}
CustomOptionMaxIntegerValues::CustomOptionMaxIntegerValues(const CustomOptionMaxIntegerValues& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionMaxIntegerValues)
}

void CustomOptionMaxIntegerValues::SharedCtor() {
  _cached_size_ = 0;
}

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

void CustomOptionMaxIntegerValues::SharedDtor() {
}

void CustomOptionMaxIntegerValues::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CustomOptionMaxIntegerValues::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[8].descriptor;
}

const CustomOptionMaxIntegerValues& CustomOptionMaxIntegerValues::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

CustomOptionMaxIntegerValues* CustomOptionMaxIntegerValues::New(::google::protobuf::Arena* arena) const {
  CustomOptionMaxIntegerValues* n = new CustomOptionMaxIntegerValues;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CustomOptionMaxIntegerValues::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.CustomOptionMaxIntegerValues)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool CustomOptionMaxIntegerValues::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.CustomOptionMaxIntegerValues)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.CustomOptionMaxIntegerValues)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.CustomOptionMaxIntegerValues)
  return false;
#undef DO_
}

void CustomOptionMaxIntegerValues::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.CustomOptionMaxIntegerValues)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.CustomOptionMaxIntegerValues)
}

::google::protobuf::uint8* CustomOptionMaxIntegerValues::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.CustomOptionMaxIntegerValues)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.CustomOptionMaxIntegerValues)
  return target;
}

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

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

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

void CustomOptionMaxIntegerValues::MergeFrom(const CustomOptionMaxIntegerValues& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.CustomOptionMaxIntegerValues)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void CustomOptionMaxIntegerValues::Swap(CustomOptionMaxIntegerValues* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CustomOptionMaxIntegerValues::InternalSwap(CustomOptionMaxIntegerValues* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CustomOptionMaxIntegerValues::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[8];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// CustomOptionMaxIntegerValues

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CustomOptionOtherValues::CustomOptionOtherValues()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionOtherValues)
}
CustomOptionOtherValues::CustomOptionOtherValues(const CustomOptionOtherValues& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionOtherValues)
}

void CustomOptionOtherValues::SharedCtor() {
  _cached_size_ = 0;
}

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

void CustomOptionOtherValues::SharedDtor() {
}

void CustomOptionOtherValues::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CustomOptionOtherValues::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[9].descriptor;
}

const CustomOptionOtherValues& CustomOptionOtherValues::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

CustomOptionOtherValues* CustomOptionOtherValues::New(::google::protobuf::Arena* arena) const {
  CustomOptionOtherValues* n = new CustomOptionOtherValues;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CustomOptionOtherValues::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.CustomOptionOtherValues)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool CustomOptionOtherValues::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.CustomOptionOtherValues)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.CustomOptionOtherValues)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.CustomOptionOtherValues)
  return false;
#undef DO_
}

void CustomOptionOtherValues::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.CustomOptionOtherValues)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.CustomOptionOtherValues)
}

::google::protobuf::uint8* CustomOptionOtherValues::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.CustomOptionOtherValues)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.CustomOptionOtherValues)
  return target;
}

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

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

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

void CustomOptionOtherValues::MergeFrom(const CustomOptionOtherValues& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.CustomOptionOtherValues)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void CustomOptionOtherValues::Swap(CustomOptionOtherValues* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CustomOptionOtherValues::InternalSwap(CustomOptionOtherValues* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CustomOptionOtherValues::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[9];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// CustomOptionOtherValues

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

SettingRealsFromPositiveInts::SettingRealsFromPositiveInts()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.SettingRealsFromPositiveInts)
}
SettingRealsFromPositiveInts::SettingRealsFromPositiveInts(const SettingRealsFromPositiveInts& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.SettingRealsFromPositiveInts)
}

void SettingRealsFromPositiveInts::SharedCtor() {
  _cached_size_ = 0;
}

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

void SettingRealsFromPositiveInts::SharedDtor() {
}

void SettingRealsFromPositiveInts::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SettingRealsFromPositiveInts::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[10].descriptor;
}

const SettingRealsFromPositiveInts& SettingRealsFromPositiveInts::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

SettingRealsFromPositiveInts* SettingRealsFromPositiveInts::New(::google::protobuf::Arena* arena) const {
  SettingRealsFromPositiveInts* n = new SettingRealsFromPositiveInts;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void SettingRealsFromPositiveInts::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.SettingRealsFromPositiveInts)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool SettingRealsFromPositiveInts::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.SettingRealsFromPositiveInts)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.SettingRealsFromPositiveInts)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.SettingRealsFromPositiveInts)
  return false;
#undef DO_
}

void SettingRealsFromPositiveInts::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.SettingRealsFromPositiveInts)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.SettingRealsFromPositiveInts)
}

::google::protobuf::uint8* SettingRealsFromPositiveInts::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.SettingRealsFromPositiveInts)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.SettingRealsFromPositiveInts)
  return target;
}

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

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

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

void SettingRealsFromPositiveInts::MergeFrom(const SettingRealsFromPositiveInts& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.SettingRealsFromPositiveInts)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void SettingRealsFromPositiveInts::Swap(SettingRealsFromPositiveInts* other) {
  if (other == this) return;
  InternalSwap(other);
}
void SettingRealsFromPositiveInts::InternalSwap(SettingRealsFromPositiveInts* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata SettingRealsFromPositiveInts::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[10];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// SettingRealsFromPositiveInts

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

SettingRealsFromNegativeInts::SettingRealsFromNegativeInts()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.SettingRealsFromNegativeInts)
}
SettingRealsFromNegativeInts::SettingRealsFromNegativeInts(const SettingRealsFromNegativeInts& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.SettingRealsFromNegativeInts)
}

void SettingRealsFromNegativeInts::SharedCtor() {
  _cached_size_ = 0;
}

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

void SettingRealsFromNegativeInts::SharedDtor() {
}

void SettingRealsFromNegativeInts::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SettingRealsFromNegativeInts::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[11].descriptor;
}

const SettingRealsFromNegativeInts& SettingRealsFromNegativeInts::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

SettingRealsFromNegativeInts* SettingRealsFromNegativeInts::New(::google::protobuf::Arena* arena) const {
  SettingRealsFromNegativeInts* n = new SettingRealsFromNegativeInts;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void SettingRealsFromNegativeInts::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.SettingRealsFromNegativeInts)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool SettingRealsFromNegativeInts::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.SettingRealsFromNegativeInts)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.SettingRealsFromNegativeInts)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.SettingRealsFromNegativeInts)
  return false;
#undef DO_
}

void SettingRealsFromNegativeInts::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.SettingRealsFromNegativeInts)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.SettingRealsFromNegativeInts)
}

::google::protobuf::uint8* SettingRealsFromNegativeInts::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.SettingRealsFromNegativeInts)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.SettingRealsFromNegativeInts)
  return target;
}

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

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

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

void SettingRealsFromNegativeInts::MergeFrom(const SettingRealsFromNegativeInts& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.SettingRealsFromNegativeInts)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void SettingRealsFromNegativeInts::Swap(SettingRealsFromNegativeInts* other) {
  if (other == this) return;
  InternalSwap(other);
}
void SettingRealsFromNegativeInts::InternalSwap(SettingRealsFromNegativeInts* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata SettingRealsFromNegativeInts::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[11];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// SettingRealsFromNegativeInts

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ComplexOptionType1::kFooFieldNumber;
const int ComplexOptionType1::kFoo2FieldNumber;
const int ComplexOptionType1::kFoo3FieldNumber;
const int ComplexOptionType1::kFoo4FieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ComplexOptionType1::ComplexOptionType1()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ComplexOptionType1)
}
ComplexOptionType1::ComplexOptionType1(const ComplexOptionType1& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0),
      foo4_(from.foo4_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  ::memcpy(&foo_, &from.foo_,
    reinterpret_cast<char*>(&foo3_) -
    reinterpret_cast<char*>(&foo_) + sizeof(foo3_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ComplexOptionType1)
}

void ComplexOptionType1::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&foo_, 0, reinterpret_cast<char*>(&foo3_) -
    reinterpret_cast<char*>(&foo_) + sizeof(foo3_));
}

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

void ComplexOptionType1::SharedDtor() {
}

void ComplexOptionType1::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ComplexOptionType1::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[12].descriptor;
}

const ComplexOptionType1& ComplexOptionType1::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

ComplexOptionType1* ComplexOptionType1::New(::google::protobuf::Arena* arena) const {
  ComplexOptionType1* n = new ComplexOptionType1;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ComplexOptionType1::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.ComplexOptionType1)
  _extensions_.Clear();
  foo4_.Clear();
  if (_has_bits_[0 / 32] & 7u) {
    ::memset(&foo_, 0, reinterpret_cast<char*>(&foo3_) -
      reinterpret_cast<char*>(&foo_) + sizeof(foo3_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ComplexOptionType1::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.ComplexOptionType1)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 foo = 1;
      case 1: {
        if (tag == 8u) {
          set_has_foo();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &foo_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 foo2 = 2;
      case 2: {
        if (tag == 16u) {
          set_has_foo2();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &foo2_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 foo3 = 3;
      case 3: {
        if (tag == 24u) {
          set_has_foo3();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &foo3_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 foo4 = 4;
      case 4: {
        if (tag == 32u) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 32u, input, this->mutable_foo4())));
        } else if (tag == 34u) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_foo4())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        if ((800u <= tag)) {
          DO_(_extensions_.ParseField(tag, input, internal_default_instance(),
                                      mutable_unknown_fields()));
          continue;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.ComplexOptionType1)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.ComplexOptionType1)
  return false;
#undef DO_
}

void ComplexOptionType1::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.ComplexOptionType1)
  // optional int32 foo = 1;
  if (has_foo()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->foo(), output);
  }

  // optional int32 foo2 = 2;
  if (has_foo2()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->foo2(), output);
  }

  // optional int32 foo3 = 3;
  if (has_foo3()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->foo3(), output);
  }

  // repeated int32 foo4 = 4;
  for (int i = 0; i < this->foo4_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      4, this->foo4(i), output);
  }

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

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

::google::protobuf::uint8* ComplexOptionType1::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.ComplexOptionType1)
  // optional int32 foo = 1;
  if (has_foo()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->foo(), target);
  }

  // optional int32 foo2 = 2;
  if (has_foo2()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->foo2(), target);
  }

  // optional int32 foo3 = 3;
  if (has_foo3()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->foo3(), target);
  }

  // repeated int32 foo4 = 4;
  for (int i = 0; i < this->foo4_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(4, this->foo4(i), target);
  }

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

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

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

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  // repeated int32 foo4 = 4;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->foo4_);
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->foo4_size());
    total_size += data_size;
  }

  if (_has_bits_[0 / 32] & 7u) {
    // optional int32 foo = 1;
    if (has_foo()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->foo());
    }

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

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

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void ComplexOptionType1::MergeFrom(const ComplexOptionType1& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.ComplexOptionType1)
  GOOGLE_DCHECK_NE(&from, this);
  _extensions_.MergeFrom(from._extensions_);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  foo4_.MergeFrom(from.foo4_);
  if (from._has_bits_[0 / 32] & 7u) {
    if (from.has_foo()) {
      set_foo(from.foo());
    }
    if (from.has_foo2()) {
      set_foo2(from.foo2());
    }
    if (from.has_foo3()) {
      set_foo3(from.foo3());
    }
  }
}

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

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

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

  return true;
}

void ComplexOptionType1::Swap(ComplexOptionType1* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ComplexOptionType1::InternalSwap(ComplexOptionType1* other) {
  foo4_.UnsafeArenaSwap(&other->foo4_);
  std::swap(foo_, other->foo_);
  std::swap(foo2_, other->foo2_);
  std::swap(foo3_, other->foo3_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
  _extensions_.Swap(&other->_extensions_);
}

::google::protobuf::Metadata ComplexOptionType1::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[12];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ComplexOptionType1

// optional int32 foo = 1;
bool ComplexOptionType1::has_foo() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ComplexOptionType1::set_has_foo() {
  _has_bits_[0] |= 0x00000001u;
}
void ComplexOptionType1::clear_has_foo() {
  _has_bits_[0] &= ~0x00000001u;
}
void ComplexOptionType1::clear_foo() {
  foo_ = 0;
  clear_has_foo();
}
::google::protobuf::int32 ComplexOptionType1::foo() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType1.foo)
  return foo_;
}
void ComplexOptionType1::set_foo(::google::protobuf::int32 value) {
  set_has_foo();
  foo_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.ComplexOptionType1.foo)
}

// optional int32 foo2 = 2;
bool ComplexOptionType1::has_foo2() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ComplexOptionType1::set_has_foo2() {
  _has_bits_[0] |= 0x00000002u;
}
void ComplexOptionType1::clear_has_foo2() {
  _has_bits_[0] &= ~0x00000002u;
}
void ComplexOptionType1::clear_foo2() {
  foo2_ = 0;
  clear_has_foo2();
}
::google::protobuf::int32 ComplexOptionType1::foo2() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType1.foo2)
  return foo2_;
}
void ComplexOptionType1::set_foo2(::google::protobuf::int32 value) {
  set_has_foo2();
  foo2_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.ComplexOptionType1.foo2)
}

// optional int32 foo3 = 3;
bool ComplexOptionType1::has_foo3() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void ComplexOptionType1::set_has_foo3() {
  _has_bits_[0] |= 0x00000004u;
}
void ComplexOptionType1::clear_has_foo3() {
  _has_bits_[0] &= ~0x00000004u;
}
void ComplexOptionType1::clear_foo3() {
  foo3_ = 0;
  clear_has_foo3();
}
::google::protobuf::int32 ComplexOptionType1::foo3() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType1.foo3)
  return foo3_;
}
void ComplexOptionType1::set_foo3(::google::protobuf::int32 value) {
  set_has_foo3();
  foo3_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.ComplexOptionType1.foo3)
}

// repeated int32 foo4 = 4;
int ComplexOptionType1::foo4_size() const {
  return foo4_.size();
}
void ComplexOptionType1::clear_foo4() {
  foo4_.Clear();
}
::google::protobuf::int32 ComplexOptionType1::foo4(int index) const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType1.foo4)
  return foo4_.Get(index);
}
void ComplexOptionType1::set_foo4(int index, ::google::protobuf::int32 value) {
  foo4_.Set(index, value);
  // @@protoc_insertion_point(field_set:protobuf_unittest.ComplexOptionType1.foo4)
}
void ComplexOptionType1::add_foo4(::google::protobuf::int32 value) {
  foo4_.Add(value);
  // @@protoc_insertion_point(field_add:protobuf_unittest.ComplexOptionType1.foo4)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
ComplexOptionType1::foo4() const {
  // @@protoc_insertion_point(field_list:protobuf_unittest.ComplexOptionType1.foo4)
  return foo4_;
}
::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
ComplexOptionType1::mutable_foo4() {
  // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.ComplexOptionType1.foo4)
  return &foo4_;
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ComplexOptionType2_ComplexOptionType4::kWaldoFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ComplexOptionType2_ComplexOptionType4::ComplexOptionType2_ComplexOptionType4()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ComplexOptionType2.ComplexOptionType4)
}
ComplexOptionType2_ComplexOptionType4::ComplexOptionType2_ComplexOptionType4(const ComplexOptionType2_ComplexOptionType4& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  waldo_ = from.waldo_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ComplexOptionType2.ComplexOptionType4)
}

void ComplexOptionType2_ComplexOptionType4::SharedCtor() {
  _cached_size_ = 0;
  waldo_ = 0;
}

ComplexOptionType2_ComplexOptionType4::~ComplexOptionType2_ComplexOptionType4() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.ComplexOptionType2.ComplexOptionType4)
  SharedDtor();
}

void ComplexOptionType2_ComplexOptionType4::SharedDtor() {
}

void ComplexOptionType2_ComplexOptionType4::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ComplexOptionType2_ComplexOptionType4::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[13].descriptor;
}

const ComplexOptionType2_ComplexOptionType4& ComplexOptionType2_ComplexOptionType4::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

ComplexOptionType2_ComplexOptionType4* ComplexOptionType2_ComplexOptionType4::New(::google::protobuf::Arena* arena) const {
  ComplexOptionType2_ComplexOptionType4* n = new ComplexOptionType2_ComplexOptionType4;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ComplexOptionType2_ComplexOptionType4::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.ComplexOptionType2.ComplexOptionType4)
  waldo_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ComplexOptionType2_ComplexOptionType4::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.ComplexOptionType2.ComplexOptionType4)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 waldo = 1;
      case 1: {
        if (tag == 8u) {
          set_has_waldo();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &waldo_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void ComplexOptionType2_ComplexOptionType4::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.ComplexOptionType2.ComplexOptionType4)
  // optional int32 waldo = 1;
  if (has_waldo()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->waldo(), output);
  }

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

::google::protobuf::uint8* ComplexOptionType2_ComplexOptionType4::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.ComplexOptionType2.ComplexOptionType4)
  // optional int32 waldo = 1;
  if (has_waldo()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->waldo(), target);
  }

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

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

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

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void ComplexOptionType2_ComplexOptionType4::MergeFrom(const ComplexOptionType2_ComplexOptionType4& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.ComplexOptionType2.ComplexOptionType4)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_waldo()) {
    set_waldo(from.waldo());
  }
}

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

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

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

void ComplexOptionType2_ComplexOptionType4::Swap(ComplexOptionType2_ComplexOptionType4* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ComplexOptionType2_ComplexOptionType4::InternalSwap(ComplexOptionType2_ComplexOptionType4* other) {
  std::swap(waldo_, other->waldo_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ComplexOptionType2_ComplexOptionType4::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[13];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ComplexOptionType2_ComplexOptionType4

// optional int32 waldo = 1;
bool ComplexOptionType2_ComplexOptionType4::has_waldo() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ComplexOptionType2_ComplexOptionType4::set_has_waldo() {
  _has_bits_[0] |= 0x00000001u;
}
void ComplexOptionType2_ComplexOptionType4::clear_has_waldo() {
  _has_bits_[0] &= ~0x00000001u;
}
void ComplexOptionType2_ComplexOptionType4::clear_waldo() {
  waldo_ = 0;
  clear_has_waldo();
}
::google::protobuf::int32 ComplexOptionType2_ComplexOptionType4::waldo() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType2.ComplexOptionType4.waldo)
  return waldo_;
}
void ComplexOptionType2_ComplexOptionType4::set_waldo(::google::protobuf::int32 value) {
  set_has_waldo();
  waldo_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.ComplexOptionType2.ComplexOptionType4.waldo)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ComplexOptionType2::kBarFieldNumber;
const int ComplexOptionType2::kBazFieldNumber;
const int ComplexOptionType2::kFredFieldNumber;
const int ComplexOptionType2::kBarneyFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ComplexOptionType2::ComplexOptionType2()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ComplexOptionType2)
}
ComplexOptionType2::ComplexOptionType2(const ComplexOptionType2& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0),
      barney_(from.barney_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  if (from.has_bar()) {
    bar_ = new ::protobuf_unittest::ComplexOptionType1(*from.bar_);
  } else {
    bar_ = NULL;
  }
  if (from.has_fred()) {
    fred_ = new ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4(*from.fred_);
  } else {
    fred_ = NULL;
  }
  baz_ = from.baz_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ComplexOptionType2)
}

void ComplexOptionType2::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&bar_, 0, reinterpret_cast<char*>(&baz_) -
    reinterpret_cast<char*>(&bar_) + sizeof(baz_));
}

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

void ComplexOptionType2::SharedDtor() {
  if (this != internal_default_instance()) {
    delete bar_;
  }
  if (this != internal_default_instance()) {
    delete fred_;
  }
}

void ComplexOptionType2::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ComplexOptionType2::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[14].descriptor;
}

const ComplexOptionType2& ComplexOptionType2::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

ComplexOptionType2* ComplexOptionType2::New(::google::protobuf::Arena* arena) const {
  ComplexOptionType2* n = new ComplexOptionType2;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ComplexOptionType2::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.ComplexOptionType2)
  _extensions_.Clear();
  barney_.Clear();
  if (_has_bits_[0 / 32] & 3u) {
    if (has_bar()) {
      GOOGLE_DCHECK(bar_ != NULL);
      bar_->::protobuf_unittest::ComplexOptionType1::Clear();
    }
    if (has_fred()) {
      GOOGLE_DCHECK(fred_ != NULL);
      fred_->::protobuf_unittest::ComplexOptionType2_ComplexOptionType4::Clear();
    }
  }
  baz_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ComplexOptionType2::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.ComplexOptionType2)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .protobuf_unittest.ComplexOptionType1 bar = 1;
      case 1: {
        if (tag == 10u) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_bar()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 baz = 2;
      case 2: {
        if (tag == 16u) {
          set_has_baz();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &baz_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 fred = 3;
      case 3: {
        if (tag == 26u) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_fred()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 barney = 4;
      case 4: {
        if (tag == 34u) {
          DO_(input->IncrementRecursionDepth());
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_barney()));
        } else {
          goto handle_unusual;
        }
        input->UnsafeDecrementRecursionDepth();
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        if ((800u <= tag)) {
          DO_(_extensions_.ParseField(tag, input, internal_default_instance(),
                                      mutable_unknown_fields()));
          continue;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.ComplexOptionType2)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.ComplexOptionType2)
  return false;
#undef DO_
}

void ComplexOptionType2::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.ComplexOptionType2)
  // optional .protobuf_unittest.ComplexOptionType1 bar = 1;
  if (has_bar()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, *this->bar_, output);
  }

  // optional int32 baz = 2;
  if (has_baz()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->baz(), output);
  }

  // optional .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 fred = 3;
  if (has_fred()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *this->fred_, output);
  }

  // repeated .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 barney = 4;
  for (unsigned int i = 0, n = this->barney_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, this->barney(i), output);
  }

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

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

::google::protobuf::uint8* ComplexOptionType2::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.ComplexOptionType2)
  // optional .protobuf_unittest.ComplexOptionType1 bar = 1;
  if (has_bar()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        1, *this->bar_, false, target);
  }

  // optional int32 baz = 2;
  if (has_baz()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->baz(), target);
  }

  // optional .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 fred = 3;
  if (has_fred()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        3, *this->fred_, false, target);
  }

  // repeated .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 barney = 4;
  for (unsigned int i = 0, n = this->barney_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        4, this->barney(i), false, target);
  }

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

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

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

  total_size += _extensions_.ByteSize();

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  // repeated .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 barney = 4;
  {
    unsigned int count = this->barney_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->barney(i));
    }
  }

  if (_has_bits_[0 / 32] & 7u) {
    // optional .protobuf_unittest.ComplexOptionType1 bar = 1;
    if (has_bar()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->bar_);
    }

    // optional .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 fred = 3;
    if (has_fred()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->fred_);
    }

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

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void ComplexOptionType2::MergeFrom(const ComplexOptionType2& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.ComplexOptionType2)
  GOOGLE_DCHECK_NE(&from, this);
  _extensions_.MergeFrom(from._extensions_);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  barney_.MergeFrom(from.barney_);
  if (from._has_bits_[0 / 32] & 7u) {
    if (from.has_bar()) {
      mutable_bar()->::protobuf_unittest::ComplexOptionType1::MergeFrom(from.bar());
    }
    if (from.has_fred()) {
      mutable_fred()->::protobuf_unittest::ComplexOptionType2_ComplexOptionType4::MergeFrom(from.fred());
    }
    if (from.has_baz()) {
      set_baz(from.baz());
    }
  }
}

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

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

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

  if (has_bar()) {
    if (!this->bar_->IsInitialized()) return false;
  }
  return true;
}

void ComplexOptionType2::Swap(ComplexOptionType2* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ComplexOptionType2::InternalSwap(ComplexOptionType2* other) {
  barney_.UnsafeArenaSwap(&other->barney_);
  std::swap(bar_, other->bar_);
  std::swap(fred_, other->fred_);
  std::swap(baz_, other->baz_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
  _extensions_.Swap(&other->_extensions_);
}

::google::protobuf::Metadata ComplexOptionType2::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[14];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ComplexOptionType2

// optional .protobuf_unittest.ComplexOptionType1 bar = 1;
bool ComplexOptionType2::has_bar() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ComplexOptionType2::set_has_bar() {
  _has_bits_[0] |= 0x00000001u;
}
void ComplexOptionType2::clear_has_bar() {
  _has_bits_[0] &= ~0x00000001u;
}
void ComplexOptionType2::clear_bar() {
  if (bar_ != NULL) bar_->::protobuf_unittest::ComplexOptionType1::Clear();
  clear_has_bar();
}
const ::protobuf_unittest::ComplexOptionType1& ComplexOptionType2::bar() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType2.bar)
  return bar_ != NULL ? *bar_
                         : *::protobuf_unittest::ComplexOptionType1::internal_default_instance();
}
::protobuf_unittest::ComplexOptionType1* ComplexOptionType2::mutable_bar() {
  set_has_bar();
  if (bar_ == NULL) {
    bar_ = new ::protobuf_unittest::ComplexOptionType1;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.ComplexOptionType2.bar)
  return bar_;
}
::protobuf_unittest::ComplexOptionType1* ComplexOptionType2::release_bar() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.ComplexOptionType2.bar)
  clear_has_bar();
  ::protobuf_unittest::ComplexOptionType1* temp = bar_;
  bar_ = NULL;
  return temp;
}
void ComplexOptionType2::set_allocated_bar(::protobuf_unittest::ComplexOptionType1* bar) {
  delete bar_;
  bar_ = bar;
  if (bar) {
    set_has_bar();
  } else {
    clear_has_bar();
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.ComplexOptionType2.bar)
}

// optional int32 baz = 2;
bool ComplexOptionType2::has_baz() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void ComplexOptionType2::set_has_baz() {
  _has_bits_[0] |= 0x00000004u;
}
void ComplexOptionType2::clear_has_baz() {
  _has_bits_[0] &= ~0x00000004u;
}
void ComplexOptionType2::clear_baz() {
  baz_ = 0;
  clear_has_baz();
}
::google::protobuf::int32 ComplexOptionType2::baz() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType2.baz)
  return baz_;
}
void ComplexOptionType2::set_baz(::google::protobuf::int32 value) {
  set_has_baz();
  baz_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.ComplexOptionType2.baz)
}

// optional .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 fred = 3;
bool ComplexOptionType2::has_fred() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ComplexOptionType2::set_has_fred() {
  _has_bits_[0] |= 0x00000002u;
}
void ComplexOptionType2::clear_has_fred() {
  _has_bits_[0] &= ~0x00000002u;
}
void ComplexOptionType2::clear_fred() {
  if (fred_ != NULL) fred_->::protobuf_unittest::ComplexOptionType2_ComplexOptionType4::Clear();
  clear_has_fred();
}
const ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4& ComplexOptionType2::fred() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType2.fred)
  return fred_ != NULL ? *fred_
                         : *::protobuf_unittest::ComplexOptionType2_ComplexOptionType4::internal_default_instance();
}
::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* ComplexOptionType2::mutable_fred() {
  set_has_fred();
  if (fred_ == NULL) {
    fred_ = new ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.ComplexOptionType2.fred)
  return fred_;
}
::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* ComplexOptionType2::release_fred() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.ComplexOptionType2.fred)
  clear_has_fred();
  ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* temp = fred_;
  fred_ = NULL;
  return temp;
}
void ComplexOptionType2::set_allocated_fred(::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* fred) {
  delete fred_;
  fred_ = fred;
  if (fred) {
    set_has_fred();
  } else {
    clear_has_fred();
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.ComplexOptionType2.fred)
}

// repeated .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 barney = 4;
int ComplexOptionType2::barney_size() const {
  return barney_.size();
}
void ComplexOptionType2::clear_barney() {
  barney_.Clear();
}
const ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4& ComplexOptionType2::barney(int index) const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType2.barney)
  return barney_.Get(index);
}
::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* ComplexOptionType2::mutable_barney(int index) {
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.ComplexOptionType2.barney)
  return barney_.Mutable(index);
}
::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* ComplexOptionType2::add_barney() {
  // @@protoc_insertion_point(field_add:protobuf_unittest.ComplexOptionType2.barney)
  return barney_.Add();
}
::google::protobuf::RepeatedPtrField< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 >*
ComplexOptionType2::mutable_barney() {
  // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.ComplexOptionType2.barney)
  return &barney_;
}
const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 >&
ComplexOptionType2::barney() const {
  // @@protoc_insertion_point(field_list:protobuf_unittest.ComplexOptionType2.barney)
  return barney_;
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ComplexOptionType3_ComplexOptionType5::kPlughFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ComplexOptionType3_ComplexOptionType5::ComplexOptionType3_ComplexOptionType5()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ComplexOptionType3.ComplexOptionType5)
}
ComplexOptionType3_ComplexOptionType5::ComplexOptionType3_ComplexOptionType5(const ComplexOptionType3_ComplexOptionType5& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  plugh_ = from.plugh_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ComplexOptionType3.ComplexOptionType5)
}

void ComplexOptionType3_ComplexOptionType5::SharedCtor() {
  _cached_size_ = 0;
  plugh_ = 0;
}

ComplexOptionType3_ComplexOptionType5::~ComplexOptionType3_ComplexOptionType5() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.ComplexOptionType3.ComplexOptionType5)
  SharedDtor();
}

void ComplexOptionType3_ComplexOptionType5::SharedDtor() {
}

void ComplexOptionType3_ComplexOptionType5::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ComplexOptionType3_ComplexOptionType5::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[15].descriptor;
}

const ComplexOptionType3_ComplexOptionType5& ComplexOptionType3_ComplexOptionType5::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

ComplexOptionType3_ComplexOptionType5* ComplexOptionType3_ComplexOptionType5::New(::google::protobuf::Arena* arena) const {
  ComplexOptionType3_ComplexOptionType5* n = new ComplexOptionType3_ComplexOptionType5;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ComplexOptionType3_ComplexOptionType5::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.ComplexOptionType3.ComplexOptionType5)
  plugh_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ComplexOptionType3_ComplexOptionType5::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.ComplexOptionType3.ComplexOptionType5)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 plugh = 3;
      case 3: {
        if (tag == 24u) {
          set_has_plugh();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &plugh_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void ComplexOptionType3_ComplexOptionType5::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.ComplexOptionType3.ComplexOptionType5)
  // optional int32 plugh = 3;
  if (has_plugh()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->plugh(), output);
  }

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

::google::protobuf::uint8* ComplexOptionType3_ComplexOptionType5::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.ComplexOptionType3.ComplexOptionType5)
  // optional int32 plugh = 3;
  if (has_plugh()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->plugh(), target);
  }

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

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

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

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void ComplexOptionType3_ComplexOptionType5::MergeFrom(const ComplexOptionType3_ComplexOptionType5& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.ComplexOptionType3.ComplexOptionType5)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_plugh()) {
    set_plugh(from.plugh());
  }
}

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

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

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

void ComplexOptionType3_ComplexOptionType5::Swap(ComplexOptionType3_ComplexOptionType5* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ComplexOptionType3_ComplexOptionType5::InternalSwap(ComplexOptionType3_ComplexOptionType5* other) {
  std::swap(plugh_, other->plugh_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ComplexOptionType3_ComplexOptionType5::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[15];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ComplexOptionType3_ComplexOptionType5

// optional int32 plugh = 3;
bool ComplexOptionType3_ComplexOptionType5::has_plugh() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ComplexOptionType3_ComplexOptionType5::set_has_plugh() {
  _has_bits_[0] |= 0x00000001u;
}
void ComplexOptionType3_ComplexOptionType5::clear_has_plugh() {
  _has_bits_[0] &= ~0x00000001u;
}
void ComplexOptionType3_ComplexOptionType5::clear_plugh() {
  plugh_ = 0;
  clear_has_plugh();
}
::google::protobuf::int32 ComplexOptionType3_ComplexOptionType5::plugh() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType3.ComplexOptionType5.plugh)
  return plugh_;
}
void ComplexOptionType3_ComplexOptionType5::set_plugh(::google::protobuf::int32 value) {
  set_has_plugh();
  plugh_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.ComplexOptionType3.ComplexOptionType5.plugh)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ComplexOptionType3::kQuxFieldNumber;
const int ComplexOptionType3::kComplexoptiontype5FieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ComplexOptionType3::ComplexOptionType3()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ComplexOptionType3)
}
ComplexOptionType3::ComplexOptionType3(const ComplexOptionType3& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_complexoptiontype5()) {
    complexoptiontype5_ = new ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5(*from.complexoptiontype5_);
  } else {
    complexoptiontype5_ = NULL;
  }
  qux_ = from.qux_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ComplexOptionType3)
}

void ComplexOptionType3::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&complexoptiontype5_, 0, reinterpret_cast<char*>(&qux_) -
    reinterpret_cast<char*>(&complexoptiontype5_) + sizeof(qux_));
}

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

void ComplexOptionType3::SharedDtor() {
  if (this != internal_default_instance()) {
    delete complexoptiontype5_;
  }
}

void ComplexOptionType3::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ComplexOptionType3::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[16].descriptor;
}

const ComplexOptionType3& ComplexOptionType3::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

ComplexOptionType3* ComplexOptionType3::New(::google::protobuf::Arena* arena) const {
  ComplexOptionType3* n = new ComplexOptionType3;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ComplexOptionType3::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.ComplexOptionType3)
  if (has_complexoptiontype5()) {
    GOOGLE_DCHECK(complexoptiontype5_ != NULL);
    complexoptiontype5_->::protobuf_unittest::ComplexOptionType3_ComplexOptionType5::Clear();
  }
  qux_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ComplexOptionType3::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.ComplexOptionType3)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 qux = 1;
      case 1: {
        if (tag == 8u) {
          set_has_qux();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &qux_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional group ComplexOptionType5 = 2 { ... };
      case 2: {
        if (tag == 19u) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroupNoVirtual(
                2, input, mutable_complexoptiontype5()));
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void ComplexOptionType3::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.ComplexOptionType3)
  // optional int32 qux = 1;
  if (has_qux()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->qux(), output);
  }

  // optional group ComplexOptionType5 = 2 { ... };
  if (has_complexoptiontype5()) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      2, *this->complexoptiontype5_, output);
  }

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

::google::protobuf::uint8* ComplexOptionType3::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.ComplexOptionType3)
  // optional int32 qux = 1;
  if (has_qux()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->qux(), target);
  }

  // optional group ComplexOptionType5 = 2 { ... };
  if (has_complexoptiontype5()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupNoVirtualToArray(
        2, *this->complexoptiontype5_, false, target);
  }

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

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional group ComplexOptionType5 = 2 { ... };
    if (has_complexoptiontype5()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::GroupSizeNoVirtual(
          *this->complexoptiontype5_);
    }

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

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void ComplexOptionType3::MergeFrom(const ComplexOptionType3& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.ComplexOptionType3)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from._has_bits_[0 / 32] & 3u) {
    if (from.has_complexoptiontype5()) {
      mutable_complexoptiontype5()->::protobuf_unittest::ComplexOptionType3_ComplexOptionType5::MergeFrom(from.complexoptiontype5());
    }
    if (from.has_qux()) {
      set_qux(from.qux());
    }
  }
}

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

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

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

void ComplexOptionType3::Swap(ComplexOptionType3* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ComplexOptionType3::InternalSwap(ComplexOptionType3* other) {
  std::swap(complexoptiontype5_, other->complexoptiontype5_);
  std::swap(qux_, other->qux_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ComplexOptionType3::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[16];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ComplexOptionType3

// optional int32 qux = 1;
bool ComplexOptionType3::has_qux() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ComplexOptionType3::set_has_qux() {
  _has_bits_[0] |= 0x00000002u;
}
void ComplexOptionType3::clear_has_qux() {
  _has_bits_[0] &= ~0x00000002u;
}
void ComplexOptionType3::clear_qux() {
  qux_ = 0;
  clear_has_qux();
}
::google::protobuf::int32 ComplexOptionType3::qux() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType3.qux)
  return qux_;
}
void ComplexOptionType3::set_qux(::google::protobuf::int32 value) {
  set_has_qux();
  qux_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.ComplexOptionType3.qux)
}

// optional group ComplexOptionType5 = 2 { ... };
bool ComplexOptionType3::has_complexoptiontype5() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ComplexOptionType3::set_has_complexoptiontype5() {
  _has_bits_[0] |= 0x00000001u;
}
void ComplexOptionType3::clear_has_complexoptiontype5() {
  _has_bits_[0] &= ~0x00000001u;
}
void ComplexOptionType3::clear_complexoptiontype5() {
  if (complexoptiontype5_ != NULL) complexoptiontype5_->::protobuf_unittest::ComplexOptionType3_ComplexOptionType5::Clear();
  clear_has_complexoptiontype5();
}
const ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5& ComplexOptionType3::complexoptiontype5() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType3.complexoptiontype5)
  return complexoptiontype5_ != NULL ? *complexoptiontype5_
                         : *::protobuf_unittest::ComplexOptionType3_ComplexOptionType5::internal_default_instance();
}
::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* ComplexOptionType3::mutable_complexoptiontype5() {
  set_has_complexoptiontype5();
  if (complexoptiontype5_ == NULL) {
    complexoptiontype5_ = new ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.ComplexOptionType3.complexoptiontype5)
  return complexoptiontype5_;
}
::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* ComplexOptionType3::release_complexoptiontype5() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.ComplexOptionType3.complexoptiontype5)
  clear_has_complexoptiontype5();
  ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* temp = complexoptiontype5_;
  complexoptiontype5_ = NULL;
  return temp;
}
void ComplexOptionType3::set_allocated_complexoptiontype5(::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* complexoptiontype5) {
  delete complexoptiontype5_;
  complexoptiontype5_ = complexoptiontype5;
  if (complexoptiontype5) {
    set_has_complexoptiontype5();
  } else {
    clear_has_complexoptiontype5();
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.ComplexOptionType3.complexoptiontype5)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ComplexOpt6::kXyzzyFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ComplexOpt6::ComplexOpt6()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ComplexOpt6)
}
ComplexOpt6::ComplexOpt6(const ComplexOpt6& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  xyzzy_ = from.xyzzy_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ComplexOpt6)
}

void ComplexOpt6::SharedCtor() {
  _cached_size_ = 0;
  xyzzy_ = 0;
}

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

void ComplexOpt6::SharedDtor() {
}

void ComplexOpt6::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ComplexOpt6::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[17].descriptor;
}

const ComplexOpt6& ComplexOpt6::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

ComplexOpt6* ComplexOpt6::New(::google::protobuf::Arena* arena) const {
  ComplexOpt6* n = new ComplexOpt6;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ComplexOpt6::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.ComplexOpt6)
  xyzzy_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ComplexOpt6::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.ComplexOpt6)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(60751608u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 xyzzy = 7593951;
      case 7593951: {
        if (tag == 60751608u) {
          set_has_xyzzy();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &xyzzy_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void ComplexOpt6::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.ComplexOpt6)
  // optional int32 xyzzy = 7593951;
  if (has_xyzzy()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(7593951, this->xyzzy(), output);
  }

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

::google::protobuf::uint8* ComplexOpt6::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.ComplexOpt6)
  // optional int32 xyzzy = 7593951;
  if (has_xyzzy()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7593951, this->xyzzy(), target);
  }

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

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  // optional int32 xyzzy = 7593951;
  if (has_xyzzy()) {
    total_size += 4 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->xyzzy());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void ComplexOpt6::MergeFrom(const ComplexOpt6& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.ComplexOpt6)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_xyzzy()) {
    set_xyzzy(from.xyzzy());
  }
}

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

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

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

void ComplexOpt6::Swap(ComplexOpt6* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ComplexOpt6::InternalSwap(ComplexOpt6* other) {
  std::swap(xyzzy_, other->xyzzy_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ComplexOpt6::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[17];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ComplexOpt6

// optional int32 xyzzy = 7593951;
bool ComplexOpt6::has_xyzzy() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ComplexOpt6::set_has_xyzzy() {
  _has_bits_[0] |= 0x00000001u;
}
void ComplexOpt6::clear_has_xyzzy() {
  _has_bits_[0] &= ~0x00000001u;
}
void ComplexOpt6::clear_xyzzy() {
  xyzzy_ = 0;
  clear_has_xyzzy();
}
::google::protobuf::int32 ComplexOpt6::xyzzy() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOpt6.xyzzy)
  return xyzzy_;
}
void ComplexOpt6::set_xyzzy(::google::protobuf::int32 value) {
  set_has_xyzzy();
  xyzzy_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.ComplexOpt6.xyzzy)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

VariousComplexOptions::VariousComplexOptions()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.VariousComplexOptions)
}
VariousComplexOptions::VariousComplexOptions(const VariousComplexOptions& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.VariousComplexOptions)
}

void VariousComplexOptions::SharedCtor() {
  _cached_size_ = 0;
}

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

void VariousComplexOptions::SharedDtor() {
}

void VariousComplexOptions::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* VariousComplexOptions::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[18].descriptor;
}

const VariousComplexOptions& VariousComplexOptions::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

VariousComplexOptions* VariousComplexOptions::New(::google::protobuf::Arena* arena) const {
  VariousComplexOptions* n = new VariousComplexOptions;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void VariousComplexOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.VariousComplexOptions)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool VariousComplexOptions::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.VariousComplexOptions)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.VariousComplexOptions)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.VariousComplexOptions)
  return false;
#undef DO_
}

void VariousComplexOptions::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.VariousComplexOptions)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.VariousComplexOptions)
}

::google::protobuf::uint8* VariousComplexOptions::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.VariousComplexOptions)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.VariousComplexOptions)
  return target;
}

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

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

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

void VariousComplexOptions::MergeFrom(const VariousComplexOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.VariousComplexOptions)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void VariousComplexOptions::Swap(VariousComplexOptions* other) {
  if (other == this) return;
  InternalSwap(other);
}
void VariousComplexOptions::InternalSwap(VariousComplexOptions* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata VariousComplexOptions::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[18];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// VariousComplexOptions

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

AggregateMessageSet::AggregateMessageSet()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.AggregateMessageSet)
}
AggregateMessageSet::AggregateMessageSet(const AggregateMessageSet& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.AggregateMessageSet)
}

void AggregateMessageSet::SharedCtor() {
  _cached_size_ = 0;
}

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

void AggregateMessageSet::SharedDtor() {
}

void AggregateMessageSet::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AggregateMessageSet::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[19].descriptor;
}

const AggregateMessageSet& AggregateMessageSet::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

AggregateMessageSet* AggregateMessageSet::New(::google::protobuf::Arena* arena) const {
  AggregateMessageSet* n = new AggregateMessageSet;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void AggregateMessageSet::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.AggregateMessageSet)
  _extensions_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool AggregateMessageSet::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
  return _extensions_.ParseMessageSet(input, internal_default_instance(),
                                      mutable_unknown_fields());
}

void AggregateMessageSet::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  _extensions_.SerializeMessageSetWithCachedSizes(output);
  ::google::protobuf::internal::WireFormat::SerializeUnknownMessageSetItems(
      unknown_fields(), output);
}

::google::protobuf::uint8* AggregateMessageSet::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  target = _extensions_.InternalSerializeMessageSetWithCachedSizesToArray(
               deterministic, target);
  target = ::google::protobuf::internal::WireFormat::
             SerializeUnknownMessageSetItemsToArray(
               unknown_fields(), target);
  return target;
}

size_t AggregateMessageSet::ByteSizeLong() const {
// @@protoc_insertion_point(message_set_byte_size_start:protobuf_unittest.AggregateMessageSet)
  size_t total_size = _extensions_.MessageSetByteSize();
if (_internal_metadata_.have_unknown_fields()) {
  total_size += ::google::protobuf::internal::WireFormat::
      ComputeUnknownMessageSetItemsSize(unknown_fields());
}
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void AggregateMessageSet::MergeFrom(const AggregateMessageSet& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.AggregateMessageSet)
  GOOGLE_DCHECK_NE(&from, this);
  _extensions_.MergeFrom(from._extensions_);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

  return true;
}

void AggregateMessageSet::Swap(AggregateMessageSet* other) {
  if (other == this) return;
  InternalSwap(other);
}
void AggregateMessageSet::InternalSwap(AggregateMessageSet* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
  _extensions_.Swap(&other->_extensions_);
}

::google::protobuf::Metadata AggregateMessageSet::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[19];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// AggregateMessageSet

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int AggregateMessageSetElement::kSFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

AggregateMessageSetElement::AggregateMessageSetElement()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.AggregateMessageSetElement)
}
AggregateMessageSetElement::AggregateMessageSetElement(const AggregateMessageSetElement& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_s()) {
    s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.AggregateMessageSetElement)
}

void AggregateMessageSetElement::SharedCtor() {
  _cached_size_ = 0;
  s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

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

void AggregateMessageSetElement::SharedDtor() {
  s_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void AggregateMessageSetElement::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AggregateMessageSetElement::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[20].descriptor;
}

const AggregateMessageSetElement& AggregateMessageSetElement::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

AggregateMessageSetElement* AggregateMessageSetElement::New(::google::protobuf::Arena* arena) const {
  AggregateMessageSetElement* n = new AggregateMessageSetElement;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void AggregateMessageSetElement::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.AggregateMessageSetElement)
  if (has_s()) {
    GOOGLE_DCHECK(!s_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
    (*s_.UnsafeRawStringPointer())->clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool AggregateMessageSetElement::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.AggregateMessageSetElement)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string s = 1;
      case 1: {
        if (tag == 10u) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_s()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->s().data(), this->s().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.AggregateMessageSetElement.s");
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void AggregateMessageSetElement::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.AggregateMessageSetElement)
  // optional string s = 1;
  if (has_s()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->s().data(), this->s().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.AggregateMessageSetElement.s");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->s(), output);
  }

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

::google::protobuf::uint8* AggregateMessageSetElement::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.AggregateMessageSetElement)
  // optional string s = 1;
  if (has_s()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->s().data(), this->s().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.AggregateMessageSetElement.s");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->s(), target);
  }

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

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  // optional string s = 1;
  if (has_s()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->s());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void AggregateMessageSetElement::MergeFrom(const AggregateMessageSetElement& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.AggregateMessageSetElement)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_s()) {
    set_has_s();
    s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
  }
}

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

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

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

void AggregateMessageSetElement::Swap(AggregateMessageSetElement* other) {
  if (other == this) return;
  InternalSwap(other);
}
void AggregateMessageSetElement::InternalSwap(AggregateMessageSetElement* other) {
  s_.Swap(&other->s_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata AggregateMessageSetElement::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[20];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// AggregateMessageSetElement

// optional string s = 1;
bool AggregateMessageSetElement::has_s() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void AggregateMessageSetElement::set_has_s() {
  _has_bits_[0] |= 0x00000001u;
}
void AggregateMessageSetElement::clear_has_s() {
  _has_bits_[0] &= ~0x00000001u;
}
void AggregateMessageSetElement::clear_s() {
  s_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_s();
}
const ::std::string& AggregateMessageSetElement::s() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.AggregateMessageSetElement.s)
  return s_.GetNoArena();
}
void AggregateMessageSetElement::set_s(const ::std::string& value) {
  set_has_s();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:protobuf_unittest.AggregateMessageSetElement.s)
}
#if LANG_CXX11
void AggregateMessageSetElement::set_s(::std::string&& value) {
  set_has_s();
  s_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest.AggregateMessageSetElement.s)
}
#endif
void AggregateMessageSetElement::set_s(const char* value) {
  set_has_s();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:protobuf_unittest.AggregateMessageSetElement.s)
}
void AggregateMessageSetElement::set_s(const char* value, size_t size) {
  set_has_s();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.AggregateMessageSetElement.s)
}
::std::string* AggregateMessageSetElement::mutable_s() {
  set_has_s();
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.AggregateMessageSetElement.s)
  return s_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* AggregateMessageSetElement::release_s() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.AggregateMessageSetElement.s)
  clear_has_s();
  return s_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void AggregateMessageSetElement::set_allocated_s(::std::string* s) {
  if (s != NULL) {
    set_has_s();
  } else {
    clear_has_s();
  }
  s_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s);
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.AggregateMessageSetElement.s)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Aggregate::kIFieldNumber;
const int Aggregate::kSFieldNumber;
const int Aggregate::kSubFieldNumber;
const int Aggregate::kFileFieldNumber;
const int Aggregate::kMsetFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Aggregate::Aggregate()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.Aggregate)
}
Aggregate::Aggregate(const Aggregate& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_s()) {
    s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
  }
  if (from.has_sub()) {
    sub_ = new ::protobuf_unittest::Aggregate(*from.sub_);
  } else {
    sub_ = NULL;
  }
  if (from.has_file()) {
    file_ = new ::google::protobuf::FileOptions(*from.file_);
  } else {
    file_ = NULL;
  }
  if (from.has_mset()) {
    mset_ = new ::protobuf_unittest::AggregateMessageSet(*from.mset_);
  } else {
    mset_ = NULL;
  }
  i_ = from.i_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.Aggregate)
}

void Aggregate::SharedCtor() {
  _cached_size_ = 0;
  s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&sub_, 0, reinterpret_cast<char*>(&i_) -
    reinterpret_cast<char*>(&sub_) + sizeof(i_));
}

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

void Aggregate::SharedDtor() {
  s_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) {
    delete sub_;
  }
  if (this != internal_default_instance()) {
    delete file_;
  }
  if (this != internal_default_instance()) {
    delete mset_;
  }
}

void Aggregate::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Aggregate::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[21].descriptor;
}

const Aggregate& Aggregate::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

Aggregate* Aggregate::New(::google::protobuf::Arena* arena) const {
  Aggregate* n = new Aggregate;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Aggregate::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.Aggregate)
  if (_has_bits_[0 / 32] & 15u) {
    if (has_s()) {
      GOOGLE_DCHECK(!s_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*s_.UnsafeRawStringPointer())->clear();
    }
    if (has_sub()) {
      GOOGLE_DCHECK(sub_ != NULL);
      sub_->::protobuf_unittest::Aggregate::Clear();
    }
    if (has_file()) {
      GOOGLE_DCHECK(file_ != NULL);
      file_->::google::protobuf::FileOptions::Clear();
    }
    if (has_mset()) {
      GOOGLE_DCHECK(mset_ != NULL);
      mset_->::protobuf_unittest::AggregateMessageSet::Clear();
    }
  }
  i_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool Aggregate::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.Aggregate)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 i = 1;
      case 1: {
        if (tag == 8u) {
          set_has_i();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &i_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string s = 2;
      case 2: {
        if (tag == 18u) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_s()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->s().data(), this->s().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.Aggregate.s");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.Aggregate sub = 3;
      case 3: {
        if (tag == 26u) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_sub()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .google.protobuf.FileOptions file = 4;
      case 4: {
        if (tag == 34u) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_file()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .protobuf_unittest.AggregateMessageSet mset = 5;
      case 5: {
        if (tag == 42u) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_mset()));
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void Aggregate::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.Aggregate)
  // optional int32 i = 1;
  if (has_i()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->i(), output);
  }

  // optional string s = 2;
  if (has_s()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->s().data(), this->s().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.Aggregate.s");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->s(), output);
  }

  // optional .protobuf_unittest.Aggregate sub = 3;
  if (has_sub()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *this->sub_, output);
  }

  // optional .google.protobuf.FileOptions file = 4;
  if (has_file()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *this->file_, output);
  }

  // optional .protobuf_unittest.AggregateMessageSet mset = 5;
  if (has_mset()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, *this->mset_, output);
  }

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

::google::protobuf::uint8* Aggregate::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.Aggregate)
  // optional int32 i = 1;
  if (has_i()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->i(), target);
  }

  // optional string s = 2;
  if (has_s()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->s().data(), this->s().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "protobuf_unittest.Aggregate.s");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->s(), target);
  }

  // optional .protobuf_unittest.Aggregate sub = 3;
  if (has_sub()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        3, *this->sub_, false, target);
  }

  // optional .google.protobuf.FileOptions file = 4;
  if (has_file()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        4, *this->file_, false, target);
  }

  // optional .protobuf_unittest.AggregateMessageSet mset = 5;
  if (has_mset()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        5, *this->mset_, false, target);
  }

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

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  if (_has_bits_[0 / 32] & 31u) {
    // optional string s = 2;
    if (has_s()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->s());
    }

    // optional .protobuf_unittest.Aggregate sub = 3;
    if (has_sub()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->sub_);
    }

    // optional .google.protobuf.FileOptions file = 4;
    if (has_file()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->file_);
    }

    // optional .protobuf_unittest.AggregateMessageSet mset = 5;
    if (has_mset()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->mset_);
    }

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

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void Aggregate::MergeFrom(const Aggregate& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.Aggregate)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from._has_bits_[0 / 32] & 31u) {
    if (from.has_s()) {
      set_has_s();
      s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
    }
    if (from.has_sub()) {
      mutable_sub()->::protobuf_unittest::Aggregate::MergeFrom(from.sub());
    }
    if (from.has_file()) {
      mutable_file()->::google::protobuf::FileOptions::MergeFrom(from.file());
    }
    if (from.has_mset()) {
      mutable_mset()->::protobuf_unittest::AggregateMessageSet::MergeFrom(from.mset());
    }
    if (from.has_i()) {
      set_i(from.i());
    }
  }
}

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

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

bool Aggregate::IsInitialized() const {
  if (has_sub()) {
    if (!this->sub_->IsInitialized()) return false;
  }
  if (has_file()) {
    if (!this->file_->IsInitialized()) return false;
  }
  if (has_mset()) {
    if (!this->mset_->IsInitialized()) return false;
  }
  return true;
}

void Aggregate::Swap(Aggregate* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Aggregate::InternalSwap(Aggregate* other) {
  s_.Swap(&other->s_);
  std::swap(sub_, other->sub_);
  std::swap(file_, other->file_);
  std::swap(mset_, other->mset_);
  std::swap(i_, other->i_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Aggregate::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[21];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Aggregate

// optional int32 i = 1;
bool Aggregate::has_i() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void Aggregate::set_has_i() {
  _has_bits_[0] |= 0x00000010u;
}
void Aggregate::clear_has_i() {
  _has_bits_[0] &= ~0x00000010u;
}
void Aggregate::clear_i() {
  i_ = 0;
  clear_has_i();
}
::google::protobuf::int32 Aggregate::i() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.Aggregate.i)
  return i_;
}
void Aggregate::set_i(::google::protobuf::int32 value) {
  set_has_i();
  i_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.Aggregate.i)
}

// optional string s = 2;
bool Aggregate::has_s() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void Aggregate::set_has_s() {
  _has_bits_[0] |= 0x00000001u;
}
void Aggregate::clear_has_s() {
  _has_bits_[0] &= ~0x00000001u;
}
void Aggregate::clear_s() {
  s_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_s();
}
const ::std::string& Aggregate::s() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.Aggregate.s)
  return s_.GetNoArena();
}
void Aggregate::set_s(const ::std::string& value) {
  set_has_s();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:protobuf_unittest.Aggregate.s)
}
#if LANG_CXX11
void Aggregate::set_s(::std::string&& value) {
  set_has_s();
  s_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest.Aggregate.s)
}
#endif
void Aggregate::set_s(const char* value) {
  set_has_s();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:protobuf_unittest.Aggregate.s)
}
void Aggregate::set_s(const char* value, size_t size) {
  set_has_s();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.Aggregate.s)
}
::std::string* Aggregate::mutable_s() {
  set_has_s();
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.Aggregate.s)
  return s_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Aggregate::release_s() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.Aggregate.s)
  clear_has_s();
  return s_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Aggregate::set_allocated_s(::std::string* s) {
  if (s != NULL) {
    set_has_s();
  } else {
    clear_has_s();
  }
  s_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s);
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.Aggregate.s)
}

// optional .protobuf_unittest.Aggregate sub = 3;
bool Aggregate::has_sub() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void Aggregate::set_has_sub() {
  _has_bits_[0] |= 0x00000002u;
}
void Aggregate::clear_has_sub() {
  _has_bits_[0] &= ~0x00000002u;
}
void Aggregate::clear_sub() {
  if (sub_ != NULL) sub_->::protobuf_unittest::Aggregate::Clear();
  clear_has_sub();
}
const ::protobuf_unittest::Aggregate& Aggregate::sub() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.Aggregate.sub)
  return sub_ != NULL ? *sub_
                         : *::protobuf_unittest::Aggregate::internal_default_instance();
}
::protobuf_unittest::Aggregate* Aggregate::mutable_sub() {
  set_has_sub();
  if (sub_ == NULL) {
    sub_ = new ::protobuf_unittest::Aggregate;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.Aggregate.sub)
  return sub_;
}
::protobuf_unittest::Aggregate* Aggregate::release_sub() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.Aggregate.sub)
  clear_has_sub();
  ::protobuf_unittest::Aggregate* temp = sub_;
  sub_ = NULL;
  return temp;
}
void Aggregate::set_allocated_sub(::protobuf_unittest::Aggregate* sub) {
  delete sub_;
  sub_ = sub;
  if (sub) {
    set_has_sub();
  } else {
    clear_has_sub();
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.Aggregate.sub)
}

// optional .google.protobuf.FileOptions file = 4;
bool Aggregate::has_file() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void Aggregate::set_has_file() {
  _has_bits_[0] |= 0x00000004u;
}
void Aggregate::clear_has_file() {
  _has_bits_[0] &= ~0x00000004u;
}
void Aggregate::clear_file() {
  if (file_ != NULL) file_->::google::protobuf::FileOptions::Clear();
  clear_has_file();
}
const ::google::protobuf::FileOptions& Aggregate::file() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.Aggregate.file)
  return file_ != NULL ? *file_
                         : *::google::protobuf::FileOptions::internal_default_instance();
}
::google::protobuf::FileOptions* Aggregate::mutable_file() {
  set_has_file();
  if (file_ == NULL) {
    file_ = new ::google::protobuf::FileOptions;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.Aggregate.file)
  return file_;
}
::google::protobuf::FileOptions* Aggregate::release_file() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.Aggregate.file)
  clear_has_file();
  ::google::protobuf::FileOptions* temp = file_;
  file_ = NULL;
  return temp;
}
void Aggregate::set_allocated_file(::google::protobuf::FileOptions* file) {
  delete file_;
  file_ = file;
  if (file) {
    set_has_file();
  } else {
    clear_has_file();
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.Aggregate.file)
}

// optional .protobuf_unittest.AggregateMessageSet mset = 5;
bool Aggregate::has_mset() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void Aggregate::set_has_mset() {
  _has_bits_[0] |= 0x00000008u;
}
void Aggregate::clear_has_mset() {
  _has_bits_[0] &= ~0x00000008u;
}
void Aggregate::clear_mset() {
  if (mset_ != NULL) mset_->::protobuf_unittest::AggregateMessageSet::Clear();
  clear_has_mset();
}
const ::protobuf_unittest::AggregateMessageSet& Aggregate::mset() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.Aggregate.mset)
  return mset_ != NULL ? *mset_
                         : *::protobuf_unittest::AggregateMessageSet::internal_default_instance();
}
::protobuf_unittest::AggregateMessageSet* Aggregate::mutable_mset() {
  set_has_mset();
  if (mset_ == NULL) {
    mset_ = new ::protobuf_unittest::AggregateMessageSet;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.Aggregate.mset)
  return mset_;
}
::protobuf_unittest::AggregateMessageSet* Aggregate::release_mset() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.Aggregate.mset)
  clear_has_mset();
  ::protobuf_unittest::AggregateMessageSet* temp = mset_;
  mset_ = NULL;
  return temp;
}
void Aggregate::set_allocated_mset(::protobuf_unittest::AggregateMessageSet* mset) {
  delete mset_;
  mset_ = mset;
  if (mset) {
    set_has_mset();
  } else {
    clear_has_mset();
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.Aggregate.mset)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int AggregateMessage::kFieldnameFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

AggregateMessage::AggregateMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.AggregateMessage)
}
AggregateMessage::AggregateMessage(const AggregateMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  fieldname_ = from.fieldname_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.AggregateMessage)
}

void AggregateMessage::SharedCtor() {
  _cached_size_ = 0;
  fieldname_ = 0;
}

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

void AggregateMessage::SharedDtor() {
}

void AggregateMessage::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AggregateMessage::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[22].descriptor;
}

const AggregateMessage& AggregateMessage::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

AggregateMessage* AggregateMessage::New(::google::protobuf::Arena* arena) const {
  AggregateMessage* n = new AggregateMessage;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void AggregateMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.AggregateMessage)
  fieldname_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool AggregateMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.AggregateMessage)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 fieldname = 1 [(.protobuf_unittest.fieldopt) = {
      case 1: {
        if (tag == 8u) {
          set_has_fieldname();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &fieldname_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void AggregateMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.AggregateMessage)
  // optional int32 fieldname = 1 [(.protobuf_unittest.fieldopt) = {
  if (has_fieldname()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->fieldname(), output);
  }

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

::google::protobuf::uint8* AggregateMessage::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.AggregateMessage)
  // optional int32 fieldname = 1 [(.protobuf_unittest.fieldopt) = {
  if (has_fieldname()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->fieldname(), target);
  }

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

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

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

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void AggregateMessage::MergeFrom(const AggregateMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.AggregateMessage)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_fieldname()) {
    set_fieldname(from.fieldname());
  }
}

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

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

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

void AggregateMessage::Swap(AggregateMessage* other) {
  if (other == this) return;
  InternalSwap(other);
}
void AggregateMessage::InternalSwap(AggregateMessage* other) {
  std::swap(fieldname_, other->fieldname_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata AggregateMessage::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[22];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// AggregateMessage

// optional int32 fieldname = 1 [(.protobuf_unittest.fieldopt) = {
bool AggregateMessage::has_fieldname() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void AggregateMessage::set_has_fieldname() {
  _has_bits_[0] |= 0x00000001u;
}
void AggregateMessage::clear_has_fieldname() {
  _has_bits_[0] &= ~0x00000001u;
}
void AggregateMessage::clear_fieldname() {
  fieldname_ = 0;
  clear_has_fieldname();
}
::google::protobuf::int32 AggregateMessage::fieldname() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.AggregateMessage.fieldname)
  return fieldname_;
}
void AggregateMessage::set_fieldname(::google::protobuf::int32 value) {
  set_has_fieldname();
  fieldname_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.AggregateMessage.fieldname)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NestedOptionType_NestedMessage::kNestedFieldFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

NestedOptionType_NestedMessage::NestedOptionType_NestedMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.NestedOptionType.NestedMessage)
}
NestedOptionType_NestedMessage::NestedOptionType_NestedMessage(const NestedOptionType_NestedMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  nested_field_ = from.nested_field_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.NestedOptionType.NestedMessage)
}

void NestedOptionType_NestedMessage::SharedCtor() {
  _cached_size_ = 0;
  nested_field_ = 0;
}

NestedOptionType_NestedMessage::~NestedOptionType_NestedMessage() {
  // @@protoc_insertion_point(destructor:protobuf_unittest.NestedOptionType.NestedMessage)
  SharedDtor();
}

void NestedOptionType_NestedMessage::SharedDtor() {
}

void NestedOptionType_NestedMessage::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NestedOptionType_NestedMessage::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[23].descriptor;
}

const NestedOptionType_NestedMessage& NestedOptionType_NestedMessage::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

NestedOptionType_NestedMessage* NestedOptionType_NestedMessage::New(::google::protobuf::Arena* arena) const {
  NestedOptionType_NestedMessage* n = new NestedOptionType_NestedMessage;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void NestedOptionType_NestedMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.NestedOptionType.NestedMessage)
  nested_field_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool NestedOptionType_NestedMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.NestedOptionType.NestedMessage)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 nested_field = 1 [(.protobuf_unittest.field_opt1) = 1002];
      case 1: {
        if (tag == 8u) {
          set_has_nested_field();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &nested_field_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void NestedOptionType_NestedMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.NestedOptionType.NestedMessage)
  // optional int32 nested_field = 1 [(.protobuf_unittest.field_opt1) = 1002];
  if (has_nested_field()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->nested_field(), output);
  }

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

::google::protobuf::uint8* NestedOptionType_NestedMessage::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.NestedOptionType.NestedMessage)
  // optional int32 nested_field = 1 [(.protobuf_unittest.field_opt1) = 1002];
  if (has_nested_field()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->nested_field(), target);
  }

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

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  // optional int32 nested_field = 1 [(.protobuf_unittest.field_opt1) = 1002];
  if (has_nested_field()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->nested_field());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void NestedOptionType_NestedMessage::MergeFrom(const NestedOptionType_NestedMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.NestedOptionType.NestedMessage)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_nested_field()) {
    set_nested_field(from.nested_field());
  }
}

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

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

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

void NestedOptionType_NestedMessage::Swap(NestedOptionType_NestedMessage* other) {
  if (other == this) return;
  InternalSwap(other);
}
void NestedOptionType_NestedMessage::InternalSwap(NestedOptionType_NestedMessage* other) {
  std::swap(nested_field_, other->nested_field_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata NestedOptionType_NestedMessage::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[23];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// NestedOptionType_NestedMessage

// optional int32 nested_field = 1 [(.protobuf_unittest.field_opt1) = 1002];
bool NestedOptionType_NestedMessage::has_nested_field() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void NestedOptionType_NestedMessage::set_has_nested_field() {
  _has_bits_[0] |= 0x00000001u;
}
void NestedOptionType_NestedMessage::clear_has_nested_field() {
  _has_bits_[0] &= ~0x00000001u;
}
void NestedOptionType_NestedMessage::clear_nested_field() {
  nested_field_ = 0;
  clear_has_nested_field();
}
::google::protobuf::int32 NestedOptionType_NestedMessage::nested_field() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.NestedOptionType.NestedMessage.nested_field)
  return nested_field_;
}
void NestedOptionType_NestedMessage::set_nested_field(::google::protobuf::int32 value) {
  set_has_nested_field();
  nested_field_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.NestedOptionType.NestedMessage.nested_field)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

NestedOptionType::NestedOptionType()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.NestedOptionType)
}
NestedOptionType::NestedOptionType(const NestedOptionType& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.NestedOptionType)
}

void NestedOptionType::SharedCtor() {
  _cached_size_ = 0;
}

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

void NestedOptionType::SharedDtor() {
}

void NestedOptionType::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NestedOptionType::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[24].descriptor;
}

const NestedOptionType& NestedOptionType::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

NestedOptionType* NestedOptionType::New(::google::protobuf::Arena* arena) const {
  NestedOptionType* n = new NestedOptionType;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void NestedOptionType::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.NestedOptionType)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool NestedOptionType::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.NestedOptionType)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.NestedOptionType)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.NestedOptionType)
  return false;
#undef DO_
}

void NestedOptionType::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.NestedOptionType)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.NestedOptionType)
}

::google::protobuf::uint8* NestedOptionType::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.NestedOptionType)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.NestedOptionType)
  return target;
}

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

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

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

void NestedOptionType::MergeFrom(const NestedOptionType& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.NestedOptionType)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void NestedOptionType::Swap(NestedOptionType* other) {
  if (other == this) return;
  InternalSwap(other);
}
void NestedOptionType::InternalSwap(NestedOptionType* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata NestedOptionType::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[24];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// NestedOptionType

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int OldOptionType::kValueFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

OldOptionType::OldOptionType()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.OldOptionType)
}
OldOptionType::OldOptionType(const OldOptionType& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  value_ = from.value_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.OldOptionType)
}

void OldOptionType::SharedCtor() {
  _cached_size_ = 0;
  value_ = 0;
}

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

void OldOptionType::SharedDtor() {
}

void OldOptionType::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* OldOptionType::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[25].descriptor;
}

const OldOptionType& OldOptionType::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

OldOptionType* OldOptionType::New(::google::protobuf::Arena* arena) const {
  OldOptionType* n = new OldOptionType;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void OldOptionType::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.OldOptionType)
  value_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool OldOptionType::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.OldOptionType)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required .protobuf_unittest.OldOptionType.TestEnum value = 1;
      case 1: {
        if (tag == 8u) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::OldOptionType_TestEnum_IsValid(value)) {
            set_value(static_cast< ::protobuf_unittest::OldOptionType_TestEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void OldOptionType::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.OldOptionType)
  // required .protobuf_unittest.OldOptionType.TestEnum value = 1;
  if (has_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->value(), output);
  }

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

::google::protobuf::uint8* OldOptionType::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.OldOptionType)
  // required .protobuf_unittest.OldOptionType.TestEnum value = 1;
  if (has_value()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->value(), target);
  }

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

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  // required .protobuf_unittest.OldOptionType.TestEnum value = 1;
  if (has_value()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->value());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void OldOptionType::MergeFrom(const OldOptionType& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.OldOptionType)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_value()) {
    set_value(from.value());
  }
}

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

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

bool OldOptionType::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  return true;
}

void OldOptionType::Swap(OldOptionType* other) {
  if (other == this) return;
  InternalSwap(other);
}
void OldOptionType::InternalSwap(OldOptionType* other) {
  std::swap(value_, other->value_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata OldOptionType::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[25];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// OldOptionType

// required .protobuf_unittest.OldOptionType.TestEnum value = 1;
bool OldOptionType::has_value() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void OldOptionType::set_has_value() {
  _has_bits_[0] |= 0x00000001u;
}
void OldOptionType::clear_has_value() {
  _has_bits_[0] &= ~0x00000001u;
}
void OldOptionType::clear_value() {
  value_ = 0;
  clear_has_value();
}
::protobuf_unittest::OldOptionType_TestEnum OldOptionType::value() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.OldOptionType.value)
  return static_cast< ::protobuf_unittest::OldOptionType_TestEnum >(value_);
}
void OldOptionType::set_value(::protobuf_unittest::OldOptionType_TestEnum value) {
  assert(::protobuf_unittest::OldOptionType_TestEnum_IsValid(value));
  set_has_value();
  value_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.OldOptionType.value)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NewOptionType::kValueFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

NewOptionType::NewOptionType()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.NewOptionType)
}
NewOptionType::NewOptionType(const NewOptionType& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  value_ = from.value_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.NewOptionType)
}

void NewOptionType::SharedCtor() {
  _cached_size_ = 0;
  value_ = 0;
}

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

void NewOptionType::SharedDtor() {
}

void NewOptionType::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NewOptionType::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[26].descriptor;
}

const NewOptionType& NewOptionType::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

NewOptionType* NewOptionType::New(::google::protobuf::Arena* arena) const {
  NewOptionType* n = new NewOptionType;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void NewOptionType::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.NewOptionType)
  value_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool NewOptionType::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.NewOptionType)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required .protobuf_unittest.NewOptionType.TestEnum value = 1;
      case 1: {
        if (tag == 8u) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::NewOptionType_TestEnum_IsValid(value)) {
            set_value(static_cast< ::protobuf_unittest::NewOptionType_TestEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

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

void NewOptionType::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.NewOptionType)
  // required .protobuf_unittest.NewOptionType.TestEnum value = 1;
  if (has_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->value(), output);
  }

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

::google::protobuf::uint8* NewOptionType::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.NewOptionType)
  // required .protobuf_unittest.NewOptionType.TestEnum value = 1;
  if (has_value()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->value(), target);
  }

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

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  // required .protobuf_unittest.NewOptionType.TestEnum value = 1;
  if (has_value()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->value());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

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

void NewOptionType::MergeFrom(const NewOptionType& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.NewOptionType)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_value()) {
    set_value(from.value());
  }
}

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

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

bool NewOptionType::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  return true;
}

void NewOptionType::Swap(NewOptionType* other) {
  if (other == this) return;
  InternalSwap(other);
}
void NewOptionType::InternalSwap(NewOptionType* other) {
  std::swap(value_, other->value_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata NewOptionType::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[26];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// NewOptionType

// required .protobuf_unittest.NewOptionType.TestEnum value = 1;
bool NewOptionType::has_value() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void NewOptionType::set_has_value() {
  _has_bits_[0] |= 0x00000001u;
}
void NewOptionType::clear_has_value() {
  _has_bits_[0] &= ~0x00000001u;
}
void NewOptionType::clear_value() {
  value_ = 0;
  clear_has_value();
}
::protobuf_unittest::NewOptionType_TestEnum NewOptionType::value() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.NewOptionType.value)
  return static_cast< ::protobuf_unittest::NewOptionType_TestEnum >(value_);
}
void NewOptionType::set_value(::protobuf_unittest::NewOptionType_TestEnum value) {
  assert(::protobuf_unittest::NewOptionType_TestEnum_IsValid(value));
  set_has_value();
  value_ = value;
  // @@protoc_insertion_point(field_set:protobuf_unittest.NewOptionType.value)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TestMessageWithRequiredEnumOption::TestMessageWithRequiredEnumOption()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestMessageWithRequiredEnumOption)
}
TestMessageWithRequiredEnumOption::TestMessageWithRequiredEnumOption(const TestMessageWithRequiredEnumOption& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMessageWithRequiredEnumOption)
}

void TestMessageWithRequiredEnumOption::SharedCtor() {
  _cached_size_ = 0;
}

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

void TestMessageWithRequiredEnumOption::SharedDtor() {
}

void TestMessageWithRequiredEnumOption::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TestMessageWithRequiredEnumOption::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[27].descriptor;
}

const TestMessageWithRequiredEnumOption& TestMessageWithRequiredEnumOption::default_instance() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::InitDefaults();
  return *internal_default_instance();
}

TestMessageWithRequiredEnumOption* TestMessageWithRequiredEnumOption::New(::google::protobuf::Arena* arena) const {
  TestMessageWithRequiredEnumOption* n = new TestMessageWithRequiredEnumOption;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void TestMessageWithRequiredEnumOption::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestMessageWithRequiredEnumOption)
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TestMessageWithRequiredEnumOption::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:protobuf_unittest.TestMessageWithRequiredEnumOption)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.TestMessageWithRequiredEnumOption)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMessageWithRequiredEnumOption)
  return false;
#undef DO_
}

void TestMessageWithRequiredEnumOption::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestMessageWithRequiredEnumOption)
  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMessageWithRequiredEnumOption)
}

::google::protobuf::uint8* TestMessageWithRequiredEnumOption::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic;  // Unused
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestMessageWithRequiredEnumOption)
  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMessageWithRequiredEnumOption)
  return target;
}

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

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

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

void TestMessageWithRequiredEnumOption::MergeFrom(const TestMessageWithRequiredEnumOption& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestMessageWithRequiredEnumOption)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
}

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

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

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

void TestMessageWithRequiredEnumOption::Swap(TestMessageWithRequiredEnumOption* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TestMessageWithRequiredEnumOption::InternalSwap(TestMessageWithRequiredEnumOption* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata TestMessageWithRequiredEnumOption::GetMetadata() const {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_metadata[27];
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// TestMessageWithRequiredEnumOption

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

TestServiceWithCustomOptions::~TestServiceWithCustomOptions() {}

const ::google::protobuf::ServiceDescriptor* TestServiceWithCustomOptions::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_service_descriptors[0];
}

const ::google::protobuf::ServiceDescriptor* TestServiceWithCustomOptions::GetDescriptor() {
  return descriptor();
}

void TestServiceWithCustomOptions::Foo(::google::protobuf::RpcController* controller,
                         const ::protobuf_unittest::CustomOptionFooRequest*,
                         ::protobuf_unittest::CustomOptionFooResponse*,
                         ::google::protobuf::Closure* done) {
  controller->SetFailed("Method Foo() not implemented.");
  done->Run();
}

void TestServiceWithCustomOptions::CallMethod(const ::google::protobuf::MethodDescriptor* method,
                             ::google::protobuf::RpcController* controller,
                             const ::google::protobuf::Message* request,
                             ::google::protobuf::Message* response,
                             ::google::protobuf::Closure* done) {
  GOOGLE_DCHECK_EQ(method->service(), protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_service_descriptors[0]);
  switch(method->index()) {
    case 0:
      Foo(controller,
             ::google::protobuf::down_cast<const ::protobuf_unittest::CustomOptionFooRequest*>(request),
             ::google::protobuf::down_cast< ::protobuf_unittest::CustomOptionFooResponse*>(response),
             done);
      break;
    default:
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
      break;
  }
}

const ::google::protobuf::Message& TestServiceWithCustomOptions::GetRequestPrototype(
    const ::google::protobuf::MethodDescriptor* method) const {
  GOOGLE_DCHECK_EQ(method->service(), descriptor());
  switch(method->index()) {
    case 0:
      return ::protobuf_unittest::CustomOptionFooRequest::default_instance();
    default:
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
      return *::google::protobuf::MessageFactory::generated_factory()
          ->GetPrototype(method->input_type());
  }
}

const ::google::protobuf::Message& TestServiceWithCustomOptions::GetResponsePrototype(
    const ::google::protobuf::MethodDescriptor* method) const {
  GOOGLE_DCHECK_EQ(method->service(), descriptor());
  switch(method->index()) {
    case 0:
      return ::protobuf_unittest::CustomOptionFooResponse::default_instance();
    default:
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
      return *::google::protobuf::MessageFactory::generated_factory()
          ->GetPrototype(method->output_type());
  }
}

TestServiceWithCustomOptions_Stub::TestServiceWithCustomOptions_Stub(::google::protobuf::RpcChannel* channel)
  : channel_(channel), owns_channel_(false) {}
TestServiceWithCustomOptions_Stub::TestServiceWithCustomOptions_Stub(
    ::google::protobuf::RpcChannel* channel,
    ::google::protobuf::Service::ChannelOwnership ownership)
  : channel_(channel),
    owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {}
TestServiceWithCustomOptions_Stub::~TestServiceWithCustomOptions_Stub() {
  if (owns_channel_) delete channel_;
}

void TestServiceWithCustomOptions_Stub::Foo(::google::protobuf::RpcController* controller,
                              const ::protobuf_unittest::CustomOptionFooRequest* request,
                              ::protobuf_unittest::CustomOptionFooResponse* response,
                              ::google::protobuf::Closure* done) {
  channel_->CallMethod(descriptor()->method(0),
                       controller, request, response, done);
}
// ===================================================================

AggregateService::~AggregateService() {}

const ::google::protobuf::ServiceDescriptor* AggregateService::descriptor() {
  protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_service_descriptors[1];
}

const ::google::protobuf::ServiceDescriptor* AggregateService::GetDescriptor() {
  return descriptor();
}

void AggregateService::Method(::google::protobuf::RpcController* controller,
                         const ::protobuf_unittest::AggregateMessage*,
                         ::protobuf_unittest::AggregateMessage*,
                         ::google::protobuf::Closure* done) {
  controller->SetFailed("Method Method() not implemented.");
  done->Run();
}

void AggregateService::CallMethod(const ::google::protobuf::MethodDescriptor* method,
                             ::google::protobuf::RpcController* controller,
                             const ::google::protobuf::Message* request,
                             ::google::protobuf::Message* response,
                             ::google::protobuf::Closure* done) {
  GOOGLE_DCHECK_EQ(method->service(), protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::file_level_service_descriptors[1]);
  switch(method->index()) {
    case 0:
      Method(controller,
             ::google::protobuf::down_cast<const ::protobuf_unittest::AggregateMessage*>(request),
             ::google::protobuf::down_cast< ::protobuf_unittest::AggregateMessage*>(response),
             done);
      break;
    default:
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
      break;
  }
}

const ::google::protobuf::Message& AggregateService::GetRequestPrototype(
    const ::google::protobuf::MethodDescriptor* method) const {
  GOOGLE_DCHECK_EQ(method->service(), descriptor());
  switch(method->index()) {
    case 0:
      return ::protobuf_unittest::AggregateMessage::default_instance();
    default:
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
      return *::google::protobuf::MessageFactory::generated_factory()
          ->GetPrototype(method->input_type());
  }
}

const ::google::protobuf::Message& AggregateService::GetResponsePrototype(
    const ::google::protobuf::MethodDescriptor* method) const {
  GOOGLE_DCHECK_EQ(method->service(), descriptor());
  switch(method->index()) {
    case 0:
      return ::protobuf_unittest::AggregateMessage::default_instance();
    default:
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
      return *::google::protobuf::MessageFactory::generated_factory()
          ->GetPrototype(method->output_type());
  }
}

AggregateService_Stub::AggregateService_Stub(::google::protobuf::RpcChannel* channel)
  : channel_(channel), owns_channel_(false) {}
AggregateService_Stub::AggregateService_Stub(
    ::google::protobuf::RpcChannel* channel,
    ::google::protobuf::Service::ChannelOwnership ownership)
  : channel_(channel),
    owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {}
AggregateService_Stub::~AggregateService_Stub() {
  if (owns_channel_) delete channel_;
}

void AggregateService_Stub::Method(::google::protobuf::RpcController* controller,
                              const ::protobuf_unittest::AggregateMessage* request,
                              ::protobuf_unittest::AggregateMessage* response,
                              ::google::protobuf::Closure* done) {
  channel_->CallMethod(descriptor()->method(0),
                       controller, request, response, done);
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ComplexOptionType2_ComplexOptionType4::kComplexOpt4FieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 >, 11, false >
  ComplexOptionType2_ComplexOptionType4::complex_opt4(kComplexOpt4FieldNumber, *::protobuf_unittest::ComplexOptionType2_ComplexOptionType4::internal_default_instance());
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int AggregateMessageSetElement::kMessageSetExtensionFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::AggregateMessageSet,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::AggregateMessageSetElement >, 11, false >
  AggregateMessageSetElement::message_set_extension(kMessageSetExtensionFieldNumber, *::protobuf_unittest::AggregateMessageSetElement::internal_default_instance());
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Aggregate::kNestedFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FileOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  Aggregate::nested(kNestedFieldNumber, *::protobuf_unittest::Aggregate::internal_default_instance());
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NestedOptionType::kNestedExtensionFieldNumber;
#endif
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FileOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  NestedOptionType::nested_extension(kNestedExtensionFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FileOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  file_opt1(kFileOpt1FieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  message_opt1(kMessageOpt1FieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FieldOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  field_opt1(kFieldOpt1FieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FieldOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  field_opt2(kFieldOpt2FieldNumber, 42);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::OneofOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  oneof_opt1(kOneofOpt1FieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::EnumOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  enum_opt1(kEnumOpt1FieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::EnumValueOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  enum_value_opt1(kEnumValueOpt1FieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::ServiceOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  service_opt1(kServiceOpt1FieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MethodOptions,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::MethodOpt1, ::protobuf_unittest::MethodOpt1_IsValid>, 14, false >
  method_opt1(kMethodOpt1FieldNumber, static_cast< ::protobuf_unittest::MethodOpt1 >(1));
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< bool >, 8, false >
  bool_opt(kBoolOptFieldNumber, false);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  int32_opt(kInt32OptFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  int64_opt(kInt64OptFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  uint32_opt(kUint32OptFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  uint64_opt(kUint64OptFieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  sint32_opt(kSint32OptFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  sint64_opt(kSint64OptFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  fixed32_opt(kFixed32OptFieldNumber, 0u);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  fixed64_opt(kFixed64OptFieldNumber, GOOGLE_ULONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  sfixed32_opt(kSfixed32OptFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  sfixed64_opt(kSfixed64OptFieldNumber, GOOGLE_LONGLONG(0));
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< float >, 2, false >
  float_opt(kFloatOptFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< double >, 1, false >
  double_opt(kDoubleOptFieldNumber, 0);
const ::std::string string_opt_default("");
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  string_opt(kStringOptFieldNumber, string_opt_default);
const ::std::string bytes_opt_default("");
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::StringTypeTraits, 12, false >
  bytes_opt(kBytesOptFieldNumber, bytes_opt_default);
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::DummyMessageContainingEnum_TestEnumType, ::protobuf_unittest::DummyMessageContainingEnum_TestEnumType_IsValid>, 14, false >
  enum_opt(kEnumOptFieldNumber, static_cast< ::protobuf_unittest::DummyMessageContainingEnum_TestEnumType >(22));
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::DummyMessageInvalidAsOptionType >, 11, false >
  message_type_opt(kMessageTypeOptFieldNumber, *::protobuf_unittest::DummyMessageInvalidAsOptionType::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::ComplexOptionType1,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  quux(kQuuxFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::ComplexOptionType1,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType3 >, 11, false >
  corge(kCorgeFieldNumber, *::protobuf_unittest::ComplexOptionType3::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::ComplexOptionType2,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  grault(kGraultFieldNumber, 0);
::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::ComplexOptionType2,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType1 >, 11, false >
  garply(kGarplyFieldNumber, *::protobuf_unittest::ComplexOptionType1::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType1 >, 11, false >
  complex_opt1(kComplexOpt1FieldNumber, *::protobuf_unittest::ComplexOptionType1::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType2 >, 11, false >
  complex_opt2(kComplexOpt2FieldNumber, *::protobuf_unittest::ComplexOptionType2::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType3 >, 11, false >
  complex_opt3(kComplexOpt3FieldNumber, *::protobuf_unittest::ComplexOptionType3::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOpt6 >, 10, false >
  complexopt6(kComplexopt6FieldNumber, *::protobuf_unittest::ComplexOpt6::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FileOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  fileopt(kFileoptFieldNumber, *::protobuf_unittest::Aggregate::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  msgopt(kMsgoptFieldNumber, *::protobuf_unittest::Aggregate::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FieldOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  fieldopt(kFieldoptFieldNumber, *::protobuf_unittest::Aggregate::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::EnumOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  enumopt(kEnumoptFieldNumber, *::protobuf_unittest::Aggregate::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::EnumValueOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  enumvalopt(kEnumvaloptFieldNumber, *::protobuf_unittest::Aggregate::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::ServiceOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  serviceopt(kServiceoptFieldNumber, *::protobuf_unittest::Aggregate::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MethodOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  methodopt(kMethodoptFieldNumber, *::protobuf_unittest::Aggregate::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::OldOptionType >, 11, false >
  required_enum_opt(kRequiredEnumOptFieldNumber, *::protobuf_unittest::OldOptionType::internal_default_instance());

// @@protoc_insertion_point(namespace_scope)

}  // namespace protobuf_unittest

// @@protoc_insertion_point(global_scope)

redpajama_set_name: RedPajamaGithub