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

#ifndef PROTOBUF_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto__INCLUDED
#define PROTOBUF_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto__INCLUDED

#include <string>

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

#if GOOGLE_PROTOBUF_VERSION < 2004000
#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 2004001 < 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/generated_message_util.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/generated_message_reflection.h>
#include "google/protobuf/unittest.pb.h"
// @@protoc_insertion_point(includes)

namespace protobuf_unittest {

// Internal implementation detail -- do not call these.
void  protobuf_AddDesc_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
void protobuf_AssignDesc_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();

class TestOptimizedForSize;
class TestRequiredOptimizedForSize;
class TestOptionalOptimizedForSize;

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

class TestOptimizedForSize : public ::google::protobuf::Message {
 public:
  TestOptimizedForSize();
  virtual ~TestOptimizedForSize();
  
  TestOptimizedForSize(const TestOptimizedForSize& from);
  
  inline TestOptimizedForSize& operator=(const TestOptimizedForSize& from) {
    CopyFrom(from);
    return *this;
  }
  
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }
  
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }
  
  static const ::google::protobuf::Descriptor* descriptor();
  static const TestOptimizedForSize& default_instance();
  
  void Swap(TestOptimizedForSize* other);
  
  // implements Message ----------------------------------------------
  
  TestOptimizedForSize* New() const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  
  ::google::protobuf::Metadata GetMetadata() const;
  
  // nested types ----------------------------------------------------
  
  // accessors -------------------------------------------------------
  
  // optional int32 i = 1;
  inline bool has_i() const;
  inline void clear_i();
  static const int kIFieldNumber = 1;
  inline ::google::protobuf::int32 i() const;
  inline void set_i(::google::protobuf::int32 value);
  
  // optional .protobuf_unittest.ForeignMessage msg = 19;
  inline bool has_msg() const;
  inline void clear_msg();
  static const int kMsgFieldNumber = 19;
  inline const ::protobuf_unittest::ForeignMessage& msg() const;
  inline ::protobuf_unittest::ForeignMessage* mutable_msg();
  inline ::protobuf_unittest::ForeignMessage* release_msg();
  
  GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(TestOptimizedForSize)
  static const int kTestExtensionFieldNumber = 1234;
  static ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestOptimizedForSize,
      ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
    test_extension;
  static const int kTestExtension2FieldNumber = 1235;
  static ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestOptimizedForSize,
      ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestRequiredOptimizedForSize >, 11, false >
    test_extension2;
  // @@protoc_insertion_point(class_scope:protobuf_unittest.TestOptimizedForSize)
 private:
  inline void set_has_i();
  inline void clear_has_i();
  inline void set_has_msg();
  inline void clear_has_msg();
  
  ::google::protobuf::internal::ExtensionSet _extensions_;
  
  ::google::protobuf::UnknownFieldSet _unknown_fields_;
  
  ::protobuf_unittest::ForeignMessage* msg_;
  ::google::protobuf::int32 i_;
  
  mutable int _cached_size_;
  ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
  
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
  
  void InitAsDefaultInstance();
  static TestOptimizedForSize* default_instance_;
};
// -------------------------------------------------------------------

class TestRequiredOptimizedForSize : public ::google::protobuf::Message {
 public:
  TestRequiredOptimizedForSize();
  virtual ~TestRequiredOptimizedForSize();
  
  TestRequiredOptimizedForSize(const TestRequiredOptimizedForSize& from);
  
  inline TestRequiredOptimizedForSize& operator=(const TestRequiredOptimizedForSize& from) {
    CopyFrom(from);
    return *this;
  }
  
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }
  
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }
  
  static const ::google::protobuf::Descriptor* descriptor();
  static const TestRequiredOptimizedForSize& default_instance();
  
  void Swap(TestRequiredOptimizedForSize* other);
  
  // implements Message ----------------------------------------------
  
  TestRequiredOptimizedForSize* New() const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  
  ::google::protobuf::Metadata GetMetadata() const;
  
  // nested types ----------------------------------------------------
  
  // accessors -------------------------------------------------------
  
  // required int32 x = 1;
  inline bool has_x() const;
  inline void clear_x();
  static const int kXFieldNumber = 1;
  inline ::google::protobuf::int32 x() const;
  inline void set_x(::google::protobuf::int32 value);
  
  // @@protoc_insertion_point(class_scope:protobuf_unittest.TestRequiredOptimizedForSize)
 private:
  inline void set_has_x();
  inline void clear_has_x();
  
  ::google::protobuf::UnknownFieldSet _unknown_fields_;
  
  ::google::protobuf::int32 x_;
  
  mutable int _cached_size_;
  ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
  
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
  
  void InitAsDefaultInstance();
  static TestRequiredOptimizedForSize* default_instance_;
};
// -------------------------------------------------------------------

class TestOptionalOptimizedForSize : public ::google::protobuf::Message {
 public:
  TestOptionalOptimizedForSize();
  virtual ~TestOptionalOptimizedForSize();
  
  TestOptionalOptimizedForSize(const TestOptionalOptimizedForSize& from);
  
  inline TestOptionalOptimizedForSize& operator=(const TestOptionalOptimizedForSize& from) {
    CopyFrom(from);
    return *this;
  }
  
  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }
  
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }
  
  static const ::google::protobuf::Descriptor* descriptor();
  static const TestOptionalOptimizedForSize& default_instance();
  
  void Swap(TestOptionalOptimizedForSize* other);
  
  // implements Message ----------------------------------------------
  
  TestOptionalOptimizedForSize* New() const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  
  ::google::protobuf::Metadata GetMetadata() const;
  
  // nested types ----------------------------------------------------
  
  // accessors -------------------------------------------------------
  
  // optional .protobuf_unittest.TestRequiredOptimizedForSize o = 1;
  inline bool has_o() const;
  inline void clear_o();
  static const int kOFieldNumber = 1;
  inline const ::protobuf_unittest::TestRequiredOptimizedForSize& o() const;
  inline ::protobuf_unittest::TestRequiredOptimizedForSize* mutable_o();
  inline ::protobuf_unittest::TestRequiredOptimizedForSize* release_o();
  
  // @@protoc_insertion_point(class_scope:protobuf_unittest.TestOptionalOptimizedForSize)
 private:
  inline void set_has_o();
  inline void clear_has_o();
  
  ::google::protobuf::UnknownFieldSet _unknown_fields_;
  
  ::protobuf_unittest::TestRequiredOptimizedForSize* o_;
  
  mutable int _cached_size_;
  ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
  
  friend void  protobuf_AddDesc_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
  friend void protobuf_AssignDesc_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
  friend void protobuf_ShutdownFile_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto();
  
  void InitAsDefaultInstance();
  static TestOptionalOptimizedForSize* default_instance_;
};
// ===================================================================


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

// TestOptimizedForSize

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

// optional .protobuf_unittest.ForeignMessage msg = 19;
inline bool TestOptimizedForSize::has_msg() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void TestOptimizedForSize::set_has_msg() {
  _has_bits_[0] |= 0x00000002u;
}
inline void TestOptimizedForSize::clear_has_msg() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void TestOptimizedForSize::clear_msg() {
  if (msg_ != NULL) msg_->::protobuf_unittest::ForeignMessage::Clear();
  clear_has_msg();
}
inline const ::protobuf_unittest::ForeignMessage& TestOptimizedForSize::msg() const {
  return msg_ != NULL ? *msg_ : *default_instance_->msg_;
}
inline ::protobuf_unittest::ForeignMessage* TestOptimizedForSize::mutable_msg() {
  set_has_msg();
  if (msg_ == NULL) msg_ = new ::protobuf_unittest::ForeignMessage;
  return msg_;
}
inline ::protobuf_unittest::ForeignMessage* TestOptimizedForSize::release_msg() {
  clear_has_msg();
  ::protobuf_unittest::ForeignMessage* temp = msg_;
  msg_ = NULL;
  return temp;
}

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

// TestRequiredOptimizedForSize

// required int32 x = 1;
inline bool TestRequiredOptimizedForSize::has_x() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void TestRequiredOptimizedForSize::set_has_x() {
  _has_bits_[0] |= 0x00000001u;
}
inline void TestRequiredOptimizedForSize::clear_has_x() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void TestRequiredOptimizedForSize::clear_x() {
  x_ = 0;
  clear_has_x();
}
inline ::google::protobuf::int32 TestRequiredOptimizedForSize::x() const {
  return x_;
}
inline void TestRequiredOptimizedForSize::set_x(::google::protobuf::int32 value) {
  set_has_x();
  x_ = value;
}

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

// TestOptionalOptimizedForSize

// optional .protobuf_unittest.TestRequiredOptimizedForSize o = 1;
inline bool TestOptionalOptimizedForSize::has_o() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void TestOptionalOptimizedForSize::set_has_o() {
  _has_bits_[0] |= 0x00000001u;
}
inline void TestOptionalOptimizedForSize::clear_has_o() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void TestOptionalOptimizedForSize::clear_o() {
  if (o_ != NULL) o_->::protobuf_unittest::TestRequiredOptimizedForSize::Clear();
  clear_has_o();
}
inline const ::protobuf_unittest::TestRequiredOptimizedForSize& TestOptionalOptimizedForSize::o() const {
  return o_ != NULL ? *o_ : *default_instance_->o_;
}
inline ::protobuf_unittest::TestRequiredOptimizedForSize* TestOptionalOptimizedForSize::mutable_o() {
  set_has_o();
  if (o_ == NULL) o_ = new ::protobuf_unittest::TestRequiredOptimizedForSize;
  return o_;
}
inline ::protobuf_unittest::TestRequiredOptimizedForSize* TestOptionalOptimizedForSize::release_o() {
  clear_has_o();
  ::protobuf_unittest::TestRequiredOptimizedForSize* temp = o_;
  o_ = NULL;
  return temp;
}


// @@protoc_insertion_point(namespace_scope)

}  // namespace protobuf_unittest

#ifndef SWIG
namespace google {
namespace protobuf {


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

// @@protoc_insertion_point(global_scope)

#endif  // PROTOBUF_google_2fprotobuf_2funittest_5foptimize_5ffor_2eproto__INCLUDED
