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

#include <google/protobuf/unittest_custom_options.pb.h>

#include <algorithm>

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

namespace protobuf_google_2fprotobuf_2fdescriptor_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_FileOptions;
}  // namespace protobuf_google_2fprotobuf_2fdescriptor_2eproto
namespace protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_AggregateMessageSet;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_AggregateMessageSetElement;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ComplexOpt6;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ComplexOptionType1;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ComplexOptionType2_ComplexOptionType4;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ComplexOptionType3_ComplexOptionType5;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_DummyMessageInvalidAsOptionType;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_OldOptionType;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ComplexOptionType3;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_Aggregate;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_ComplexOptionType2;
}  // namespace protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto
namespace protobuf_unittest {
class TestMessageWithCustomOptionsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestMessageWithCustomOptions>
      _instance;
  ::google::protobuf::int32 oneof_field_;
} _TestMessageWithCustomOptions_default_instance_;
class CustomOptionFooRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionFooRequest>
      _instance;
} _CustomOptionFooRequest_default_instance_;
class CustomOptionFooResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionFooResponse>
      _instance;
} _CustomOptionFooResponse_default_instance_;
class CustomOptionFooClientMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionFooClientMessage>
      _instance;
} _CustomOptionFooClientMessage_default_instance_;
class CustomOptionFooServerMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionFooServerMessage>
      _instance;
} _CustomOptionFooServerMessage_default_instance_;
class DummyMessageContainingEnumDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DummyMessageContainingEnum>
      _instance;
} _DummyMessageContainingEnum_default_instance_;
class DummyMessageInvalidAsOptionTypeDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DummyMessageInvalidAsOptionType>
      _instance;
} _DummyMessageInvalidAsOptionType_default_instance_;
class CustomOptionMinIntegerValuesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionMinIntegerValues>
      _instance;
} _CustomOptionMinIntegerValues_default_instance_;
class CustomOptionMaxIntegerValuesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionMaxIntegerValues>
      _instance;
} _CustomOptionMaxIntegerValues_default_instance_;
class CustomOptionOtherValuesDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CustomOptionOtherValues>
      _instance;
} _CustomOptionOtherValues_default_instance_;
class SettingRealsFromPositiveIntsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<SettingRealsFromPositiveInts>
      _instance;
} _SettingRealsFromPositiveInts_default_instance_;
class SettingRealsFromNegativeIntsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<SettingRealsFromNegativeInts>
      _instance;
} _SettingRealsFromNegativeInts_default_instance_;
class ComplexOptionType1DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ComplexOptionType1>
      _instance;
} _ComplexOptionType1_default_instance_;
class ComplexOptionType2_ComplexOptionType4DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ComplexOptionType2_ComplexOptionType4>
      _instance;
} _ComplexOptionType2_ComplexOptionType4_default_instance_;
class ComplexOptionType2DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ComplexOptionType2>
      _instance;
} _ComplexOptionType2_default_instance_;
class ComplexOptionType3_ComplexOptionType5DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ComplexOptionType3_ComplexOptionType5>
      _instance;
} _ComplexOptionType3_ComplexOptionType5_default_instance_;
class ComplexOptionType3DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ComplexOptionType3>
      _instance;
} _ComplexOptionType3_default_instance_;
class ComplexOpt6DefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ComplexOpt6>
      _instance;
} _ComplexOpt6_default_instance_;
class VariousComplexOptionsDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<VariousComplexOptions>
      _instance;
} _VariousComplexOptions_default_instance_;
class AggregateMessageSetDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<AggregateMessageSet>
      _instance;
} _AggregateMessageSet_default_instance_;
class AggregateMessageSetElementDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<AggregateMessageSetElement>
      _instance;
} _AggregateMessageSetElement_default_instance_;
class AggregateDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Aggregate>
      _instance;
} _Aggregate_default_instance_;
class AggregateMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<AggregateMessage>
      _instance;
} _AggregateMessage_default_instance_;
class NestedOptionType_NestedMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<NestedOptionType_NestedMessage>
      _instance;
} _NestedOptionType_NestedMessage_default_instance_;
class NestedOptionTypeDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<NestedOptionType>
      _instance;
} _NestedOptionType_default_instance_;
class OldOptionTypeDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<OldOptionType>
      _instance;
} _OldOptionType_default_instance_;
class NewOptionTypeDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<NewOptionType>
      _instance;
} _NewOptionType_default_instance_;
class TestMessageWithRequiredEnumOptionDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TestMessageWithRequiredEnumOption>
      _instance;
} _TestMessageWithRequiredEnumOption_default_instance_;
}  // namespace protobuf_unittest
namespace protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto {
static void InitDefaultsTestMessageWithCustomOptions() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsCustomOptionFooRequest() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsCustomOptionFooResponse() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsCustomOptionFooClientMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsCustomOptionFooServerMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsDummyMessageContainingEnum() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsDummyMessageInvalidAsOptionType() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsCustomOptionMinIntegerValues() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsCustomOptionMaxIntegerValues() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsCustomOptionOtherValues() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsSettingRealsFromPositiveInts() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsSettingRealsFromNegativeInts() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsComplexOptionType1() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsComplexOptionType2_ComplexOptionType4() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsComplexOptionType2() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

::google::protobuf::internal::SCCInfo<2> scc_info_ComplexOptionType2 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsComplexOptionType2}, {
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType1.base,
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType2_ComplexOptionType4.base,}};

static void InitDefaultsComplexOptionType3_ComplexOptionType5() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsComplexOptionType3() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

::google::protobuf::internal::SCCInfo<1> scc_info_ComplexOptionType3 =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsComplexOptionType3}, {
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType3_ComplexOptionType5.base,}};

static void InitDefaultsComplexOpt6() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsVariousComplexOptions() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsAggregateMessageSet() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsAggregateMessageSetElement() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsAggregate() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

::google::protobuf::internal::SCCInfo<2> scc_info_Aggregate =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsAggregate}, {
      &protobuf_google_2fprotobuf_2fdescriptor_2eproto::scc_info_FileOptions.base,
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_AggregateMessageSet.base,}};

static void InitDefaultsAggregateMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsNestedOptionType_NestedMessage() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsNestedOptionType() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsOldOptionType() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsNewOptionType() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

static void InitDefaultsTestMessageWithRequiredEnumOption() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

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

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

void InitDefaults() {
  ::google::protobuf::internal::InitSCC(&scc_info_TestMessageWithCustomOptions.base);
  ::google::protobuf::internal::InitSCC(&scc_info_CustomOptionFooRequest.base);
  ::google::protobuf::internal::InitSCC(&scc_info_CustomOptionFooResponse.base);
  ::google::protobuf::internal::InitSCC(&scc_info_CustomOptionFooClientMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_CustomOptionFooServerMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_DummyMessageContainingEnum.base);
  ::google::protobuf::internal::InitSCC(&scc_info_DummyMessageInvalidAsOptionType.base);
  ::google::protobuf::internal::InitSCC(&scc_info_CustomOptionMinIntegerValues.base);
  ::google::protobuf::internal::InitSCC(&scc_info_CustomOptionMaxIntegerValues.base);
  ::google::protobuf::internal::InitSCC(&scc_info_CustomOptionOtherValues.base);
  ::google::protobuf::internal::InitSCC(&scc_info_SettingRealsFromPositiveInts.base);
  ::google::protobuf::internal::InitSCC(&scc_info_SettingRealsFromNegativeInts.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ComplexOptionType1.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ComplexOptionType2_ComplexOptionType4.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ComplexOptionType2.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ComplexOptionType3_ComplexOptionType5.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ComplexOptionType3.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ComplexOpt6.base);
  ::google::protobuf::internal::InitSCC(&scc_info_VariousComplexOptions.base);
  ::google::protobuf::internal::InitSCC(&scc_info_AggregateMessageSet.base);
  ::google::protobuf::internal::InitSCC(&scc_info_AggregateMessageSetElement.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Aggregate.base);
  ::google::protobuf::internal::InitSCC(&scc_info_AggregateMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_NestedOptionType_NestedMessage.base);
  ::google::protobuf::internal::InitSCC(&scc_info_NestedOptionType.base);
  ::google::protobuf::internal::InitSCC(&scc_info_OldOptionType.base);
  ::google::protobuf::internal::InitSCC(&scc_info_NewOptionType.base);
  ::google::protobuf::internal::InitSCC(&scc_info_TestMessageWithRequiredEnumOption.base);
}

::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];

const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMessageWithCustomOptions, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMessageWithCustomOptions, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMessageWithCustomOptions, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMessageWithCustomOptions, field1_),
  offsetof(::protobuf_unittest::TestMessageWithCustomOptionsDefaultTypeInternal, oneof_field_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMessageWithCustomOptions, AnOneof_),
  0,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionFooRequest, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionFooRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionFooResponse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionFooResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionFooClientMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionFooClientMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionFooServerMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionFooServerMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::DummyMessageContainingEnum, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::DummyMessageContainingEnum, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::DummyMessageInvalidAsOptionType, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::DummyMessageInvalidAsOptionType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionMinIntegerValues, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionMinIntegerValues, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionMaxIntegerValues, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionMaxIntegerValues, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionOtherValues, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::CustomOptionOtherValues, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::SettingRealsFromPositiveInts, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::SettingRealsFromPositiveInts, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::SettingRealsFromNegativeInts, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::SettingRealsFromNegativeInts, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType1, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType1, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType1, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType1, foo_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType1, foo2_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType1, foo3_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType1, foo4_),
  0,
  1,
  2,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType2_ComplexOptionType4, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType2_ComplexOptionType4, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType2_ComplexOptionType4, waldo_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType2, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType2, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType2, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType2, bar_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType2, baz_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType2, fred_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType2, barney_),
  0,
  2,
  1,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType3_ComplexOptionType5, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType3_ComplexOptionType5, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType3_ComplexOptionType5, plugh_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType3, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType3, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType3, qux_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOptionType3, complexoptiontype5_),
  1,
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOpt6, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOpt6, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ComplexOpt6, xyzzy_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::VariousComplexOptions, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::VariousComplexOptions, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::AggregateMessageSet, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::AggregateMessageSet, _internal_metadata_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::AggregateMessageSet, _extensions_),
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::AggregateMessageSetElement, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::AggregateMessageSetElement, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::AggregateMessageSetElement, s_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Aggregate, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Aggregate, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Aggregate, i_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Aggregate, s_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Aggregate, sub_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Aggregate, file_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Aggregate, mset_),
  4,
  0,
  1,
  2,
  3,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::AggregateMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::AggregateMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::AggregateMessage, fieldname_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedOptionType_NestedMessage, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedOptionType_NestedMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedOptionType_NestedMessage, nested_field_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedOptionType, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedOptionType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OldOptionType, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OldOptionType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OldOptionType, value_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NewOptionType, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NewOptionType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NewOptionType, value_),
  0,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMessageWithRequiredEnumOption, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMessageWithRequiredEnumOption, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 8, sizeof(::protobuf_unittest::TestMessageWithCustomOptions)},
  { 10, 15, sizeof(::protobuf_unittest::CustomOptionFooRequest)},
  { 15, 20, sizeof(::protobuf_unittest::CustomOptionFooResponse)},
  { 20, 25, sizeof(::protobuf_unittest::CustomOptionFooClientMessage)},
  { 25, 30, sizeof(::protobuf_unittest::CustomOptionFooServerMessage)},
  { 30, 35, sizeof(::protobuf_unittest::DummyMessageContainingEnum)},
  { 35, 40, sizeof(::protobuf_unittest::DummyMessageInvalidAsOptionType)},
  { 40, 45, sizeof(::protobuf_unittest::CustomOptionMinIntegerValues)},
  { 45, 50, sizeof(::protobuf_unittest::CustomOptionMaxIntegerValues)},
  { 50, 55, sizeof(::protobuf_unittest::CustomOptionOtherValues)},
  { 55, 60, sizeof(::protobuf_unittest::SettingRealsFromPositiveInts)},
  { 60, 65, sizeof(::protobuf_unittest::SettingRealsFromNegativeInts)},
  { 65, 74, sizeof(::protobuf_unittest::ComplexOptionType1)},
  { 78, 84, sizeof(::protobuf_unittest::ComplexOptionType2_ComplexOptionType4)},
  { 85, 94, sizeof(::protobuf_unittest::ComplexOptionType2)},
  { 98, 104, sizeof(::protobuf_unittest::ComplexOptionType3_ComplexOptionType5)},
  { 105, 112, sizeof(::protobuf_unittest::ComplexOptionType3)},
  { 114, 120, sizeof(::protobuf_unittest::ComplexOpt6)},
  { 121, 126, sizeof(::protobuf_unittest::VariousComplexOptions)},
  { 126, 131, sizeof(::protobuf_unittest::AggregateMessageSet)},
  { 131, 137, sizeof(::protobuf_unittest::AggregateMessageSetElement)},
  { 138, 148, sizeof(::protobuf_unittest::Aggregate)},
  { 153, 159, sizeof(::protobuf_unittest::AggregateMessage)},
  { 160, 166, sizeof(::protobuf_unittest::NestedOptionType_NestedMessage)},
  { 167, 172, sizeof(::protobuf_unittest::NestedOptionType)},
  { 172, 178, sizeof(::protobuf_unittest::OldOptionType)},
  { 179, 185, sizeof(::protobuf_unittest::NewOptionType)},
  { 186, 191, sizeof(::protobuf_unittest::TestMessageWithRequiredEnumOption)},
};

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

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

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

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

void AddDescriptorsImpl() {
  InitDefaults();
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
      "\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);
  ::protobuf_google_2fprotobuf_2fdescriptor_2eproto::AddDescriptors();
}

void AddDescriptors() {
  static ::google::protobuf::internal::once_flag once;
  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
  StaticDescriptorInitializer() {
    AddDescriptors();
  }
} static_descriptor_initializer;
}  // namespace protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto
namespace protobuf_unittest {
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;
  }
}


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

void TestMessageWithCustomOptions::InitAsDefaultInstance() {
  ::protobuf_unittest::_TestMessageWithCustomOptions_default_instance_.oneof_field_ = 0;
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_TestMessageWithCustomOptions.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestMessageWithCustomOptions)
}
TestMessageWithCustomOptions::TestMessageWithCustomOptions(const TestMessageWithCustomOptions& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _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() {
  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 {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const TestMessageWithCustomOptions& TestMessageWithCustomOptions::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_TestMessageWithCustomOptions.base);
  return *internal_default_instance();
}


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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    field1_.ClearNonDefaultToEmptyNoArena();
  }
  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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_field1()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->field1().data(), static_cast<int>(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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          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) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string field1 = 1 [ctype = CORD, (.protobuf_unittest.field_opt1) = 8765432109];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->field1().data(), static_cast<int>(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(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string field1 = 1 [ctype = CORD, (.protobuf_unittest.field_opt1) = 8765432109];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->field1().data(), static_cast<int>(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(
        _internal_metadata_.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(
        _internal_metadata_.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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  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) {
  using std::swap;
  field1_.Swap(&other->field1_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(AnOneof_, other->AnOneof_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

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


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

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

CustomOptionFooRequest::CustomOptionFooRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionFooRequest.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionFooRequest)
}
CustomOptionFooRequest::CustomOptionFooRequest(const CustomOptionFooRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionFooRequest)
}

void CustomOptionFooRequest::SharedCtor() {
}

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

void CustomOptionFooRequest::SharedDtor() {
}

void CustomOptionFooRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const CustomOptionFooRequest& CustomOptionFooRequest::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionFooRequest.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

CustomOptionFooResponse::CustomOptionFooResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionFooResponse.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionFooResponse)
}
CustomOptionFooResponse::CustomOptionFooResponse(const CustomOptionFooResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionFooResponse)
}

void CustomOptionFooResponse::SharedCtor() {
}

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

void CustomOptionFooResponse::SharedDtor() {
}

void CustomOptionFooResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const CustomOptionFooResponse& CustomOptionFooResponse::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionFooResponse.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

CustomOptionFooClientMessage::CustomOptionFooClientMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionFooClientMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionFooClientMessage)
}
CustomOptionFooClientMessage::CustomOptionFooClientMessage(const CustomOptionFooClientMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionFooClientMessage)
}

void CustomOptionFooClientMessage::SharedCtor() {
}

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

void CustomOptionFooClientMessage::SharedDtor() {
}

void CustomOptionFooClientMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const CustomOptionFooClientMessage& CustomOptionFooClientMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionFooClientMessage.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

CustomOptionFooServerMessage::CustomOptionFooServerMessage()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionFooServerMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionFooServerMessage)
}
CustomOptionFooServerMessage::CustomOptionFooServerMessage(const CustomOptionFooServerMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionFooServerMessage)
}

void CustomOptionFooServerMessage::SharedCtor() {
}

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

void CustomOptionFooServerMessage::SharedDtor() {
}

void CustomOptionFooServerMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const CustomOptionFooServerMessage& CustomOptionFooServerMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionFooServerMessage.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

DummyMessageContainingEnum::DummyMessageContainingEnum()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_DummyMessageContainingEnum.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.DummyMessageContainingEnum)
}
DummyMessageContainingEnum::DummyMessageContainingEnum(const DummyMessageContainingEnum& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.DummyMessageContainingEnum)
}

void DummyMessageContainingEnum::SharedCtor() {
}

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

void DummyMessageContainingEnum::SharedDtor() {
}

void DummyMessageContainingEnum::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const DummyMessageContainingEnum& DummyMessageContainingEnum::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_DummyMessageContainingEnum.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

DummyMessageInvalidAsOptionType::DummyMessageInvalidAsOptionType()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_DummyMessageInvalidAsOptionType.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.DummyMessageInvalidAsOptionType)
}
DummyMessageInvalidAsOptionType::DummyMessageInvalidAsOptionType(const DummyMessageInvalidAsOptionType& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.DummyMessageInvalidAsOptionType)
}

void DummyMessageInvalidAsOptionType::SharedCtor() {
}

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

void DummyMessageInvalidAsOptionType::SharedDtor() {
}

void DummyMessageInvalidAsOptionType::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const DummyMessageInvalidAsOptionType& DummyMessageInvalidAsOptionType::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_DummyMessageInvalidAsOptionType.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

CustomOptionMinIntegerValues::CustomOptionMinIntegerValues()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionMinIntegerValues.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionMinIntegerValues)
}
CustomOptionMinIntegerValues::CustomOptionMinIntegerValues(const CustomOptionMinIntegerValues& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionMinIntegerValues)
}

void CustomOptionMinIntegerValues::SharedCtor() {
}

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

void CustomOptionMinIntegerValues::SharedDtor() {
}

void CustomOptionMinIntegerValues::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const CustomOptionMinIntegerValues& CustomOptionMinIntegerValues::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionMinIntegerValues.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

CustomOptionMaxIntegerValues::CustomOptionMaxIntegerValues()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionMaxIntegerValues.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionMaxIntegerValues)
}
CustomOptionMaxIntegerValues::CustomOptionMaxIntegerValues(const CustomOptionMaxIntegerValues& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionMaxIntegerValues)
}

void CustomOptionMaxIntegerValues::SharedCtor() {
}

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

void CustomOptionMaxIntegerValues::SharedDtor() {
}

void CustomOptionMaxIntegerValues::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const CustomOptionMaxIntegerValues& CustomOptionMaxIntegerValues::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionMaxIntegerValues.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

CustomOptionOtherValues::CustomOptionOtherValues()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionOtherValues.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.CustomOptionOtherValues)
}
CustomOptionOtherValues::CustomOptionOtherValues(const CustomOptionOtherValues& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.CustomOptionOtherValues)
}

void CustomOptionOtherValues::SharedCtor() {
}

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

void CustomOptionOtherValues::SharedDtor() {
}

void CustomOptionOtherValues::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const CustomOptionOtherValues& CustomOptionOtherValues::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_CustomOptionOtherValues.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

SettingRealsFromPositiveInts::SettingRealsFromPositiveInts()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_SettingRealsFromPositiveInts.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.SettingRealsFromPositiveInts)
}
SettingRealsFromPositiveInts::SettingRealsFromPositiveInts(const SettingRealsFromPositiveInts& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.SettingRealsFromPositiveInts)
}

void SettingRealsFromPositiveInts::SharedCtor() {
}

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

void SettingRealsFromPositiveInts::SharedDtor() {
}

void SettingRealsFromPositiveInts::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const SettingRealsFromPositiveInts& SettingRealsFromPositiveInts::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_SettingRealsFromPositiveInts.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

SettingRealsFromNegativeInts::SettingRealsFromNegativeInts()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_SettingRealsFromNegativeInts.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.SettingRealsFromNegativeInts)
}
SettingRealsFromNegativeInts::SettingRealsFromNegativeInts(const SettingRealsFromNegativeInts& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.SettingRealsFromNegativeInts)
}

void SettingRealsFromNegativeInts::SharedCtor() {
}

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

void SettingRealsFromNegativeInts::SharedDtor() {
}

void SettingRealsFromNegativeInts::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const SettingRealsFromNegativeInts& SettingRealsFromNegativeInts::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_SettingRealsFromNegativeInts.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

void ComplexOptionType1::InitAsDefaultInstance() {
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType1.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ComplexOptionType1)
}
ComplexOptionType1::ComplexOptionType1(const ComplexOptionType1& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      foo4_(from.foo4_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  ::memcpy(&foo_, &from.foo_,
    static_cast<size_t>(reinterpret_cast<char*>(&foo3_) -
    reinterpret_cast<char*>(&foo_)) + sizeof(foo3_));
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ComplexOptionType1)
}

void ComplexOptionType1::SharedCtor() {
  ::memset(&foo_, 0, static_cast<size_t>(
      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 {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const ComplexOptionType1& ComplexOptionType1::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType1.base);
  return *internal_default_instance();
}


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

  _extensions_.Clear();
  foo4_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 7u) {
    ::memset(&foo_, 0, static_cast<size_t>(
        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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 32u, input, this->mutable_foo4())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          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) {
          goto success;
        }
        if ((800u <= tag)) {
          DO_(_extensions_.ParseField(tag, input,
              internal_default_instance(),
              _internal_metadata_.mutable_unknown_fields()));
          continue;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

  // repeated int32 foo4 = 4;
  for (int i = 0, n = this->foo4_size(); i < n; 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(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

  // repeated int32 foo4 = 4;
  target = ::google::protobuf::internal::WireFormatLite::
    WriteInt32ToArray(4, this->foo4_, target);

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  foo4_.MergeFrom(from.foo4_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 7u) {
    if (cached_has_bits & 0x00000001u) {
      foo_ = from.foo_;
    }
    if (cached_has_bits & 0x00000002u) {
      foo2_ = from.foo2_;
    }
    if (cached_has_bits & 0x00000004u) {
      foo3_ = from.foo3_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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) {
  using std::swap;
  foo4_.InternalSwap(&other->foo4_);
  swap(foo_, other->foo_);
  swap(foo2_, other->foo2_);
  swap(foo3_, other->foo3_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _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[kIndexInFileMessages];
}


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

void ComplexOptionType2_ComplexOptionType4::InitAsDefaultInstance() {
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType2_ComplexOptionType4.base);
  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_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  waldo_ = from.waldo_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ComplexOptionType2.ComplexOptionType4)
}

void ComplexOptionType2_ComplexOptionType4::SharedCtor() {
  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 {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const ComplexOptionType2_ComplexOptionType4& ComplexOptionType2_ComplexOptionType4::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType2_ComplexOptionType4.base);
  return *internal_default_instance();
}


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

  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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          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) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  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) {
  using std::swap;
  swap(waldo_, other->waldo_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

void ComplexOptionType2::InitAsDefaultInstance() {
  ::protobuf_unittest::_ComplexOptionType2_default_instance_._instance.get_mutable()->bar_ = const_cast< ::protobuf_unittest::ComplexOptionType1*>(
      ::protobuf_unittest::ComplexOptionType1::internal_default_instance());
  ::protobuf_unittest::_ComplexOptionType2_default_instance_._instance.get_mutable()->fred_ = const_cast< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4*>(
      ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4::internal_default_instance());
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType2.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ComplexOptionType2)
}
ComplexOptionType2::ComplexOptionType2(const ComplexOptionType2& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      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() {
  ::memset(&bar_, 0, static_cast<size_t>(
      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 {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const ComplexOptionType2& ComplexOptionType2::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType2.base);
  return *internal_default_instance();
}


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

  _extensions_.Clear();
  barney_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(bar_ != NULL);
      bar_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(fred_ != NULL);
      fred_->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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_bar()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 baz = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_fred()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 barney = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_barney()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        if ((800u <= tag)) {
          DO_(_extensions_.ParseField(tag, input,
              internal_default_instance(),
              _internal_metadata_.mutable_unknown_fields()));
          continue;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 fred = 3;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->_internal_fred(), output);
  }

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

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 fred = 3;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->_internal_fred(), deterministic, target);
  }

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

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  // repeated .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 barney = 4;
  {
    unsigned int count = static_cast<unsigned int>(this->barney_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->barney(static_cast<int>(i)));
    }
  }

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

    // optional .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 fred = 3;
    if (has_fred()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  barney_.MergeFrom(from.barney_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 7u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_bar()->::protobuf_unittest::ComplexOptionType1::MergeFrom(from.bar());
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_fred()->::protobuf_unittest::ComplexOptionType2_ComplexOptionType4::MergeFrom(from.fred());
    }
    if (cached_has_bits & 0x00000004u) {
      baz_ = from.baz_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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) {
  using std::swap;
  CastToBase(&barney_)->InternalSwap(CastToBase(&other->barney_));
  swap(bar_, other->bar_);
  swap(fred_, other->fred_);
  swap(baz_, other->baz_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _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[kIndexInFileMessages];
}


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

void ComplexOptionType3_ComplexOptionType5::InitAsDefaultInstance() {
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType3_ComplexOptionType5.base);
  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_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  plugh_ = from.plugh_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ComplexOptionType3.ComplexOptionType5)
}

void ComplexOptionType3_ComplexOptionType5::SharedCtor() {
  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 {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const ComplexOptionType3_ComplexOptionType5& ComplexOptionType3_ComplexOptionType5::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType3_ComplexOptionType5.base);
  return *internal_default_instance();
}


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

  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->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 plugh = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          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) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  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) {
  using std::swap;
  swap(plugh_, other->plugh_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

void ComplexOptionType3::InitAsDefaultInstance() {
  ::protobuf_unittest::_ComplexOptionType3_default_instance_._instance.get_mutable()->complexoptiontype5_ = const_cast< ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5*>(
      ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5::internal_default_instance());
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType3.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ComplexOptionType3)
}
ComplexOptionType3::ComplexOptionType3(const ComplexOptionType3& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _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() {
  ::memset(&complexoptiontype5_, 0, static_cast<size_t>(
      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 {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const ComplexOptionType3& ComplexOptionType3::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOptionType3.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(complexoptiontype5_ != NULL);
    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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(19u /* 19 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
                2, input, mutable_complexoptiontype5()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional group ComplexOptionType5 = 2 { ... };
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
      2, this->_internal_complexoptiontype5(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional group ComplexOptionType5 = 2 { ... };
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteGroupToArray(
        2, this->_internal_complexoptiontype5(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional group ComplexOptionType5 = 2 { ... };
    if (has_complexoptiontype5()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::GroupSize(
          *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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      mutable_complexoptiontype5()->::protobuf_unittest::ComplexOptionType3_ComplexOptionType5::MergeFrom(from.complexoptiontype5());
    }
    if (cached_has_bits & 0x00000002u) {
      qux_ = from.qux_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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) {
  using std::swap;
  swap(complexoptiontype5_, other->complexoptiontype5_);
  swap(qux_, other->qux_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

void ComplexOpt6::InitAsDefaultInstance() {
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOpt6.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.ComplexOpt6)
}
ComplexOpt6::ComplexOpt6(const ComplexOpt6& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  xyzzy_ = from.xyzzy_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ComplexOpt6)
}

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

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

void ComplexOpt6::SharedDtor() {
}

void ComplexOpt6::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const ComplexOpt6& ComplexOpt6::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_ComplexOpt6.base);
  return *internal_default_instance();
}


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

  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->ReadTagWithCutoffNoLastTag(60751613u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 xyzzy = 7593951;
      case 7593951: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(248u /* 60751608 & 0xFF */)) {
          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) {
          input->SetLastTag(tag);
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  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) {
  using std::swap;
  swap(xyzzy_, other->xyzzy_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

VariousComplexOptions::VariousComplexOptions()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_VariousComplexOptions.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.VariousComplexOptions)
}
VariousComplexOptions::VariousComplexOptions(const VariousComplexOptions& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.VariousComplexOptions)
}

void VariousComplexOptions::SharedCtor() {
}

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

void VariousComplexOptions::SharedDtor() {
}

void VariousComplexOptions::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const VariousComplexOptions& VariousComplexOptions::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_VariousComplexOptions.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

AggregateMessageSet::AggregateMessageSet()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_AggregateMessageSet.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.AggregateMessageSet)
}
AggregateMessageSet::AggregateMessageSet(const AggregateMessageSet& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.AggregateMessageSet)
}

void AggregateMessageSet::SharedCtor() {
}

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

void AggregateMessageSet::SharedDtor() {
}

void AggregateMessageSet::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const AggregateMessageSet& AggregateMessageSet::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_AggregateMessageSet.base);
  return *internal_default_instance();
}


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

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

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

void AggregateMessageSet::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  _extensions_.SerializeMessageSetWithCachedSizes(output);
  ::google::protobuf::internal::WireFormat::SerializeUnknownMessageSetItems(
      _internal_metadata_.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(
               _internal_metadata_.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(_internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  _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[kIndexInFileMessages];
}


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

void AggregateMessageSetElement::InitAsDefaultInstance() {
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_AggregateMessageSetElement.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.AggregateMessageSetElement)
}
AggregateMessageSetElement::AggregateMessageSetElement(const AggregateMessageSetElement& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _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() {
  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 {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const AggregateMessageSetElement& AggregateMessageSetElement::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_AggregateMessageSetElement.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    s_.ClearNonDefaultToEmptyNoArena();
  }
  _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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_s()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->s().data(), static_cast<int>(this->s().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "protobuf_unittest.AggregateMessageSetElement.s");
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string s = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->s().data(), static_cast<int>(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(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string s = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->s().data(), static_cast<int>(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(
        _internal_metadata_.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(
        _internal_metadata_.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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  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) {
  using std::swap;
  s_.Swap(&other->s_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

void Aggregate::InitAsDefaultInstance() {
  ::protobuf_unittest::_Aggregate_default_instance_._instance.get_mutable()->sub_ = const_cast< ::protobuf_unittest::Aggregate*>(
      ::protobuf_unittest::Aggregate::internal_default_instance());
  ::protobuf_unittest::_Aggregate_default_instance_._instance.get_mutable()->file_ = const_cast< ::google::protobuf::FileOptions*>(
      ::google::protobuf::FileOptions::internal_default_instance());
  ::protobuf_unittest::_Aggregate_default_instance_._instance.get_mutable()->mset_ = const_cast< ::protobuf_unittest::AggregateMessageSet*>(
      ::protobuf_unittest::AggregateMessageSet::internal_default_instance());
}
void Aggregate::clear_file() {
  if (file_ != NULL) file_->Clear();
  clear_has_file();
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_Aggregate.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.Aggregate)
}
Aggregate::Aggregate(const Aggregate& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _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() {
  s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&sub_, 0, static_cast<size_t>(
      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 {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const Aggregate& Aggregate::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_Aggregate.base);
  return *internal_default_instance();
}


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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 15u) {
    if (cached_has_bits & 0x00000001u) {
      s_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(sub_ != NULL);
      sub_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(file_ != NULL);
      file_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(mset_ != NULL);
      mset_->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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          set_has_i();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &i_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string s = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_s()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->s().data(), static_cast<int>(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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_sub()));
        } else {
          goto handle_unusual;
        }
        break;
      }

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

      // optional .protobuf_unittest.AggregateMessageSet mset = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_mset()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional string s = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->s().data(), static_cast<int>(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 (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->_internal_sub(), output);
  }

  // optional .google.protobuf.FileOptions file = 4;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, this->_internal_file(), output);
  }

  // optional .protobuf_unittest.AggregateMessageSet mset = 5;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, this->_internal_mset(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional string s = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->s().data(), static_cast<int>(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 (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->_internal_sub(), deterministic, target);
  }

  // optional .google.protobuf.FileOptions file = 4;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, this->_internal_file(), deterministic, target);
  }

  // optional .protobuf_unittest.AggregateMessageSet mset = 5;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, this->_internal_mset(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.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::MessageSize(
          *sub_);
    }

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

    // optional .protobuf_unittest.AggregateMessageSet mset = 5;
    if (has_mset()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 31u) {
    if (cached_has_bits & 0x00000001u) {
      set_has_s();
      s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_sub()->::protobuf_unittest::Aggregate::MergeFrom(from.sub());
    }
    if (cached_has_bits & 0x00000004u) {
      mutable_file()->::google::protobuf::FileOptions::MergeFrom(from.file());
    }
    if (cached_has_bits & 0x00000008u) {
      mutable_mset()->::protobuf_unittest::AggregateMessageSet::MergeFrom(from.mset());
    }
    if (cached_has_bits & 0x00000010u) {
      i_ = from.i_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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) {
  using std::swap;
  s_.Swap(&other->s_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(sub_, other->sub_);
  swap(file_, other->file_);
  swap(mset_, other->mset_);
  swap(i_, other->i_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

void AggregateMessage::InitAsDefaultInstance() {
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_AggregateMessage.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.AggregateMessage)
}
AggregateMessage::AggregateMessage(const AggregateMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  fieldname_ = from.fieldname_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.AggregateMessage)
}

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

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

void AggregateMessage::SharedDtor() {
}

void AggregateMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const AggregateMessage& AggregateMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_AggregateMessage.base);
  return *internal_default_instance();
}


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

  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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          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) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  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) {
  using std::swap;
  swap(fieldname_, other->fieldname_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

void NestedOptionType_NestedMessage::InitAsDefaultInstance() {
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_NestedOptionType_NestedMessage.base);
  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_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  nested_field_ = from.nested_field_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.NestedOptionType.NestedMessage)
}

void NestedOptionType_NestedMessage::SharedCtor() {
  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 {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const NestedOptionType_NestedMessage& NestedOptionType_NestedMessage::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_NestedOptionType_NestedMessage.base);
  return *internal_default_instance();
}


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

  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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          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) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  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) {
  using std::swap;
  swap(nested_field_, other->nested_field_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

NestedOptionType::NestedOptionType()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_NestedOptionType.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.NestedOptionType)
}
NestedOptionType::NestedOptionType(const NestedOptionType& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.NestedOptionType)
}

void NestedOptionType::SharedCtor() {
}

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

void NestedOptionType::SharedDtor() {
}

void NestedOptionType::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const NestedOptionType& NestedOptionType::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_NestedOptionType.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

void OldOptionType::InitAsDefaultInstance() {
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_OldOptionType.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.OldOptionType)
}
OldOptionType::OldOptionType(const OldOptionType& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  value_ = from.value_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.OldOptionType)
}

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

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

void OldOptionType::SharedDtor() {
}

void OldOptionType::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const OldOptionType& OldOptionType::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_OldOptionType.base);
  return *internal_default_instance();
}


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

  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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::OldOptionType_TestEnum_IsValid(value)) {
            set_value(static_cast< ::protobuf_unittest::OldOptionType_TestEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                1, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required .protobuf_unittest.OldOptionType.TestEnum value = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->value(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required .protobuf_unittest.OldOptionType.TestEnum value = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->value(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  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) {
  using std::swap;
  swap(value_, other->value_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

void NewOptionType::InitAsDefaultInstance() {
}
#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) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_NewOptionType.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.NewOptionType)
}
NewOptionType::NewOptionType(const NewOptionType& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  value_ = from.value_;
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.NewOptionType)
}

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

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

void NewOptionType::SharedDtor() {
}

void NewOptionType::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const NewOptionType& NewOptionType::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_NewOptionType.base);
  return *internal_default_instance();
}


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

  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 (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::protobuf_unittest::NewOptionType_TestEnum_IsValid(value)) {
            set_value(static_cast< ::protobuf_unittest::NewOptionType_TestEnum >(value));
          } else {
            mutable_unknown_fields()->AddVarint(
                1, static_cast< ::google::protobuf::uint64>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required .protobuf_unittest.NewOptionType.TestEnum value = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->value(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required .protobuf_unittest.NewOptionType.TestEnum value = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->value(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.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);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  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) {
  using std::swap;
  swap(value_, other->value_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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

TestMessageWithRequiredEnumOption::TestMessageWithRequiredEnumOption()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_TestMessageWithRequiredEnumOption.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:protobuf_unittest.TestMessageWithRequiredEnumOption)
}
TestMessageWithRequiredEnumOption::TestMessageWithRequiredEnumOption(const TestMessageWithRequiredEnumOption& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMessageWithRequiredEnumOption)
}

void TestMessageWithRequiredEnumOption::SharedCtor() {
}

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

void TestMessageWithRequiredEnumOption::SharedDtor() {
}

void TestMessageWithRequiredEnumOption::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
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[kIndexInFileMessages].descriptor;
}

const TestMessageWithRequiredEnumOption& TestMessageWithRequiredEnumOption::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::scc_info_TestMessageWithRequiredEnumOption.base);
  return *internal_default_instance();
}


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

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

bool 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) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, _internal_metadata_.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:protobuf_unittest.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)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.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(
        _internal_metadata_.unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  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_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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) {
  using std::swap;
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::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[kIndexInFileMessages];
}


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

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
namespace google {
namespace protobuf {
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMessageWithCustomOptions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMessageWithCustomOptions >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::TestMessageWithCustomOptions >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::CustomOptionFooRequest* Arena::CreateMaybeMessage< ::protobuf_unittest::CustomOptionFooRequest >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::CustomOptionFooRequest >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::CustomOptionFooResponse* Arena::CreateMaybeMessage< ::protobuf_unittest::CustomOptionFooResponse >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::CustomOptionFooResponse >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::CustomOptionFooClientMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::CustomOptionFooClientMessage >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::CustomOptionFooClientMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::CustomOptionFooServerMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::CustomOptionFooServerMessage >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::CustomOptionFooServerMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::DummyMessageContainingEnum* Arena::CreateMaybeMessage< ::protobuf_unittest::DummyMessageContainingEnum >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::DummyMessageContainingEnum >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::DummyMessageInvalidAsOptionType* Arena::CreateMaybeMessage< ::protobuf_unittest::DummyMessageInvalidAsOptionType >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::DummyMessageInvalidAsOptionType >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::CustomOptionMinIntegerValues* Arena::CreateMaybeMessage< ::protobuf_unittest::CustomOptionMinIntegerValues >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::CustomOptionMinIntegerValues >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::CustomOptionMaxIntegerValues* Arena::CreateMaybeMessage< ::protobuf_unittest::CustomOptionMaxIntegerValues >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::CustomOptionMaxIntegerValues >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::CustomOptionOtherValues* Arena::CreateMaybeMessage< ::protobuf_unittest::CustomOptionOtherValues >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::CustomOptionOtherValues >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::SettingRealsFromPositiveInts* Arena::CreateMaybeMessage< ::protobuf_unittest::SettingRealsFromPositiveInts >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::SettingRealsFromPositiveInts >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::SettingRealsFromNegativeInts* Arena::CreateMaybeMessage< ::protobuf_unittest::SettingRealsFromNegativeInts >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::SettingRealsFromNegativeInts >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::ComplexOptionType1* Arena::CreateMaybeMessage< ::protobuf_unittest::ComplexOptionType1 >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::ComplexOptionType1 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* Arena::CreateMaybeMessage< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::ComplexOptionType2* Arena::CreateMaybeMessage< ::protobuf_unittest::ComplexOptionType2 >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::ComplexOptionType2 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* Arena::CreateMaybeMessage< ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5 >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::ComplexOptionType3* Arena::CreateMaybeMessage< ::protobuf_unittest::ComplexOptionType3 >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::ComplexOptionType3 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::ComplexOpt6* Arena::CreateMaybeMessage< ::protobuf_unittest::ComplexOpt6 >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::ComplexOpt6 >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::VariousComplexOptions* Arena::CreateMaybeMessage< ::protobuf_unittest::VariousComplexOptions >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::VariousComplexOptions >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::AggregateMessageSet* Arena::CreateMaybeMessage< ::protobuf_unittest::AggregateMessageSet >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::AggregateMessageSet >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::AggregateMessageSetElement* Arena::CreateMaybeMessage< ::protobuf_unittest::AggregateMessageSetElement >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::AggregateMessageSetElement >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::Aggregate* Arena::CreateMaybeMessage< ::protobuf_unittest::Aggregate >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::Aggregate >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::AggregateMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::AggregateMessage >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::AggregateMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::NestedOptionType_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::NestedOptionType_NestedMessage >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::NestedOptionType_NestedMessage >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::NestedOptionType* Arena::CreateMaybeMessage< ::protobuf_unittest::NestedOptionType >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::NestedOptionType >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::OldOptionType* Arena::CreateMaybeMessage< ::protobuf_unittest::OldOptionType >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::OldOptionType >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::NewOptionType* Arena::CreateMaybeMessage< ::protobuf_unittest::NewOptionType >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::NewOptionType >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMessageWithRequiredEnumOption* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMessageWithRequiredEnumOption >(Arena* arena) {
  return Arena::CreateInternal< ::protobuf_unittest::TestMessageWithRequiredEnumOption >(arena);
}
}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)
