text:
namespace protobuf_unittest {

// Internal implementation detail -- do not call these.
void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

class TestMessageWithCustomOptions;
class CustomOptionFooRequest;
class CustomOptionFooResponse;
class CustomOptionFooClientMessage;
class CustomOptionFooServerMessage;
class DummyMessageContainingEnum;
class DummyMessageInvalidAsOptionType;
class CustomOptionMinIntegerValues;
class CustomOptionMaxIntegerValues;
class CustomOptionOtherValues;
class SettingRealsFromPositiveInts;
class SettingRealsFromNegativeInts;
class ComplexOptionType1;
class ComplexOptionType2;
class ComplexOptionType2_ComplexOptionType4;
class ComplexOptionType3;
class ComplexOptionType3_ComplexOptionType5;
class ComplexOpt6;
class VariousComplexOptions;
class AggregateMessageSet;
class AggregateMessageSetElement;
class Aggregate;
class AggregateMessage;
class NestedOptionType;
class NestedOptionType_NestedMessage;

enum TestMessageWithCustomOptions_AnEnum {
  TestMessageWithCustomOptions_AnEnum_ANENUM_VAL1 = 1,
  TestMessageWithCustomOptions_AnEnum_ANENUM_VAL2 = 2
};
bool TestMessageWithCustomOptions_AnEnum_IsValid(int value);
const TestMessageWithCustomOptions_AnEnum TestMessageWithCustomOptions_AnEnum_AnEnum_MIN = TestMessageWithCustomOptions_AnEnum_ANENUM_VAL1;
const TestMessageWithCustomOptions_AnEnum TestMessageWithCustomOptions_AnEnum_AnEnum_MAX = TestMessageWithCustomOptions_AnEnum_ANENUM_VAL2;
const int TestMessageWithCustomOptions_AnEnum_AnEnum_ARRAYSIZE = TestMessageWithCustomOptions_AnEnum_AnEnum_MAX + 1;

const ::google::protobuf::EnumDescriptor* TestMessageWithCustomOptions_AnEnum_descriptor();
inline const ::std::string& TestMessageWithCustomOptions_AnEnum_Name(TestMessageWithCustomOptions_AnEnum value) {
  return ::google::protobuf::internal::NameOfEnum(
    TestMessageWithCustomOptions_AnEnum_descriptor(), value);
}
inline bool TestMessageWithCustomOptions_AnEnum_Parse(
    const ::std::string& name, TestMessageWithCustomOptions_AnEnum* value) {
  return ::google::protobuf::internal::ParseNamedEnum<TestMessageWithCustomOptions_AnEnum>(
    TestMessageWithCustomOptions_AnEnum_descriptor(), name, value);
}
enum DummyMessageContainingEnum_TestEnumType {
  DummyMessageContainingEnum_TestEnumType_TEST_OPTION_ENUM_TYPE1 = 22,
  DummyMessageContainingEnum_TestEnumType_TEST_OPTION_ENUM_TYPE2 = -23
};
bool DummyMessageContainingEnum_TestEnumType_IsValid(int value);
const DummyMessageContainingEnum_TestEnumType DummyMessageContainingEnum_TestEnumType_TestEnumType_MIN = DummyMessageContainingEnum_TestEnumType_TEST_OPTION_ENUM_TYPE2;
const DummyMessageContainingEnum_TestEnumType DummyMessageContainingEnum_TestEnumType_TestEnumType_MAX = DummyMessageContainingEnum_TestEnumType_TEST_OPTION_ENUM_TYPE1;
const int DummyMessageContainingEnum_TestEnumType_TestEnumType_ARRAYSIZE = DummyMessageContainingEnum_TestEnumType_TestEnumType_MAX + 1;

const ::google::protobuf::EnumDescriptor* DummyMessageContainingEnum_TestEnumType_descriptor();
inline const ::std::string& DummyMessageContainingEnum_TestEnumType_Name(DummyMessageContainingEnum_TestEnumType value) {
  return ::google::protobuf::internal::NameOfEnum(
    DummyMessageContainingEnum_TestEnumType_descriptor(), value);
}
inline bool DummyMessageContainingEnum_TestEnumType_Parse(
    const ::std::string& name, DummyMessageContainingEnum_TestEnumType* value) {
  return ::google::protobuf::internal::ParseNamedEnum<DummyMessageContainingEnum_TestEnumType>(
    DummyMessageContainingEnum_TestEnumType_descriptor(), name, value);
}
enum NestedOptionType_NestedEnum {
  NestedOptionType_NestedEnum_NESTED_ENUM_VALUE = 1
};
bool NestedOptionType_NestedEnum_IsValid(int value);
const NestedOptionType_NestedEnum NestedOptionType_NestedEnum_NestedEnum_MIN = NestedOptionType_NestedEnum_NESTED_ENUM_VALUE;
const NestedOptionType_NestedEnum NestedOptionType_NestedEnum_NestedEnum_MAX = NestedOptionType_NestedEnum_NESTED_ENUM_VALUE;
const int NestedOptionType_NestedEnum_NestedEnum_ARRAYSIZE = NestedOptionType_NestedEnum_NestedEnum_MAX + 1;

const ::google::protobuf::EnumDescriptor* NestedOptionType_NestedEnum_descriptor();
inline const ::std::string& NestedOptionType_NestedEnum_Name(NestedOptionType_NestedEnum value) {
  return ::google::protobuf::internal::NameOfEnum(
    NestedOptionType_NestedEnum_descriptor(), value);
}
inline bool NestedOptionType_NestedEnum_Parse(
    const ::std::string& name, NestedOptionType_NestedEnum* value) {
  return ::google::protobuf::internal::ParseNamedEnum<NestedOptionType_NestedEnum>(
    NestedOptionType_NestedEnum_descriptor(), name, value);
}
enum MethodOpt1 {
  METHODOPT1_VAL1 = 1,
  METHODOPT1_VAL2 = 2
};
bool MethodOpt1_IsValid(int value);
const MethodOpt1 MethodOpt1_MIN = METHODOPT1_VAL1;
const MethodOpt1 MethodOpt1_MAX = METHODOPT1_VAL2;
const int MethodOpt1_ARRAYSIZE = MethodOpt1_MAX + 1;

const ::google::protobuf::EnumDescriptor* MethodOpt1_descriptor();
inline const ::std::string& MethodOpt1_Name(MethodOpt1 value) {
  return ::google::protobuf::internal::NameOfEnum(
    MethodOpt1_descriptor(), value);
}
inline bool MethodOpt1_Parse(
    const ::std::string& name, MethodOpt1* value) {
  return ::google::protobuf::internal::ParseNamedEnum<MethodOpt1>(
    MethodOpt1_descriptor(), name, value);
}
enum AggregateEnum {
  VALUE = 1
};
bool AggregateEnum_IsValid(int value);
const AggregateEnum AggregateEnum_MIN = VALUE;
const AggregateEnum AggregateEnum_MAX = VALUE;
const int AggregateEnum_ARRAYSIZE = AggregateEnum_MAX + 1;

const ::google::protobuf::EnumDescriptor* AggregateEnum_descriptor();
inline const ::std::string& AggregateEnum_Name(AggregateEnum value) {
  return ::google::protobuf::internal::NameOfEnum(
    AggregateEnum_descriptor(), value);
}
inline bool AggregateEnum_Parse(
    const ::std::string& name, AggregateEnum* value) {
  return ::google::protobuf::internal::ParseNamedEnum<AggregateEnum>(
    AggregateEnum_descriptor(), name, value);
}
// ===================================================================

class TestMessageWithCustomOptions : public ::google::protobuf::Message {
 public:
  TestMessageWithCustomOptions();
  virtual ~TestMessageWithCustomOptions();

  TestMessageWithCustomOptions(const TestMessageWithCustomOptions& from);

  inline TestMessageWithCustomOptions& operator=(const TestMessageWithCustomOptions& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const TestMessageWithCustomOptions& default_instance();

  void Swap(TestMessageWithCustomOptions* other);

  // implements Message ----------------------------------------------

  TestMessageWithCustomOptions* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const TestMessageWithCustomOptions& from);
  void MergeFrom(const TestMessageWithCustomOptions& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  typedef TestMessageWithCustomOptions_AnEnum AnEnum;
  static const AnEnum ANENUM_VAL1 = TestMessageWithCustomOptions_AnEnum_ANENUM_VAL1;
  static const AnEnum ANENUM_VAL2 = TestMessageWithCustomOptions_AnEnum_ANENUM_VAL2;
  static inline bool AnEnum_IsValid(int value) {
    return TestMessageWithCustomOptions_AnEnum_IsValid(value);
  }
  static const AnEnum AnEnum_MIN =
    TestMessageWithCustomOptions_AnEnum_AnEnum_MIN;
  static const AnEnum AnEnum_MAX =
    TestMessageWithCustomOptions_AnEnum_AnEnum_MAX;
  static const int AnEnum_ARRAYSIZE =
    TestMessageWithCustomOptions_AnEnum_AnEnum_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor*
  AnEnum_descriptor() {
    return TestMessageWithCustomOptions_AnEnum_descriptor();
  }
  static inline const ::std::string& AnEnum_Name(AnEnum value) {
    return TestMessageWithCustomOptions_AnEnum_Name(value);
  }
  static inline bool AnEnum_Parse(const ::std::string& name,
      AnEnum* value) {
    return TestMessageWithCustomOptions_AnEnum_Parse(name, value);
  }

  // accessors -------------------------------------------------------

  // optional string field1 = 1 [ctype = CORD];
  inline bool has_field1() const;
  inline void clear_field1();
  static const int kField1FieldNumber = 1;
 private:
  // Hidden due to unknown ctype option.
  inline const ::std::string& field1() const;
  inline void set_field1(const ::std::string& value);
  inline void set_field1(const char* value);
  inline void set_field1(const char* value, size_t size);
  inline ::std::string* mutable_field1();
  inline ::std::string* release_field1();
  inline void set_allocated_field1(::std::string* field1);
 public:

  // @@protoc_insertion_point(class_scope:protobuf_unittest.TestMessageWithCustomOptions)
 private:
  inline void set_has_field1();
  inline void clear_has_field1();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::std::string* field1_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static TestMessageWithCustomOptions* default_instance_;
};
// -------------------------------------------------------------------

class CustomOptionFooRequest : public ::google::protobuf::Message {
 public:
  CustomOptionFooRequest();
  virtual ~CustomOptionFooRequest();

  CustomOptionFooRequest(const CustomOptionFooRequest& from);

  inline CustomOptionFooRequest& operator=(const CustomOptionFooRequest& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const CustomOptionFooRequest& default_instance();

  void Swap(CustomOptionFooRequest* other);

  // implements Message ----------------------------------------------

  CustomOptionFooRequest* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const CustomOptionFooRequest& from);
  void MergeFrom(const CustomOptionFooRequest& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.CustomOptionFooRequest)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static CustomOptionFooRequest* default_instance_;
};
// -------------------------------------------------------------------

class CustomOptionFooResponse : public ::google::protobuf::Message {
 public:
  CustomOptionFooResponse();
  virtual ~CustomOptionFooResponse();

  CustomOptionFooResponse(const CustomOptionFooResponse& from);

  inline CustomOptionFooResponse& operator=(const CustomOptionFooResponse& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const CustomOptionFooResponse& default_instance();

  void Swap(CustomOptionFooResponse* other);

  // implements Message ----------------------------------------------

  CustomOptionFooResponse* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const CustomOptionFooResponse& from);
  void MergeFrom(const CustomOptionFooResponse& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.CustomOptionFooResponse)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static CustomOptionFooResponse* default_instance_;
};
// -------------------------------------------------------------------

class CustomOptionFooClientMessage : public ::google::protobuf::Message {
 public:
  CustomOptionFooClientMessage();
  virtual ~CustomOptionFooClientMessage();

  CustomOptionFooClientMessage(const CustomOptionFooClientMessage& from);

  inline CustomOptionFooClientMessage& operator=(const CustomOptionFooClientMessage& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const CustomOptionFooClientMessage& default_instance();

  void Swap(CustomOptionFooClientMessage* other);

  // implements Message ----------------------------------------------

  CustomOptionFooClientMessage* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const CustomOptionFooClientMessage& from);
  void MergeFrom(const CustomOptionFooClientMessage& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.CustomOptionFooClientMessage)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static CustomOptionFooClientMessage* default_instance_;
};
// -------------------------------------------------------------------

class CustomOptionFooServerMessage : public ::google::protobuf::Message {
 public:
  CustomOptionFooServerMessage();
  virtual ~CustomOptionFooServerMessage();

  CustomOptionFooServerMessage(const CustomOptionFooServerMessage& from);

  inline CustomOptionFooServerMessage& operator=(const CustomOptionFooServerMessage& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const CustomOptionFooServerMessage& default_instance();

  void Swap(CustomOptionFooServerMessage* other);

  // implements Message ----------------------------------------------

  CustomOptionFooServerMessage* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const CustomOptionFooServerMessage& from);
  void MergeFrom(const CustomOptionFooServerMessage& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.CustomOptionFooServerMessage)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static CustomOptionFooServerMessage* default_instance_;
};
// -------------------------------------------------------------------

class DummyMessageContainingEnum : public ::google::protobuf::Message {
 public:
  DummyMessageContainingEnum();
  virtual ~DummyMessageContainingEnum();

  DummyMessageContainingEnum(const DummyMessageContainingEnum& from);

  inline DummyMessageContainingEnum& operator=(const DummyMessageContainingEnum& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const DummyMessageContainingEnum& default_instance();

  void Swap(DummyMessageContainingEnum* other);

  // implements Message ----------------------------------------------

  DummyMessageContainingEnum* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const DummyMessageContainingEnum& from);
  void MergeFrom(const DummyMessageContainingEnum& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  typedef DummyMessageContainingEnum_TestEnumType TestEnumType;
  static const TestEnumType TEST_OPTION_ENUM_TYPE1 = DummyMessageContainingEnum_TestEnumType_TEST_OPTION_ENUM_TYPE1;
  static const TestEnumType TEST_OPTION_ENUM_TYPE2 = DummyMessageContainingEnum_TestEnumType_TEST_OPTION_ENUM_TYPE2;
  static inline bool TestEnumType_IsValid(int value) {
    return DummyMessageContainingEnum_TestEnumType_IsValid(value);
  }
  static const TestEnumType TestEnumType_MIN =
    DummyMessageContainingEnum_TestEnumType_TestEnumType_MIN;
  static const TestEnumType TestEnumType_MAX =
    DummyMessageContainingEnum_TestEnumType_TestEnumType_MAX;
  static const int TestEnumType_ARRAYSIZE =
    DummyMessageContainingEnum_TestEnumType_TestEnumType_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor*
  TestEnumType_descriptor() {
    return DummyMessageContainingEnum_TestEnumType_descriptor();
  }
  static inline const ::std::string& TestEnumType_Name(TestEnumType value) {
    return DummyMessageContainingEnum_TestEnumType_Name(value);
  }
  static inline bool TestEnumType_Parse(const ::std::string& name,
      TestEnumType* value) {
    return DummyMessageContainingEnum_TestEnumType_Parse(name, value);
  }

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.DummyMessageContainingEnum)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static DummyMessageContainingEnum* default_instance_;
};
// -------------------------------------------------------------------

class DummyMessageInvalidAsOptionType : public ::google::protobuf::Message {
 public:
  DummyMessageInvalidAsOptionType();
  virtual ~DummyMessageInvalidAsOptionType();

  DummyMessageInvalidAsOptionType(const DummyMessageInvalidAsOptionType& from);

  inline DummyMessageInvalidAsOptionType& operator=(const DummyMessageInvalidAsOptionType& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const DummyMessageInvalidAsOptionType& default_instance();

  void Swap(DummyMessageInvalidAsOptionType* other);

  // implements Message ----------------------------------------------

  DummyMessageInvalidAsOptionType* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const DummyMessageInvalidAsOptionType& from);
  void MergeFrom(const DummyMessageInvalidAsOptionType& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.DummyMessageInvalidAsOptionType)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static DummyMessageInvalidAsOptionType* default_instance_;
};
// -------------------------------------------------------------------

class CustomOptionMinIntegerValues : public ::google::protobuf::Message {
 public:
  CustomOptionMinIntegerValues();
  virtual ~CustomOptionMinIntegerValues();

  CustomOptionMinIntegerValues(const CustomOptionMinIntegerValues& from);

  inline CustomOptionMinIntegerValues& operator=(const CustomOptionMinIntegerValues& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const CustomOptionMinIntegerValues& default_instance();

  void Swap(CustomOptionMinIntegerValues* other);

  // implements Message ----------------------------------------------

  CustomOptionMinIntegerValues* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const CustomOptionMinIntegerValues& from);
  void MergeFrom(const CustomOptionMinIntegerValues& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.CustomOptionMinIntegerValues)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static CustomOptionMinIntegerValues* default_instance_;
};
// -------------------------------------------------------------------

class CustomOptionMaxIntegerValues : public ::google::protobuf::Message {
 public:
  CustomOptionMaxIntegerValues();
  virtual ~CustomOptionMaxIntegerValues();

  CustomOptionMaxIntegerValues(const CustomOptionMaxIntegerValues& from);

  inline CustomOptionMaxIntegerValues& operator=(const CustomOptionMaxIntegerValues& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const CustomOptionMaxIntegerValues& default_instance();

  void Swap(CustomOptionMaxIntegerValues* other);

  // implements Message ----------------------------------------------

  CustomOptionMaxIntegerValues* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const CustomOptionMaxIntegerValues& from);
  void MergeFrom(const CustomOptionMaxIntegerValues& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.CustomOptionMaxIntegerValues)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static CustomOptionMaxIntegerValues* default_instance_;
};
// -------------------------------------------------------------------

class CustomOptionOtherValues : public ::google::protobuf::Message {
 public:
  CustomOptionOtherValues();
  virtual ~CustomOptionOtherValues();

  CustomOptionOtherValues(const CustomOptionOtherValues& from);

  inline CustomOptionOtherValues& operator=(const CustomOptionOtherValues& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const CustomOptionOtherValues& default_instance();

  void Swap(CustomOptionOtherValues* other);

  // implements Message ----------------------------------------------

  CustomOptionOtherValues* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const CustomOptionOtherValues& from);
  void MergeFrom(const CustomOptionOtherValues& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.CustomOptionOtherValues)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static CustomOptionOtherValues* default_instance_;
};
// -------------------------------------------------------------------

class SettingRealsFromPositiveInts : public ::google::protobuf::Message {
 public:
  SettingRealsFromPositiveInts();
  virtual ~SettingRealsFromPositiveInts();

  SettingRealsFromPositiveInts(const SettingRealsFromPositiveInts& from);

  inline SettingRealsFromPositiveInts& operator=(const SettingRealsFromPositiveInts& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const SettingRealsFromPositiveInts& default_instance();

  void Swap(SettingRealsFromPositiveInts* other);

  // implements Message ----------------------------------------------

  SettingRealsFromPositiveInts* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const SettingRealsFromPositiveInts& from);
  void MergeFrom(const SettingRealsFromPositiveInts& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.SettingRealsFromPositiveInts)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static SettingRealsFromPositiveInts* default_instance_;
};
// -------------------------------------------------------------------

class SettingRealsFromNegativeInts : public ::google::protobuf::Message {
 public:
  SettingRealsFromNegativeInts();
  virtual ~SettingRealsFromNegativeInts();

  SettingRealsFromNegativeInts(const SettingRealsFromNegativeInts& from);

  inline SettingRealsFromNegativeInts& operator=(const SettingRealsFromNegativeInts& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const SettingRealsFromNegativeInts& default_instance();

  void Swap(SettingRealsFromNegativeInts* other);

  // implements Message ----------------------------------------------

  SettingRealsFromNegativeInts* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const SettingRealsFromNegativeInts& from);
  void MergeFrom(const SettingRealsFromNegativeInts& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.SettingRealsFromNegativeInts)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static SettingRealsFromNegativeInts* default_instance_;
};
// -------------------------------------------------------------------

class ComplexOptionType1 : public ::google::protobuf::Message {
 public:
  ComplexOptionType1();
  virtual ~ComplexOptionType1();

  ComplexOptionType1(const ComplexOptionType1& from);

  inline ComplexOptionType1& operator=(const ComplexOptionType1& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const ComplexOptionType1& default_instance();

  void Swap(ComplexOptionType1* other);

  // implements Message ----------------------------------------------

  ComplexOptionType1* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const ComplexOptionType1& from);
  void MergeFrom(const ComplexOptionType1& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional int32 foo = 1;
  inline bool has_foo() const;
  inline void clear_foo();
  static const int kFooFieldNumber = 1;
  inline ::google::protobuf::int32 foo() const;
  inline void set_foo(::google::protobuf::int32 value);

  // optional int32 foo2 = 2;
  inline bool has_foo2() const;
  inline void clear_foo2();
  static const int kFoo2FieldNumber = 2;
  inline ::google::protobuf::int32 foo2() const;
  inline void set_foo2(::google::protobuf::int32 value);

  // optional int32 foo3 = 3;
  inline bool has_foo3() const;
  inline void clear_foo3();
  static const int kFoo3FieldNumber = 3;
  inline ::google::protobuf::int32 foo3() const;
  inline void set_foo3(::google::protobuf::int32 value);

  // repeated int32 foo4 = 4;
  inline int foo4_size() const;
  inline void clear_foo4();
  static const int kFoo4FieldNumber = 4;
  inline ::google::protobuf::int32 foo4(int index) const;
  inline void set_foo4(int index, ::google::protobuf::int32 value);
  inline void add_foo4(::google::protobuf::int32 value);
  inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
      foo4() const;
  inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
      mutable_foo4();

  GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ComplexOptionType1)
  // @@protoc_insertion_point(class_scope:protobuf_unittest.ComplexOptionType1)
 private:
  inline void set_has_foo();
  inline void clear_has_foo();
  inline void set_has_foo2();
  inline void clear_has_foo2();
  inline void set_has_foo3();
  inline void clear_has_foo3();

  ::google::protobuf::internal::ExtensionSet _extensions_;

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::google::protobuf::int32 foo_;
  ::google::protobuf::int32 foo2_;
  ::google::protobuf::RepeatedField< ::google::protobuf::int32 > foo4_;
  ::google::protobuf::int32 foo3_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static ComplexOptionType1* default_instance_;
};
// -------------------------------------------------------------------

class ComplexOptionType2_ComplexOptionType4 : public ::google::protobuf::Message {
 public:
  ComplexOptionType2_ComplexOptionType4();
  virtual ~ComplexOptionType2_ComplexOptionType4();

  ComplexOptionType2_ComplexOptionType4(const ComplexOptionType2_ComplexOptionType4& from);

  inline ComplexOptionType2_ComplexOptionType4& operator=(const ComplexOptionType2_ComplexOptionType4& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const ComplexOptionType2_ComplexOptionType4& default_instance();

  void Swap(ComplexOptionType2_ComplexOptionType4* other);

  // implements Message ----------------------------------------------

  ComplexOptionType2_ComplexOptionType4* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const ComplexOptionType2_ComplexOptionType4& from);
  void MergeFrom(const ComplexOptionType2_ComplexOptionType4& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional int32 waldo = 1;
  inline bool has_waldo() const;
  inline void clear_waldo();
  static const int kWaldoFieldNumber = 1;
  inline ::google::protobuf::int32 waldo() const;
  inline void set_waldo(::google::protobuf::int32 value);

  static const int kComplexOpt4FieldNumber = 7633546;
  static ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
      ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 >, 11, false >
    complex_opt4;
  // @@protoc_insertion_point(class_scope:protobuf_unittest.ComplexOptionType2.ComplexOptionType4)
 private:
  inline void set_has_waldo();
  inline void clear_has_waldo();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::google::protobuf::int32 waldo_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static ComplexOptionType2_ComplexOptionType4* default_instance_;
};
// -------------------------------------------------------------------

class ComplexOptionType2 : public ::google::protobuf::Message {
 public:
  ComplexOptionType2();
  virtual ~ComplexOptionType2();

  ComplexOptionType2(const ComplexOptionType2& from);

  inline ComplexOptionType2& operator=(const ComplexOptionType2& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const ComplexOptionType2& default_instance();

  void Swap(ComplexOptionType2* other);

  // implements Message ----------------------------------------------

  ComplexOptionType2* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const ComplexOptionType2& from);
  void MergeFrom(const ComplexOptionType2& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  typedef ComplexOptionType2_ComplexOptionType4 ComplexOptionType4;

  // accessors -------------------------------------------------------

  // optional .protobuf_unittest.ComplexOptionType1 bar = 1;
  inline bool has_bar() const;
  inline void clear_bar();
  static const int kBarFieldNumber = 1;
  inline const ::protobuf_unittest::ComplexOptionType1& bar() const;
  inline ::protobuf_unittest::ComplexOptionType1* mutable_bar();
  inline ::protobuf_unittest::ComplexOptionType1* release_bar();
  inline void set_allocated_bar(::protobuf_unittest::ComplexOptionType1* bar);

  // optional int32 baz = 2;
  inline bool has_baz() const;
  inline void clear_baz();
  static const int kBazFieldNumber = 2;
  inline ::google::protobuf::int32 baz() const;
  inline void set_baz(::google::protobuf::int32 value);

  // optional .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 fred = 3;
  inline bool has_fred() const;
  inline void clear_fred();
  static const int kFredFieldNumber = 3;
  inline const ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4& fred() const;
  inline ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* mutable_fred();
  inline ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* release_fred();
  inline void set_allocated_fred(::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* fred);

  // repeated .protobuf_unittest.ComplexOptionType2.ComplexOptionType4 barney = 4;
  inline int barney_size() const;
  inline void clear_barney();
  static const int kBarneyFieldNumber = 4;
  inline const ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4& barney(int index) const;
  inline ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* mutable_barney(int index);
  inline ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* add_barney();
  inline const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 >&
      barney() const;
  inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 >*
      mutable_barney();

  GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ComplexOptionType2)
  // @@protoc_insertion_point(class_scope:protobuf_unittest.ComplexOptionType2)
 private:
  inline void set_has_bar();
  inline void clear_has_bar();
  inline void set_has_baz();
  inline void clear_has_baz();
  inline void set_has_fred();
  inline void clear_has_fred();

  ::google::protobuf::internal::ExtensionSet _extensions_;

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::protobuf_unittest::ComplexOptionType1* bar_;
  ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* fred_;
  ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 > barney_;
  ::google::protobuf::int32 baz_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static ComplexOptionType2* default_instance_;
};
// -------------------------------------------------------------------

class ComplexOptionType3_ComplexOptionType5 : public ::google::protobuf::Message {
 public:
  ComplexOptionType3_ComplexOptionType5();
  virtual ~ComplexOptionType3_ComplexOptionType5();

  ComplexOptionType3_ComplexOptionType5(const ComplexOptionType3_ComplexOptionType5& from);

  inline ComplexOptionType3_ComplexOptionType5& operator=(const ComplexOptionType3_ComplexOptionType5& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const ComplexOptionType3_ComplexOptionType5& default_instance();

  void Swap(ComplexOptionType3_ComplexOptionType5* other);

  // implements Message ----------------------------------------------

  ComplexOptionType3_ComplexOptionType5* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const ComplexOptionType3_ComplexOptionType5& from);
  void MergeFrom(const ComplexOptionType3_ComplexOptionType5& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional int32 plugh = 3;
  inline bool has_plugh() const;
  inline void clear_plugh();
  static const int kPlughFieldNumber = 3;
  inline ::google::protobuf::int32 plugh() const;
  inline void set_plugh(::google::protobuf::int32 value);

  // @@protoc_insertion_point(class_scope:protobuf_unittest.ComplexOptionType3.ComplexOptionType5)
 private:
  inline void set_has_plugh();
  inline void clear_has_plugh();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::google::protobuf::int32 plugh_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static ComplexOptionType3_ComplexOptionType5* default_instance_;
};
// -------------------------------------------------------------------

class ComplexOptionType3 : public ::google::protobuf::Message {
 public:
  ComplexOptionType3();
  virtual ~ComplexOptionType3();

  ComplexOptionType3(const ComplexOptionType3& from);

  inline ComplexOptionType3& operator=(const ComplexOptionType3& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const ComplexOptionType3& default_instance();

  void Swap(ComplexOptionType3* other);

  // implements Message ----------------------------------------------

  ComplexOptionType3* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const ComplexOptionType3& from);
  void MergeFrom(const ComplexOptionType3& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  typedef ComplexOptionType3_ComplexOptionType5 ComplexOptionType5;

  // accessors -------------------------------------------------------

  // optional int32 qux = 1;
  inline bool has_qux() const;
  inline void clear_qux();
  static const int kQuxFieldNumber = 1;
  inline ::google::protobuf::int32 qux() const;
  inline void set_qux(::google::protobuf::int32 value);

  // optional group ComplexOptionType5 = 2 {
  inline bool has_complexoptiontype5() const;
  inline void clear_complexoptiontype5();
  static const int kComplexoptiontype5FieldNumber = 2;
  inline const ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5& complexoptiontype5() const;
  inline ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* mutable_complexoptiontype5();
  inline ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* release_complexoptiontype5();
  inline void set_allocated_complexoptiontype5(::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* complexoptiontype5);

  // @@protoc_insertion_point(class_scope:protobuf_unittest.ComplexOptionType3)
 private:
  inline void set_has_qux();
  inline void clear_has_qux();
  inline void set_has_complexoptiontype5();
  inline void clear_has_complexoptiontype5();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* complexoptiontype5_;
  ::google::protobuf::int32 qux_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static ComplexOptionType3* default_instance_;
};
// -------------------------------------------------------------------

class ComplexOpt6 : public ::google::protobuf::Message {
 public:
  ComplexOpt6();
  virtual ~ComplexOpt6();

  ComplexOpt6(const ComplexOpt6& from);

  inline ComplexOpt6& operator=(const ComplexOpt6& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const ComplexOpt6& default_instance();

  void Swap(ComplexOpt6* other);

  // implements Message ----------------------------------------------

  ComplexOpt6* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const ComplexOpt6& from);
  void MergeFrom(const ComplexOpt6& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional int32 xyzzy = 7593951;
  inline bool has_xyzzy() const;
  inline void clear_xyzzy();
  static const int kXyzzyFieldNumber = 7593951;
  inline ::google::protobuf::int32 xyzzy() const;
  inline void set_xyzzy(::google::protobuf::int32 value);

  // @@protoc_insertion_point(class_scope:protobuf_unittest.ComplexOpt6)
 private:
  inline void set_has_xyzzy();
  inline void clear_has_xyzzy();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::google::protobuf::int32 xyzzy_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static ComplexOpt6* default_instance_;
};
// -------------------------------------------------------------------

class VariousComplexOptions : public ::google::protobuf::Message {
 public:
  VariousComplexOptions();
  virtual ~VariousComplexOptions();

  VariousComplexOptions(const VariousComplexOptions& from);

  inline VariousComplexOptions& operator=(const VariousComplexOptions& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const VariousComplexOptions& default_instance();

  void Swap(VariousComplexOptions* other);

  // implements Message ----------------------------------------------

  VariousComplexOptions* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const VariousComplexOptions& from);
  void MergeFrom(const VariousComplexOptions& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:protobuf_unittest.VariousComplexOptions)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static VariousComplexOptions* default_instance_;
};
// -------------------------------------------------------------------

class AggregateMessageSet : public ::google::protobuf::Message {
 public:
  AggregateMessageSet();
  virtual ~AggregateMessageSet();

  AggregateMessageSet(const AggregateMessageSet& from);

  inline AggregateMessageSet& operator=(const AggregateMessageSet& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const AggregateMessageSet& default_instance();

  void Swap(AggregateMessageSet* other);

  // implements Message ----------------------------------------------

  AggregateMessageSet* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const AggregateMessageSet& from);
  void MergeFrom(const AggregateMessageSet& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(AggregateMessageSet)
  // @@protoc_insertion_point(class_scope:protobuf_unittest.AggregateMessageSet)
 private:

  ::google::protobuf::internal::ExtensionSet _extensions_;

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static AggregateMessageSet* default_instance_;
};
// -------------------------------------------------------------------

class AggregateMessageSetElement : public ::google::protobuf::Message {
 public:
  AggregateMessageSetElement();
  virtual ~AggregateMessageSetElement();

  AggregateMessageSetElement(const AggregateMessageSetElement& from);

  inline AggregateMessageSetElement& operator=(const AggregateMessageSetElement& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const AggregateMessageSetElement& default_instance();

  void Swap(AggregateMessageSetElement* other);

  // implements Message ----------------------------------------------

  AggregateMessageSetElement* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const AggregateMessageSetElement& from);
  void MergeFrom(const AggregateMessageSetElement& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional string s = 1;
  inline bool has_s() const;
  inline void clear_s();
  static const int kSFieldNumber = 1;
  inline const ::std::string& s() const;
  inline void set_s(const ::std::string& value);
  inline void set_s(const char* value);
  inline void set_s(const char* value, size_t size);
  inline ::std::string* mutable_s();
  inline ::std::string* release_s();
  inline void set_allocated_s(::std::string* s);

  static const int kMessageSetExtensionFieldNumber = 15447542;
  static ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::AggregateMessageSet,
      ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::AggregateMessageSetElement >, 11, false >
    message_set_extension;
  // @@protoc_insertion_point(class_scope:protobuf_unittest.AggregateMessageSetElement)
 private:
  inline void set_has_s();
  inline void clear_has_s();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::std::string* s_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static AggregateMessageSetElement* default_instance_;
};
// -------------------------------------------------------------------

class Aggregate : public ::google::protobuf::Message {
 public:
  Aggregate();
  virtual ~Aggregate();

  Aggregate(const Aggregate& from);

  inline Aggregate& operator=(const Aggregate& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const Aggregate& default_instance();

  void Swap(Aggregate* other);

  // implements Message ----------------------------------------------

  Aggregate* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const Aggregate& from);
  void MergeFrom(const Aggregate& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional int32 i = 1;
  inline bool has_i() const;
  inline void clear_i();
  static const int kIFieldNumber = 1;
  inline ::google::protobuf::int32 i() const;
  inline void set_i(::google::protobuf::int32 value);

  // optional string s = 2;
  inline bool has_s() const;
  inline void clear_s();
  static const int kSFieldNumber = 2;
  inline const ::std::string& s() const;
  inline void set_s(const ::std::string& value);
  inline void set_s(const char* value);
  inline void set_s(const char* value, size_t size);
  inline ::std::string* mutable_s();
  inline ::std::string* release_s();
  inline void set_allocated_s(::std::string* s);

  // optional .protobuf_unittest.Aggregate sub = 3;
  inline bool has_sub() const;
  inline void clear_sub();
  static const int kSubFieldNumber = 3;
  inline const ::protobuf_unittest::Aggregate& sub() const;
  inline ::protobuf_unittest::Aggregate* mutable_sub();
  inline ::protobuf_unittest::Aggregate* release_sub();
  inline void set_allocated_sub(::protobuf_unittest::Aggregate* sub);

  // optional .google.protobuf.FileOptions file = 4;
  inline bool has_file() const;
  inline void clear_file();
  static const int kFileFieldNumber = 4;
  inline const ::google::protobuf::FileOptions& file() const;
  inline ::google::protobuf::FileOptions* mutable_file();
  inline ::google::protobuf::FileOptions* release_file();
  inline void set_allocated_file(::google::protobuf::FileOptions* file);

  // optional .protobuf_unittest.AggregateMessageSet mset = 5;
  inline bool has_mset() const;
  inline void clear_mset();
  static const int kMsetFieldNumber = 5;
  inline const ::protobuf_unittest::AggregateMessageSet& mset() const;
  inline ::protobuf_unittest::AggregateMessageSet* mutable_mset();
  inline ::protobuf_unittest::AggregateMessageSet* release_mset();
  inline void set_allocated_mset(::protobuf_unittest::AggregateMessageSet* mset);

  static const int kNestedFieldNumber = 15476903;
  static ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FileOptions,
      ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
    nested;
  // @@protoc_insertion_point(class_scope:protobuf_unittest.Aggregate)
 private:
  inline void set_has_i();
  inline void clear_has_i();
  inline void set_has_s();
  inline void clear_has_s();
  inline void set_has_sub();
  inline void clear_has_sub();
  inline void set_has_file();
  inline void clear_has_file();
  inline void set_has_mset();
  inline void clear_has_mset();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::std::string* s_;
  ::protobuf_unittest::Aggregate* sub_;
  ::google::protobuf::FileOptions* file_;
  ::protobuf_unittest::AggregateMessageSet* mset_;
  ::google::protobuf::int32 i_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static Aggregate* default_instance_;
};
// -------------------------------------------------------------------

class AggregateMessage : public ::google::protobuf::Message {
 public:
  AggregateMessage();
  virtual ~AggregateMessage();

  AggregateMessage(const AggregateMessage& from);

  inline AggregateMessage& operator=(const AggregateMessage& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const AggregateMessage& default_instance();

  void Swap(AggregateMessage* other);

  // implements Message ----------------------------------------------

  AggregateMessage* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const AggregateMessage& from);
  void MergeFrom(const AggregateMessage& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional int32 fieldname = 1;
  inline bool has_fieldname() const;
  inline void clear_fieldname();
  static const int kFieldnameFieldNumber = 1;
  inline ::google::protobuf::int32 fieldname() const;
  inline void set_fieldname(::google::protobuf::int32 value);

  // @@protoc_insertion_point(class_scope:protobuf_unittest.AggregateMessage)
 private:
  inline void set_has_fieldname();
  inline void clear_has_fieldname();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::google::protobuf::int32 fieldname_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static AggregateMessage* default_instance_;
};
// -------------------------------------------------------------------

class NestedOptionType_NestedMessage : public ::google::protobuf::Message {
 public:
  NestedOptionType_NestedMessage();
  virtual ~NestedOptionType_NestedMessage();

  NestedOptionType_NestedMessage(const NestedOptionType_NestedMessage& from);

  inline NestedOptionType_NestedMessage& operator=(const NestedOptionType_NestedMessage& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const NestedOptionType_NestedMessage& default_instance();

  void Swap(NestedOptionType_NestedMessage* other);

  // implements Message ----------------------------------------------

  NestedOptionType_NestedMessage* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const NestedOptionType_NestedMessage& from);
  void MergeFrom(const NestedOptionType_NestedMessage& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional int32 nested_field = 1;
  inline bool has_nested_field() const;
  inline void clear_nested_field();
  static const int kNestedFieldFieldNumber = 1;
  inline ::google::protobuf::int32 nested_field() const;
  inline void set_nested_field(::google::protobuf::int32 value);

  // @@protoc_insertion_point(class_scope:protobuf_unittest.NestedOptionType.NestedMessage)
 private:
  inline void set_has_nested_field();
  inline void clear_has_nested_field();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::google::protobuf::int32 nested_field_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static NestedOptionType_NestedMessage* default_instance_;
};
// -------------------------------------------------------------------

class NestedOptionType : public ::google::protobuf::Message {
 public:
  NestedOptionType();
  virtual ~NestedOptionType();

  NestedOptionType(const NestedOptionType& from);

  inline NestedOptionType& operator=(const NestedOptionType& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const NestedOptionType& default_instance();

  void Swap(NestedOptionType* other);

  // implements Message ----------------------------------------------

  NestedOptionType* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const NestedOptionType& from);
  void MergeFrom(const NestedOptionType& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  typedef NestedOptionType_NestedMessage NestedMessage;

  typedef NestedOptionType_NestedEnum NestedEnum;
  static const NestedEnum NESTED_ENUM_VALUE = NestedOptionType_NestedEnum_NESTED_ENUM_VALUE;
  static inline bool NestedEnum_IsValid(int value) {
    return NestedOptionType_NestedEnum_IsValid(value);
  }
  static const NestedEnum NestedEnum_MIN =
    NestedOptionType_NestedEnum_NestedEnum_MIN;
  static const NestedEnum NestedEnum_MAX =
    NestedOptionType_NestedEnum_NestedEnum_MAX;
  static const int NestedEnum_ARRAYSIZE =
    NestedOptionType_NestedEnum_NestedEnum_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor*
  NestedEnum_descriptor() {
    return NestedOptionType_NestedEnum_descriptor();
  }
  static inline const ::std::string& NestedEnum_Name(NestedEnum value) {
    return NestedOptionType_NestedEnum_Name(value);
  }
  static inline bool NestedEnum_Parse(const ::std::string& name,
      NestedEnum* value) {
    return NestedOptionType_NestedEnum_Parse(name, value);
  }

  // accessors -------------------------------------------------------

  static const int kNestedExtensionFieldNumber = 7912573;
  static ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FileOptions,
      ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
    nested_extension;
  // @@protoc_insertion_point(class_scope:protobuf_unittest.NestedOptionType)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto();

  void InitAsDefaultInstance();
  static NestedOptionType* default_instance_;
};
// ===================================================================

class TestServiceWithCustomOptions_Stub;

class TestServiceWithCustomOptions : public ::google::protobuf::Service {
 protected:
  // This class should be treated as an abstract interface.
  inline TestServiceWithCustomOptions() {};
 public:
  virtual ~TestServiceWithCustomOptions();

  typedef TestServiceWithCustomOptions_Stub Stub;

  static const ::google::protobuf::ServiceDescriptor* descriptor();

  virtual void Foo(::google::protobuf::RpcController* controller,
                       const ::protobuf_unittest::CustomOptionFooRequest* request,
                       ::protobuf_unittest::CustomOptionFooResponse* response,
                       ::google::protobuf::Closure* done);

  // implements Service ----------------------------------------------

  const ::google::protobuf::ServiceDescriptor* GetDescriptor();
  void CallMethod(const ::google::protobuf::MethodDescriptor* method,
                  ::google::protobuf::RpcController* controller,
                  const ::google::protobuf::Message* request,
                  ::google::protobuf::Message* response,
                  ::google::protobuf::Closure* done);
  const ::google::protobuf::Message& GetRequestPrototype(
    const ::google::protobuf::MethodDescriptor* method) const;
  const ::google::protobuf::Message& GetResponsePrototype(
    const ::google::protobuf::MethodDescriptor* method) const;

 private:
  GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TestServiceWithCustomOptions);
};

class TestServiceWithCustomOptions_Stub : public TestServiceWithCustomOptions {
 public:
  TestServiceWithCustomOptions_Stub(::google::protobuf::RpcChannel* channel);
  TestServiceWithCustomOptions_Stub(::google::protobuf::RpcChannel* channel,
                   ::google::protobuf::Service::ChannelOwnership ownership);
  ~TestServiceWithCustomOptions_Stub();

  inline ::google::protobuf::RpcChannel* channel() { return channel_; }

  // implements TestServiceWithCustomOptions ------------------------------------------

  void Foo(::google::protobuf::RpcController* controller,
                       const ::protobuf_unittest::CustomOptionFooRequest* request,
                       ::protobuf_unittest::CustomOptionFooResponse* response,
                       ::google::protobuf::Closure* done);
 private:
  ::google::protobuf::RpcChannel* channel_;
  bool owns_channel_;
  GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TestServiceWithCustomOptions_Stub);
};

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

class AggregateService_Stub;

class AggregateService : public ::google::protobuf::Service {
 protected:
  // This class should be treated as an abstract interface.
  inline AggregateService() {};
 public:
  virtual ~AggregateService();

  typedef AggregateService_Stub Stub;

  static const ::google::protobuf::ServiceDescriptor* descriptor();

  virtual void Method(::google::protobuf::RpcController* controller,
                       const ::protobuf_unittest::AggregateMessage* request,
                       ::protobuf_unittest::AggregateMessage* response,
                       ::google::protobuf::Closure* done);

  // implements Service ----------------------------------------------

  const ::google::protobuf::ServiceDescriptor* GetDescriptor();
  void CallMethod(const ::google::protobuf::MethodDescriptor* method,
                  ::google::protobuf::RpcController* controller,
                  const ::google::protobuf::Message* request,
                  ::google::protobuf::Message* response,
                  ::google::protobuf::Closure* done);
  const ::google::protobuf::Message& GetRequestPrototype(
    const ::google::protobuf::MethodDescriptor* method) const;
  const ::google::protobuf::Message& GetResponsePrototype(
    const ::google::protobuf::MethodDescriptor* method) const;

 private:
  GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AggregateService);
};

class AggregateService_Stub : public AggregateService {
 public:
  AggregateService_Stub(::google::protobuf::RpcChannel* channel);
  AggregateService_Stub(::google::protobuf::RpcChannel* channel,
                   ::google::protobuf::Service::ChannelOwnership ownership);
  ~AggregateService_Stub();

  inline ::google::protobuf::RpcChannel* channel() { return channel_; }

  // implements AggregateService ------------------------------------------

  void Method(::google::protobuf::RpcController* controller,
                       const ::protobuf_unittest::AggregateMessage* request,
                       ::protobuf_unittest::AggregateMessage* response,
                       ::google::protobuf::Closure* done);
 private:
  ::google::protobuf::RpcChannel* channel_;
  bool owns_channel_;
  GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AggregateService_Stub);
};

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

static const int kFileOpt1FieldNumber = 7736974;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FileOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  file_opt1;
static const int kMessageOpt1FieldNumber = 7739036;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  message_opt1;
static const int kFieldOpt1FieldNumber = 7740936;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FieldOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  field_opt1;
static const int kFieldOpt2FieldNumber = 7753913;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FieldOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  field_opt2;
static const int kEnumOpt1FieldNumber = 7753576;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::EnumOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  enum_opt1;
static const int kEnumValueOpt1FieldNumber = 1560678;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::EnumValueOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  enum_value_opt1;
static const int kServiceOpt1FieldNumber = 7887650;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::ServiceOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  service_opt1;
static const int kMethodOpt1FieldNumber = 7890860;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MethodOptions,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::MethodOpt1, ::protobuf_unittest::MethodOpt1_IsValid>, 14, false >
  method_opt1;
static const int kBoolOptFieldNumber = 7706090;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< bool >, 8, false >
  bool_opt;
static const int kInt32OptFieldNumber = 7705709;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  int32_opt;
static const int kInt64OptFieldNumber = 7705542;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  int64_opt;
static const int kUint32OptFieldNumber = 7704880;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  uint32_opt;
static const int kUint64OptFieldNumber = 7702367;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  uint64_opt;
static const int kSint32OptFieldNumber = 7701568;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  sint32_opt;
static const int kSint64OptFieldNumber = 7700863;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  sint64_opt;
static const int kFixed32OptFieldNumber = 7700307;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  fixed32_opt;
static const int kFixed64OptFieldNumber = 7700194;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  fixed64_opt;
static const int kSfixed32OptFieldNumber = 7698645;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  sfixed32_opt;
static const int kSfixed64OptFieldNumber = 7685475;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  sfixed64_opt;
static const int kFloatOptFieldNumber = 7675390;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< float >, 2, false >
  float_opt;
static const int kDoubleOptFieldNumber = 7673293;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< double >, 1, false >
  double_opt;
static const int kStringOptFieldNumber = 7673285;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::StringTypeTraits, 9, false >
  string_opt;
static const int kBytesOptFieldNumber = 7673238;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::StringTypeTraits, 12, false >
  bytes_opt;
static const int kEnumOptFieldNumber = 7673233;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::DummyMessageContainingEnum_TestEnumType, ::protobuf_unittest::DummyMessageContainingEnum_TestEnumType_IsValid>, 14, false >
  enum_opt;
static const int kMessageTypeOptFieldNumber = 7665967;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::DummyMessageInvalidAsOptionType >, 11, false >
  message_type_opt;
static const int kQuuxFieldNumber = 7663707;
extern ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::ComplexOptionType1,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  quux;
static const int kCorgeFieldNumber = 7663442;
extern ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::ComplexOptionType1,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType3 >, 11, false >
  corge;
static const int kGraultFieldNumber = 7650927;
extern ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::ComplexOptionType2,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  grault;
static const int kGarplyFieldNumber = 7649992;
extern ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::ComplexOptionType2,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType1 >, 11, false >
  garply;
static const int kComplexOpt1FieldNumber = 7646756;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType1 >, 11, false >
  complex_opt1;
static const int kComplexOpt2FieldNumber = 7636949;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType2 >, 11, false >
  complex_opt2;
static const int kComplexOpt3FieldNumber = 7636463;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOptionType3 >, 11, false >
  complex_opt3;
static const int kComplexopt6FieldNumber = 7595468;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ComplexOpt6 >, 10, false >
  complexopt6;
static const int kFileoptFieldNumber = 15478479;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FileOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  fileopt;
static const int kMsgoptFieldNumber = 15480088;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  msgopt;
static const int kFieldoptFieldNumber = 15481374;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FieldOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  fieldopt;
static const int kEnumoptFieldNumber = 15483218;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::EnumOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  enumopt;
static const int kEnumvaloptFieldNumber = 15486921;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::EnumValueOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  enumvalopt;
static const int kServiceoptFieldNumber = 15497145;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::ServiceOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  serviceopt;
static const int kMethodoptFieldNumber = 15512713;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MethodOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::Aggregate >, 11, false >
  methodopt;

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

// TestMessageWithCustomOptions

// optional string field1 = 1 [ctype = CORD];
inline bool TestMessageWithCustomOptions::has_field1() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void TestMessageWithCustomOptions::set_has_field1() {
  _has_bits_[0] |= 0x00000001u;
}
inline void TestMessageWithCustomOptions::clear_has_field1() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void TestMessageWithCustomOptions::clear_field1() {
  if (field1_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    field1_->clear();
  }
  clear_has_field1();
}
inline const ::std::string& TestMessageWithCustomOptions::field1() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.TestMessageWithCustomOptions.field1)
  return *field1_;
}
inline void TestMessageWithCustomOptions::set_field1(const ::std::string& value) {
  set_has_field1();
  if (field1_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    field1_ = new ::std::string;
  }
  field1_->assign(value);
  // @@protoc_insertion_point(field_set:protobuf_unittest.TestMessageWithCustomOptions.field1)
}
inline void TestMessageWithCustomOptions::set_field1(const char* value) {
  set_has_field1();
  if (field1_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    field1_ = new ::std::string;
  }
  field1_->assign(value);
  // @@protoc_insertion_point(field_set_char:protobuf_unittest.TestMessageWithCustomOptions.field1)
}
inline void TestMessageWithCustomOptions::set_field1(const char* value, size_t size) {
  set_has_field1();
  if (field1_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    field1_ = new ::std::string;
  }
  field1_->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.TestMessageWithCustomOptions.field1)
}
inline ::std::string* TestMessageWithCustomOptions::mutable_field1() {
  set_has_field1();
  if (field1_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    field1_ = new ::std::string;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestMessageWithCustomOptions.field1)
  return field1_;
}
inline ::std::string* TestMessageWithCustomOptions::release_field1() {
  clear_has_field1();
  if (field1_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    return NULL;
  } else {
    ::std::string* temp = field1_;
    field1_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    return temp;
  }
}
inline void TestMessageWithCustomOptions::set_allocated_field1(::std::string* field1) {
  if (field1_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete field1_;
  }
  if (field1) {
    set_has_field1();
    field1_ = field1;
  } else {
    clear_has_field1();
    field1_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestMessageWithCustomOptions.field1)
}

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

// CustomOptionFooRequest

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

// CustomOptionFooResponse

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

// CustomOptionFooClientMessage

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

// CustomOptionFooServerMessage

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

// DummyMessageContainingEnum

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

// DummyMessageInvalidAsOptionType

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

// CustomOptionMinIntegerValues

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

// CustomOptionMaxIntegerValues

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

// CustomOptionOtherValues

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

// SettingRealsFromPositiveInts

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

// SettingRealsFromNegativeInts

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

// ComplexOptionType1

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

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

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

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

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

// ComplexOptionType2_ComplexOptionType4

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

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

// ComplexOptionType2

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

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

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

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

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

// ComplexOptionType3_ComplexOptionType5

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

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

// ComplexOptionType3

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

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

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

// ComplexOpt6

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

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

// VariousComplexOptions

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

// AggregateMessageSet

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

// AggregateMessageSetElement

// optional string s = 1;
inline bool AggregateMessageSetElement::has_s() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void AggregateMessageSetElement::set_has_s() {
  _has_bits_[0] |= 0x00000001u;
}
inline void AggregateMessageSetElement::clear_has_s() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void AggregateMessageSetElement::clear_s() {
  if (s_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    s_->clear();
  }
  clear_has_s();
}
inline const ::std::string& AggregateMessageSetElement::s() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.AggregateMessageSetElement.s)
  return *s_;
}
inline void AggregateMessageSetElement::set_s(const ::std::string& value) {
  set_has_s();
  if (s_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    s_ = new ::std::string;
  }
  s_->assign(value);
  // @@protoc_insertion_point(field_set:protobuf_unittest.AggregateMessageSetElement.s)
}
inline void AggregateMessageSetElement::set_s(const char* value) {
  set_has_s();
  if (s_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    s_ = new ::std::string;
  }
  s_->assign(value);
  // @@protoc_insertion_point(field_set_char:protobuf_unittest.AggregateMessageSetElement.s)
}
inline void AggregateMessageSetElement::set_s(const char* value, size_t size) {
  set_has_s();
  if (s_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    s_ = new ::std::string;
  }
  s_->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.AggregateMessageSetElement.s)
}
inline ::std::string* AggregateMessageSetElement::mutable_s() {
  set_has_s();
  if (s_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    s_ = new ::std::string;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.AggregateMessageSetElement.s)
  return s_;
}
inline ::std::string* AggregateMessageSetElement::release_s() {
  clear_has_s();
  if (s_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    return NULL;
  } else {
    ::std::string* temp = s_;
    s_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    return temp;
  }
}
inline void AggregateMessageSetElement::set_allocated_s(::std::string* s) {
  if (s_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete s_;
  }
  if (s) {
    set_has_s();
    s_ = s;
  } else {
    clear_has_s();
    s_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.AggregateMessageSetElement.s)
}

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

// Aggregate

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

// optional string s = 2;
inline bool Aggregate::has_s() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void Aggregate::set_has_s() {
  _has_bits_[0] |= 0x00000002u;
}
inline void Aggregate::clear_has_s() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void Aggregate::clear_s() {
  if (s_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    s_->clear();
  }
  clear_has_s();
}
inline const ::std::string& Aggregate::s() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.Aggregate.s)
  return *s_;
}
inline void Aggregate::set_s(const ::std::string& value) {
  set_has_s();
  if (s_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    s_ = new ::std::string;
  }
  s_->assign(value);
  // @@protoc_insertion_point(field_set:protobuf_unittest.Aggregate.s)
}
inline void Aggregate::set_s(const char* value) {
  set_has_s();
  if (s_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    s_ = new ::std::string;
  }
  s_->assign(value);
  // @@protoc_insertion_point(field_set_char:protobuf_unittest.Aggregate.s)
}
inline void Aggregate::set_s(const char* value, size_t size) {
  set_has_s();
  if (s_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    s_ = new ::std::string;
  }
  s_->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.Aggregate.s)
}
inline ::std::string* Aggregate::mutable_s() {
  set_has_s();
  if (s_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    s_ = new ::std::string;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.Aggregate.s)
  return s_;
}
inline ::std::string* Aggregate::release_s() {
  clear_has_s();
  if (s_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    return NULL;
  } else {
    ::std::string* temp = s_;
    s_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    return temp;
  }
}
inline void Aggregate::set_allocated_s(::std::string* s) {
  if (s_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete s_;
  }
  if (s) {
    set_has_s();
    s_ = s;
  } else {
    clear_has_s();
    s_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  }
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.Aggregate.s)
}

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

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

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

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

// AggregateMessage

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

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

// NestedOptionType_NestedMessage

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

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

// NestedOptionType

// @@protoc_insertion_point(namespace_scope)

}  // namespace protobuf_unittest

#ifndef SWIG
namespace google {
namespace protobuf {

template <> struct is_proto_enum< ::protobuf_unittest::TestMessageWithCustomOptions_AnEnum> : ::google::protobuf::internal::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest::TestMessageWithCustomOptions_AnEnum>() {
  return ::protobuf_unittest::TestMessageWithCustomOptions_AnEnum_descriptor();
}
template <> struct is_proto_enum< ::protobuf_unittest::DummyMessageContainingEnum_TestEnumType> : ::google::protobuf::internal::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest::DummyMessageContainingEnum_TestEnumType>() {
  return ::protobuf_unittest::DummyMessageContainingEnum_TestEnumType_descriptor();
}
template <> struct is_proto_enum< ::protobuf_unittest::NestedOptionType_NestedEnum> : ::google::protobuf::internal::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest::NestedOptionType_NestedEnum>() {
  return ::protobuf_unittest::NestedOptionType_NestedEnum_descriptor();
}
template <> struct is_proto_enum< ::protobuf_unittest::MethodOpt1> : ::google::protobuf::internal::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest::MethodOpt1>() {
  return ::protobuf_unittest::MethodOpt1_descriptor();
}
template <> struct is_proto_enum< ::protobuf_unittest::AggregateEnum> : ::google::protobuf::internal::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest::AggregateEnum>() {
  return ::protobuf_unittest::AggregateEnum_descriptor();
}

}  // namespace google
}  // namespace protobuf
#endif  // SWIG

// @@protoc_insertion_point(global_scope)

#endif  // PROTOBUF_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto__INCLUDED