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

#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto
#define PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto

#include <string>

#include <google/protobuf/stubs/common.h>

#if GOOGLE_PROTOBUF_VERSION < 3006001
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please update
#error your headers.
#endif
#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please
#error regenerate this file with a newer version of protoc.
#endif

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h>  // IWYU pragma: export
#include <google/protobuf/extension_set.h>  // IWYU pragma: export
#include <google/protobuf/generated_enum_reflection.h>
#include <google/protobuf/service.h>
#include <google/protobuf/unknown_field_set.h>
#include <google/protobuf/descriptor.pb.h>
// @@protoc_insertion_point(includes)
#define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto 

namespace protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto {
// Internal implementation detail -- do not use these members.
struct TableStruct {
  static const ::google::protobuf::internal::ParseTableField entries[];
  static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
  static const ::google::protobuf::internal::ParseTable schema[28];
  static const ::google::protobuf::internal::FieldMetadata field_metadata[];
  static const ::google::protobuf::internal::SerializationTable serialization_table[];
  static const ::google::protobuf::uint32 offsets[];
};
void AddDescriptors();
}  // namespace protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto
namespace protobuf_unittest {
class Aggregate;
class AggregateDefaultTypeInternal;
extern AggregateDefaultTypeInternal _Aggregate_default_instance_;
class AggregateMessage;
class AggregateMessageDefaultTypeInternal;
extern AggregateMessageDefaultTypeInternal _AggregateMessage_default_instance_;
class AggregateMessageSet;
class AggregateMessageSetDefaultTypeInternal;
extern AggregateMessageSetDefaultTypeInternal _AggregateMessageSet_default_instance_;
class AggregateMessageSetElement;
class AggregateMessageSetElementDefaultTypeInternal;
extern AggregateMessageSetElementDefaultTypeInternal _AggregateMessageSetElement_default_instance_;
class ComplexOpt6;
class ComplexOpt6DefaultTypeInternal;
extern ComplexOpt6DefaultTypeInternal _ComplexOpt6_default_instance_;
class ComplexOptionType1;
class ComplexOptionType1DefaultTypeInternal;
extern ComplexOptionType1DefaultTypeInternal _ComplexOptionType1_default_instance_;
class ComplexOptionType2;
class ComplexOptionType2DefaultTypeInternal;
extern ComplexOptionType2DefaultTypeInternal _ComplexOptionType2_default_instance_;
class ComplexOptionType2_ComplexOptionType4;
class ComplexOptionType2_ComplexOptionType4DefaultTypeInternal;
extern ComplexOptionType2_ComplexOptionType4DefaultTypeInternal _ComplexOptionType2_ComplexOptionType4_default_instance_;
class ComplexOptionType3;
class ComplexOptionType3DefaultTypeInternal;
extern ComplexOptionType3DefaultTypeInternal _ComplexOptionType3_default_instance_;
class ComplexOptionType3_ComplexOptionType5;
class ComplexOptionType3_ComplexOptionType5DefaultTypeInternal;
extern ComplexOptionType3_ComplexOptionType5DefaultTypeInternal _ComplexOptionType3_ComplexOptionType5_default_instance_;
class CustomOptionFooClientMessage;
class CustomOptionFooClientMessageDefaultTypeInternal;
extern CustomOptionFooClientMessageDefaultTypeInternal _CustomOptionFooClientMessage_default_instance_;
class CustomOptionFooRequest;
class CustomOptionFooRequestDefaultTypeInternal;
extern CustomOptionFooRequestDefaultTypeInternal _CustomOptionFooRequest_default_instance_;
class CustomOptionFooResponse;
class CustomOptionFooResponseDefaultTypeInternal;
extern CustomOptionFooResponseDefaultTypeInternal _CustomOptionFooResponse_default_instance_;
class CustomOptionFooServerMessage;
class CustomOptionFooServerMessageDefaultTypeInternal;
extern CustomOptionFooServerMessageDefaultTypeInternal _CustomOptionFooServerMessage_default_instance_;
class CustomOptionMaxIntegerValues;
class CustomOptionMaxIntegerValuesDefaultTypeInternal;
extern CustomOptionMaxIntegerValuesDefaultTypeInternal _CustomOptionMaxIntegerValues_default_instance_;
class CustomOptionMinIntegerValues;
class CustomOptionMinIntegerValuesDefaultTypeInternal;
extern CustomOptionMinIntegerValuesDefaultTypeInternal _CustomOptionMinIntegerValues_default_instance_;
class CustomOptionOtherValues;
class CustomOptionOtherValuesDefaultTypeInternal;
extern CustomOptionOtherValuesDefaultTypeInternal _CustomOptionOtherValues_default_instance_;
class DummyMessageContainingEnum;
class DummyMessageContainingEnumDefaultTypeInternal;
extern DummyMessageContainingEnumDefaultTypeInternal _DummyMessageContainingEnum_default_instance_;
class DummyMessageInvalidAsOptionType;
class DummyMessageInvalidAsOptionTypeDefaultTypeInternal;
extern DummyMessageInvalidAsOptionTypeDefaultTypeInternal _DummyMessageInvalidAsOptionType_default_instance_;
class NestedOptionType;
class NestedOptionTypeDefaultTypeInternal;
extern NestedOptionTypeDefaultTypeInternal _NestedOptionType_default_instance_;
class NestedOptionType_NestedMessage;
class NestedOptionType_NestedMessageDefaultTypeInternal;
extern NestedOptionType_NestedMessageDefaultTypeInternal _NestedOptionType_NestedMessage_default_instance_;
class NewOptionType;
class NewOptionTypeDefaultTypeInternal;
extern NewOptionTypeDefaultTypeInternal _NewOptionType_default_instance_;
class OldOptionType;
class OldOptionTypeDefaultTypeInternal;
extern OldOptionTypeDefaultTypeInternal _OldOptionType_default_instance_;
class SettingRealsFromNegativeInts;
class SettingRealsFromNegativeIntsDefaultTypeInternal;
extern SettingRealsFromNegativeIntsDefaultTypeInternal _SettingRealsFromNegativeInts_default_instance_;
class SettingRealsFromPositiveInts;
class SettingRealsFromPositiveIntsDefaultTypeInternal;
extern SettingRealsFromPositiveIntsDefaultTypeInternal _SettingRealsFromPositiveInts_default_instance_;
class TestMessageWithCustomOptions;
class TestMessageWithCustomOptionsDefaultTypeInternal;
extern TestMessageWithCustomOptionsDefaultTypeInternal _TestMessageWithCustomOptions_default_instance_;
class TestMessageWithRequiredEnumOption;
class TestMessageWithRequiredEnumOptionDefaultTypeInternal;
extern TestMessageWithRequiredEnumOptionDefaultTypeInternal _TestMessageWithRequiredEnumOption_default_instance_;
class VariousComplexOptions;
class VariousComplexOptionsDefaultTypeInternal;
extern VariousComplexOptionsDefaultTypeInternal _VariousComplexOptions_default_instance_;
}  // namespace protobuf_unittest
namespace google {
namespace protobuf {
template<> ::protobuf_unittest::Aggregate* Arena::CreateMaybeMessage<::protobuf_unittest::Aggregate>(Arena*);
template<> ::protobuf_unittest::AggregateMessage* Arena::CreateMaybeMessage<::protobuf_unittest::AggregateMessage>(Arena*);
template<> ::protobuf_unittest::AggregateMessageSet* Arena::CreateMaybeMessage<::protobuf_unittest::AggregateMessageSet>(Arena*);
template<> ::protobuf_unittest::AggregateMessageSetElement* Arena::CreateMaybeMessage<::protobuf_unittest::AggregateMessageSetElement>(Arena*);
template<> ::protobuf_unittest::ComplexOpt6* Arena::CreateMaybeMessage<::protobuf_unittest::ComplexOpt6>(Arena*);
template<> ::protobuf_unittest::ComplexOptionType1* Arena::CreateMaybeMessage<::protobuf_unittest::ComplexOptionType1>(Arena*);
template<> ::protobuf_unittest::ComplexOptionType2* Arena::CreateMaybeMessage<::protobuf_unittest::ComplexOptionType2>(Arena*);
template<> ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* Arena::CreateMaybeMessage<::protobuf_unittest::ComplexOptionType2_ComplexOptionType4>(Arena*);
template<> ::protobuf_unittest::ComplexOptionType3* Arena::CreateMaybeMessage<::protobuf_unittest::ComplexOptionType3>(Arena*);
template<> ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* Arena::CreateMaybeMessage<::protobuf_unittest::ComplexOptionType3_ComplexOptionType5>(Arena*);
template<> ::protobuf_unittest::CustomOptionFooClientMessage* Arena::CreateMaybeMessage<::protobuf_unittest::CustomOptionFooClientMessage>(Arena*);
template<> ::protobuf_unittest::CustomOptionFooRequest* Arena::CreateMaybeMessage<::protobuf_unittest::CustomOptionFooRequest>(Arena*);
template<> ::protobuf_unittest::CustomOptionFooResponse* Arena::CreateMaybeMessage<::protobuf_unittest::CustomOptionFooResponse>(Arena*);
template<> ::protobuf_unittest::CustomOptionFooServerMessage* Arena::CreateMaybeMessage<::protobuf_unittest::CustomOptionFooServerMessage>(Arena*);
template<> ::protobuf_unittest::CustomOptionMaxIntegerValues* Arena::CreateMaybeMessage<::protobuf_unittest::CustomOptionMaxIntegerValues>(Arena*);
template<> ::protobuf_unittest::CustomOptionMinIntegerValues* Arena::CreateMaybeMessage<::protobuf_unittest::CustomOptionMinIntegerValues>(Arena*);
template<> ::protobuf_unittest::CustomOptionOtherValues* Arena::CreateMaybeMessage<::protobuf_unittest::CustomOptionOtherValues>(Arena*);
template<> ::protobuf_unittest::DummyMessageContainingEnum* Arena::CreateMaybeMessage<::protobuf_unittest::DummyMessageContainingEnum>(Arena*);
template<> ::protobuf_unittest::DummyMessageInvalidAsOptionType* Arena::CreateMaybeMessage<::protobuf_unittest::DummyMessageInvalidAsOptionType>(Arena*);
template<> ::protobuf_unittest::NestedOptionType* Arena::CreateMaybeMessage<::protobuf_unittest::NestedOptionType>(Arena*);
template<> ::protobuf_unittest::NestedOptionType_NestedMessage* Arena::CreateMaybeMessage<::protobuf_unittest::NestedOptionType_NestedMessage>(Arena*);
template<> ::protobuf_unittest::NewOptionType* Arena::CreateMaybeMessage<::protobuf_unittest::NewOptionType>(Arena*);
template<> ::protobuf_unittest::OldOptionType* Arena::CreateMaybeMessage<::protobuf_unittest::OldOptionType>(Arena*);
template<> ::protobuf_unittest::SettingRealsFromNegativeInts* Arena::CreateMaybeMessage<::protobuf_unittest::SettingRealsFromNegativeInts>(Arena*);
template<> ::protobuf_unittest::SettingRealsFromPositiveInts* Arena::CreateMaybeMessage<::protobuf_unittest::SettingRealsFromPositiveInts>(Arena*);
template<> ::protobuf_unittest::TestMessageWithCustomOptions* Arena::CreateMaybeMessage<::protobuf_unittest::TestMessageWithCustomOptions>(Arena*);
template<> ::protobuf_unittest::TestMessageWithRequiredEnumOption* Arena::CreateMaybeMessage<::protobuf_unittest::TestMessageWithRequiredEnumOption>(Arena*);
template<> ::protobuf_unittest::VariousComplexOptions* Arena::CreateMaybeMessage<::protobuf_unittest::VariousComplexOptions>(Arena*);
}  // namespace protobuf
}  // namespace google
namespace protobuf_unittest {

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 OldOptionType_TestEnum {
  OldOptionType_TestEnum_OLD_VALUE = 0
};
bool OldOptionType_TestEnum_IsValid(int value);
const OldOptionType_TestEnum OldOptionType_TestEnum_TestEnum_MIN = OldOptionType_TestEnum_OLD_VALUE;
const OldOptionType_TestEnum OldOptionType_TestEnum_TestEnum_MAX = OldOptionType_TestEnum_OLD_VALUE;
const int OldOptionType_TestEnum_TestEnum_ARRAYSIZE = OldOptionType_TestEnum_TestEnum_MAX + 1;

const ::google::protobuf::EnumDescriptor* OldOptionType_TestEnum_descriptor();
inline const ::std::string& OldOptionType_TestEnum_Name(OldOptionType_TestEnum value) {
  return ::google::protobuf::internal::NameOfEnum(
    OldOptionType_TestEnum_descriptor(), value);
}
inline bool OldOptionType_TestEnum_Parse(
    const ::std::string& name, OldOptionType_TestEnum* value) {
  return ::google::protobuf::internal::ParseNamedEnum<OldOptionType_TestEnum>(
    OldOptionType_TestEnum_descriptor(), name, value);
}
enum NewOptionType_TestEnum {
  NewOptionType_TestEnum_OLD_VALUE = 0,
  NewOptionType_TestEnum_NEW_VALUE = 1
};
bool NewOptionType_TestEnum_IsValid(int value);
const NewOptionType_TestEnum NewOptionType_TestEnum_TestEnum_MIN = NewOptionType_TestEnum_OLD_VALUE;
const NewOptionType_TestEnum NewOptionType_TestEnum_TestEnum_MAX = NewOptionType_TestEnum_NEW_VALUE;
const int NewOptionType_TestEnum_TestEnum_ARRAYSIZE = NewOptionType_TestEnum_TestEnum_MAX + 1;

const ::google::protobuf::EnumDescriptor* NewOptionType_TestEnum_descriptor();
inline const ::std::string& NewOptionType_TestEnum_Name(NewOptionType_TestEnum value) {
  return ::google::protobuf::internal::NameOfEnum(
    NewOptionType_TestEnum_descriptor(), value);
}
inline bool NewOptionType_TestEnum_Parse(
    const ::std::string& name, NewOptionType_TestEnum* value) {
  return ::google::protobuf::internal::ParseNamedEnum<NewOptionType_TestEnum>(
    NewOptionType_TestEnum_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 /* @@protoc_insertion_point(class_definition:protobuf_unittest.TestMessageWithCustomOptions) */ {
 public:
  TestMessageWithCustomOptions();
  virtual ~TestMessageWithCustomOptions();

  TestMessageWithCustomOptions(const TestMessageWithCustomOptions& from);

  inline TestMessageWithCustomOptions& operator=(const TestMessageWithCustomOptions& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  TestMessageWithCustomOptions(TestMessageWithCustomOptions&& from) noexcept
    : TestMessageWithCustomOptions() {
    *this = ::std::move(from);
  }

  inline TestMessageWithCustomOptions& operator=(TestMessageWithCustomOptions&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  enum AnOneofCase {
    kOneofField = 2,
    ANONEOF_NOT_SET = 0,
  };

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const TestMessageWithCustomOptions* internal_default_instance() {
    return reinterpret_cast<const TestMessageWithCustomOptions*>(
               &_TestMessageWithCustomOptions_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    0;

  void Swap(TestMessageWithCustomOptions* other);
  friend void swap(TestMessageWithCustomOptions& a, TestMessageWithCustomOptions& b) {
    a.Swap(&b);
  }

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

  inline TestMessageWithCustomOptions* New() const final {
    return CreateMaybeMessage<TestMessageWithCustomOptions>(NULL);
  }

  TestMessageWithCustomOptions* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<TestMessageWithCustomOptions>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const TestMessageWithCustomOptions& from);
  void MergeFrom(const TestMessageWithCustomOptions& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(TestMessageWithCustomOptions* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

  // 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, (.protobuf_unittest.field_opt1) = 8765432109];
  bool has_field1() const;
  void clear_field1();
  static const int kField1FieldNumber = 1;
 private:
  // Hidden due to unknown ctype option.
  const ::std::string& field1() const;
  void set_field1(const ::std::string& value);
  #if LANG_CXX11
  void set_field1(::std::string&& value);
  #endif
  void set_field1(const char* value);
  void set_field1(const char* value, size_t size);
  ::std::string* mutable_field1();
  ::std::string* release_field1();
  void set_allocated_field1(::std::string* field1);
 public:

  // optional int32 oneof_field = 2;
  bool has_oneof_field() const;
  void clear_oneof_field();
  static const int kOneofFieldFieldNumber = 2;
  ::google::protobuf::int32 oneof_field() const;
  void set_oneof_field(::google::protobuf::int32 value);

  void clear_AnOneof();
  AnOneofCase AnOneof_case() const;
  // @@protoc_insertion_point(class_scope:protobuf_unittest.TestMessageWithCustomOptions)
 private:
  void set_has_field1();
  void clear_has_field1();
  void set_has_oneof_field();

  inline bool has_AnOneof() const;
  inline void clear_has_AnOneof();

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::internal::ArenaStringPtr field1_;
  union AnOneofUnion {
    AnOneofUnion() {}
    ::google::protobuf::int32 oneof_field_;
  } AnOneof_;
  ::google::protobuf::uint32 _oneof_case_[1];

  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class CustomOptionFooRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.CustomOptionFooRequest) */ {
 public:
  CustomOptionFooRequest();
  virtual ~CustomOptionFooRequest();

  CustomOptionFooRequest(const CustomOptionFooRequest& from);

  inline CustomOptionFooRequest& operator=(const CustomOptionFooRequest& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  CustomOptionFooRequest(CustomOptionFooRequest&& from) noexcept
    : CustomOptionFooRequest() {
    *this = ::std::move(from);
  }

  inline CustomOptionFooRequest& operator=(CustomOptionFooRequest&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const CustomOptionFooRequest* internal_default_instance() {
    return reinterpret_cast<const CustomOptionFooRequest*>(
               &_CustomOptionFooRequest_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    1;

  void Swap(CustomOptionFooRequest* other);
  friend void swap(CustomOptionFooRequest& a, CustomOptionFooRequest& b) {
    a.Swap(&b);
  }

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

  inline CustomOptionFooRequest* New() const final {
    return CreateMaybeMessage<CustomOptionFooRequest>(NULL);
  }

  CustomOptionFooRequest* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<CustomOptionFooRequest>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const CustomOptionFooRequest& from);
  void MergeFrom(const CustomOptionFooRequest& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(CustomOptionFooRequest* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class CustomOptionFooResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.CustomOptionFooResponse) */ {
 public:
  CustomOptionFooResponse();
  virtual ~CustomOptionFooResponse();

  CustomOptionFooResponse(const CustomOptionFooResponse& from);

  inline CustomOptionFooResponse& operator=(const CustomOptionFooResponse& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  CustomOptionFooResponse(CustomOptionFooResponse&& from) noexcept
    : CustomOptionFooResponse() {
    *this = ::std::move(from);
  }

  inline CustomOptionFooResponse& operator=(CustomOptionFooResponse&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const CustomOptionFooResponse* internal_default_instance() {
    return reinterpret_cast<const CustomOptionFooResponse*>(
               &_CustomOptionFooResponse_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    2;

  void Swap(CustomOptionFooResponse* other);
  friend void swap(CustomOptionFooResponse& a, CustomOptionFooResponse& b) {
    a.Swap(&b);
  }

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

  inline CustomOptionFooResponse* New() const final {
    return CreateMaybeMessage<CustomOptionFooResponse>(NULL);
  }

  CustomOptionFooResponse* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<CustomOptionFooResponse>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const CustomOptionFooResponse& from);
  void MergeFrom(const CustomOptionFooResponse& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(CustomOptionFooResponse* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class CustomOptionFooClientMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.CustomOptionFooClientMessage) */ {
 public:
  CustomOptionFooClientMessage();
  virtual ~CustomOptionFooClientMessage();

  CustomOptionFooClientMessage(const CustomOptionFooClientMessage& from);

  inline CustomOptionFooClientMessage& operator=(const CustomOptionFooClientMessage& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  CustomOptionFooClientMessage(CustomOptionFooClientMessage&& from) noexcept
    : CustomOptionFooClientMessage() {
    *this = ::std::move(from);
  }

  inline CustomOptionFooClientMessage& operator=(CustomOptionFooClientMessage&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const CustomOptionFooClientMessage* internal_default_instance() {
    return reinterpret_cast<const CustomOptionFooClientMessage*>(
               &_CustomOptionFooClientMessage_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    3;

  void Swap(CustomOptionFooClientMessage* other);
  friend void swap(CustomOptionFooClientMessage& a, CustomOptionFooClientMessage& b) {
    a.Swap(&b);
  }

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

  inline CustomOptionFooClientMessage* New() const final {
    return CreateMaybeMessage<CustomOptionFooClientMessage>(NULL);
  }

  CustomOptionFooClientMessage* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<CustomOptionFooClientMessage>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const CustomOptionFooClientMessage& from);
  void MergeFrom(const CustomOptionFooClientMessage& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(CustomOptionFooClientMessage* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class CustomOptionFooServerMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.CustomOptionFooServerMessage) */ {
 public:
  CustomOptionFooServerMessage();
  virtual ~CustomOptionFooServerMessage();

  CustomOptionFooServerMessage(const CustomOptionFooServerMessage& from);

  inline CustomOptionFooServerMessage& operator=(const CustomOptionFooServerMessage& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  CustomOptionFooServerMessage(CustomOptionFooServerMessage&& from) noexcept
    : CustomOptionFooServerMessage() {
    *this = ::std::move(from);
  }

  inline CustomOptionFooServerMessage& operator=(CustomOptionFooServerMessage&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const CustomOptionFooServerMessage* internal_default_instance() {
    return reinterpret_cast<const CustomOptionFooServerMessage*>(
               &_CustomOptionFooServerMessage_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    4;

  void Swap(CustomOptionFooServerMessage* other);
  friend void swap(CustomOptionFooServerMessage& a, CustomOptionFooServerMessage& b) {
    a.Swap(&b);
  }

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

  inline CustomOptionFooServerMessage* New() const final {
    return CreateMaybeMessage<CustomOptionFooServerMessage>(NULL);
  }

  CustomOptionFooServerMessage* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<CustomOptionFooServerMessage>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const CustomOptionFooServerMessage& from);
  void MergeFrom(const CustomOptionFooServerMessage& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(CustomOptionFooServerMessage* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class DummyMessageContainingEnum : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.DummyMessageContainingEnum) */ {
 public:
  DummyMessageContainingEnum();
  virtual ~DummyMessageContainingEnum();

  DummyMessageContainingEnum(const DummyMessageContainingEnum& from);

  inline DummyMessageContainingEnum& operator=(const DummyMessageContainingEnum& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  DummyMessageContainingEnum(DummyMessageContainingEnum&& from) noexcept
    : DummyMessageContainingEnum() {
    *this = ::std::move(from);
  }

  inline DummyMessageContainingEnum& operator=(DummyMessageContainingEnum&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const DummyMessageContainingEnum* internal_default_instance() {
    return reinterpret_cast<const DummyMessageContainingEnum*>(
               &_DummyMessageContainingEnum_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    5;

  void Swap(DummyMessageContainingEnum* other);
  friend void swap(DummyMessageContainingEnum& a, DummyMessageContainingEnum& b) {
    a.Swap(&b);
  }

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

  inline DummyMessageContainingEnum* New() const final {
    return CreateMaybeMessage<DummyMessageContainingEnum>(NULL);
  }

  DummyMessageContainingEnum* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<DummyMessageContainingEnum>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const DummyMessageContainingEnum& from);
  void MergeFrom(const DummyMessageContainingEnum& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(DummyMessageContainingEnum* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

  // 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::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class DummyMessageInvalidAsOptionType : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.DummyMessageInvalidAsOptionType) */ {
 public:
  DummyMessageInvalidAsOptionType();
  virtual ~DummyMessageInvalidAsOptionType();

  DummyMessageInvalidAsOptionType(const DummyMessageInvalidAsOptionType& from);

  inline DummyMessageInvalidAsOptionType& operator=(const DummyMessageInvalidAsOptionType& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  DummyMessageInvalidAsOptionType(DummyMessageInvalidAsOptionType&& from) noexcept
    : DummyMessageInvalidAsOptionType() {
    *this = ::std::move(from);
  }

  inline DummyMessageInvalidAsOptionType& operator=(DummyMessageInvalidAsOptionType&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const DummyMessageInvalidAsOptionType* internal_default_instance() {
    return reinterpret_cast<const DummyMessageInvalidAsOptionType*>(
               &_DummyMessageInvalidAsOptionType_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    6;

  void Swap(DummyMessageInvalidAsOptionType* other);
  friend void swap(DummyMessageInvalidAsOptionType& a, DummyMessageInvalidAsOptionType& b) {
    a.Swap(&b);
  }

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

  inline DummyMessageInvalidAsOptionType* New() const final {
    return CreateMaybeMessage<DummyMessageInvalidAsOptionType>(NULL);
  }

  DummyMessageInvalidAsOptionType* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<DummyMessageInvalidAsOptionType>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const DummyMessageInvalidAsOptionType& from);
  void MergeFrom(const DummyMessageInvalidAsOptionType& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(DummyMessageInvalidAsOptionType* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class CustomOptionMinIntegerValues : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.CustomOptionMinIntegerValues) */ {
 public:
  CustomOptionMinIntegerValues();
  virtual ~CustomOptionMinIntegerValues();

  CustomOptionMinIntegerValues(const CustomOptionMinIntegerValues& from);

  inline CustomOptionMinIntegerValues& operator=(const CustomOptionMinIntegerValues& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  CustomOptionMinIntegerValues(CustomOptionMinIntegerValues&& from) noexcept
    : CustomOptionMinIntegerValues() {
    *this = ::std::move(from);
  }

  inline CustomOptionMinIntegerValues& operator=(CustomOptionMinIntegerValues&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const CustomOptionMinIntegerValues* internal_default_instance() {
    return reinterpret_cast<const CustomOptionMinIntegerValues*>(
               &_CustomOptionMinIntegerValues_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    7;

  void Swap(CustomOptionMinIntegerValues* other);
  friend void swap(CustomOptionMinIntegerValues& a, CustomOptionMinIntegerValues& b) {
    a.Swap(&b);
  }

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

  inline CustomOptionMinIntegerValues* New() const final {
    return CreateMaybeMessage<CustomOptionMinIntegerValues>(NULL);
  }

  CustomOptionMinIntegerValues* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<CustomOptionMinIntegerValues>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const CustomOptionMinIntegerValues& from);
  void MergeFrom(const CustomOptionMinIntegerValues& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(CustomOptionMinIntegerValues* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class CustomOptionMaxIntegerValues : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.CustomOptionMaxIntegerValues) */ {
 public:
  CustomOptionMaxIntegerValues();
  virtual ~CustomOptionMaxIntegerValues();

  CustomOptionMaxIntegerValues(const CustomOptionMaxIntegerValues& from);

  inline CustomOptionMaxIntegerValues& operator=(const CustomOptionMaxIntegerValues& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  CustomOptionMaxIntegerValues(CustomOptionMaxIntegerValues&& from) noexcept
    : CustomOptionMaxIntegerValues() {
    *this = ::std::move(from);
  }

  inline CustomOptionMaxIntegerValues& operator=(CustomOptionMaxIntegerValues&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const CustomOptionMaxIntegerValues* internal_default_instance() {
    return reinterpret_cast<const CustomOptionMaxIntegerValues*>(
               &_CustomOptionMaxIntegerValues_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    8;

  void Swap(CustomOptionMaxIntegerValues* other);
  friend void swap(CustomOptionMaxIntegerValues& a, CustomOptionMaxIntegerValues& b) {
    a.Swap(&b);
  }

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

  inline CustomOptionMaxIntegerValues* New() const final {
    return CreateMaybeMessage<CustomOptionMaxIntegerValues>(NULL);
  }

  CustomOptionMaxIntegerValues* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<CustomOptionMaxIntegerValues>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const CustomOptionMaxIntegerValues& from);
  void MergeFrom(const CustomOptionMaxIntegerValues& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(CustomOptionMaxIntegerValues* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class CustomOptionOtherValues : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.CustomOptionOtherValues) */ {
 public:
  CustomOptionOtherValues();
  virtual ~CustomOptionOtherValues();

  CustomOptionOtherValues(const CustomOptionOtherValues& from);

  inline CustomOptionOtherValues& operator=(const CustomOptionOtherValues& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  CustomOptionOtherValues(CustomOptionOtherValues&& from) noexcept
    : CustomOptionOtherValues() {
    *this = ::std::move(from);
  }

  inline CustomOptionOtherValues& operator=(CustomOptionOtherValues&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const CustomOptionOtherValues* internal_default_instance() {
    return reinterpret_cast<const CustomOptionOtherValues*>(
               &_CustomOptionOtherValues_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    9;

  void Swap(CustomOptionOtherValues* other);
  friend void swap(CustomOptionOtherValues& a, CustomOptionOtherValues& b) {
    a.Swap(&b);
  }

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

  inline CustomOptionOtherValues* New() const final {
    return CreateMaybeMessage<CustomOptionOtherValues>(NULL);
  }

  CustomOptionOtherValues* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<CustomOptionOtherValues>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const CustomOptionOtherValues& from);
  void MergeFrom(const CustomOptionOtherValues& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(CustomOptionOtherValues* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class SettingRealsFromPositiveInts : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.SettingRealsFromPositiveInts) */ {
 public:
  SettingRealsFromPositiveInts();
  virtual ~SettingRealsFromPositiveInts();

  SettingRealsFromPositiveInts(const SettingRealsFromPositiveInts& from);

  inline SettingRealsFromPositiveInts& operator=(const SettingRealsFromPositiveInts& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  SettingRealsFromPositiveInts(SettingRealsFromPositiveInts&& from) noexcept
    : SettingRealsFromPositiveInts() {
    *this = ::std::move(from);
  }

  inline SettingRealsFromPositiveInts& operator=(SettingRealsFromPositiveInts&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const SettingRealsFromPositiveInts* internal_default_instance() {
    return reinterpret_cast<const SettingRealsFromPositiveInts*>(
               &_SettingRealsFromPositiveInts_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    10;

  void Swap(SettingRealsFromPositiveInts* other);
  friend void swap(SettingRealsFromPositiveInts& a, SettingRealsFromPositiveInts& b) {
    a.Swap(&b);
  }

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

  inline SettingRealsFromPositiveInts* New() const final {
    return CreateMaybeMessage<SettingRealsFromPositiveInts>(NULL);
  }

  SettingRealsFromPositiveInts* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<SettingRealsFromPositiveInts>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const SettingRealsFromPositiveInts& from);
  void MergeFrom(const SettingRealsFromPositiveInts& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(SettingRealsFromPositiveInts* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class SettingRealsFromNegativeInts : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.SettingRealsFromNegativeInts) */ {
 public:
  SettingRealsFromNegativeInts();
  virtual ~SettingRealsFromNegativeInts();

  SettingRealsFromNegativeInts(const SettingRealsFromNegativeInts& from);

  inline SettingRealsFromNegativeInts& operator=(const SettingRealsFromNegativeInts& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  SettingRealsFromNegativeInts(SettingRealsFromNegativeInts&& from) noexcept
    : SettingRealsFromNegativeInts() {
    *this = ::std::move(from);
  }

  inline SettingRealsFromNegativeInts& operator=(SettingRealsFromNegativeInts&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const SettingRealsFromNegativeInts* internal_default_instance() {
    return reinterpret_cast<const SettingRealsFromNegativeInts*>(
               &_SettingRealsFromNegativeInts_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    11;

  void Swap(SettingRealsFromNegativeInts* other);
  friend void swap(SettingRealsFromNegativeInts& a, SettingRealsFromNegativeInts& b) {
    a.Swap(&b);
  }

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

  inline SettingRealsFromNegativeInts* New() const final {
    return CreateMaybeMessage<SettingRealsFromNegativeInts>(NULL);
  }

  SettingRealsFromNegativeInts* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<SettingRealsFromNegativeInts>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const SettingRealsFromNegativeInts& from);
  void MergeFrom(const SettingRealsFromNegativeInts& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(SettingRealsFromNegativeInts* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class ComplexOptionType1 : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.ComplexOptionType1) */ {
 public:
  ComplexOptionType1();
  virtual ~ComplexOptionType1();

  ComplexOptionType1(const ComplexOptionType1& from);

  inline ComplexOptionType1& operator=(const ComplexOptionType1& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  ComplexOptionType1(ComplexOptionType1&& from) noexcept
    : ComplexOptionType1() {
    *this = ::std::move(from);
  }

  inline ComplexOptionType1& operator=(ComplexOptionType1&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const ComplexOptionType1* internal_default_instance() {
    return reinterpret_cast<const ComplexOptionType1*>(
               &_ComplexOptionType1_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    12;

  void Swap(ComplexOptionType1* other);
  friend void swap(ComplexOptionType1& a, ComplexOptionType1& b) {
    a.Swap(&b);
  }

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

  inline ComplexOptionType1* New() const final {
    return CreateMaybeMessage<ComplexOptionType1>(NULL);
  }

  ComplexOptionType1* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<ComplexOptionType1>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const ComplexOptionType1& from);
  void MergeFrom(const ComplexOptionType1& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(ComplexOptionType1* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

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

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

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::RepeatedField< ::google::protobuf::int32 > foo4_;
  ::google::protobuf::int32 foo_;
  ::google::protobuf::int32 foo2_;
  ::google::protobuf::int32 foo3_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class ComplexOptionType2_ComplexOptionType4 : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.ComplexOptionType2.ComplexOptionType4) */ {
 public:
  ComplexOptionType2_ComplexOptionType4();
  virtual ~ComplexOptionType2_ComplexOptionType4();

  ComplexOptionType2_ComplexOptionType4(const ComplexOptionType2_ComplexOptionType4& from);

  inline ComplexOptionType2_ComplexOptionType4& operator=(const ComplexOptionType2_ComplexOptionType4& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  ComplexOptionType2_ComplexOptionType4(ComplexOptionType2_ComplexOptionType4&& from) noexcept
    : ComplexOptionType2_ComplexOptionType4() {
    *this = ::std::move(from);
  }

  inline ComplexOptionType2_ComplexOptionType4& operator=(ComplexOptionType2_ComplexOptionType4&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const ComplexOptionType2_ComplexOptionType4* internal_default_instance() {
    return reinterpret_cast<const ComplexOptionType2_ComplexOptionType4*>(
               &_ComplexOptionType2_ComplexOptionType4_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    13;

  void Swap(ComplexOptionType2_ComplexOptionType4* other);
  friend void swap(ComplexOptionType2_ComplexOptionType4& a, ComplexOptionType2_ComplexOptionType4& b) {
    a.Swap(&b);
  }

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

  inline ComplexOptionType2_ComplexOptionType4* New() const final {
    return CreateMaybeMessage<ComplexOptionType2_ComplexOptionType4>(NULL);
  }

  ComplexOptionType2_ComplexOptionType4* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<ComplexOptionType2_ComplexOptionType4>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const ComplexOptionType2_ComplexOptionType4& from);
  void MergeFrom(const ComplexOptionType2_ComplexOptionType4& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(ComplexOptionType2_ComplexOptionType4* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

  // optional int32 waldo = 1;
  bool has_waldo() const;
  void clear_waldo();
  static const int kWaldoFieldNumber = 1;
  ::google::protobuf::int32 waldo() const;
  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:
  void set_has_waldo();
  void clear_has_waldo();

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::int32 waldo_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class ComplexOptionType2 : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.ComplexOptionType2) */ {
 public:
  ComplexOptionType2();
  virtual ~ComplexOptionType2();

  ComplexOptionType2(const ComplexOptionType2& from);

  inline ComplexOptionType2& operator=(const ComplexOptionType2& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  ComplexOptionType2(ComplexOptionType2&& from) noexcept
    : ComplexOptionType2() {
    *this = ::std::move(from);
  }

  inline ComplexOptionType2& operator=(ComplexOptionType2&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const ComplexOptionType2* internal_default_instance() {
    return reinterpret_cast<const ComplexOptionType2*>(
               &_ComplexOptionType2_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    14;

  void Swap(ComplexOptionType2* other);
  friend void swap(ComplexOptionType2& a, ComplexOptionType2& b) {
    a.Swap(&b);
  }

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

  inline ComplexOptionType2* New() const final {
    return CreateMaybeMessage<ComplexOptionType2>(NULL);
  }

  ComplexOptionType2* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<ComplexOptionType2>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const ComplexOptionType2& from);
  void MergeFrom(const ComplexOptionType2& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(ComplexOptionType2* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

  typedef ComplexOptionType2_ComplexOptionType4 ComplexOptionType4;

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

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

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

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

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 > barney_;
  ::protobuf_unittest::ComplexOptionType1* bar_;
  ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* fred_;
  ::google::protobuf::int32 baz_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class ComplexOptionType3_ComplexOptionType5 : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.ComplexOptionType3.ComplexOptionType5) */ {
 public:
  ComplexOptionType3_ComplexOptionType5();
  virtual ~ComplexOptionType3_ComplexOptionType5();

  ComplexOptionType3_ComplexOptionType5(const ComplexOptionType3_ComplexOptionType5& from);

  inline ComplexOptionType3_ComplexOptionType5& operator=(const ComplexOptionType3_ComplexOptionType5& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  ComplexOptionType3_ComplexOptionType5(ComplexOptionType3_ComplexOptionType5&& from) noexcept
    : ComplexOptionType3_ComplexOptionType5() {
    *this = ::std::move(from);
  }

  inline ComplexOptionType3_ComplexOptionType5& operator=(ComplexOptionType3_ComplexOptionType5&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const ComplexOptionType3_ComplexOptionType5* internal_default_instance() {
    return reinterpret_cast<const ComplexOptionType3_ComplexOptionType5*>(
               &_ComplexOptionType3_ComplexOptionType5_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    15;

  void Swap(ComplexOptionType3_ComplexOptionType5* other);
  friend void swap(ComplexOptionType3_ComplexOptionType5& a, ComplexOptionType3_ComplexOptionType5& b) {
    a.Swap(&b);
  }

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

  inline ComplexOptionType3_ComplexOptionType5* New() const final {
    return CreateMaybeMessage<ComplexOptionType3_ComplexOptionType5>(NULL);
  }

  ComplexOptionType3_ComplexOptionType5* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<ComplexOptionType3_ComplexOptionType5>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const ComplexOptionType3_ComplexOptionType5& from);
  void MergeFrom(const ComplexOptionType3_ComplexOptionType5& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(ComplexOptionType3_ComplexOptionType5* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::int32 plugh_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class ComplexOptionType3 : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.ComplexOptionType3) */ {
 public:
  ComplexOptionType3();
  virtual ~ComplexOptionType3();

  ComplexOptionType3(const ComplexOptionType3& from);

  inline ComplexOptionType3& operator=(const ComplexOptionType3& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  ComplexOptionType3(ComplexOptionType3&& from) noexcept
    : ComplexOptionType3() {
    *this = ::std::move(from);
  }

  inline ComplexOptionType3& operator=(ComplexOptionType3&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const ComplexOptionType3* internal_default_instance() {
    return reinterpret_cast<const ComplexOptionType3*>(
               &_ComplexOptionType3_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    16;

  void Swap(ComplexOptionType3* other);
  friend void swap(ComplexOptionType3& a, ComplexOptionType3& b) {
    a.Swap(&b);
  }

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

  inline ComplexOptionType3* New() const final {
    return CreateMaybeMessage<ComplexOptionType3>(NULL);
  }

  ComplexOptionType3* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<ComplexOptionType3>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const ComplexOptionType3& from);
  void MergeFrom(const ComplexOptionType3& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(ComplexOptionType3* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

  typedef ComplexOptionType3_ComplexOptionType5 ComplexOptionType5;

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

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* complexoptiontype5_;
  ::google::protobuf::int32 qux_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class ComplexOpt6 : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.ComplexOpt6) */ {
 public:
  ComplexOpt6();
  virtual ~ComplexOpt6();

  ComplexOpt6(const ComplexOpt6& from);

  inline ComplexOpt6& operator=(const ComplexOpt6& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  ComplexOpt6(ComplexOpt6&& from) noexcept
    : ComplexOpt6() {
    *this = ::std::move(from);
  }

  inline ComplexOpt6& operator=(ComplexOpt6&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const ComplexOpt6* internal_default_instance() {
    return reinterpret_cast<const ComplexOpt6*>(
               &_ComplexOpt6_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    17;

  void Swap(ComplexOpt6* other);
  friend void swap(ComplexOpt6& a, ComplexOpt6& b) {
    a.Swap(&b);
  }

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

  inline ComplexOpt6* New() const final {
    return CreateMaybeMessage<ComplexOpt6>(NULL);
  }

  ComplexOpt6* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<ComplexOpt6>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const ComplexOpt6& from);
  void MergeFrom(const ComplexOpt6& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(ComplexOpt6* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::int32 xyzzy_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class VariousComplexOptions : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.VariousComplexOptions) */ {
 public:
  VariousComplexOptions();
  virtual ~VariousComplexOptions();

  VariousComplexOptions(const VariousComplexOptions& from);

  inline VariousComplexOptions& operator=(const VariousComplexOptions& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  VariousComplexOptions(VariousComplexOptions&& from) noexcept
    : VariousComplexOptions() {
    *this = ::std::move(from);
  }

  inline VariousComplexOptions& operator=(VariousComplexOptions&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const VariousComplexOptions* internal_default_instance() {
    return reinterpret_cast<const VariousComplexOptions*>(
               &_VariousComplexOptions_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    18;

  void Swap(VariousComplexOptions* other);
  friend void swap(VariousComplexOptions& a, VariousComplexOptions& b) {
    a.Swap(&b);
  }

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

  inline VariousComplexOptions* New() const final {
    return CreateMaybeMessage<VariousComplexOptions>(NULL);
  }

  VariousComplexOptions* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<VariousComplexOptions>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const VariousComplexOptions& from);
  void MergeFrom(const VariousComplexOptions& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(VariousComplexOptions* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class AggregateMessageSet : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.AggregateMessageSet) */ {
 public:
  AggregateMessageSet();
  virtual ~AggregateMessageSet();

  AggregateMessageSet(const AggregateMessageSet& from);

  inline AggregateMessageSet& operator=(const AggregateMessageSet& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  AggregateMessageSet(AggregateMessageSet&& from) noexcept
    : AggregateMessageSet() {
    *this = ::std::move(from);
  }

  inline AggregateMessageSet& operator=(AggregateMessageSet&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const AggregateMessageSet* internal_default_instance() {
    return reinterpret_cast<const AggregateMessageSet*>(
               &_AggregateMessageSet_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    19;

  void Swap(AggregateMessageSet* other);
  friend void swap(AggregateMessageSet& a, AggregateMessageSet& b) {
    a.Swap(&b);
  }

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

  inline AggregateMessageSet* New() const final {
    return CreateMaybeMessage<AggregateMessageSet>(NULL);
  }

  AggregateMessageSet* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<AggregateMessageSet>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const AggregateMessageSet& from);
  void MergeFrom(const AggregateMessageSet& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(AggregateMessageSet* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class AggregateMessageSetElement : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.AggregateMessageSetElement) */ {
 public:
  AggregateMessageSetElement();
  virtual ~AggregateMessageSetElement();

  AggregateMessageSetElement(const AggregateMessageSetElement& from);

  inline AggregateMessageSetElement& operator=(const AggregateMessageSetElement& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  AggregateMessageSetElement(AggregateMessageSetElement&& from) noexcept
    : AggregateMessageSetElement() {
    *this = ::std::move(from);
  }

  inline AggregateMessageSetElement& operator=(AggregateMessageSetElement&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const AggregateMessageSetElement* internal_default_instance() {
    return reinterpret_cast<const AggregateMessageSetElement*>(
               &_AggregateMessageSetElement_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    20;

  void Swap(AggregateMessageSetElement* other);
  friend void swap(AggregateMessageSetElement& a, AggregateMessageSetElement& b) {
    a.Swap(&b);
  }

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

  inline AggregateMessageSetElement* New() const final {
    return CreateMaybeMessage<AggregateMessageSetElement>(NULL);
  }

  AggregateMessageSetElement* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<AggregateMessageSetElement>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const AggregateMessageSetElement& from);
  void MergeFrom(const AggregateMessageSetElement& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(AggregateMessageSetElement* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

  // optional string s = 1;
  bool has_s() const;
  void clear_s();
  static const int kSFieldNumber = 1;
  const ::std::string& s() const;
  void set_s(const ::std::string& value);
  #if LANG_CXX11
  void set_s(::std::string&& value);
  #endif
  void set_s(const char* value);
  void set_s(const char* value, size_t size);
  ::std::string* mutable_s();
  ::std::string* release_s();
  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:
  void set_has_s();
  void clear_has_s();

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::internal::ArenaStringPtr s_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class Aggregate : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.Aggregate) */ {
 public:
  Aggregate();
  virtual ~Aggregate();

  Aggregate(const Aggregate& from);

  inline Aggregate& operator=(const Aggregate& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  Aggregate(Aggregate&& from) noexcept
    : Aggregate() {
    *this = ::std::move(from);
  }

  inline Aggregate& operator=(Aggregate&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const Aggregate* internal_default_instance() {
    return reinterpret_cast<const Aggregate*>(
               &_Aggregate_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    21;

  void Swap(Aggregate* other);
  friend void swap(Aggregate& a, Aggregate& b) {
    a.Swap(&b);
  }

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

  inline Aggregate* New() const final {
    return CreateMaybeMessage<Aggregate>(NULL);
  }

  Aggregate* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<Aggregate>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const Aggregate& from);
  void MergeFrom(const Aggregate& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(Aggregate* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

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

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

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

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

  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:
  void set_has_i();
  void clear_has_i();
  void set_has_s();
  void clear_has_s();
  void set_has_sub();
  void clear_has_sub();
  void set_has_file();
  void clear_has_file();
  void set_has_mset();
  void clear_has_mset();

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::internal::ArenaStringPtr s_;
  ::protobuf_unittest::Aggregate* sub_;
  ::google::protobuf::FileOptions* file_;
  ::protobuf_unittest::AggregateMessageSet* mset_;
  ::google::protobuf::int32 i_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class AggregateMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.AggregateMessage) */ {
 public:
  AggregateMessage();
  virtual ~AggregateMessage();

  AggregateMessage(const AggregateMessage& from);

  inline AggregateMessage& operator=(const AggregateMessage& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  AggregateMessage(AggregateMessage&& from) noexcept
    : AggregateMessage() {
    *this = ::std::move(from);
  }

  inline AggregateMessage& operator=(AggregateMessage&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const AggregateMessage* internal_default_instance() {
    return reinterpret_cast<const AggregateMessage*>(
               &_AggregateMessage_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    22;

  void Swap(AggregateMessage* other);
  friend void swap(AggregateMessage& a, AggregateMessage& b) {
    a.Swap(&b);
  }

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

  inline AggregateMessage* New() const final {
    return CreateMaybeMessage<AggregateMessage>(NULL);
  }

  AggregateMessage* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<AggregateMessage>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const AggregateMessage& from);
  void MergeFrom(const AggregateMessage& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(AggregateMessage* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

  // optional int32 fieldname = 1 [(.protobuf_unittest.fieldopt) = {
  bool has_fieldname() const;
  void clear_fieldname();
  static const int kFieldnameFieldNumber = 1;
  ::google::protobuf::int32 fieldname() const;
  void set_fieldname(::google::protobuf::int32 value);

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::int32 fieldname_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class NestedOptionType_NestedMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.NestedOptionType.NestedMessage) */ {
 public:
  NestedOptionType_NestedMessage();
  virtual ~NestedOptionType_NestedMessage();

  NestedOptionType_NestedMessage(const NestedOptionType_NestedMessage& from);

  inline NestedOptionType_NestedMessage& operator=(const NestedOptionType_NestedMessage& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  NestedOptionType_NestedMessage(NestedOptionType_NestedMessage&& from) noexcept
    : NestedOptionType_NestedMessage() {
    *this = ::std::move(from);
  }

  inline NestedOptionType_NestedMessage& operator=(NestedOptionType_NestedMessage&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const NestedOptionType_NestedMessage* internal_default_instance() {
    return reinterpret_cast<const NestedOptionType_NestedMessage*>(
               &_NestedOptionType_NestedMessage_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    23;

  void Swap(NestedOptionType_NestedMessage* other);
  friend void swap(NestedOptionType_NestedMessage& a, NestedOptionType_NestedMessage& b) {
    a.Swap(&b);
  }

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

  inline NestedOptionType_NestedMessage* New() const final {
    return CreateMaybeMessage<NestedOptionType_NestedMessage>(NULL);
  }

  NestedOptionType_NestedMessage* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<NestedOptionType_NestedMessage>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const NestedOptionType_NestedMessage& from);
  void MergeFrom(const NestedOptionType_NestedMessage& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(NestedOptionType_NestedMessage* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

  // optional int32 nested_field = 1 [(.protobuf_unittest.field_opt1) = 1002];
  bool has_nested_field() const;
  void clear_nested_field();
  static const int kNestedFieldFieldNumber = 1;
  ::google::protobuf::int32 nested_field() const;
  void set_nested_field(::google::protobuf::int32 value);

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::int32 nested_field_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class NestedOptionType : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.NestedOptionType) */ {
 public:
  NestedOptionType();
  virtual ~NestedOptionType();

  NestedOptionType(const NestedOptionType& from);

  inline NestedOptionType& operator=(const NestedOptionType& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  NestedOptionType(NestedOptionType&& from) noexcept
    : NestedOptionType() {
    *this = ::std::move(from);
  }

  inline NestedOptionType& operator=(NestedOptionType&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const NestedOptionType* internal_default_instance() {
    return reinterpret_cast<const NestedOptionType*>(
               &_NestedOptionType_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    24;

  void Swap(NestedOptionType* other);
  friend void swap(NestedOptionType& a, NestedOptionType& b) {
    a.Swap(&b);
  }

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

  inline NestedOptionType* New() const final {
    return CreateMaybeMessage<NestedOptionType>(NULL);
  }

  NestedOptionType* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<NestedOptionType>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const NestedOptionType& from);
  void MergeFrom(const NestedOptionType& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(NestedOptionType* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

  // 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::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class OldOptionType : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.OldOptionType) */ {
 public:
  OldOptionType();
  virtual ~OldOptionType();

  OldOptionType(const OldOptionType& from);

  inline OldOptionType& operator=(const OldOptionType& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  OldOptionType(OldOptionType&& from) noexcept
    : OldOptionType() {
    *this = ::std::move(from);
  }

  inline OldOptionType& operator=(OldOptionType&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const OldOptionType* internal_default_instance() {
    return reinterpret_cast<const OldOptionType*>(
               &_OldOptionType_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    25;

  void Swap(OldOptionType* other);
  friend void swap(OldOptionType& a, OldOptionType& b) {
    a.Swap(&b);
  }

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

  inline OldOptionType* New() const final {
    return CreateMaybeMessage<OldOptionType>(NULL);
  }

  OldOptionType* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<OldOptionType>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const OldOptionType& from);
  void MergeFrom(const OldOptionType& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(OldOptionType* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

  typedef OldOptionType_TestEnum TestEnum;
  static const TestEnum OLD_VALUE =
    OldOptionType_TestEnum_OLD_VALUE;
  static inline bool TestEnum_IsValid(int value) {
    return OldOptionType_TestEnum_IsValid(value);
  }
  static const TestEnum TestEnum_MIN =
    OldOptionType_TestEnum_TestEnum_MIN;
  static const TestEnum TestEnum_MAX =
    OldOptionType_TestEnum_TestEnum_MAX;
  static const int TestEnum_ARRAYSIZE =
    OldOptionType_TestEnum_TestEnum_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor*
  TestEnum_descriptor() {
    return OldOptionType_TestEnum_descriptor();
  }
  static inline const ::std::string& TestEnum_Name(TestEnum value) {
    return OldOptionType_TestEnum_Name(value);
  }
  static inline bool TestEnum_Parse(const ::std::string& name,
      TestEnum* value) {
    return OldOptionType_TestEnum_Parse(name, value);
  }

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

  // required .protobuf_unittest.OldOptionType.TestEnum value = 1;
  bool has_value() const;
  void clear_value();
  static const int kValueFieldNumber = 1;
  ::protobuf_unittest::OldOptionType_TestEnum value() const;
  void set_value(::protobuf_unittest::OldOptionType_TestEnum value);

  // @@protoc_insertion_point(class_scope:protobuf_unittest.OldOptionType)
 private:
  void set_has_value();
  void clear_has_value();

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  int value_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class NewOptionType : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.NewOptionType) */ {
 public:
  NewOptionType();
  virtual ~NewOptionType();

  NewOptionType(const NewOptionType& from);

  inline NewOptionType& operator=(const NewOptionType& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  NewOptionType(NewOptionType&& from) noexcept
    : NewOptionType() {
    *this = ::std::move(from);
  }

  inline NewOptionType& operator=(NewOptionType&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const NewOptionType* internal_default_instance() {
    return reinterpret_cast<const NewOptionType*>(
               &_NewOptionType_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    26;

  void Swap(NewOptionType* other);
  friend void swap(NewOptionType& a, NewOptionType& b) {
    a.Swap(&b);
  }

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

  inline NewOptionType* New() const final {
    return CreateMaybeMessage<NewOptionType>(NULL);
  }

  NewOptionType* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<NewOptionType>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const NewOptionType& from);
  void MergeFrom(const NewOptionType& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(NewOptionType* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

  typedef NewOptionType_TestEnum TestEnum;
  static const TestEnum OLD_VALUE =
    NewOptionType_TestEnum_OLD_VALUE;
  static const TestEnum NEW_VALUE =
    NewOptionType_TestEnum_NEW_VALUE;
  static inline bool TestEnum_IsValid(int value) {
    return NewOptionType_TestEnum_IsValid(value);
  }
  static const TestEnum TestEnum_MIN =
    NewOptionType_TestEnum_TestEnum_MIN;
  static const TestEnum TestEnum_MAX =
    NewOptionType_TestEnum_TestEnum_MAX;
  static const int TestEnum_ARRAYSIZE =
    NewOptionType_TestEnum_TestEnum_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor*
  TestEnum_descriptor() {
    return NewOptionType_TestEnum_descriptor();
  }
  static inline const ::std::string& TestEnum_Name(TestEnum value) {
    return NewOptionType_TestEnum_Name(value);
  }
  static inline bool TestEnum_Parse(const ::std::string& name,
      TestEnum* value) {
    return NewOptionType_TestEnum_Parse(name, value);
  }

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

  // required .protobuf_unittest.NewOptionType.TestEnum value = 1;
  bool has_value() const;
  void clear_value();
  static const int kValueFieldNumber = 1;
  ::protobuf_unittest::NewOptionType_TestEnum value() const;
  void set_value(::protobuf_unittest::NewOptionType_TestEnum value);

  // @@protoc_insertion_point(class_scope:protobuf_unittest.NewOptionType)
 private:
  void set_has_value();
  void clear_has_value();

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  int value_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class TestMessageWithRequiredEnumOption : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.TestMessageWithRequiredEnumOption) */ {
 public:
  TestMessageWithRequiredEnumOption();
  virtual ~TestMessageWithRequiredEnumOption();

  TestMessageWithRequiredEnumOption(const TestMessageWithRequiredEnumOption& from);

  inline TestMessageWithRequiredEnumOption& operator=(const TestMessageWithRequiredEnumOption& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  TestMessageWithRequiredEnumOption(TestMessageWithRequiredEnumOption&& from) noexcept
    : TestMessageWithRequiredEnumOption() {
    *this = ::std::move(from);
  }

  inline TestMessageWithRequiredEnumOption& operator=(TestMessageWithRequiredEnumOption&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields();
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields();
  }

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

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const TestMessageWithRequiredEnumOption* internal_default_instance() {
    return reinterpret_cast<const TestMessageWithRequiredEnumOption*>(
               &_TestMessageWithRequiredEnumOption_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    27;

  void Swap(TestMessageWithRequiredEnumOption* other);
  friend void swap(TestMessageWithRequiredEnumOption& a, TestMessageWithRequiredEnumOption& b) {
    a.Swap(&b);
  }

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

  inline TestMessageWithRequiredEnumOption* New() const final {
    return CreateMaybeMessage<TestMessageWithRequiredEnumOption>(NULL);
  }

  TestMessageWithRequiredEnumOption* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<TestMessageWithRequiredEnumOption>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const TestMessageWithRequiredEnumOption& from);
  void MergeFrom(const TestMessageWithRequiredEnumOption& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(TestMessageWithRequiredEnumOption* other);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return NULL;
  }
  inline void* MaybeArenaPtr() const {
    return NULL;
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

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

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

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

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::HasBits<1> _has_bits_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto::TableStruct;
};
// ===================================================================

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 kOneofOpt1FieldNumber = 7740111;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::OneofOptions,
    ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  oneof_opt1;
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;
static const int kRequiredEnumOptFieldNumber = 106161807;
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
    ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::OldOptionType >, 11, false >
  required_enum_opt;

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

#ifdef __GNUC__
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif  // __GNUC__
// TestMessageWithCustomOptions

// optional string field1 = 1 [ctype = CORD, (.protobuf_unittest.field_opt1) = 8765432109];
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() {
  field1_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_field1();
}
inline const ::std::string& TestMessageWithCustomOptions::field1() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.TestMessageWithCustomOptions.field1)
  return field1_.GetNoArena();
}
inline void TestMessageWithCustomOptions::set_field1(const ::std::string& value) {
  set_has_field1();
  field1_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:protobuf_unittest.TestMessageWithCustomOptions.field1)
}
#if LANG_CXX11
inline void TestMessageWithCustomOptions::set_field1(::std::string&& value) {
  set_has_field1();
  field1_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest.TestMessageWithCustomOptions.field1)
}
#endif
inline void TestMessageWithCustomOptions::set_field1(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_field1();
  field1_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(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();
  field1_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(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();
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestMessageWithCustomOptions.field1)
  return field1_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* TestMessageWithCustomOptions::release_field1() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.TestMessageWithCustomOptions.field1)
  if (!has_field1()) {
    return NULL;
  }
  clear_has_field1();
  return field1_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void TestMessageWithCustomOptions::set_allocated_field1(::std::string* field1) {
  if (field1 != NULL) {
    set_has_field1();
  } else {
    clear_has_field1();
  }
  field1_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), field1);
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestMessageWithCustomOptions.field1)
}

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

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

// 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_->Clear();
  clear_has_bar();
}
inline const ::protobuf_unittest::ComplexOptionType1& ComplexOptionType2::_internal_bar() const {
  return *bar_;
}
inline const ::protobuf_unittest::ComplexOptionType1& ComplexOptionType2::bar() const {
  const ::protobuf_unittest::ComplexOptionType1* p = bar_;
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType2.bar)
  return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest::ComplexOptionType1*>(
      &::protobuf_unittest::_ComplexOptionType1_default_instance_);
}
inline ::protobuf_unittest::ComplexOptionType1* ComplexOptionType2::release_bar() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.ComplexOptionType2.bar)
  clear_has_bar();
  ::protobuf_unittest::ComplexOptionType1* temp = bar_;
  bar_ = NULL;
  return temp;
}
inline ::protobuf_unittest::ComplexOptionType1* ComplexOptionType2::mutable_bar() {
  set_has_bar();
  if (bar_ == NULL) {
    auto* p = CreateMaybeMessage<::protobuf_unittest::ComplexOptionType1>(GetArenaNoVirtual());
    bar_ = p;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.ComplexOptionType2.bar)
  return bar_;
}
inline void ComplexOptionType2::set_allocated_bar(::protobuf_unittest::ComplexOptionType1* bar) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  if (message_arena == NULL) {
    delete bar_;
  }
  if (bar) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      bar = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, bar, submessage_arena);
    }
    set_has_bar();
  } else {
    clear_has_bar();
  }
  bar_ = 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] & 0x00000004u) != 0;
}
inline void ComplexOptionType2::set_has_baz() {
  _has_bits_[0] |= 0x00000004u;
}
inline void ComplexOptionType2::clear_has_baz() {
  _has_bits_[0] &= ~0x00000004u;
}
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] & 0x00000002u) != 0;
}
inline void ComplexOptionType2::set_has_fred() {
  _has_bits_[0] |= 0x00000002u;
}
inline void ComplexOptionType2::clear_has_fred() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void ComplexOptionType2::clear_fred() {
  if (fred_ != NULL) fred_->Clear();
  clear_has_fred();
}
inline const ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4& ComplexOptionType2::_internal_fred() const {
  return *fred_;
}
inline const ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4& ComplexOptionType2::fred() const {
  const ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* p = fred_;
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType2.fred)
  return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4*>(
      &::protobuf_unittest::_ComplexOptionType2_ComplexOptionType4_default_instance_);
}
inline ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* ComplexOptionType2::release_fred() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.ComplexOptionType2.fred)
  clear_has_fred();
  ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* temp = fred_;
  fred_ = NULL;
  return temp;
}
inline ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* ComplexOptionType2::mutable_fred() {
  set_has_fred();
  if (fred_ == NULL) {
    auto* p = CreateMaybeMessage<::protobuf_unittest::ComplexOptionType2_ComplexOptionType4>(GetArenaNoVirtual());
    fred_ = p;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.ComplexOptionType2.fred)
  return fred_;
}
inline void ComplexOptionType2::set_allocated_fred(::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* fred) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  if (message_arena == NULL) {
    delete fred_;
  }
  if (fred) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      fred = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, fred, submessage_arena);
    }
    set_has_fred();
  } else {
    clear_has_fred();
  }
  fred_ = 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 ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4* ComplexOptionType2::mutable_barney(int index) {
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.ComplexOptionType2.barney)
  return barney_.Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::ComplexOptionType2_ComplexOptionType4 >*
ComplexOptionType2::mutable_barney() {
  // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.ComplexOptionType2.barney)
  return &barney_;
}
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::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_;
}

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

// 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] & 0x00000002u) != 0;
}
inline void ComplexOptionType3::set_has_qux() {
  _has_bits_[0] |= 0x00000002u;
}
inline void ComplexOptionType3::clear_has_qux() {
  _has_bits_[0] &= ~0x00000002u;
}
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] & 0x00000001u) != 0;
}
inline void ComplexOptionType3::set_has_complexoptiontype5() {
  _has_bits_[0] |= 0x00000001u;
}
inline void ComplexOptionType3::clear_has_complexoptiontype5() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void ComplexOptionType3::clear_complexoptiontype5() {
  if (complexoptiontype5_ != NULL) complexoptiontype5_->Clear();
  clear_has_complexoptiontype5();
}
inline const ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5& ComplexOptionType3::_internal_complexoptiontype5() const {
  return *complexoptiontype5_;
}
inline const ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5& ComplexOptionType3::complexoptiontype5() const {
  const ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* p = complexoptiontype5_;
  // @@protoc_insertion_point(field_get:protobuf_unittest.ComplexOptionType3.complexoptiontype5)
  return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5*>(
      &::protobuf_unittest::_ComplexOptionType3_ComplexOptionType5_default_instance_);
}
inline ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* ComplexOptionType3::release_complexoptiontype5() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.ComplexOptionType3.complexoptiontype5)
  clear_has_complexoptiontype5();
  ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* temp = complexoptiontype5_;
  complexoptiontype5_ = NULL;
  return temp;
}
inline ::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* ComplexOptionType3::mutable_complexoptiontype5() {
  set_has_complexoptiontype5();
  if (complexoptiontype5_ == NULL) {
    auto* p = CreateMaybeMessage<::protobuf_unittest::ComplexOptionType3_ComplexOptionType5>(GetArenaNoVirtual());
    complexoptiontype5_ = p;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.ComplexOptionType3.complexoptiontype5)
  return complexoptiontype5_;
}
inline void ComplexOptionType3::set_allocated_complexoptiontype5(::protobuf_unittest::ComplexOptionType3_ComplexOptionType5* complexoptiontype5) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  if (message_arena == NULL) {
    delete complexoptiontype5_;
  }
  if (complexoptiontype5) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      complexoptiontype5 = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, complexoptiontype5, submessage_arena);
    }
    set_has_complexoptiontype5();
  } else {
    clear_has_complexoptiontype5();
  }
  complexoptiontype5_ = 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() {
  s_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_s();
}
inline const ::std::string& AggregateMessageSetElement::s() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.AggregateMessageSetElement.s)
  return s_.GetNoArena();
}
inline void AggregateMessageSetElement::set_s(const ::std::string& value) {
  set_has_s();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:protobuf_unittest.AggregateMessageSetElement.s)
}
#if LANG_CXX11
inline void AggregateMessageSetElement::set_s(::std::string&& value) {
  set_has_s();
  s_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest.AggregateMessageSetElement.s)
}
#endif
inline void AggregateMessageSetElement::set_s(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_s();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(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();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(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();
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.AggregateMessageSetElement.s)
  return s_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* AggregateMessageSetElement::release_s() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.AggregateMessageSetElement.s)
  if (!has_s()) {
    return NULL;
  }
  clear_has_s();
  return s_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void AggregateMessageSetElement::set_allocated_s(::std::string* s) {
  if (s != NULL) {
    set_has_s();
  } else {
    clear_has_s();
  }
  s_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s);
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.AggregateMessageSetElement.s)
}

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

// Aggregate

// optional int32 i = 1;
inline bool Aggregate::has_i() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void Aggregate::set_has_i() {
  _has_bits_[0] |= 0x00000010u;
}
inline void Aggregate::clear_has_i() {
  _has_bits_[0] &= ~0x00000010u;
}
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] & 0x00000001u) != 0;
}
inline void Aggregate::set_has_s() {
  _has_bits_[0] |= 0x00000001u;
}
inline void Aggregate::clear_has_s() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void Aggregate::clear_s() {
  s_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_s();
}
inline const ::std::string& Aggregate::s() const {
  // @@protoc_insertion_point(field_get:protobuf_unittest.Aggregate.s)
  return s_.GetNoArena();
}
inline void Aggregate::set_s(const ::std::string& value) {
  set_has_s();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:protobuf_unittest.Aggregate.s)
}
#if LANG_CXX11
inline void Aggregate::set_s(::std::string&& value) {
  set_has_s();
  s_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest.Aggregate.s)
}
#endif
inline void Aggregate::set_s(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_s();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(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();
  s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(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();
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.Aggregate.s)
  return s_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* Aggregate::release_s() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.Aggregate.s)
  if (!has_s()) {
    return NULL;
  }
  clear_has_s();
  return s_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Aggregate::set_allocated_s(::std::string* s) {
  if (s != NULL) {
    set_has_s();
  } else {
    clear_has_s();
  }
  s_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s);
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.Aggregate.s)
}

// optional .protobuf_unittest.Aggregate sub = 3;
inline bool Aggregate::has_sub() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void Aggregate::set_has_sub() {
  _has_bits_[0] |= 0x00000002u;
}
inline void Aggregate::clear_has_sub() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void Aggregate::clear_sub() {
  if (sub_ != NULL) sub_->Clear();
  clear_has_sub();
}
inline const ::protobuf_unittest::Aggregate& Aggregate::_internal_sub() const {
  return *sub_;
}
inline const ::protobuf_unittest::Aggregate& Aggregate::sub() const {
  const ::protobuf_unittest::Aggregate* p = sub_;
  // @@protoc_insertion_point(field_get:protobuf_unittest.Aggregate.sub)
  return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest::Aggregate*>(
      &::protobuf_unittest::_Aggregate_default_instance_);
}
inline ::protobuf_unittest::Aggregate* Aggregate::release_sub() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.Aggregate.sub)
  clear_has_sub();
  ::protobuf_unittest::Aggregate* temp = sub_;
  sub_ = NULL;
  return temp;
}
inline ::protobuf_unittest::Aggregate* Aggregate::mutable_sub() {
  set_has_sub();
  if (sub_ == NULL) {
    auto* p = CreateMaybeMessage<::protobuf_unittest::Aggregate>(GetArenaNoVirtual());
    sub_ = p;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.Aggregate.sub)
  return sub_;
}
inline void Aggregate::set_allocated_sub(::protobuf_unittest::Aggregate* sub) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  if (message_arena == NULL) {
    delete sub_;
  }
  if (sub) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      sub = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, sub, submessage_arena);
    }
    set_has_sub();
  } else {
    clear_has_sub();
  }
  sub_ = 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] & 0x00000004u) != 0;
}
inline void Aggregate::set_has_file() {
  _has_bits_[0] |= 0x00000004u;
}
inline void Aggregate::clear_has_file() {
  _has_bits_[0] &= ~0x00000004u;
}
inline const ::google::protobuf::FileOptions& Aggregate::_internal_file() const {
  return *file_;
}
inline const ::google::protobuf::FileOptions& Aggregate::file() const {
  const ::google::protobuf::FileOptions* p = file_;
  // @@protoc_insertion_point(field_get:protobuf_unittest.Aggregate.file)
  return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::FileOptions*>(
      &::google::protobuf::_FileOptions_default_instance_);
}
inline ::google::protobuf::FileOptions* Aggregate::release_file() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.Aggregate.file)
  clear_has_file();
  ::google::protobuf::FileOptions* temp = file_;
  file_ = NULL;
  return temp;
}
inline ::google::protobuf::FileOptions* Aggregate::mutable_file() {
  set_has_file();
  if (file_ == NULL) {
    auto* p = CreateMaybeMessage<::google::protobuf::FileOptions>(GetArenaNoVirtual());
    file_ = p;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.Aggregate.file)
  return file_;
}
inline void Aggregate::set_allocated_file(::google::protobuf::FileOptions* file) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  if (message_arena == NULL) {
    delete reinterpret_cast< ::google::protobuf::MessageLite*>(file_);
  }
  if (file) {
    ::google::protobuf::Arena* submessage_arena =
      reinterpret_cast<::google::protobuf::MessageLite*>(file)->GetArena();
    if (message_arena != submessage_arena) {
      file = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, file, submessage_arena);
    }
    set_has_file();
  } else {
    clear_has_file();
  }
  file_ = 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] & 0x00000008u) != 0;
}
inline void Aggregate::set_has_mset() {
  _has_bits_[0] |= 0x00000008u;
}
inline void Aggregate::clear_has_mset() {
  _has_bits_[0] &= ~0x00000008u;
}
inline void Aggregate::clear_mset() {
  if (mset_ != NULL) mset_->Clear();
  clear_has_mset();
}
inline const ::protobuf_unittest::AggregateMessageSet& Aggregate::_internal_mset() const {
  return *mset_;
}
inline const ::protobuf_unittest::AggregateMessageSet& Aggregate::mset() const {
  const ::protobuf_unittest::AggregateMessageSet* p = mset_;
  // @@protoc_insertion_point(field_get:protobuf_unittest.Aggregate.mset)
  return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest::AggregateMessageSet*>(
      &::protobuf_unittest::_AggregateMessageSet_default_instance_);
}
inline ::protobuf_unittest::AggregateMessageSet* Aggregate::release_mset() {
  // @@protoc_insertion_point(field_release:protobuf_unittest.Aggregate.mset)
  clear_has_mset();
  ::protobuf_unittest::AggregateMessageSet* temp = mset_;
  mset_ = NULL;
  return temp;
}
inline ::protobuf_unittest::AggregateMessageSet* Aggregate::mutable_mset() {
  set_has_mset();
  if (mset_ == NULL) {
    auto* p = CreateMaybeMessage<::protobuf_unittest::AggregateMessageSet>(GetArenaNoVirtual());
    mset_ = p;
  }
  // @@protoc_insertion_point(field_mutable:protobuf_unittest.Aggregate.mset)
  return mset_;
}
inline void Aggregate::set_allocated_mset(::protobuf_unittest::AggregateMessageSet* mset) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  if (message_arena == NULL) {
    delete mset_;
  }
  if (mset) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      mset = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, mset, submessage_arena);
    }
    set_has_mset();
  } else {
    clear_has_mset();
  }
  mset_ = mset;
  // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.Aggregate.mset)
}

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

// AggregateMessage

// optional int32 fieldname = 1 [(.protobuf_unittest.fieldopt) = {
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 [(.protobuf_unittest.field_opt1) = 1002];
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

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

// OldOptionType

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

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

// NewOptionType

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

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

// TestMessageWithRequiredEnumOption

#ifdef __GNUC__
  #pragma GCC diagnostic pop
#endif  // __GNUC__
// -------------------------------------------------------------------

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


// @@protoc_insertion_point(namespace_scope)

}  // namespace protobuf_unittest

namespace google {
namespace protobuf {

template <> struct is_proto_enum< ::protobuf_unittest::TestMessageWithCustomOptions_AnEnum> : ::std::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> : ::std::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> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest::NestedOptionType_NestedEnum>() {
  return ::protobuf_unittest::NestedOptionType_NestedEnum_descriptor();
}
template <> struct is_proto_enum< ::protobuf_unittest::OldOptionType_TestEnum> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest::OldOptionType_TestEnum>() {
  return ::protobuf_unittest::OldOptionType_TestEnum_descriptor();
}
template <> struct is_proto_enum< ::protobuf_unittest::NewOptionType_TestEnum> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest::NewOptionType_TestEnum>() {
  return ::protobuf_unittest::NewOptionType_TestEnum_descriptor();
}
template <> struct is_proto_enum< ::protobuf_unittest::MethodOpt1> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest::MethodOpt1>() {
  return ::protobuf_unittest::MethodOpt1_descriptor();
}
template <> struct is_proto_enum< ::protobuf_unittest::AggregateEnum> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest::AggregateEnum>() {
  return ::protobuf_unittest::AggregateEnum_descriptor();
}

}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)

#endif  // PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fcustom_5foptions_2eproto
