Check in prebuilt protoc compiler and protobuf python lib

Updated to latest protobuf version 21.9, proceeding as follow:

1. Download libprotobuf from
https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protobuf-all-21.9.zip

2. Goto protobuf-all-21.9/python

3. python setup.py build

4. Copy `python` folder from protobuf-all-21.9 to
   the local path for `prebuilts/libprotobuf/linux`

5. Copy `src` folder from protobuf-all-21.9 to
   the local path for `prebuilts/libprotobuf/linux`,
   this is necessary for unit tests.

6. Copy `LICENSE`, `CHANGES.txt` from protobuf-all-21.9 to
   the local path for `prebuilts/libprotobuf/linux`

6. Download the prebuilt protoc compiler from
   https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip

7. Copy `bin` folder, `include` folder, `readme.txt`
   from protoc-21.9-linux-x86_64 into
   the local path for `prebuilts/libprotobuf/linux`

8. Update `METADATA` file

Bug: None
Change-Id: I8bfee218492ca001e951cb4adcc8929d14259767
(cherry picked from commit fbc6810e0ea7322e5ed7c80662ddc4aad97fe60d)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0d20b64
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.pyc
diff --git a/CHANGES.txt b/CHANGES.txt
new file mode 100644
index 0000000..79c5b29
--- /dev/null
+++ b/CHANGES.txt
@@ -0,0 +1,3475 @@
+2022-10-26 version 21.9 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+

+  C++

+  * Update zlib to 1.2.13 (#10819)

+

+  Python

+  * Target MacOS 10.9 to fix #10799 (#10807)

+

+  Ruby

+  * Replace libc strdup usage with internal impl to restore musl compat (#10818)

+

+2022-10-18 version 21.8 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+

+  Other

+  * Fix for grpc.tools #17995 & protobuf #7474 (handle UTF-8 paths in argumentfile) (#10721)

+

+  C++

+  * 21.x No longer define no_threadlocal on OpenBSD (#10743)

+

+  Java

+  * Mark default instance as immutable first to avoid race during static initialization of default instances (#10771)

+

+  Ruby

+  * Auto capitalize enums name in Ruby (#10454) (#10763)

+

+

+2022-09-29 version 21.7 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+  Java

+  * Refactoring java full runtime to reuse sub-message builders and prepare to

+    migrate parsing logic from parse constructor to builder.

+  * Move proto wireformat parsing functionality from the private "parsing

+    constructor" to the Builder class.

+  * Change the Lite runtime to prefer merging from the wireformat into mutable

+    messages rather than building up a new immutable object before merging. This

+    way results in fewer allocations and copy operations.

+  * Make message-type extensions merge from wire-format instead of building up

+    instances and merging afterwards. This has much better performance.

+  * Fix TextFormat parser to build up recurring (but supposedly not repeated)

+    sub-messages directly from text rather than building a new sub-message and

+    merging the fully formed message into the existing field.

+

+2022-09-13 version 21.6 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+

+C++

+* Reduce memory consumption of MessageSet parsing

+

+2022-08-09 version 21.5 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+

+  PHP

+  * Added getContainingOneof and getRealContainingOneof to descriptor.

+  * fix PHP readonly legacy files for nested messages

+

+  Python

+  * Fixed comparison of maps in Python.

+

+

+2022-07-25 version 21.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+

+  C++

+  * Reduce the required alignment of ArenaString from 8 to 4 (#10298)

+

+

+2022-07-19 version 21.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+  C++

+  * Add header search paths to Protobuf-C++.podspec (#10024)

+  * Fixed Visual Studio constinit errors (#10232)

+  * Fix #9947: make the ABI compatible between debug and non-debug builds (#10271)

+

+  UPB

+  * Allow empty package names (fixes behavior regression in 4.21.0)

+  * Fix a SEGV bug when comparing a non-materialized sub-message (#10208)

+  * Fix several bugs in descriptor mapping containers (eg. descriptor.services_by_name)

+    * for x in mapping now yields keys rather than values, to match Python conventions and the behavior of the old library.

+    * Lookup operations now correctly reject unhashable types as map keys.

+    * We implement repr() to use the same format as dict.

+  * Fix maps to use the ScalarMapContainer class when appropriate

+  * Fix bug when parsing an unknown value in a proto2 enum extension (protocolbuffers/upb#717)

+

+  PHP

+  * Add "readonly" as a keyword for PHP and add previous classnames to descriptor pool (#10041)

+

+  Python

+  * Make //:protobuf_python and //:well_known_types_py_pb2 public (#10118)

+

+  Bazel

+  * Add back a filegroup for :well_known_protos (#10061)

+

+2022-06-27 version 21.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+  C++

+  * ArenaString improvements (fix alignment issue)

+

+  PHP

+  * API changes for OneOf  (#10102)

+

+

+2022-05-27 version 21.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+

+  C++

+  * cmake: Revert "Fix cmake install targets (#9822)" (#10060)

+  * Remove Abseil dependency from CMake build (#10056)

+

+  Python

+  * Update python wheel metadata with more information incl. required python version (#10058)

+  * Fix segmentation fault when instantiating field via repeated field assignment (#10066)

+

+2022-05-25 version 21.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+

+  C++

+  * cmake: Call get_filename_component() with DIRECTORY mode instead of PATH mode (#9614)

+  * Escape GetObject macro inside protoc-generated code (#9739)

+  * Update CMake configuration to add a dependency on Abseil (#9793)

+  * Fix cmake install targets (#9822)

+  * Use __constinit only in GCC 12.2 and up (#9936)

+

+  Java

+  * Update protobuf_version.bzl to separate protoc and per-language java … (#9900)

+

+  Python

+  * Increment python major version to 4 in version.json for python upb (#9926)

+  * The C extension module for Python has been rewritten to use the upb library.

+    This is expected to deliver significant performance benefits, especially when

+    parsing large payloads.  There are some minor breaking changes, but these

+    should not impact most users.  For more information see:

+    https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

+  * Fixed win32 build and fixed str(message) on all Windows platforms. (#9976)

+  * The binary wheel for macOS now supports Apple silicon.

+

+  PHP

+  * [PHP] fix PHP build system (#9571)

+  * Fix building packaged PHP extension (#9727)

+  * fix: reserve "ReadOnly" keyword for PHP 8.1 and add compatibility (#9633)

+  * fix: phpdoc syntax for repeatedfield parameters (#9784)

+  * fix: phpdoc for repeatedfield (#9783)

+  * Change enum string name for reserved words (#9780)

+  * chore: [PHP] fix phpdoc for MapField keys (#9536)

+  * Fixed PHP SEGV by not writing to shared memory for zend_class_entry. (#9996)

+

+  Ruby

+  * Allow pre-compiled binaries for ruby 3.1.0 (#9566)

+  * Implement `respond_to?` in RubyMessage (#9677)

+  * [Ruby] Fix RepeatedField#last, #first inconsistencies (#9722)

+  * Do not use range based UTF-8 validation in truffleruby (#9769)

+  * Improve range handling logic of `RepeatedField` (#9799)

+  * Support x64-mingw-ucrt platform

+

+  Other

+  * [Kotlin] remove redundant public modifiers for compiled code (#9642)

+  * [C#] Update GetExtension to support getting typed value (#9655)

+  * Fix invalid dependency manifest when using `descriptor_set_out` (#9647)

+  * Fix C# generator handling of a field named "none" in a oneof (#9636)

+  * Add initial version.json file for 21-dev (#9840)

+  * Remove duplicate java generated code (#9909)

+  * Cherry-pick PR #9981 into 21.x branch (#10000)

+

+

+2022-05-19 version 21.0-rc2(C++/Java/Python/PHP/Objective-C/C#/Ruby)

+

+  Python

+  * Fix windows builds

+  * Throw more helpful error if generated code is out of date

+  * Fixed two reference leaks

+

+  Ruby

+  * Support x64-mingw-ucrt platform

+

+  PHP

+  * Fix SEGV by not writing to shared memory for zend_class_entry

+

+  C#

+  * Suppress warning CS8981

+

+  Other

+  * Fix Maven release to release actual osx_aarch64 binary

+  * Fix protoc zips to have the proto files for well known types

+

+2022-05-10 version 21.0-rc1 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

+

+  C++

+  * Rename main cmake/CMakeLists.txt to CMakeLists.txt (#9603)

+  * avoid allocating memory if all extension are cleared (#9345)

+  * cmake: Call get_filename_component() with DIRECTORY mode instead of PATH mode (#9614)

+  * Escape GetObject macro inside protoc-generated code (#9739)

+  * Update CMake configuration to add a dependency on Abseil (#9793)

+  * Use __constinit only in GCC 12.2 and up (#9936)

+  * Refactor generated message class layout

+  * Optimize tokenizer ParseInteger by removing division

+  * Reserve exactly the right amount of capacity in ExtensionSet::MergeFrom

+  * Parse FLT_MAX correctly when represented in JSON

+

+  Java

+  * Update protobuf_version.bzl to separate protoc and per-language java … (#9900)

+  * 6x speedup in ArrayEncoder.writeUInt32NotTag

+

+  Python

+  * Increment python major version to 4 in version.json for python upb (#9926)

+  * The C extension module for Python has been rewritten to use the upb library.

+    This is expected to deliver significant performance benefits, especially when

+    parsing large payloads.  There are some minor breaking changes, but these

+    should not impact most users.  For more information see:

+    https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

+  * Due to the breaking changes for Python, the major version number for Python

+    has been incremented.

+  * The binary wheel for macOS now supports Apple silicon.

+

+

+  PHP

+  * chore: [PHP] fix phpdoc for MapField keys (#9536)

+  * [PHP] Remove unnecessary zval initialization (#9600)

+  * [PHP] fix PHP build system (#9571)

+  * Fix building packaged PHP extension (#9727)

+  * fix: reserve "ReadOnly" keyword for PHP 8.1 and add compatibility (#9633)

+  * fix: phpdoc syntax for repeatedfield parameters (#9784)

+  * fix: phpdoc for repeatedfield (#9783)

+  * Change enum string name for reserved words (#9780)

+  * Fixed composer.json to only advertise compatibility with PHP 7.0+.  (#9819)

+

+  Ruby

+  * Allow pre-compiled binaries for ruby 3.1.0 (#9566)

+  * Implement `respond_to?` in RubyMessage (#9677)

+  * [Ruby] Fix RepeatedField#last, #first inconsistencies (#9722)

+  * Do not use range based UTF-8 validation in truffleruby (#9769)

+  * Improve range handling logic of `RepeatedField` (#9799)

+  * Disable the aarch64 build on macOS until it can be fixed. (#9816)

+

+  Other

+  * [Kotlin] remove redundant public modifiers for compiled code (#9642)

+  * [C#] Update GetExtension to support getting typed value (#9655)

+  * Fix invalid dependency manifest when using `descriptor_set_out` (#9647)

+  * Fix C# generator handling of a field named "none" in a oneof (#9636)

+  * Add initial version.json file for 21-dev (#9840)

+  * Remove duplicate java generated code (#9909)

+  * Fix versioning issues in 3.20.0

+

+  Compiler

+  * Protoc outputs the list of suggested field numbers when invalid field

+    numbers are specified in the .proto file.

+  * Require package names to be less than 512 bytes in length

+

+2022-04-21 version 3.20.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  PHP

+  * Fix building packaged PHP extension (#9727)

+

+  Other

+  * Fix versioning issues in 3.20.0

+

+2022-03-04 version 3.20.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Ruby

+  * Dropped Ruby 2.3 and 2.4 support for CI and releases. (#9311)

+  * Added Ruby 3.1 support for CI and releases (#9566).

+  * Message.decode/encode: Add recursion_limit option (#9218/#9486)

+  * Allocate with xrealloc()/xfree() so message allocation is visible to the

+    Ruby GC.  In certain tests this leads to much lower memory usage due to more

+    frequent GC runs (#9586).

+  * Fix conversion of singleton classes in Ruby (#9342)

+  * Suppress warning for intentional circular require (#9556)

+  * JSON will now output shorter strings for double and float fields when possible

+    without losing precision.

+  * Encoding and decoding of binary format will now work properly on big-endian

+    systems.

+  * UTF-8 verification was fixed to properly reject surrogate code points.

+  * Unknown enums for proto2 protos now properly implement proto2's behavior of

+    putting such values in unknown fields.

+

+  Java

+  * Revert "Standardize on Array copyOf" (#9400)

+  * Resolve more java field accessor name conflicts (#8198)

+  * Don't support map fields in DynamicMessage.Builder.{getFieldBuilder,getRepeatedFieldBuilder}

+  * Fix parseFrom to only throw InvalidProtocolBufferException

+  * InvalidProtocolBufferException now allows arbitrary wrapped Exception types.

+  * Fix bug in `FieldSet.Builder.mergeFrom`

+  * Flush CodedOutputStream also flushes underlying OutputStream

+  * When oneof case is the same and the field type is Message, merge the

+    subfield. (previously it was replaced.)’

+  * Add @CheckReturnValue to some protobuf types

+  * Report original exceptions when parsing JSON

+  * Add more info to @deprecated javadoc for set/get/has methods

+  * Fix initialization bug in doc comment line numbers

+  * Fix comments for message set wire format.

+

+  Kotlin

+  * Add test scope to kotlin-test for protobuf-kotlin-lite (#9518)

+  * Add orNull extensions for optional message fields.

+  * Add orNull extensions to all proto3 message fields.

+

+  Python

+  * Dropped support for Python < 3.7 (#9480)

+  * Protoc is now able to generate python stubs (.pyi) with --pyi_out

+  * Pin multibuild scripts to get manylinux1 wheels back (#9216)

+  * Fix type annotations of some Duration and Timestamp methods.

+  * Repeated field containers are now generic in field types and could be used

+    in type annotations.

+  * Protobuf python generated codes are simplified. Descriptors and message

+    classes' definitions are now dynamic created in internal/builder.py.

+    Insertion Points for messages classes are discarded.

+  * has_presence is added for FieldDescriptor in python

+  * Loosen indexing type requirements to allow valid __index__() implementations

+    rather than only PyLongObjects.

+  * Fix the deepcopy bug caused by not copying message_listener.

+  * Added python JSON parse recursion limit (default 100)

+  * Path info is added for python JSON parse errors

+  * Pure python repeated scalar fields will not able to pickle. Convert to list

+    first.

+  * Timestamp.ToDatetime() now accepts an optional tzinfo parameter. If

+    specified, the function returns a timezone-aware datetime in the given time

+    zone. If omitted or None, the function returns a timezone-naive UTC datetime

+    (as previously).

+  * Adds client_streaming and server_streaming fields to MethodDescriptor.

+  * Add "ensure_ascii" parameter to json_format.MessageToJson. This allows smaller

+    JSON serializations with UTF-8 or other non-ASCII encodings.

+  * Added experimental support for directly assigning numpy scalars and array.

+  * Improve the calculation of public_dependencies in DescriptorPool.

+  * [Breaking Change] Disallow setting fields to numpy singleton arrays or repeated fields to numpy

+    multi-dimensional arrays. Numpy arrays should be indexed or flattened explicitly before assignment.

+

+  Compiler

+  * Migrate IsDefault(const std::string*) and UnsafeSetDefault(const std::string*)

+  * Implement strong qualified tags for TaggedPtr

+  * Rework allocations to power-of-two byte sizes.

+  * Migrate IsDefault(const std::string*) and UnsafeSetDefault(const std::string*)

+  * Implement strong qualified tags for TaggedPtr

+  * Make TaggedPtr Set...() calls explicitly spell out the content type.

+  * Check for parsing error before verifying UTF8.

+  * Enforce a maximum message nesting limit of 32 in the descriptor builder to

+    guard against stack overflows

+  * Fixed bugs in operators for RepeatedPtrIterator

+  * Assert a maximum map alignment for allocated values

+  * Fix proto1 group extension protodb parsing error

+  * Do not log/report the same descriptor symbol multiple times if it contains

+    more than one invalid character.

+  * Add UnknownFieldSet::SerializeToString and SerializeToCodedStream.

+  * Remove explicit default pointers and deprecated API from protocol compiler

+

+  Arenas

+  * Change Repeated*Field to reuse memory when using arenas.

+  * Implements pbarenaz for profiling proto arenas

+  * Introduce CreateString() and CreateArenaString() for cleaner semantics

+  * Fix unreferenced parameter for MSVC builds

+  * Add UnsafeSetAllocated to be used for one-of string fields.

+  * Make Arena::AllocateAligned() a public function.

+  * Determine if ArenaDtor related code generation is necessary in one place.

+  * Implement on demand register ArenaDtor for InlinedStringField

+

+  C++

+  * Enable testing via CTest (#8737)

+  * Add option to use external GTest in CMake (#8736)

+  * CMake: Set correct sonames for libprotobuf-lite.so and libprotoc.so (#8635) (#9529)

+  * Add cmake option `protobuf_INSTALL` to not install files (#7123)

+  * CMake: Allow custom plugin options e.g. to generate mocks (#9105)

+  * CMake: Use linker version scripts (#9545)

+  * Manually *struct Cord fields to work better with arenas.

+  * Manually destruct map fields.

+  * Generate narrower code

+  * Fix https://github.com/protocolbuffers/protobuf/issues/9378 by removing

+    shadowed _cached_size_ field

+  * Remove GetPointer() and explicit nullptr defaults.

+  * Add proto_h flag for speeding up large builds

+  * Add missing overload for reference wrapped fields.

+  * Add MergedDescriptorDatabase::FindAllFileNames()

+  * RepeatedField now defines an iterator type instead of using a pointer.

+  * Remove obsolete macros GOOGLE_PROTOBUF_HAS_ONEOF and GOOGLE_PROTOBUF_HAS_ARENAS.

+

+  PHP

+  * Fix: add missing reserved classnames (#9458)

+  * PHP 8.1 compatibility (#9370)

+

+  C#

+  * Fix trim warnings (#9182)

+  * Fixes NullReferenceException when accessing FieldDescriptor.IsPacked (#9430)

+  * Add ToProto() method to all descriptor classes (#9426)

+  * Add an option to preserve proto names in JsonFormatter (#6307)

+

+  Objective-C

+  * Add prefix_to_proto_package_mappings_path option. (#9498)

+  * Rename `proto_package_to_prefix_mappings_path` to `package_to_prefix_mappings_path`. (#9552)

+  * Add a generation option to control use of forward declarations in headers. (#9568)

+

+2022-01-28 version 3.19.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Python

+  * Make libprotobuf symbols local on OSX to fix issue #9395 (#9435)

+

+  Ruby

+  * Fixed a data loss bug that could occur when the number of `optional`

+    fields in a message is an exact multiple of 32. (#9440).

+

+  PHP

+  * Fixed a data loss bug that could occur when the number of `optional`

+    fields in a message is an exact multiple of 32. (#9440).

+

+2022-01-10 version 3.19.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Python

+  * Fix missing Windows wheel for Python 3.10 on PyPI

+

+2022-01-05 version 3.19.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Java

+  * Improve performance characteristics of UnknownFieldSet parsing (#9371)

+  * This release addresses a Security Advisory for Java users

+   (https://github.com/protocolbuffers/protobuf/security/advisories/GHSA-wrvw-hg22-4m67)

+

+2022-01-05 version 3.18.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Java

+  * Improve performance characteristics of UnknownFieldSet parsing (#9371)

+  * This release addresses a Security Advisory for Java users

+   (https://github.com/protocolbuffers/protobuf/security/advisories/GHSA-wrvw-hg22-4m67)

+

+2022-01-05 version 3.16.1 (Java)

+

+  Java

+  * Improve performance characteristics of UnknownFieldSet parsing (#9371)

+  * This release addresses a Security Advisory for Java users

+   (https://github.com/protocolbuffers/protobuf/security/advisories/GHSA-wrvw-hg22-4m67)

+

+2021-10-28 version 3.19.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Bazel

+  * Ensure that release archives contain everything needed for Bazel (#9131)

+  * Align dependency handling with Bazel best practices (#9165)

+

+  JavaScript

+  * Fix `ReferenceError: window is not defined` when getting the global object (#9156)

+

+  Ruby

+  * Fix memory leak in MessageClass.encode (#9150)

+

+2021-10-15 version 3.19.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Make proto2::Message::DiscardUnknownFields() non-virtual

+  * Separate RepeatedPtrField into its own header file

+  * For default floating point values of 0, consider all bits significant

+  * cmake: support `MSVC_RUNTIME_LIBRARY` property (#8851)

+  * Fix shadowing warnings (#8926)

+  * Fix for issue #8484, constant initialization doesn't compile in msvc clang-cl environment (#8993)

+  * Fix build on AIX and SunOS (#8373) (#9065)

+  * Add Android stlport and default toolchains to BUILD. (#8290)

+

+  Java

+  * For default floating point values of 0, consider all bits significant

+  * Annotate `//java/com/google/protobuf/util/...` with nullness annotations

+  * Use ArrayList copy constructor (#7853)

+

+  Kotlin

+  * Switch Kotlin proto DSLs to be implemented with inline value classes

+  * Fix inlining and deprecation for repeated string fields in kotlin (#9120)

+

+  Python

+  * Proto2 DecodeError now includes message name in error message

+  * Make MessageToDict convert map keys to strings (#8122)

+  * Add python-requires in setup.py (#8989)

+  * Add python 3.10 (#9034)

+

+  JavaScript

+  * Skip exports if not available by CommonJS (#8856)

+  * JS: Comply with CSP no-unsafe-eval. (#8864)

+

+  PHP

+  * Added "object" as a reserved name for PHP (#8962)

+

+  Ruby

+  * Override Map.clone to use Map's dup method (#7938)

+  * Ruby: build extensions for arm64-darwin (#8232)

+  * Add class method Timestamp.from_time to ruby well known types (#8562)

+  * Adopt pure ruby DSL implementation for JRuby (#9047)

+  * Add size to Map class (#8068)

+  * Fix for descriptor_pb.rb: google/protobuf should be required first (#9121)

+

+  C#

+  * Correctly set ExtensionRegistry when parsing with MessageParser, but using an already existing CodedInputStream (#7246)

+  * [C#] Make FieldDescriptor propertyName public (#7642)

+

+2021-10-04 version 3.18.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Python

+  * Update setup.py to reflect that we now require at least Python 3.5 (#8989)

+  * Performance fix for DynamicMessage: force GetRaw() to be inlined (#9023)

+

+  Ruby

+  * Update ruby_generator.cc to allow proto2 imports in proto3 (#9003)

+

+2021-09-13 version 3.18.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Python

+  * Removed Python 2.x support.

+  * Pure python descriptor_pool.AddSerializedFile() will always build the

+    file and return FileDescriptor which is same with python c++ extension

+  * type errors thrown by MergeFrom now report fully qualified class names

+  * Protobuf python generated code are simplified. Some platforms that uses

+    "is"("is not") to compare the enum or descriptor's label/type may fail,

+    should use "=="("!=") instead.

+

+  C++

+  * Generated code now uses the c++11 standard integer types int{32,64}_t and

+    uint{32,64}_t

+  * Reduce memory usage of the DescriptorPool type.

+  * Moved the zero-argument New() method on messages to the base class (internal

+    optimization).

+  * Unused return values marked with `PROTOBUF_MUST_USE_RESULT` are now

+    correctly attributed.

+  * Demotes PrintPath log for maps in MessageDifferencer down from WARNING to

+    INFO.

+  * Make sure FullMessageName() is always private.

+  * Fix race condition in EnumDescriptor.

+  * Remove MessageLite::GetMaybeArenaPointer.

+

+  Java

+  * Add @deprecated javadoc for set/get/has methods

+  * correctly decode \? escape sequence in text protos

+  * Avoid depending on Objects.requireNonNull() until we can verify that no

+    users are depending on older Android versions.

+  * disallow null string map values in put and putAll

+  * Add `@CheckReturnValue` to `ByteString` API.

+  * Make the `hasPresence` method public in `FieldDescriptor`.

+  * Report more detailed messages in Duration and Timestamp proto parsing

+    errors.

+  * New Timestamps.fromDate utility method that converts a java.util.Date to a

+    Timestamp proto object.

+

+  Kotlin

+  * Generated Kotlin code is Explicit API mode compatible

+

+2021-09-13 version 3.18.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+  C++

+  * Fix warnings raised by clang 11 (#8664)

+  * Make StringPiece constructible from std::string_view (#8707)

+  * Add missing capability attributes for LLVM 12 (#8714)

+  * Stop using std::iterator (deprecated in C++17). (#8741)

+  * Move field_access_listener from libprotobuf-lite to libprotobuf (#8775)

+  * Fix #7047 Safely handle setlocale (#8735)

+  * Remove deprecated version of SetTotalBytesLimit() (#8794)

+  * Support arena allocation of google::protobuf::AnyMetadata (#8758)

+  * Fix undefined symbol error around SharedCtor() (#8827)

+  * Fix default value of enum(int) in json_util with proto2 (#8835)

+  * Better Smaller ByteSizeLong

+  * Introduce event filters for inject_field_listener_events

+  * Reduce memory usage of DescriptorPool

+  * For lazy fields copy serialized form when allowed.

+  * Re-introduce the InlinedStringField class

+  * v2 access listener

+  * Reduce padding in the proto's ExtensionRegistry map.

+  * GetExtension performance optimizations

+  * Make tracker a static variable rather than call static functions

+  * Support extensions in field access listener

+  * Annotate MergeFrom for field access listener

+  * Fix incomplete types for field access listener

+  * Add map_entry/new_map_entry to SpecificField in MessageDifferencer. They

+    record the map items which are different in MessageDifferencer's reporter.

+  * Reduce binary size due to fieldless proto messages

+  * TextFormat: ParseInfoTree supports getting field end location in addition to

+    start.

+  * Fix repeated enum extension size in field listener

+  * Enable Any Text Expansion for Descriptors::DebugString()

+  * Switch from int{8,16,32,64} to int{8,16,32,64}_t

+  * Reduce memory usage of the DescriptorPool type.

+

+  Java

+  * Fix errorprone conflict (#8723)

+  * Removing deprecated TimeUtil class. (#8749)

+  * Optimized FieldDescriptor.valueOf() to avoid array copying.

+  * Removing deprecated TimeUtil class.

+  * Add Durations.parseUnchecked(String) and Timestamps.parseUnchecked(String)

+  * FieldMaskUtil: Add convenience method to mask the fields out of a given proto.

+

+  JavaScript

+  * Optimize binary parsing of repeated float64

+  * Fix for optimization when reading doubles from binary wire format

+  * Replace toArray implementation with toJSON.

+

+  Python

+  * Drops support for 2.7 and 3.5.

+

+  PHP

+  * Migrate PHP & Ruby to ABSL wyhash (#8854)

+  * Added support for PHP 8.1 (currently in RC1) to the C extension (#8964)

+  * Fixed PHP SEGV when constructing messages from a destructor. (#8969)

+

+  Ruby

+  * Move DSL implementation from C to pure Ruby (#8850)

+  * Fixed a memory bug with RepeatedField#+. (#8970)

+

+  Other

+  * [csharp] ByteString.CreateCodedInput should use ArraySegment offset and count (#8740)

+  * [ObjC] Add support for using the proto package to prefix symbols. (#8760)

+  * field_presence.md: fix Go example (#8788)

+

+

+  Kotlin

+  * Suppress NOTHING_TO_INLINE in Kotlin generated inline functions.

+

+2021-06-04 version 3.17.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+  Python

+  * Note: This is the last release to support Python 2.7. Future releases will

+    require Python >= 3.5.

+

+  C++

+  * Introduce FieldAccessListener.

+  * Stop emitting boilerplate {Copy/Merge}From in each ProtoBuf class

+  * Fixed some uninitialized variable warnings in generated_message_reflection.cc.

+

+  Kotlin

+  * Fix duplicate proto files error (#8699)

+

+  Java

+  * Fixed parser to check that we are at a proper limit when a sub-message has

+    finished parsing.

+

+2021-05-25 version 3.17.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+  Kotlin

+  * Fix duplicate class error (#8653)

+

+  PHP

+  * Fixed SEGV in sub-message getters for well-known types when message is unset

+    (#8670)

+

+2021-05-07 version 3.17.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+  PHP

+  * Fixed PHP memory leaks and arginfo errors. (#8614)

+  * Fixed JSON parser to allow multiple values from the same oneof as long as

+    all but one are null.

+

+  Ruby

+  * Fixed memory bug: properly root repeated/map field when assigning. (#8639)

+  * Fixed JSON parser to allow multiple values from the same oneof as long as

+    all but one are null.

+

+

+2021-05-07 version 3.17.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Protocol Compiler

+  * Fix the generated source information for reserved values in Enums.

+

+  C++

+  * Fix -Wunused-parameter in map<string, int> fields (fixes #8494) (#8500)

+  * Use byteswap.h when building against musl libc (#8503)

+  * Fix -Wundefined-inline error when using SharedCtor() or SharedDtor() (#8532)

+  * Fix bug where `Descriptor::DebugString()` printed proto3 synthetic oneofs.

+  * Provide stable versions of `SortAndUnique()`.

+  * Make sure to cache proto3 optional message fields when they are cleared.

+  * Expose UnsafeArena methods to Reflection.

+  * Use std::string::empty() rather than std::string::size() > 0.

+

+  Kotlin

+  * Restrict extension setter and getter operators to non-nullable T.

+

+  Java

+  * updating GSON and Guava to more recent versions (#8524)

+  * Reduce the time spent evaluating isExtensionNumber by storing the extension

+    ranges in a TreeMap for faster queries. This is particularly relevant for

+    protos which define a large number of extension ranges, for example when

+    each tag is defined as an extension.

+  * Fix java bytecode estimation logic for optional fields.

+  * Optimize Descriptor.isExtensionNumber.

+

+  Python

+  * Add MethodDescriptor.CopyToProto() (#8327)

+  * Remove unused python_protobuf.{cc,h} (#8513)

+  * Start publishing python aarch64 manylinux wheels normally (#8530)

+  * Fix constness issue detected by MSVC standard conforming mode (#8568)

+  * Make JSON parsing match C++ and Java when multiple fields from the same

+    oneof are present and all but one is null.

+

+  Ruby

+  * Add support for proto3 json_name in compiler and field definitions (#8356)

+  * Fixed memory leak of Ruby arena objects. (#8461)

+  * Fix source gem compilation (#8471)

+  * Fix various exceptions in Ruby on 64-bit Windows (#8563)

+  * Fix crash when calculating Message hash values on 64-bit Windows (#8565)

+

+  Conformance Tests

+  * Added a conformance test for the case of multiple fields from the same

+    oneof.

+

+2021-04-06 version 3.16.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+  Other

+  * Opensourcing kotlin protos (#8272)

+  * Use a newer version of rules_proto, with the new rule `proto_descriptor_set` (#8469)

+

+  C++

+  * Fix compiler warnings issue found in conformance_test_runner #8189 (#8190)

+  * Fix MinGW-w64 build issues. (#8286)

+  * [Protoc] C++ Resolved an issue where NO_DESTROY and CONSTINIT are in incorrect order (#8296)

+  * Fix PROTOBUF_CONSTINIT macro redefinition (#8323)

+  * Delete StringPiecePod (#8353)

+  * Fix gcc error: comparison of unsigned expression in '>= 0' is always … (#8309)

+  * Fix cmake install on iOS (#8301)

+  * Create a CMake option to control whether or not RTTI is enabled (#8347)

+  * Fix endian.h location on FreeBSD (#8351)

+  * Refactor util::Status (#8354)

+  * Make util::Status more similar to absl::Status (#8405)

+  * Fix -Wsuggest-destructor-override for generated C++ proto classes. (#8408)

+  * Refactor StatusOr and StringPiece (#8406)

+  * Refactor uint128 (#8416)

+  * The ::pb namespace is no longer exposed due to conflicts.

+  * Allow MessageDifferencer::TreatAsSet() (and friends) to override previous

+    calls instead of crashing.

+  * Reduce the size of generated proto headers for protos with `string` or

+    `bytes` fields.

+  * Move arena() operation on uncommon path to out-of-line routine

+  * For iterator-pair function parameter types, take both iterators by value.

+  * Code-space savings and perhaps some modest performance improvements in

+    RepeatedPtrField.

+  * Eliminate nullptr check from every tag parse.

+  * Remove unused _$name$_cached_byte_size_ fields.

+  * Serialize extension ranges together when not broken by a proto field in the

+    middle.

+  * Do out-of-line allocation and deallocation of string object in ArenaString.

+  * Streamline ParseContext::ParseMessage<T> to avoid code bloat and improve

+    performance.

+  * New member functions RepeatedField::Assign, RepeatedPtrField::{Add, Assign}.

+  * Fix undefined behavior warning due to innocuous uninitialization of value

+    on an error path.

+  * Avoid expensive inlined code space for encoding message length for messages

+    >= 128 bytes and instead do a procedure call to a shared out-of-line routine.

+  * util::DefaultFieldComparator will be final in a future version of protobuf.

+    Subclasses should inherit from SimpleFieldComparator instead.

+

+  C#

+  * Add .NET 5 target and improve WriteString performance with SIMD (#8147)

+

+  Java

+  * deps: update JUnit and Truth (#8319)

+  * Detect invalid overflow of byteLimit and return InvalidProtocolBufferException as documented.

+  * Exceptions thrown while reading from an InputStream in parseFrom are now

+    included as causes.

+  * Support potentially more efficient proto parsing from RopeByteStrings.

+  * Clarify runtime of ByteString.Output.toStringBuffer().

+  * Added UnsafeByteOperations to protobuf-lite (#8426)

+

+  JavaScript

+  * Make Any.pack() chainable.

+

+  Python

+  * Fix some constness / char literal issues being found by MSVC standard conforming mode (#8344)

+  * Switch on "new" buffer API (#8339)

+  * Enable crosscompiling aarch64 python wheels under dockcross manylinux docker image (#8280)

+  * Fixed a bug in text format where a trailing colon was printed for repeated field.

+  * When TextFormat encounters a duplicate message map key, replace the current

+    one instead of merging.

+

+  Objective-C

+  * Move the class map to a CFDictionary. (#8328)

+

+  PHP

+  * read_property() handler is not supposed to return NULL (#8362)

+  * Changed parameter type from long to integer (#7613)

+  * fix: README supported PHP version for C extension (#8236)

+

+  Ruby

+  * Fixed quadratic memory usage when appending to arrays. (#8364)

+  * Fixed memory leak of Ruby arena objects. (#8461)

+  * Add support for proto3 json_name in compiler and field definitions. (#8356)

+

+  Other

+  * Some doc on AOT compilation and protobuf (#8294)

+  * [CMake] Ability to pass options to protoc executable from cmake (#8374)

+  * Add --fatal_warnings flag to treat warnings as errors (#8131)

+  * [bazel] Remove deprecated way to depend on googletest (#8396)

+  * add error returns missing from protoc to prevent it from exiting with… (#8409)

+

+

+2021-04-07 version 3.15.8 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Ruby

+  * Fixed memory leak of Ruby arena objects (#8461)

+

+2021-04-02 version 3.15.7 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Remove the ::pb namespace (alias) (#8423)

+

+  Ruby

+  * Fix unbounded memory growth for Ruby <2.7 (#8429)

+  * Fixed message equality in cases where the message type is different (#8434)

+

+2021-03-10 version 3.15.6 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Ruby

+  * Fixed bug in string comparison logic (#8386)

+

+2021-03-04 version 3.15.5 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Ruby

+  * Fixed quadratic memory use in array append (#8379)

+

+  PHP

+  * Fixed quadratic memory use in array append (#8379)

+

+  C++

+  * Do not disable RTTI by default in the CMake build (#8377)

+

+2021-03-02 version 3.15.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Ruby

+  * Fixed SEGV when users pass nil messages (#8363)

+  * Fixed quadratic memory usage when appending to arrays (#8364)

+

+  C++

+  * Create a CMake option to control whether or not RTTI is enabled (#8361)

+

+  PHP

+  * read_property() handler is not supposed to return NULL (#8362)

+

+2021-02-25 version 3.15.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Ruby

+  * Ruby <2.7 now uses WeakMap too, which prevents memory leaks. (#8341)

+

+2021-02-23 version 3.15.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Ruby

+  * Fix for FieldDescriptor.get(msg) (#8330)

+

+  C++

+  * Fix PROTOBUF_CONSTINIT macro redefinition (#8323)

+

+2021-02-05 version 3.15.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Ruby

+  * Bugfix for Message.[] for repeated or map fields (#8313)

+

+2021-02-05 version 3.15.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Protocol Compiler

+  * Optional fields for proto3 are enabled by default, and no longer require

+    the --experimental_allow_proto3_optional flag.

+

+  C++

+  * MessageDifferencer: fixed bug when using custom ignore with multiple

+    unknown fields

+  * Use init_seg in MSVC to push initialization to an earlier phase.

+  * Runtime no longer triggers -Wsign-compare warnings.

+  * Fixed -Wtautological-constant-out-of-range-compare warning.

+  * DynamicCastToGenerated works for nullptr input for even if RTTI is disabled

+  * Arena is refactored and optimized.

+  * Clarified/specified that the exact value of Arena::SpaceAllocated() is an

+    implementation detail users must not rely on. It should not be used in

+    unit tests.

+  * Change the signature of Any::PackFrom() to return false on error.

+  * Add fast reflection getter API for strings.

+  * Constant initialize the global message instances

+  * Avoid potential for missed wakeup in UnknownFieldSet

+  * Now Proto3 Oneof fields have "has" methods for checking their presence in

+    C++.

+  * Bugfix for NVCC

+  * Return early in _InternalSerialize for empty maps.

+  * Adding functionality for outputting map key values in proto path logging

+    output (does not affect comparison logic) and stop printing 'value' in the

+    path. The modified print functionality is in the

+    MessageDifferencer::StreamReporter.

+  * Fixed https://github.com/protocolbuffers/protobuf/issues/8129

+  * Ensure that null char symbol, package and file names do not result in a

+    crash.

+  * Constant initialize the global message instances

+  * Pretty print 'max' instead of numeric values in reserved ranges.

+  * Removed remaining instances of std::is_pod, which is deprecated in C++20.

+  * Changes to reduce code size for unknown field handling by making uncommon

+    cases out of line.

+  * Fix std::is_pod deprecated in C++20 (#7180)

+  * Fix some -Wunused-parameter warnings (#8053)

+  * Fix detecting file as directory on zOS issue #8051 (#8052)

+  * Don't include sys/param.h for _BYTE_ORDER (#8106)

+  * remove CMAKE_THREAD_LIBS_INIT from pkgconfig CFLAGS (#8154)

+  * Fix TextFormatMapTest.DynamicMessage issue#5136 (#8159)

+  * Fix for compiler warning issue#8145 (#8160)

+  * fix: support deprecated enums for GCC < 6 (#8164)

+  * Fix some warning when compiling with Visual Studio 2019 on x64 target (#8125)

+

+  Python

+  * Provided an override for the reverse() method that will reverse the internal

+    collection directly instead of using the other methods of the BaseContainer.

+  * MessageFactory.CreateProtoype can be overridden to customize class creation.

+  * Fix PyUnknownFields memory leak (#7928)

+  * Add macOS Big Sur compatibility (#8126)

+

+  JavaScript

+  * Generate `getDescriptor` methods with `*` as their `this` type.

+  * Enforce `let/const` for generated messages.

+  * js/binary/utils.js: Fix jspb.utils.joinUnsignedDecimalString to work with negative bitsLow and low but non-zero bitsHigh parameter. (#8170)

+

+  PHP

+  * Added support for PHP 8. (#8105)

+  * unregister INI entries and fix invalid read on shutdown (#8042)

+  * Fix PhpDoc comments for message accessors to include "|null". (#8136)

+  * fix: convert native PHP floats to single precision (#8187)

+  * Fixed PHP to support field numbers >=2**28. (#8235)

+  * feat: add support for deprecated fields to PHP compiler (#8223)

+  * Protect against stack overflow if the user derives from Message. (#8248)

+  * Fixed clone for Message, RepeatedField, and MapField. (#8245)

+  * Updated upb to allow nonzero offset minutes in JSON timestamps. (#8258)

+

+  Ruby

+  * Added support for Ruby 3. (#8184)

+  * Rewrote the data storage layer to be based on upb_msg objects from the

+    upb library. This should lead to much better parsing performance,

+    particularly for large messages. (#8184).

+  * Fill out JRuby support (#7923)

+  * [Ruby] Fix: (SIGSEGV) gRPC-Ruby issue on Windows. memory alloc infinite

+    recursion/run out of memory (#8195)

+  * Fix jruby support to handle messages nested more than 1 level deep (#8194)

+

+  Java

+  * Avoid possible UnsupportedOperationException when using CodedInputSteam

+    with a direct ByteBuffer.

+  * Make Durations.comparator() and Timestamps.comparator() Serializable.

+  * Add more detailed error information for dynamic message field type

+    validation failure

+  * Removed declarations of functions declared in java_names.h from

+    java_helpers.h.

+  * Now Proto3 Oneof fields have "has" methods for checking their presence in

+    Java.

+  * Annotates Java proto generated *_FIELD_NUMBER constants.

+  * Add -assumevalues to remove JvmMemoryAccessor on Android.

+

+  C#

+  * Fix parsing negative Int32Value that crosses segment boundary (#8035)

+  * Change ByteString to use memory and support unsafe create without copy (#7645)

+  * Optimize MapField serialization by removing MessageAdapter (#8143)

+  * Allow FileDescriptors to be parsed with extension registries (#8220)

+  * Optimize writing small strings (#8149)

+

+2020-11-11 version 3.14.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Protocol Compiler

+  * The proto compiler no longer requires a .proto filename when it is not

+    generating code.

+  * Added flag `--deterministic_output` to `protoc --encode=...`.

+  * Fixed deadlock when using google.protobuf.Any embedded in aggregate options.

+

+  C++

+  * Arenas are now unconditionally enabled. cc_enable_arenas no longer has

+    any effect.

+  * Removed inlined string support, which is incompatible with arenas.

+  * Fix a memory corruption bug in reflection when mixing optional and

+    non-optional fields.

+  * Make SpaceUsed() calculation more thorough for map fields.

+  * Add stack overflow protection for text format with unknown field values.

+  * FieldPath::FollowAll() now returns a bool to signal if an out-of-bounds

+    error was encountered.

+  * Performance improvements for Map.

+  * Minor formatting fix when dumping a descriptor to .proto format with

+    DebugString.

+  * UBSAN fix in RepeatedField (#2073).

+  * When running under ASAN, skip a test that makes huge allocations.

+  * Fixed a crash that could happen when creating more than 256 extensions in

+    a single message.

+  * Fix a crash in BuildFile when passing in invalid descriptor proto.

+  * Parser security fix when operating with CodedInputStream.

+  * Warn against the use of AllowUnknownExtension.

+  * Migrated to C++11 for-range loops instead of index-based loops where

+    possible. This fixes a lot of warnings when compiling with -Wsign-compare.

+  * Fix segment fault for proto3 optional (#7805)

+  * Adds a CMake option to build `libprotoc` separately (#7949)

+

+  Java

+  * Bugfix in mergeFrom() when a oneof has multiple message fields.

+  * Fix RopeByteString.RopeInputStream.read() returning -1 when told to read

+    0 bytes when not at EOF.

+  * Redefine remove(Object) on primitive repeated field Lists to avoid

+    autoboxing.

+  * Support "\u" escapes in textformat string literals.

+  * Trailing empty spaces are no longer ignored for FieldMask.

+  * Fix FieldMaskUtil.subtract to recursively remove mask.

+  * Mark enums with `@java.lang.Deprecated` if the proto enum has option

+    `deprecated = true;`.

+  * Adding forgotten duration.proto to the lite library (#7738)

+

+  Python

+  * Print google.protobuf.NullValue as null instead of "NULL_VALUE" when it is

+    used outside WKT Value/Struct.

+  * Fix bug occurring when attempting to deep copy an enum type in python 3.

+  * Add a setuptools extension for generating Python protobufs (#7783)

+  * Remove uses of pkg_resources in non-namespace packages. (#7902)

+  * [bazel/py] Omit google/__init__.py from the Protobuf runtime. (#7908)

+  * Removed the unnecessary setuptools package dependency for Python package (#7511)

+  * Fix PyUnknownFields memory leak (#7928)

+

+  PHP

+  * Added support for "==" to the PHP C extension (#7883)

+  * Added `==` operators for Map and Array. (#7900)

+  * Native C well-known types (#7944)

+  * Optimized away hex2bin() call in generated code (#8006)

+  * New version of upb, and a new hash function wyhash in third_party. (#8000)

+  * add missing hasOneof method to check presence of oneof fields (#8003)

+

+  Go:

+  * Update go_package options to reference google.golang.org/protobuf module.

+

+  C#:

+  * annotate ByteString.CopyFrom(ReadOnlySpan<byte>) as SecuritySafeCritical (#7701)

+  * Fix C# optional field reflection when there are regular fields too (#7705)

+  * Fix parsing negative Int32Value that crosses segment boundary (#8035)

+

+  Javascript:

+  * JS: parse (un)packed fields conditionally (#7379)

+

+2020-07-14 version 3.13.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  PHP:

+  * The C extension is completely rewritten. The new C extension has significantly

+    better parsing performance and fixes a handful of conformance issues. It will

+    also make it easier to add support for more features like proto2 and proto3 presence.

+  * The new C extension does not support PHP 5.x. PHP 5.x users can still use pure-PHP.

+

+  C++:

+  * Removed deprecated unsafe arena string accessors

+  * Enabled heterogeneous lookup for std::string keys in maps.

+  * Removed implicit conversion from StringPiece to std::string

+  * Fix use-after-destroy bug when the Map is allocated in the arena.

+  * Improved the randomness of map ordering

+  * Added stack overflow protection for text format with unknown fields

+  * Use std::hash for proto maps to help with portability.

+  * Added more Windows macros to proto whitelist.

+  * Arena constructors for map entry messages are now marked "explicit"

+    (for regular messages they were already explicit).

+  * Fix subtle aliasing bug in RepeatedField::Add

+  * Fix mismatch between MapEntry ByteSize and Serialize with respect to unset

+    fields.

+

+  Python:

+  * JSON format conformance fixes:

+    * Reject lowercase t for Timestamp json format.

+    * Print full_name directly for extensions (no camelCase).

+    * Reject boolean values for integer fields.

+    * Reject NaN, Infinity, -Infinity that is not quoted.

+    * Base64 fixes for bytes fields: accept URL-safe base64 and missing padding.

+  * Bugfix for fields/files named "async" or "await".

+  * Improved the error message when AttributeError is returned from __getattr__

+    in EnumTypeWrapper.

+

+  Java:

+  * Fixed a bug where setting optional proto3 enums with setFooValue() would

+    not mark the value as present.

+  * Add Subtract function to FieldMaskUtil.

+

+  C#:

+  * Dropped support for netstandard1.0 (replaced by support for netstandard1.1).

+    This was required to modernize the parsing stack to use the `Span<byte>`

+    type internally. (#7351)

+  * Add `ParseFrom(ReadOnlySequence<byte>)` method to enable GC friendly

+    parsing with reduced allocations and buffer copies. (#7351)

+  * Add support for serialization directly to a `IBufferWriter<byte>` or

+    to a `Span<byte>` to enable GC friendly serialization.

+    The new API is available as extension methods on the `IMessage` type. (#7576)

+  * Add `GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE` define to make

+    generated code compatible with old C# compilers (pre-roslyn compilers

+    from .NET framework and old versions of mono) that do not support

+    ref structs. Users that are still on a legacy stack that does

+    not support C# 7.2 compiler might need to use the new define

+    in their projects to be able to build the newly generated code. (#7490)

+  * Due to the major overhaul of parsing and serialization internals (#7351 and #7576),

+    it is recommended to regenerate your generated code to achieve the best

+    performance (the legacy generated code will still work, but might incur

+    a slight performance penalty).

+

+2020-07-28 version 3.12.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+This release contains no significant changes, but exists because 3.12.3 was

+mistakenly tagged at the wrong commit.

+

+2020-06-01 version 3.12.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Objective-C

+  * Tweak the union used for Extensions to support old generated code. #7573

+

+2020-05-26 version 3.12.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Simplified the template export macros to fix the build for mingw32. (#7539)

+

+  Objective-C

+  * Fix for the :protobuf_objc target in the Bazel BUILD file. (#7538)

+

+2020-05-20 version 3.12.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Ruby

+  * Re-add binary gems for Ruby 2.3 and 2.4. These are EOL upstream, however

+    many people still use them and dropping support will require more

+    coordination.

+

+2020-05-12 version 3.12.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  Protocol Compiler

+  * [experimental] Singular, non-message typed fields in proto3 now support

+    presence tracking. This is enabled by adding the "optional" field label and

+    passing the --experimental_allow_proto3_optional flag to protoc.

+    * For usage info, see docs/field_presence.md.

+    * During this experimental phase, code generators should update to support

+      proto3 presence, see docs/implementing_proto3_presence.md for instructions.

+  * Allow duplicate symbol names when multiple descriptor sets are passed on

+    the command-line, to match the behavior when multiple .proto files are passed.

+  * Deterministic `protoc --descriptor_set_out` (#7175)

+

+  C++

+  * [experimental] Added proto3 presence support.

+  * New descriptor APIs to support proto3 presence.

+  * Enable Arenas by default on all .proto files.

+  * Documented that users are not allowed to subclass Message or MessageLite.

+  * Mark generated classes as final; inheriting from protos is strongly discouraged.

+  * Add stack overflow protection for text format with unknown fields.

+  * Add accessors for map key and value FieldDescriptors.

+  * Add FieldMaskUtil::FromFieldNumbers().

+  * MessageDifferencer: use ParsePartial() on Any fields so the diff does not

+    fail when there are missing required fields.

+  * ReflectionOps::Merge(): lookup messages in the right factory, if it can.

+  * Added Descriptor::WellKnownTypes enum and Descriptor::well_known_type()

+    accessor as an easier way of determining if a message is a Well-Known Type.

+  * Optimized RepeatedField::Add() when it is used in a loop.

+  * Made proto move/swap more efficient.

+  * De-virtualize the GetArena() method in MessageLite.

+  * Improves performance of json_stream_parser.cc by factor 1000 (#7230)

+  * bug: #7076 undefine Windows OUT and OPTIONAL macros (#7087)

+  * Fixed a bug in FieldDescriptor::DebugString() that would erroneously print

+    an "optional" label for a field in a oneof.

+  * Fix bug in parsing bool extensions that assumed they are always 1 byte.

+  * Fix off-by-one error in FieldOptions::ByteSize() when extensions are present.

+  * Clarified the comments to show an example of the difference between

+    Descriptor::extension and DescriptorPool::FindAllExtensions.

+  * Add a compiler option 'code_size' to force optimize_for=code_size on all

+    protos where this is possible.

+

+  Java

+  * [experimental] Added proto3 presence support.

+  * Mark java enum _VALUE constants as @Deprecated if the enum field is deprecated

+  * reduce <clinit> size for enums with allow_alias set to true.

+  * Sort map fields alphabetically by the field's key when printing textproto.

+  * Fixed a bug in map sorting that appeared in -rc1 and -rc2 (#7508).

+  * TextFormat.merge() handles Any as top level type.

+  * Throw a descriptive IllegalArgumentException when calling

+    getValueDescriptor() on enum special value UNRECOGNIZED instead of

+    ArrayIndexOutOfBoundsException.

+  * Fixed an issue with JsonFormat.printer() where setting printingEnumsAsInts()

+    would override the configuration passed into includingDefaultValueFields().

+  * Implement overrides of indexOf() and contains() on primitive lists returned

+    for repeated fields to avoid autoboxing the list contents.

+  * Add overload to FieldMaskUtil.fromStringList that accepts a descriptor.

+  * [bazel] Move Java runtime/toolchains into //java (#7190)

+

+  Python

+  * [experimental] Added proto3 presence support.

+  * [experimental] fast import protobuf module, only works with cpp generated code linked in.

+  * Truncate 'float' fields to 4 bytes of precision in setters for pure-Python

+    implementation (C++ extension was already doing this).

+  * Fixed a memory leak in C++ bindings.

+  * Added a deprecation warning when code tries to create Descriptor objects

+    directly.

+  * Fix unintended comparison between bytes and string in descriptor.py.

+  * Avoid printing excess digits for float fields in TextFormat.

+  * Remove Python 2.5 syntax compatibility from the proto compiler generated _pb2.py module code.

+  * Drop 3.3, 3.4 and use single version docker images for all python tests (#7396)

+

+  JavaScript

+  * Fix js message pivot selection (#6813)

+

+  PHP

+  * Persistent Descriptor Pool (#6899)

+  * Implement lazy loading of php class for proto messages (#6911)

+  * Correct @return in Any.unpack docblock (#7089)

+  * Ignore unknown enum value when ignore_unknown specified (#7455)

+

+  Ruby

+  * [experimental] Implemented proto3 presence for Ruby. (#7406)

+  * Stop building binary gems for ruby <2.5 (#7453)

+  * Fix for wrappers with a zero value (#7195)

+  * Fix for JSON serialization of 0/empty-valued wrapper types (#7198)

+  * Call "Class#new" over rb_class_new_instance in decoding (#7352)

+  * Build extensions for Ruby 2.7 (#7027)

+  * assigning 'nil' to submessage should clear the field. (#7397)

+

+  C#

+  * [experimental] Add support for proto3 presence fields in C# (#7382)

+  * Mark GetOption API as obsolete and expose the "GetOptions()" method on descriptors instead (#7491)

+  * Remove Has/Clear members for C# message fields in proto2 (#7429)

+  * Enforce recursion depth checking for unknown fields (#7132)

+  * Fix conformance test failures for Google.Protobuf (#6910)

+  * Cleanup various bits of Google.Protobuf (#6674)

+  * Fix latest ArgumentException for C# extensions (#6938)

+  * Remove unnecessary branch from ReadTag (#7289)

+

+  Objective-C

+  * [experimental] ObjC Proto3 optional support (#7421)

+  * Block subclassing of generated classes (#7124)

+  * Use references to Obj C classes instead of names in descriptors. (#7026)

+  * Revisit how the WKTs are bundled with ObjC. (#7173)

+

+  Other

+  * Add a proto_lang_toolchain for javalite (#6882)

+  * [bazel] Update gtest and deprecate //external:{gtest,gtest_main} (#7237)

+  * Add application note for explicit presence tracking. (#7390)

+  * Howto doc for implementing proto3 presence in a code generator. (#7407)

+

+

+2020-02-14 version 3.11.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C#

+  * Fix latest ArgumentException for C# extensions (#7188)

+  * Enforce recursion depth checking for unknown fields (#7210)

+

+  Ruby

+  * Fix wrappers with a zero value (#7195)

+  * Fix JSON serialization of 0/empty-valued wrapper types (#7198)

+

+2020-01-31 version 3.11.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Add OUT and OPTIONAL to windows portability files (#7087)

+

+  PHP

+  * Refactored ulong to zend_ulong for php7.4 compatibility (#7147)

+  * Call register_class before getClass from desc to fix segfault (#7077)

+

+

+2019-12-10 version 3.11.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  PHP

+  * Make c extension portable for php 7.4 (#6968)

+

+

+2019-12-02 version 3.11.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  PHP

+  * Extern declare protobuf_globals (#6946)

+

+

+2019-11-19 version 3.11.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Make serialization method naming consistent

+  * Make proto runtime + generated code free of deprecation warnings

+  * Moved ShutdownProtobufLibrary() to message_lite.h.  For backward compatibility a declaration is still available in stubs/common.h, but users should prefer message_lite.h

+  * Removed non-namespace macro EXPECT_OK()

+  * Removed mathlimits.h from stubs in favor of using std::numeric_limits from C++11

+  * Fixed bug in parser when ending on a group tag

+  * Add a helper function to UnknownFieldSet to deal with the changing return value of message::unknown_fields()

+  * Fix incorrect use of string_view iterators

+  * Support direct pickling of nested messages

+  * Skip extension tag validation for MessageSet if unknown dependencies are allowed

+  * Updated deprecation macros to annotate deprecated code (#6612)

+  * Remove conversion warning in MapEntryFuncs::ByteSizeLong (#6766)

+  * Revert "Make shared libraries be able to link to MSVC static runtime libraries, so that VC runtime is not required." (#6914)

+

+  Java

+  * Remove the usage of MethodHandle, so that Android users prior to API version 26 can use protobuf-java

+  * Publish ProGuard config for javalite

+  * Fix for StrictMode disk read violation in ExtensionRegistryLite

+  * Include part of the ByteString's content in its toString().

+  * Include unknown fields when merging proto3 messages in Java lite builders

+

+  Python

+  * Add float_precision option in json format printer

+  * Optionally print bytes fields as messages in unknown fields, if possible

+  * FieldPath: fix testing IsSet on root path ''

+  * Experimental code gen (fast import protobuf module) which only work with cpp generated code linked in

+

+  JavaScript

+  * Remove guard for Symbol iterator for jspb.Map

+

+  PHP

+  * Avoid too much overhead in layout_init (#6716)

+  * Lazily Create Singular Wrapper Message (#6833)

+  * Implement lazy loading of php class for proto messages (#6911)

+

+  Ruby

+  * Ruby lazy wrappers optimization (#6797)

+

+  C#

+  * (RepeatedField): Capacity property to resize the internal array (#6530)

+  * Experimental proto2 support is now officially available (#4642, #5183, #5350, #5936)

+  * Getting started doc: https://github.com/protocolbuffers/protobuf/blob/master/docs/csharp/proto2.md

+  * Add length checks to ExtensionCollection (#6759)

+  * Optimize parsing of some primitive and wrapper types (#6843)

+  * Use 3 parameter Encoding.GetString for default string values (#6828)

+  * Change _Extensions property to normal body rather than expression (#6856)

+

+  Objective C

+  * Fixed unaligned reads for 32bit arm with newer Xcode versions (#6678)

+

+

+2019-09-03 version 3.10.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Switch the proto parser to the faster MOMI parser.

+  * Properly escape Struct keys in the proto3 JSON serializer.

+  * Fix crash on uninitialized map entries.

+  * Informed the compiler of has-bit invariant to produce better code

+  * Unused imports of files defining descriptor extensions will now be reported

+  * Add proto2::util::RemoveSubranges to remove multiple subranges in linear time.

+  * Added BaseTextGenerator::GetCurrentIndentationSize()

+  * Made implicit weak fields compatible with the Apple linker

+  * Support 32 bit values for ProtoStreamObjectWriter to Struct.

+  * Removed the internal-only header coded_stream_inl.h and the internal-only methods defined there.

+  * Enforced no SWIG wrapping of descriptor_database.h (other headers already had this restriction).

+  * Implementation of the equivalent of the MOMI parser for serialization. This removes one of the two serialization routines, by making the fast array serialization routine completely general. SerializeToCodedStream can now be implemented in terms of the much much faster array serialization. The array serialization regresses slightly, but when array serialization is not possible this wins big.

+  * Do not convert unknown field name to snake case to accurately report error.

+  * Fix a UBSAN warnings. (#6333)

+  * Add podspec for C++ (#6404)

+  * protoc: fix source code info location for missing label (#6436)

+  * C++ Add move constructor for Reflection's SetString (#6477)

+

+  Java

+  * Call loadDescriptor outside of synchronized block to remove one possible source of deadlock.

+  * Have oneof enums implement a separate interface (other than EnumLite) for clarity.

+  * Opensource Android Memory Accessors

+  * Update TextFormat to make use of the new TypeRegistry.

+  * Support getFieldBuilder and getRepeatedFieldBuilder in ExtendableBuilder

+  * Update JsonFormat to make use of the new TypeRegistry.

+  * Add proguard config generator for GmmBenchmarkSuiteLite.

+  * Change ProtobufArrayList to use Object[] instead of ArrayList for 5-10% faster parsing

+  * Implement ProtobufArrayList.add(E) for 20% (5%-40%) faster overall protolite2 parsing

+  * Make a copy of JsonFormat.TypeRegistry at the protobuf top level package. This will eventually replace JsonFormat.TypeRegistry.

+  * Fix javadoc warnings in generated files (#6231)

+  * Java: Add Automatic-Module-Name entries to the Manifest (#6568)

+

+  Python

+  * Add descriptor methods in descriptor_pool are deprecated.

+  * Uses explicit imports to prevent multithread test failures in py3.

+  * Added __delitem__ for Python extension dict

+  * Update six version to 1.12.0 and fix legacy_create_init issue (#6391)

+

+  JavaScript

+  * Remove deprecated boolean option to getResultBase64String().

+  * Fix sint64 zig-zag encoding.

+  * Simplify hash64 string conversion to avoid DIGIT array. Should reduce overhead if these functions aren't used, and be more efficient by avoiding linear array searches.

+  * Change the parameter types of binaryReaderFn in ExtensionFieldBinaryInfo to (number, ?, ?).

+  * Create dates.ts and time_of_days.ts to mirror Java versions. This is a near-identical conversion of c.g.type.util.{Dates,TimeOfDays} respectively.

+  * Migrate moneys to TypeScript.

+

+  PHP

+  * Fix incorrect leap day for Timestamp (#6696)

+  * Initialize well known type values (#6713)

+

+  Ruby

+  * Fix scope resolution for Google namespace (#5878)

+  * Support hashes for struct initializers (#5716)

+  * Optimized away the creation of empty string objects. (#6502)

+  * Roll forward Ruby upb changes now that protobuf Ruby build is fixed (#5866)

+  * Optimized layout_mark() for Ruby (#6521)

+  * Optimization for layout_init() (#6547)

+  * Fix for GC of Ruby map frames. (#6533)

+  * Fixed leap year handling by reworking upb_mktime() -> upb_timegm(). (#6695)

+

+  Objective C

+  * Remove OSReadLittle* due to alignment requirements (#6678)

+  * Don't use unions and instead use memcpy for the type swaps. (#6672)

+

+  Other

+  * Override CocoaPods module to lowercase (#6464)

+

+

+2019-06-28 version 3.9.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Optimize and simplify implementation of RepeatedPtrFieldBase

+  * Don't create unnecessary unknown field sets.

+  * Remove branch from accessors to repeated field element array.

+  * Added delimited parse and serialize util.

+  * Reduce size by not emitting constants for fieldnumbers

+  * Fix a bug when comparing finite and infinite field values with explicit tolerances.

+  * TextFormat::Parser should use a custom Finder to look up extensions by number if one is provided.

+  * Add MessageLite::Utf8DebugString() to make MessageLite more compatible with Message.

+  * Fail fast for better performance in DescriptorPool::FindExtensionByNumber() if descriptor has no defined extensions.

+  * Adding the file name to help debug colliding extensions

+  * Added FieldDescriptor::PrintableNameForExtension() and DescriptorPool::FindExtensionByPrintableName().

+    The latter will replace Reflection::FindKnownExtensionByName().

+  * Replace NULL with nullptr

+  * Created a new Add method in repeated field that allows adding a range of elements all at once.

+  * Enabled enum name-to-value mapping functions for C++ lite

+  * Avoid dynamic initialization in descriptor.proto generated code

+  * Move stream functions to MessageLite from Message.

+  * Move all zero_copy_stream functionality to io_lite.

+  * Do not create array of matched fields for simple repeated fields

+  * Enabling silent mode by default to reduce make compilation noise. (#6237)

+

+  Java

+  * Expose TextFormat.Printer and make it configurable. Deprecate the static methods.

+  * Library for constructing google.protobuf.Struct and google.protobuf.Value

+  * Make OneofDescriptor extend GenericDescriptor.

+  * Expose streamingness of service methods from MethodDescriptor.

+  * Fix a bug where TextFormat fails to parse Any filed with > 1 embedded message sub-fields.

+  * Establish consistent JsonFormat behavior for nulls in oneofs, regardless of order.

+  * Update GSON version to 3.8.5. (#6268)

+  * Add `protobuf_java_lite` Bazel target. (#6177)

+

+  Python

+  * Change implementation of Name() for enums that allow aliases in proto2 in Python

+    to be in line with claims in C++ implementation (to return first value).

+  * Explicitly say what field cannot be set when the new value fails a type check.

+  * Duplicate register in descriptor pool will raise errors

+  * Add __slots__ to all well_known_types classes, custom attributes are not allowed anymore.

+  * text_format only present 8 valid digits for float fields by default

+

+  JavaScript

+  * Add Oneof enum to the list of goog.provide

+

+  PHP

+  * Make php message class final to avoid mocking. (#6277)

+  * Rename get/setXXXValue to get/setXXXWrapper. (#6295)

+

+  Ruby

+  * Remove to_hash methods. (#6166)

+

+

+2019-04-29 version 3.8.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Use std::atomic<int32> in case of myriad2 platform

+  * Always declare enums to be int-sized

+  * Added DebugString() and ShortDebugString() methods on MessageLite

+  * Specialized different parse loop control flows

+  * Make hasbits potentially in register. The or's start forming an obstacle because it's a read modify store on the same mem address on each iteration.

+  * Move to an internal MACRO for parser validity checks.

+  * Improve map parsing performance.

+  * Make MergePartialFromCodedStream non virtual. This allows direct calls, potential inlining and is also a code health improvement

+  * Add an overall limit to parse_context to prevent reading past it. This allows to remove a annoying level of indirection.

+  * Fix a mistake, we shouldn't verify map key/value strings for utf8 in opt mode for proto2.

+  * Further improvements to cut binary size.

+  * Prepare to make MergePartialFromCodedStream non-virtual.

+  * A report on some interesting behavior change in python (caused by b/27494216) made me realize there is a check that needs to be done in case the parse ended on a end group tag.

+  * Add a note of caution to the comments around skip in CodedOutputStream.

+  * Simplify end check.

+  * Add overload for ParseMessage for MessageLite/Message types. If the explicit type is not known inlining won't help de-virtualizing the virtual call.

+  * Reduce linker input. It turns out that ParseMessage is not inlined, producing  template instantiations that are used only once and save nothing but cost more.

+  * Improve the parser.

+  * [c++17] Changed proto2::RepeatedPtrField iterators to no longer derive from the deprecated std::iterator class.

+  * Change the default value of case_insensitive_enum_parsing to false for JsonStringToMessage.

+  * Add a warning if a field name doesn't match the style guide.

+  * Fix TextFormat not round-trip correctly when float value is max float.

+  * Added locationed info for some errors at compiler

+  * Python reserved keywords are now working with getattr()/setattr() for most descriptors.

+  * Added AllowUnknownField() in text_format

+  * Append '_' to C++ reserved keywords for message, enum, extension

+  * Fix MSVC warning C4244 in protobuf's parse_context.h.

+  * Updating Iterators to be compatible with C++17 in MSVC.

+  * Use capability annotation in mutex.h

+  * Fix "UndefinedBehaviorSanitizer: cfi-bad-type"

+  * CriticalSectionLock class as a lightweight replacement for std::mutex on Windows platforms.

+  * Removed vestigial wire_format_lite_inl.h

+

+  C#

+  * Added System.Memory dependency.

+

+  Java

+  * Make Java protoc code generator ignore optimize_for LITE_RUNTIME. Users should instead use the Java lite protoc plugin.

+  * Change Extension getMessageDefaultInstance() to return Message instead of MessageLite.

+  * Prevent malicious input streams from leaking buffers for ByteString or ByteBuffer parsing.

+  * Release new Javalite runtime.

+  * Show warning in case potential file name conflict.

+  * Allow Java reserved keywords to be used in extensions.

+  * Added setAllowUnknownFields() in text format

+  * Add memoization to ExtensionRegistryLite.getEmptyRegistry()

+  * Improve performance of CodedOutputStream.writeUInt32NoTag

+  * Add an optimized mismatch-finding algorithm to UnsafeUtil.

+  * When serializing uint32 varints, check that we have MAX_VARINT32_SIZE bytes left, not just MAX_VARINT_SIZE.

+  * Minor optimization to RopeByteString.PieceIterator

+

+  JavaScript

+  * Simplify generated toObject code when the default value is used.

+

+  Python

+  * Changes implementation of Name() for enums that allow aliases in proto2 in Python to be in line with claims in C++ implementation (to return first value).

+  * Added double_format option in text format printer.

+  * Added iter and __contains__ to extension dict

+  * Added allow_unknown_field option in python text format parser

+  * Fixed Timestamp.ToDatetime() loses precision issue

+  * Support unknown field in text format printer.

+  * Float field will be convert to inf if bigger than struct.unpack('f', b'\xff\xff\x7f\x7f')[0] which is about 3.4028234664e+38,

+  convert to -inf if smaller than -3.4028234664e+38

+  * Allowed casting str->bytes in Message.__setstate__

+

+  Ruby

+  * Helper methods to get enum name for Ruby.

+

+

+2019-01-24 version 3.7.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Introduced new MOMI (maybe-outside-memory-interval) parser.

+  * Add an option to json_util to parse enum as case-insensitive. In the future, enum parsing in json_util will become case-sensitive.

+  * Added conformance test for enum aliases

+  * Added support for --cpp_out=speed:...

+  * Added use of C++ override keyword where appropriate

+  * Many other cleanups and fixes.

+

+  Java

+  * Fix illegal reflective access warning in JDK 9+

+  * Add BOM

+

+  Python

+  * Added Python 3.7 compatibility.

+  * Modified ParseFromString to return bytes parsed .

+  * Introduce Proto C API.

+  * FindFileContainingSymbol in descriptor pool is now able to find field and enum values.

+  * reflection.MakeClass()  and  reflection.ParseMessage() are deprecated.

+  * Added DescriptorPool.FindMethodByName() method in pure python (c extension already has it)

+  * Flipped proto3 to preserve unknown fields by default.

+  * Added support for memoryview in python3 proto message parsing.

+  * Added MergeFrom for repeated scalar fields in c extension (pure python already has it)

+  * Surrogates are now rejected at setters in python3.

+  * Added public unknown field API.

+  * RecursionLimit is also set to max if allow_oversize_protos is enabled.

+  * Disallow duplicate scalars in proto3 text_format parse.

+  * Fix some segment faults for c extension map field.

+

+  PHP

+  * Most issues for json encoding/decoding in the c extension have been fixed. There are still some edge cases not fixed. For more details, check conformance/failure_list_php_c.txt.

+  * Supports php 7.3

+  * Added helper methods to convert between enum values and names.

+  * Allow setting/getting wrapper message fields using primitive values.

+  * Various bug fixes.

+

+  Ruby

+  * Ruby 2.6 support.

+  * Drops support for ruby < 2.3.

+  * Most issues for json encoding/decoding in the c extension have been fixed. There are still some edge cases not fixed. For more details, check conformance/failure_list_ruby.txt.

+  * Json parsing can specify an option to ignore unknown fields: msg.decode_json(data, {ignore_unknown_fields: true}).

+  * Added support for proto2 syntax (partially).

+  * Various bug fixes.

+

+  Csharp

+  * More support for FieldMask include merge, intersect and more.

+  * Increasing the default recursion limit to 100.

+  * Support loading FileDescriptors dynamically.

+  * Provide access to comments from descriptors.

+  * Added Any.Is method.

+  * Compatible with C# 6

+  * Added IComparable and comparison operators on Timestamp.

+

+  Objective C

+  * Add ability to introspect list of enum values (#4678)

+  * Copy the value when setting message/data fields (#5215)

+  * Support suppressing the objc package prefix checks on a list of files (#5309)

+  * More complete keyword and NSObject method (via categories) checks for field names, can result in more fields being rename, but avoids the collisions at runtime (#5289)

+  * Small fixes to TextFormat generation for extensions (#5362)

+  * Provide more details/context in deprecation messages (#5412)

+  * Array/Dictionary enumeration blocks NS_NOESCAPE annotation for Swift (#5421)

+  * Properly annotate extensions for ARC when their names imply behaviors (#5427)

+  * Enum alias name collision improvements (#5480)

+

+

+2018-07-27 version 3.6.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Introduced workaround for Windows issue with std::atomic and std::once_flag

+    initialization (#4777, #4773).

+

+  PHP

+  * Added compatibility with PHP 7.3 (#4898).

+

+  Ruby

+  * Fixed Ruby crash involving Any encoding (#4718).

+

+2018-06-01 version 3.6.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+

+  C++

+  * Starting from this release, we now require C++11. For those we cannot yet

+    upgrade to C++11, we will try to keep the 3.5.x branch updated with

+    critical bug fixes only. If you have any concerns about this, please

+    comment on issue #2780.

+  * Moved to C++11 types like std::atomic and std::unique_ptr and away from our

+    old custom-built equivalents.

+  * Added support for repeated message fields in lite protos using implicit

+    weak fields. This is an experimental feature that allows the linker to

+    strip out more unused messages than previously was possible.

+  * Fixed SourceCodeInfo for interpreted options and extension range options.

+  * Fixed always_print_enums_as_ints option for JSON serialization.

+  * Added support for ignoring unknown enum values when parsing JSON.

+  * Create std::string in Arena memory.

+  * Fixed ValidateDateTime to correctly check the day.

+  * Fixed bug in ZeroCopyStreamByteSink.

+  * Various other cleanups and fixes.

+

+  Java

+  * Dropped support for Java 6.

+  * Added a UTF-8 decoder that uses Unsafe to directly decode a byte buffer.

+  * Added deprecation annotations to generated code for deprecated oneof

+    fields.

+  * Fixed map field serialization in DynamicMessage.

+  * Cleanup and documentation for Java Lite runtime.

+  * Various other fixes and cleanups

+  * Fixed unboxed arraylists to handle an edge case

+  * Improved performance for copying between unboxed arraylists

+  * Fixed lite protobuf to avoid Java compiler warnings

+  * Improved test coverage for lite runtime

+  * Performance improvements for lite runtime

+

+  Python

+  * Fixed bytes/string map key incompatibility between C++ and pure-Python

+    implementations (issue #4029)

+  * Added __init__.py files to compiler and util subpackages

+  * Use /MT for all Windows versions

+  * Fixed an issue affecting the Python-C++ implementation when used with

+    Cython (issue #2896)

+  * Various text format fixes

+  * Various fixes to resolve behavior differences between the pure-Python and

+    Python-C++ implementations

+

+  PHP

+  * Added php_metadata_namespace to control the file path of generated metadata

+    file.

+  * Changed generated classes of nested message/enum. E.g., Foo.Bar, which

+    previously generates Foo_Bar, now generates Foo/Bar

+  * Added array constructor. When creating a message, users can pass a php

+    array whose content is field name to value pairs into constructor. The

+    created message will be initialized according to the array. Note that

+    message field should use a message value instead of a sub-array.

+  * Various bug fixes.

+

+  Objective-C

+  * We removed some helper class methods from GPBDictionary to shrink the size

+    of the library, the functionary is still there, but you may need to do some

+    specific +alloc / -init… methods instead.

+  * Minor improvements in the performance of object field getters/setters by

+    avoiding some memory management overhead.

+  * Fix a memory leak during the raising of some errors.

+  * Make header importing completely order independent.

+  * Small code improvements for things the undefined behaviors compiler option

+    was flagging.

+

+  Ruby

+  * Added ruby_package file option to control the module of generated class.

+  * Various bug fixes.

+

+  Javascript

+  * Allow setting string to int64 field.

+

+  Csharp

+  * Unknown fields are now parsed and then sent back on the wire. They can be

+    discarded at parse time via a CodedInputStream option.

+  * Movement towards working with .NET 3.5 and Unity

+  * Expression trees are no longer used

+  * AOT generics issues in Unity/il2cpp have a workaround (see this commit for

+    details)

+  * Floating point values are now compared bitwise (affects NaN value

+    comparisons)

+  * The default size limit when parsing is now 2GB rather than 64MB

+  * MessageParser now supports parsing from a slice of a byte array

+  * JSON list parsing now accepts null values where the underlying proto

+    representation does

+

+2017-12-20 version 3.5.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+  Planned Future Changes

+  * Make C++ implementation C++11 only: we plan to require C++11 to build

+    protobuf code starting from 3.6.0 release. Please join this github issue:

+    https://github.com/protocolbuffers/protobuf/issues/2780 to provide your feedback.

+

+  protoc

+  * Fixed a bug introduced in 3.5.0 and protoc in Windows now accepts non-ascii

+    characters in paths again.

+

+  C++

+  * Removed several usages of C++11 features in the code base.

+  * Fixed some compiler warnings.

+

+  PHP

+  * Fixed memory leak in C-extension implementation.

+  * Added discardUnknokwnFields API.

+  * Removed duplicated typedef in C-extension headers.

+  * Avoided calling private php methods (timelib_update_ts).

+  * Fixed Any.php to use fully-qualified name for DescriptorPool.

+

+  Ruby

+  * Added Google_Protobuf_discard_unknown for discarding unknown fields in

+    messages.

+

+  C#

+  * Unknown fields are now preserved by default.

+  * Floating point values are now bitwise compared, affecting message equality

+    check and Contains() API in map and repeated fields.

+

+

+2017-11-13 version 3.5.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+  Planned Future Changes

+  * Make C++ implementation C++11 only: we plan to require C++11 to build

+    protobuf code starting from 3.6.0 release. Please join this github issue:

+    https://github.com/protocolbuffers/protobuf/issues/2780 to provide your feedback.

+

+  General

+  * Unknown fields are now preserved in proto3 for most of the language

+    implementations for proto3 by default. See the per-language section for

+    details.

+  * reserve keyword are now supported in enums

+

+  C++

+  * Proto3 messages are now preserving unknown fields by default. If you rely on

+    unknowns fields being dropped. Please use DiscardUnknownFields() explicitly.

+  * Deprecated the unsafe_arena_release_* and unsafe_arena_add_allocated_*

+    methods for string fields.

+  * Added move constructor and move assignment to RepeatedField,

+    RepeatedPtrField and google::protobuf::Any.

+  * Added perfect forwarding in Arena::CreateMessage

+  * In-progress experimental support for implicit weak fields with lite protos.

+    This feature allows the linker to strip out more unused messages and reduce

+    binary size.

+  * Various performance optimizations.

+

+  Java

+  * Proto3 messages are now preserving unknown fields by default. If you’d like

+    to drop unknown fields, please use the DiscardUnknownFieldsParser API. For

+    example:

+      Parser<Foo> parser = DiscardUnknownFieldsParser.wrap(Foo.parser());

+      Foo foo = parser.parseFrom(input);

+  * Added a new CodedInputStream decoder for Iterable<ByteBuffer> with direct

+    ByteBuffers.

+  * TextFormat now prints unknown length-delimited fields as messages if

+    possible.

+  * FieldMaskUtil.merge() no longer creates unnecessary empty messages when a

+    message field is unset in both source message and destination message.

+  * Various performance optimizations.

+

+  Python

+  * Proto3 messages are now preserving unknown fields by default. Use

+    message.DiscardUnknownFields() to drop unknown fields.

+  * Add FieldDescriptor.file in generated code.

+  * Add descriptor pool FindOneofByName in pure python.

+  * Change unknown enum values into unknown field set .

+  * Add more Python dict/list compatibility for Struct/ListValue.

+  * Add utf-8 support for text_format.Merge()/Parse().

+  * Support numeric unknown enum values for proto3 JSON format.

+  * Add warning for Unexpected end-group tag in cpp extension.

+

+  PHP

+  * Proto3 messages are now preserving unknown fields.

+  * Provide well known type messages in runtime.

+  * Add prefix ‘PB’ to generated class of reserved names.

+  * Fixed all conformance tests for encode/decode json in php runtime. C

+    extension needs more work.

+

+  Objective-C

+  * Fixed some issues around copying of messages with unknown fields and then

+    mutating the unknown fields in the copy.

+

+  C#

+  * Added unknown field support in JsonParser.

+  * Fixed oneof message field merge.

+  * Simplify parsing messages from array slices.

+

+  Ruby

+  * Unknown fields are now preserved by default.

+  * Fixed several bugs for segment fault.

+

+  Javascript

+  * Decoder can handle both paced and unpacked data no matter how the proto is

+    defined.

+  * Decoder now accept long varint for 32 bit integers.

+

+

+2017-08-14 version 3.4.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+  Planned Future Changes

+  * There are some changes that are not included in this release but are planned

+    for the near future

+      - Preserve unknown fields in proto3: We are going to bring unknown fields

+        back into proto3. In this release, some languages start to support

+        preserving unknown fields in proto3, controlled by flags/options. Some

+        languages also introduce explicit APIs to drop unknown fields for

+        migration. Please read the change log sections by languages for details.

+        For general timeline and plan:

+

+          https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view

+

+        For issues and discussions:

+

+          https://github.com/protocolbuffers/protobuf/issues/272

+

+      - Make C++ implementation C++11 only: we plan to require C++11 to build

+        protobuf code starting from 3.5.0 or 3.6.0 release, after unknown fields

+        semantic changes are finished. Please join this

+        github issue:

+

+          https://github.com/protocolbuffers/protobuf/issues/2780

+

+        to provide your feedback.

+

+  General

+  * Extension ranges now accept options and are customizable.

+  * "reserve" keyword now supports “max” in field number ranges,

+    e.g.  reserve 1000 to max;

+

+  C++

+  * Proto3 messages are now able to preserve unknown fields. The default

+    behavior is still to drop unknowns, which will be flipped in a future

+    release. If you rely on unknowns fields being dropped. Please use

+    Message::DiscardUnknownFields() explicitly.

+  * Packable proto3 fields are now packed by default in serialization.

+  * Following C++11 features are introduced when C++11 is available:

+      - move-constructor and move-assignment are introduced to messages

+      - Repeated fields constructor now takes std::initializer_list

+      - rvalue setters are introduced for string fields

+  * Experimental Table-Driven parsing and serialization available to test. To

+    enable it, pass in table_driven_parsing table_driven_serialization protoc

+    generator flags for C++

+

+      $ protoc --cpp_out=table_driven_parsing,table_driven_serialization:./ \

+        test.proto

+

+  * lite generator parameter supported by the generator. Once set, all generated

+    files, use lite runtime regardless of the optimizer_for setting in the

+    .proto file.

+  * Various optimizations to make C++ code more performant on PowerPC platform

+  * Fixed maps data corruption when the maps are modified by both reflection API

+    and generated API.

+  * Deterministic serialization on maps reflection now uses stable sort.

+  * file() accessors are introduced to various *Descriptor classes to make

+    writing template function easier.

+  * ByteSize() and SpaceUsed() are deprecated.Use ByteSizeLong() and

+    SpaceUsedLong() instead

+  * Consistent hash function is used for maps in DEBUG and NDEBUG build.

+  * "using namespace std" is removed from stubs/common.h

+  * Various performance optimizations and bug fixes

+

+  Java

+  * Introduced new parser API DiscardUnknownFieldsParser in preparation of

+    proto3 unknown fields preservation change. Users who want to drop unknown

+    fields should migrate to use this new parser API. For example:

+

+      Parser<Foo> parser = DiscardUnknownFieldsParser.wrap(Foo.parser());

+      Foo foo = parser.parseFrom(input);

+

+  * Introduced new TextFormat API printUnicodeFieldValue() that prints field

+    value without escaping unicode characters.

+  * Added Durations.compare(Duration, Duration) and

+    Timestamps.compare(Timestamp, Timestamp).

+  * JsonFormat now accepts base64url encoded bytes fields.

+  * Optimized CodedInputStream to do less copies when parsing large bytes

+    fields.

+  * Optimized TextFormat to allocate less memory when printing.

+

+  Python

+  * SerializeToString API is changed to SerializeToString(self, **kwargs),

+    deterministic parameter is accepted for deterministic serialization.

+  * Added sort_keys parameter in json format to make the output deterministic.

+  * Added indent parameter in json format.

+  * Added extension support in json format.

+  * Added __repr__ support for repeated field in cpp implementation.

+  * Added file in FieldDescriptor.

+  * Added pretty-print filter to text format.

+  * Services and method descriptors are always printed even if generic_service

+    option is turned off.

+  * Note: AppEngine 2.5 is deprecated on June 2017 that AppEngine 2.5 will

+    never update protobuf runtime. Users who depend on AppEngine 2.5 should use

+    old protoc.

+

+  PHP

+  * Support PHP generic services. Specify file option php_generic_service=true

+    to enable generating service interface.

+  * Message, repeated and map fields setters take value instead of reference.

+  * Added map iterator in c extension.

+  * Support json  encode/decode.

+  * Added more type info in getter/setter phpdoc

+  * Fixed the problem that c extension and php implementation cannot be used

+    together.

+  * Added file option php_namespace to use custom php namespace instead of

+    package.

+  * Added fluent setter.

+  * Added descriptor API in runtime for custom encode/decode.

+  * Various bug fixes.

+

+  Objective-C

+  * Fix for GPBExtensionRegistry copying and add tests.

+  * Optimize GPBDictionary.m codegen to reduce size of overall library by 46K

+    per architecture.

+  * Fix some cases of reading of 64bit map values.

+  * Properly error on a tag with field number zero.

+  * Preserve unknown fields in proto3 syntax files.

+  * Document the exceptions on some of the writing apis.

+

+  C#

+  * Implemented IReadOnlyDictionary<K,V> in MapField<K,V>

+  * Added TryUnpack method for Any message in addition to Unpack.

+  * Converted C# projects to MSBuild (csproj) format.

+

+  Ruby

+  * Several bug fixes.

+

+  Javascript

+  * Added support of field option js_type. Now one can specify the JS type of a

+    64-bit integer field to be string in the generated code by adding option

+    [jstype = JS_STRING] on the field.

+

+2017-04-05 version 3.3.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

+  Planned Future Changes

+  * There are some changes that are not included in this release but are

+    planned for the near future:

+      - Preserve unknown fields in proto3: please read this doc:

+

+          https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view

+

+        for the timeline and follow up this github issue:

+

+          https://github.com/protocolbuffers/protobuf/issues/272

+

+        for discussion.

+      - Make C++ implementation C++11 only: we plan to require C++11 to build

+        protobuf code starting from 3.4.0 or 3.5.0 release. Please join this

+        github issue:

+

+          https://github.com/protocolbuffers/protobuf/issues/2780

+

+        to provide your feedback.

+

+  C++

+  * Fixed map fields serialization of DynamicMessage to correctly serialize

+    both key and value regardless of their presence.

+  * Parser now rejects field number 0 correctly.

+  * New API Message::SpaceUsedLong() that’s equivalent to

+    Message::SpaceUsed() but returns the value in size_t.

+  * JSON support

+    - New flag always_print_enums_as_ints in JsonPrintOptions.

+    - New flag preserve_proto_field_names in JsonPrintOptions. It will instruct

+      the JSON printer to use the original field name declared in the .proto

+      file instead of converting them to lowerCamelCase when printing JSON.

+    - JsonPrintOptions.always_print_primtive_fields now works for oneof message

+      fields.

+    - Fixed a bug that doesn’t allow different fields to set the same json_name

+      value.

+    - Fixed a performance bug that causes excessive memory copy when printing

+      large messages.

+  * Various performance optimizations.

+

+  Java

+  * Map field setters eagerly validate inputs and throw NullPointerExceptions

+    as appropriate.

+  * Added ByteBuffer overloads to the generated parsing methods and the Parser

+    interface.

+  * proto3 enum's getNumber() method now throws on UNRECOGNIZED values.

+  * Output of JsonFormat is now locale independent.

+

+  Python

+  * Added FindServiceByName() in the pure-Python DescriptorPool. This works only

+    for descriptors added with DescriptorPool.Add(). Generated descriptor_pool

+    does not support this yet.

+  * Added a descriptor_pool parameter for parsing Any in text_format.Parse().

+  * descriptor_pool.FindFileContainingSymbol() now is able to find nested

+    extensions.

+  * Extending empty [] to repeated field now sets parent message presence.

+

+  PHP

+  * Added file option php_class_prefix. The prefix will be prepended to all

+    generated classes defined in the file.

+  * When encoding, negative int32 values are sign-extended to int64.

+  * Repeated/Map field setter accepts a regular PHP array. Type checking is

+    done on the array elements.

+  * encode/decode are renamed to serializeToString/mergeFromString.

+  * Added mergeFrom, clear method on Message.

+  * Fixed a bug that oneof accessor didn’t return the field name that is

+    actually set.

+  * C extension now works with php7.

+  * This is the first GA release of PHP. We guarantee that old generated code

+    can always work with new runtime and new generated code.

+

+  Objective-C

+  * Fixed help for GPBTimestamp for dates before the epoch that contain

+    fractional seconds.

+  * Added GPBMessageDropUnknownFieldsRecursively() to remove unknowns from a

+    message and any sub messages.

+  * Addressed a threading race in extension registration/lookup.

+  * Increased the max message parsing depth to 100 to match the other languages.

+  * Removed some use of dispatch_once in favor of atomic compare/set since it

+    needs to be heap based.

+  * Fixes for new Xcode 8.3 warnings.

+

+  C#

+  * Fixed MapField.Values.CopyTo, which would throw an exception unnecessarily

+    if provided exactly the right size of array to copy to.

+  * Fixed enum JSON formatting when multiple names mapped to the same numeric

+    value.

+  * Added JSON formatting option to format enums as integers.

+  * Modified RepeatedField<T> to implement IReadOnlyList<T>.

+  * Introduced the start of custom option handling; it's not as pleasant as it

+    might be, but the information is at least present. We expect to extend code

+    generation to improve this in the future.

+  * Introduced ByteString.FromStream and ByteString.FromStreamAsync to

+    efficiently create a ByteString from a stream.

+  * Added whole-message deprecation, which decorates the class with [Obsolete].

+

+  Ruby

+  * Fixed Message#to_h for messages with map fields.

+  * Fixed memcpy() in binary gems to work for old glibc, without breaking the

+    build for non-glibc libc’s like musl.

+

+  Javascript

+  * Added compatibility tests for version 3.0.0.

+  * Added conformance tests.

+  * Fixed serialization of extensions: we need to emit a value even if it is

+    falsy (like the number 0).

+  * Use closurebuilder.py in favor of calcdeps.py for compiling JavaScript.

+

+2017-01-23 version 3.2.0 (C++/Java/Python/PHP/Ruby/Objective-C/C#/JavaScript/Lite)

+  General

+  * Added protoc version number to protoc plugin protocol. It can be used by

+    protoc plugin to detect which version of protoc is used with the plugin and

+    mitigate known problems in certain version of protoc.

+

+  C++

+  * The default parsing byte size limit has been raised from 64MB to 2GB.

+  * Added rvalue setters for non-arena string fields.

+  * Enabled debug logging for Android.

+  * Fixed a double-free problem when using Reflection::SetAllocatedMessage()

+    with extension fields.

+  * Fixed several deterministic serialization bugs:

+    * MessageLite::SerializeAsString() now respects the global deterministic

+      serialization flag.

+    * Extension fields are serialized deterministically as well.  Fixed protocol

+      compiler to correctly report importing-self as an error.

+  * Fixed FileDescriptor::DebugString() to print custom options correctly.

+  * Various performance/codesize optimizations and cleanups.

+

+  Java

+  * The default parsing byte size limit has been raised from 64MB to 2GB.

+  * Added recursion limit when parsing JSON.

+  * Fixed a bug that enumType.getDescriptor().getOptions() doesn't have custom

+    options.

+  * Fixed generated code to support field numbers up to 2^29-1.

+

+  Python

+  * You can now assign NumPy scalars/arrays (np.int32, np.int64) to protobuf

+    fields, and assigning other numeric types has been optimized for

+    performance.

+  * Pure-Python: message types are now garbage-collectable.

+  * Python/C++: a lot of internal cleanup/refactoring.

+

+  PHP (Alpha)

+  * For 64-bit integers type (int64/uint64/sfixed64/fixed64/sint64), use PHP

+    integer on 64-bit environment and PHP string on 32-bit environment.

+  * PHP generated code also conforms to PSR-4 now.

+  * Fixed ZTS build for c extension.

+  * Fixed c extension build on Mac.

+  * Fixed c extension build on 32-bit linux.

+  * Fixed the bug that message without namespace is not found in the descriptor

+    pool. (#2240)

+  * Fixed the bug that repeated field is not iterable in c extension.

+  * Message names Empty will be converted to GPBEmpty in generated code.

+  * Added phpdoc in generated files.

+  * The released API is almost stable. Unless there is large problem, we won't

+    change it. See

+    https://developers.google.com/protocol-buffers/docs/reference/php-generated

+    for more details.

+

+  Objective-C

+  * Added support for push/pop of the stream limit on CodedInputStream for

+    anyone doing manual parsing.

+

+  C#

+  * No changes.

+

+  Ruby

+  * Message objects now support #respond_to? for field getters/setters.

+  * You can now compare “message == non_message_object” and it will return false

+    instead of throwing an exception.

+  * JRuby: fixed #hashCode to properly reflect the values in the message.

+

+  Javascript

+  * Deserialization of repeated fields no longer has quadratic performance

+    behavior.

+  * UTF-8 encoding/decoding now properly supports high codepoints.

+  * Added convenience methods for some well-known types: Any, Struct, and

+    Timestamp. These make it easier to convert data between native JavaScript

+    types and the well-known protobuf types.

+

+2016-09-23 version 3.1.0 (C++/Java/Python/PHP/Ruby/Objective-C/C#/JavaScript/Lite)

+  General

+  * Proto3 support in PHP (alpha).

+  * Various bug fixes.

+

+  C++

+  * Added MessageLite::ByteSizeLong() that’s equivalent to

+    MessageLite::ByteSize() but returns the value in size_t. Useful to check

+    whether a message is over the 2G size limit that protobuf can support.

+  * Moved default_instances to global variables. This allows default_instance

+    addresses to be known at compile time.

+  * Adding missing generic gcc 64-bit atomicops.

+  * Restore New*Callback into google::protobuf namespace since these are used

+    by the service stubs code

+  * JSON support.

+    * Fixed some conformance issues.

+  * Fixed a JSON serialization bug for bytes fields.

+

+  Java

+  * Fixed a bug in TextFormat that doesn’t accept empty repeated fields (i.e.,

+    “field: [ ]”).

+  * JSON support

+    * Fixed JsonFormat to do correct snake_case-to-camelCase conversion for

+      non-style-conforming field names.

+    * Fixed JsonFormat to parse empty Any message correctly.

+    * Added an option to JsonFormat.Parser to ignore unknown fields.

+  * Experimental API

+    * Added UnsafeByteOperations.unsafeWrap(byte[]) to wrap a byte array into

+      ByteString without copy.

+

+  Python

+  * JSON support

+    * Fixed some conformance issues.

+

+  PHP (Alpha)

+  * We have added the proto3 support for PHP via both a pure PHP package and a

+    native c extension. The pure PHP package is intended to provide usability

+    to wider range of PHP platforms, while the c extension is intended to

+    provide higher performance. Both implementations provide the same runtime

+    APIs and share the same generated code. Users don’t need to re-generate

+    code for the same proto definition when they want to switch the

+    implementation later. The pure PHP package is included in the php/src

+    directory, and the c extension is included in the php/ext directory.

+

+    Both implementations provide idiomatic PHP APIs:

+    * All messages and enums are defined as PHP classes.

+    * All message fields can only be accessed via getter/setter.

+    * Both repeated field elements and map elements are stored in containers

+      that act like a normal PHP array.

+

+    Unlike several existing third-party PHP implementations for protobuf, our

+    implementations are built on a "strongly-typed" philosophy: message fields

+    and array/map containers will throw exceptions eagerly when values of the

+    incorrect type (not including those that can be type converted, e.g.,

+    double <-> integer <-> numeric string) are inserted.

+

+    Currently, pure PHP runtime supports php5.5, 5.6 and 7 on linux. C

+    extension runtime supports php5.5 and 5.6 on linux.

+

+    See php/README.md for more details about installment. See

+    https://developers.google.com/protocol-buffers/docs/phptutorial for more

+    details about APIs.

+

+  Objective-C

+  * Helpers are now provided for working the Any well known type (see

+    GPBWellKnownTypes.h for the api additions).

+  * Some improvements in startup code (especially when extensions aren’t used).

+

+  Javascript

+  * Fixed missing import of jspb.Map

+  * Fixed valueWriterFn variable name

+

+  Ruby

+  * Fixed hash computation for JRuby's RubyMessage

+  * Make sure map parsing frames are GC-rooted.

+  * Added API support for well-known types.

+

+  C#

+  * Removed check on dependency in the C# reflection API.

+

+2016-09-06 version 3.0.2 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript/Lite)

+  General

+  * Various bug fixes.

+

+  Objective C

+  * Fix for oneofs in proto3 syntax files where fields were set to the zero

+    value.

+  * Fix for embedded null character in strings.

+  * CocoaDocs support

+

+  Ruby

+  * Fixed memory corruption bug in parsing that could occur under GC pressure.

+

+  Javascript

+  * jspb.Map is now properly exported to CommonJS modules.

+

+  C#

+  * Removed legacy_enum_values flag.

+

+

+2016-07-27 version 3.0.0 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript/Lite)

+  General

+  * This log only contains changes since the beta-4 release. Summarized change

+    log since the last stable release (v2.6.1) can be found in the github

+    release page.

+

+  Compatibility Notice

+  * v3.0.0 is the first API stable release of the v3.x series. We do not expect

+    any future API breaking changes.

+  * For C++, Java Lite and Objective-C, source level compatibility is

+    guaranteed.  Upgrading from v3.0.0 to newer minor version releases will be

+    source compatible. For example, if your code compiles against protobuf

+    v3.0.0, it will continue to compile after you upgrade protobuf library to

+    v3.1.0.

+  * For other languages, both source level compatibility and binary level

+    compatibility are guaranteed. For example, if you have a Java binary built

+    against protobuf v3.0.0. After switching the protobuf runtime binary to

+    v3.1.0, your built binary should continue to work.

+  * Compatibility is only guaranteed for documented API and documented

+    behaviors. If you are using undocumented API (e.g., use anything in the C++

+    internal namespace), it can be broken by minor version releases in an

+    undetermined manner.

+

+  Ruby

+  * When you assign a string field `a.string_field = "X"`, we now call

+    #encode(UTF-8) on the string and freeze the copy. This saves you from

+    needing to ensure the string is already encoded as UTF-8. It also prevents

+    you from mutating the string after it has been assigned (this is how we

+    ensure it stays valid UTF-8).

+  * The generated file for `foo.proto` is now `foo_pb.rb` instead of just

+    `foo.rb`. This makes it easier to see which imports/requires are from

+    protobuf generated code, and also prevents conflicts with any `foo.rb` file

+    you might have written directly in Ruby. It is a backward-incompatible

+    change: you will need to update all of your `require` statements.

+  * For package names like `foo_bar`, we now translate this to the Ruby module

+    `FooBar`. This is more idiomatic Ruby than what we used to do (`Foo_bar`).

+

+  JavaScript

+  * Scalar fields like numbers and boolean now return defaults instead of

+    `undefined` or `null` when they are unset. You can test for presence

+    explicitly by calling `hasFoo()`, which we now generate for scalar fields.

+

+  Java Lite

+  * Java Lite is now implemented as a separate plugin, maintained in the

+    `javalite` branch. Both lite runtime and protoc artifacts will be available

+    in Maven.

+

+  C#

+  * Target platforms now .NET 4.5, selected portable subsets and .NET Core.

+  * legacy_enum_values option is no longer supported.

+

+2016-07-15 version 3.0.0-beta-4 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript)

+  General

+  * Added a deterministic serialization API for C++. The deterministic

+    serialization guarantees that given a binary, equal messages will be

+    serialized to the same bytes. This allows applications like MapReduce to

+    group equal messages based on the serialized bytes. The deterministic

+    serialization is, however, NOT canonical across languages; it is also

+    unstable across different builds with schema changes due to unknown fields.

+    Users who need canonical serialization, e.g. persistent storage in a

+    canonical form, fingerprinting, etc, should define their own

+    canonicalization specification and implement the serializer using reflection

+    APIs rather than relying on this API.

+  * Added OneofOptions. You can now define custom options for oneof groups.

+      import "google/protobuf/descriptor.proto";

+      extend google.protobuf.OneofOptions {

+        optional int32 my_oneof_extension = 12345;

+      }

+      message Foo {

+        oneof oneof_group {

+          (my_oneof_extension) = 54321;

+          ...

+        }

+      }

+

+  C++ (beta)

+  * Introduced a deterministic serialization API in

+    CodedOutputStream::SetSerializationDeterministic(bool). See the notes about

+    deterministic serialization in the General section.

+  * Added google::protobuf::Map::swap() to swap two map fields.

+  * Fixed a memory leak when calling Reflection::ReleaseMessage() on a message

+    allocated on arena.

+  * Improved error reporting when parsing text format protos.

+  * JSON

+      - Added a new parser option to ignore unknown fields when parsing JSON.

+      - Added convenient methods for message to/from JSON conversion.

+  * Various performance optimizations.

+

+  Java (beta)

+  * File option "java_generate_equals_and_hash" is now deprecated. equals() and

+    hashCode() methods are generated by default.

+  * Added a new JSON printer option "omittingInsignificantWhitespace" to produce

+    a more compact JSON output. The printer will pretty-print by default.

+  * Updated Java runtime to be compatible with 2.5.0/2.6.1 generated protos.

+

+  Python (beta)

+  * Added support to pretty print Any messages in text format.

+  * Added a flag to ignore unknown fields when parsing JSON.

+  * Bugfix: "@type" field of a JSON Any message is now correctly put before

+    other fields.

+

+  Objective-C (beta)

+  * Updated the code to support compiling with more compiler warnings

+    enabled. (Issue 1616)

+  * Exposing more detailed errors for parsing failures. (PR 1623)

+  * Small (breaking) change to the naming of some methods on the support classes

+    for map<>. There were collisions with the system provided KVO support, so

+    the names were changed to avoid those issues.  (PR 1699)

+  * Fixed for proper Swift bridging of error handling during parsing. (PR 1712)

+  * Complete support for generating sources that will go into a Framework and

+    depend on generated sources from other Frameworks. (Issue 1457)

+

+  C# (beta)

+  * RepeatedField optimizations.

+  * Support for .NET Core.

+  * Minor bug fixes.

+  * Ability to format a single value in JsonFormatter (advanced usage only).

+  * Modifications to attributes applied to generated code.

+

+  Javascript (alpha)

+  * Maps now have a real map API instead of being treated as repeated fields.

+  * Well-known types are now provided in the google-protobuf package, and the

+    code generator knows to require() them from that package.

+  * Bugfix: non-canonical varints are correctly decoded.

+

+  Ruby (alpha)

+  * Accessors for oneof fields now return default values instead of nil.

+

+  Java Lite

+  * Java lite support is removed from protocol compiler. It will be supported

+    as a protocol compiler plugin in a separate code branch.

+

+2016-05-16 version 3.0.0-beta-3 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript)

+  General

+  * Supported Proto3 lite-runtime in C++/Java for mobile platforms.

+  * Any type now supports APIs to specify prefixes other than

+    type.googleapis.com

+  * Removed javanano_use_deprecated_package option; Nano will always has its own

+    ".nano" package.

+

+  C++ (Beta)

+  * Improved hash maps.

+      - Improved hash maps comments. In particular, please note that equal hash

+        maps will not necessarily have the same iteration order and

+        serialization.

+      - Added a new hash maps implementation that will become the default in a

+        later release.

+  * Arenas

+      - Several inlined methods in Arena were moved to out-of-line to improve

+        build performance and code size.

+      - Added SpaceAllocatedAndUsed() to report both space used and allocated

+      - Added convenient class UnsafeArenaAllocatedRepeatedPtrFieldBackInserter

+  * Any

+      - Allow custom type URL prefixes in Any packing.

+      - TextFormat now expand the Any type rather than printing bytes.

+  * Performance optimizations and various bug fixes.

+

+  Java (Beta)

+  * Introduced an ExperimentalApi annotation. Annotated APIs are experimental

+    and are subject to change in a backward incompatible way in future releases.

+  * Introduced zero-copy serialization as an ExperimentalApi

+      - Introduction of the `ByteOutput` interface. This is similar to

+        `OutputStream` but provides semantics for lazy writing (i.e. no

+        immediate copy required) of fields that are considered to be immutable.

+      - `ByteString` now supports writing to a `ByteOutput`, which will directly

+        expose the internals of the `ByteString` (i.e. `byte[]` or `ByteBuffer`)

+        to the `ByteOutput` without copying.

+      - `CodedOutputStream` now supports writing to a `ByteOutput`. `ByteString`

+        instances that are too large to fit in the internal buffer will be

+        (lazily) written to the `ByteOutput` directly.

+      - This allows applications using large `ByteString` fields to avoid

+        duplication of these fields entirely. Such an application can supply a

+        `ByteOutput` that chains together the chunks received from

+        `CodedOutputStream` before forwarding them onto the IO system.

+  * Other related changes to `CodedOutputStream`

+      - Additional use of `sun.misc.Unsafe` where possible to perform fast

+        access to `byte[]` and `ByteBuffer` values and avoiding unnecessary

+        range checking.

+      - `ByteBuffer`-backed `CodedOutputStream` now writes directly to the

+        `ByteBuffer` rather than to an intermediate array.

+  * Improved lite-runtime.

+      - Lite protos now implement deep equals/hashCode/toString

+      - Significantly improved the performance of Builder#mergeFrom() and

+        Builder#mergeDelimitedFrom()

+  * Various bug fixes and small feature enhancement.

+      - Fixed stack overflow when in hashCode() for infinite recursive oneofs.

+      - Fixed the lazy field parsing in lite to merge rather than overwrite.

+      - TextFormat now supports reporting line/column numbers on errors.

+      - Updated to add appropriate @Override for better compiler errors.

+

+  Python (Beta)

+  * Added JSON format for Any, Struct, Value and ListValue

+  * [ ] is now accepted for both repeated scalar fields and repeated message

+    fields in text format parser.

+  * Numerical field name is now supported in text format.

+  * Added DiscardUnknownFields API for python protobuf message.

+

+  Objective-C (Beta)

+  * Proto comments now come over as HeaderDoc comments in the generated sources

+    so Xcode can pick them up and display them.

+  * The library headers have been updated to use HeaderDoc comments so Xcode can

+    pick them up and display them.

+  * The per message and per field overhead in both generated code and runtime

+    object sizes was reduced.

+  * Generated code now include deprecated annotations when the proto file

+    included them.

+

+  C# (Beta)

+  In general: some changes are breaking, which require regenerating messages.

+  Most user-written code will not be impacted *except* for the renaming of enum

+  values.

+

+  * Allow custom type URL prefixes in `Any` packing, and ignore them when

+    unpacking

+  * `protoc` is now in a separate NuGet package (Google.Protobuf.Tools)

+  * New option: `internal_access` to generate internal classes

+  * Enum values are now PascalCased, and if there's a prefix which matches the

+    name of the enum, that is removed (so an enum `COLOR` with a value

+    `COLOR_BLUE` would generate a value of just `Blue`). An option

+    (`legacy_enum_values`) is temporarily available to disable this, but the

+    option will be removed for GA.

+  * `json_name` option is now honored

+  * If group tags are encountered when parsing, they are validated more

+    thoroughly (although we don't support actual groups)

+  * NuGet dependencies are better specified

+  * Breaking: `Preconditions` is renamed to `ProtoPreconditions`

+  * Breaking: `GeneratedCodeInfo` is renamed to `GeneratedClrTypeInfo`

+  * `JsonFormatter` now allows writing to a `TextWriter`

+  * New interface, `ICustomDiagnosticMessage` to allow more compact

+    representations from `ToString`

+  * `CodedInputStream` and `CodedOutputStream` now implement `IDisposable`,

+    which simply disposes of the streams they were constructed with

+  * Map fields no longer support null values (in line with other languages)

+  * Improvements in JSON formatting and parsing

+

+  Javascript (Alpha)

+  * Better support for "bytes" fields: bytes fields can be read as either a

+    base64 string or UInt8Array (in environments where TypedArray is supported).

+  * New support for CommonJS imports.  This should make it easier to use the

+    JavaScript support in Node.js and tools like WebPack.  See js/README.md for

+    more information.

+  * Some significant internal refactoring to simplify and modularize the code.

+

+  Ruby (Alpha)

+  * JSON serialization now properly uses camelCased names, with a runtime option

+    that will preserve original names from .proto files instead.

+  * Well-known types are now included in the distribution.

+  * Release now includes binary gems for Windows, Mac, and Linux instead of just

+    source gems.

+  * Bugfix for serializing oneofs.

+

+  C++/Java Lite (Alpha)

+    A new "lite" generator parameter was introduced in the protoc for C++ and

+    Java for Proto3 syntax messages. Example usage:

+

+     ./protoc --cpp_out=lite:$OUTPUT_PATH foo.proto

+

+    The protoc will treat the current input and all the transitive dependencies

+    as LITE. The same generator parameter must be used to generate the

+    dependencies.

+

+    In Proto3 syntax files, "optimized_for=LITE_RUNTIME" is no longer supported.

+

+

+2015-12-30 version 3.0.0-beta-2 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript)

+  General

+  * Introduced a new language implementation: JavaScript.

+  * Added a new field option "json_name". By default proto field names are

+    converted to "lowerCamelCase" in proto3 JSON format. This option can be

+    used to override this behavior and specify a different JSON name for the

+    field.

+  * Added conformance tests to ensure implementations are following proto3 JSON

+    specification.

+

+  C++ (Beta)

+  * Various bug fixes and improvements to the JSON support utility:

+      - Duplicate map keys in JSON are now rejected (i.e., translation will

+        fail).

+      - Fixed wire-format for google.protobuf.Value/ListValue.

+      - Fixed precision loss when converting google.protobuf.Timestamp.

+      - Fixed a bug when parsing invalid UTF-8 code points.

+      - Fixed a memory leak.

+      - Reduced call stack usage.

+

+  Java (Beta)

+  * Cleaned up some unused methods on CodedOutputStream.

+  * Presized lists for packed fields during parsing in the lite runtime to

+    reduce allocations and improve performance.

+  * Improved the performance of unknown fields in the lite runtime.

+  * Introduced UnsafeByteStrings to support zero-copy ByteString creation.

+  * Various bug fixes and improvements to the JSON support utility:

+      - Fixed a thread-safety bug.

+      - Added a new option “preservingProtoFieldNames” to JsonFormat.

+      - Added a new option “includingDefaultValueFields” to JsonFormat.

+      - Updated the JSON utility to comply with proto3 JSON specification.

+

+  Python (Beta)

+  * Added proto3 JSON format utility. It includes support for all field types

+    and a few well-known types except for Any and Struct.

+  * Added runtime support for Any, Timestamp, Duration and FieldMask.

+  * [ ] is now accepted for repeated scalar fields in text format parser.

+  * Map fields now have proper O(1) performance for lookup/insert/delete

+    when using the Python/C++ implementation. They were previously using O(n)

+    search-based algorithms because the C++ reflection interface didn't

+    support true map operations.

+

+  Objective-C (Beta)

+  * Various bug-fixes and code tweaks to pass more strict compiler warnings.

+  * Now has conformance test coverage and is passing all tests.

+

+  C# (Beta)

+  * Various bug-fixes.

+  * Code generation: Files generated in directories based on namespace.

+  * Code generation: Include comments from .proto files in XML doc

+    comments (naively)

+  * Code generation: Change organization/naming of "reflection class" (access

+    to file descriptor)

+  * Code generation and library: Add Parser property to MessageDescriptor,

+    and introduce a non-generic parser type.

+  * Library: Added TypeRegistry to support JSON parsing/formatting of Any.

+  * Library: Added Any.Pack/Unpack support.

+  * Library: Implemented JSON parsing.

+

+  Javascript (Alpha)

+  * Added proto3 support for JavaScript. The runtime is written in pure

+    JavaScript and works in browsers and in Node.js. To generate JavaScript

+    code for your proto, invoke protoc with "--js_out". See js/README.md

+    for more build instructions.

+

+2015-08-26 version 3.0.0-beta-1 (C++/Java/Python/Ruby/Nano/Objective-C/C#)

+  About Beta

+  * This is the first beta release of protobuf v3.0.0. Not all languages

+    have reached beta stage. Languages not marked as beta are still in

+    alpha (i.e., be prepared for API breaking changes).

+

+  General

+  * Proto3 JSON is supported in several languages (fully supported in C++

+    and Java, partially supported in Ruby/C#). The JSON spec is defined in

+    the proto3 language guide:

+

+      https://developers.google.com/protocol-buffers/docs/proto3#json

+

+    We will publish a more detailed spec to define the exact behavior of

+    proto3-conformant JSON serializers and parsers. Until then, do not rely

+    on specific behaviors of the implementation if it’s not documented in

+    the above spec. More specifically, the behavior is not yet finalized for

+    the following:

+      - Parsing invalid JSON input (e.g., input with trailing commas).

+      - Non-camelCase names in JSON input.

+      - The same field appears multiple times in JSON input.

+      - JSON arrays contain “null” values.

+      - The message has unknown fields.

+

+  * Proto3 now enforces strict UTF-8 checking. Parsing will fail if a string

+    field contains non UTF-8 data.

+

+  C++ (Beta)

+  * Introduced new utility functions/classes in the google/protobuf/util

+    directory:

+      - MessageDifferencer: compare two proto messages and report their

+                            differences.

+      - JsonUtil: support converting protobuf binary format to/from JSON.

+      - TimeUtil: utility functions to work with well-known types Timestamp

+                  and Duration.

+      - FieldMaskUtil: utility functions to work with FieldMask.

+

+  * Performance optimization of arena construction and destruction.

+  * Bug fixes for arena and maps support.

+  * Changed to use cmake for Windows Visual Studio builds.

+  * Added Bazel support.

+

+  Java (Beta)

+  * Introduced a new util package that will be distributed as a separate

+    artifact in maven. It contains:

+      - JsonFormat: convert proto messages to/from JSON.

+      - TimeUtil: utility functions to work with Timestamp and Duration.

+      - FieldMaskUtil: utility functions to work with FieldMask.

+

+  * The static PARSER in each generated message is deprecated, and it will

+    be removed in a future release. A static parser() getter is generated

+    for each message type instead.

+  * Performance optimizations for String fields serialization.

+  * Performance optimizations for Lite runtime on Android:

+      - Reduced allocations

+      - Reduced method overhead after ProGuarding

+      - Reduced code size after ProGuarding

+

+  Python (Alpha)

+  * Removed legacy Python 2.5 support.

+  * Moved to a single Python 2.x/3.x-compatible codebase, instead of using 2to3.

+  * Fixed build/tests on Python 2.6, 2.7, 3.3, and 3.4.

+      - Pure-Python works on all four.

+      - Python/C++ implementation works on all but 3.4, due to changes in the

+        Python/C++ API in 3.4.

+  * Some preliminary work has been done to allow for multiple DescriptorPools

+    with Python/C++.

+

+  Ruby (Alpha)

+  * Many bugfixes:

+      - fixed parsing/serialization of bytes, sint, sfixed types

+      - other parser bugfixes

+      - fixed memory leak affecting Ruby 2.2

+

+  JavaNano (Alpha)

+  * JavaNano generated code now will be put in a nano package by default to

+    avoid conflicts with Java generated code.

+

+  Objective-C (Alpha)

+  * Added non-null markup to ObjC library. Requires SDK 8.4+ to build.

+  * Many bugfixes:

+      - Removed the class/enum filter.

+      - Renamed some internal types to avoid conflicts with the well-known types

+        protos.

+      - Added missing support for parsing repeated primitive fields in packed or

+        unpacked forms.

+      - Added *Count for repeated and map<> fields to avoid auto-create when

+        checking for them being set.

+

+  C# (Alpha)

+  * Namespace changed to Google.Protobuf (and NuGet package will be named

+    correspondingly).

+  * Target platforms now .NET 4.5 and selected portable subsets only.

+  * Removed lite runtime.

+  * Reimplementation to use mutable message types.

+  * Null references used to represent "no value" for message type fields.

+  * Proto3 semantics supported; proto2 files are prohibited for C# codegen.

+    Most proto3 features supported:

+      - JSON formatting (a.k.a. serialization to JSON), including well-known

+        types (except for Any).

+      - Wrapper types mapped to nullable value types (or string/ByteString

+        allowing nullability). JSON parsing is not supported yet.

+      - maps

+      - oneof

+      - enum unknown value preservation

+

+2015-05-25 version 3.0.0-alpha-3 (Objective-C/C#):

+  General

+  * Introduced two new language implementations (Objective-C, C#) to proto3.

+  * Explicit "optional" keyword are disallowed in proto3 syntax, as fields are

+    optional by default.

+  * Group fields are no longer supported in proto3 syntax.

+  * Changed repeated primitive fields to use packed serialization by default in

+    proto3 (implemented for C++, Java, Python in this release).  The user can

+    still disable packed serialization by setting packed to false for now.

+  * Added well-known type protos (any.proto, empty.proto, timestamp.proto,

+    duration.proto, etc.). Users can import and use these protos just like

+    regular proto files. Additional runtime support will be added for them in

+    future releases (in the form of utility helper functions, or having them

+    replaced by language specific types in generated code).

+  * Added a "reserved" keyword in both proto2 and proto3 syntax. User can use

+    this keyword to declare reserved field numbers and names to prevent them

+    from being reused by other fields in the same message.

+

+    To reserve field numbers, add a reserved declaration in your message:

+

+      message TestMessage {

+        reserved 2, 15, 9 to 11, 3;

+      }

+

+    This reserves field numbers 2, 3, 9, 10, 11 and 15. If a user uses any of

+    these as field numbers, the protocol buffer compiler will report an error.

+

+    Field names can also be reserved:

+

+      message TestMessage {

+        reserved "foo", "bar";

+      }

+

+  * Various bug fixes since 3.0.0-alpha-2

+

+  Objective-C

+    Objective-C includes a code generator and a native objective-c runtime

+    library.  By adding “--objc_out” to protoc, the code generator will generate

+    a header(*.pbobjc.h) and an implementation file(*.pbobjc.m) for each proto

+    file.

+

+    In this first release, the generated interface provides: enums, messages,

+    field support(single, repeated, map, oneof), proto2 and proto3 syntax

+    support, parsing and serialization. It’s  compatible with ARC and non-ARC

+    usage. Besides, user can also access it via the swift bridging header.

+

+    See objectivec/README.md for details.

+

+  C#

+    * C# protobufs are based on project

+      https://github.com/jskeet/protobuf-csharp-port. The original project was

+      frozen and all the new development will happen here.

+    * Codegen plugin for C# was completely rewritten to C++ and is now an

+      integral part of protoc.

+    * Some refactorings and cleanup has been applied to the C# runtime library.

+    * Only proto2 is supported in C# at the moment, proto3 support is in

+      progress and will likely bring significant breaking changes to the API.

+

+    See csharp/README.md for details.

+

+  C++

+    * Added runtime support for Any type. To use Any in your proto file, first

+      import the definition of Any:

+

+        // foo.proto

+        import "google/protobuf/any.proto";

+        message Foo {

+          google.protobuf.Any any_field = 1;

+        }

+        message Bar {

+          int32 value = 1;

+        }

+

+      Then in C++ you can access the Any field using PackFrom()/UnpackTo()

+      methods:

+

+        Foo foo;

+        Bar bar = ...;

+        foo.mutable_any_field()->PackFrom(bar);

+        ...

+        if (foo.any_field().IsType<Bar>()) {

+          foo.any_field().UnpackTo(&bar);

+          ...

+        }

+    * In text format, entries of a map field will be sorted by key.

+

+  Java

+    * Continued optimizations on the lite runtime to improve performance for

+      Android.

+

+  Python

+    * Added map support.

+      - maps now have a dict-like interface (msg.map_field[key] = value)

+      - existing code that modifies maps via the repeated field interface

+        will need to be updated.

+

+  Ruby

+    * Improvements to RepeatedField's emulation of the Ruby Array API.

+    * Various speedups and internal cleanups.

+

+2015-02-26 version 3.0.0-alpha-2 (Python/Ruby/JavaNano):

+  General

+  * Introduced three new language implementations (Ruby, JavaNano, and

+    Python) to proto3.

+  * Various bug fixes since 3.0.0-alpha-1

+

+  Python:

+    Python has received several updates, most notably support for proto3

+    semantics in any .proto file that declares syntax="proto3".

+    Messages declared in proto3 files no longer represent field presence

+    for scalar fields (number, enums, booleans, or strings).  You can

+    no longer call HasField() for such fields, and they are serialized

+    based on whether they have a non-zero/empty/false value.

+

+    One other notable change is in the C++-accelerated implementation.

+    Descriptor objects (which describe the protobuf schema and allow

+    reflection over it) are no longer duplicated between the Python

+    and C++ layers.  The Python descriptors are now simple wrappers

+    around the C++ descriptors.  This change should significantly

+    reduce the memory usage of programs that use a lot of message

+    types.

+

+  Ruby:

+    We have added proto3 support for Ruby via a native C extension.

+

+    The Ruby extension itself is included in the ruby/ directory, and details on

+    building and installing the extension are in ruby/README.md. The extension

+    will also be published as a Ruby gem. Code generator support is included as

+    part of `protoc` with the `--ruby_out` flag.

+

+    The Ruby extension implements a user-friendly DSL to define message types

+    (also generated by the code generator from `.proto` files).  Once a message

+    type is defined, the user may create instances of the message that behave in

+    ways idiomatic to Ruby. For example:

+

+    - Message fields are present as ordinary Ruby properties (getter method

+      `foo` and setter method `foo=`).

+    - Repeated field elements are stored in a container that acts like a native

+      Ruby array, and map elements are stored in a container that acts like a

+      native Ruby hashmap.

+    - The usual well-known methods, such as `#to_s`, `#dup`, and the like, are

+      present.

+

+    Unlike several existing third-party Ruby extensions for protobuf, this

+    extension is built on a "strongly-typed" philosophy: message fields and

+    array/map containers will throw exceptions eagerly when values of the

+    incorrect type are inserted.

+

+    See ruby/README.md for details.

+

+  JavaNano:

+    JavaNano is a special code generator and runtime library designed especially

+    for resource-restricted systems, like Android. It is very resource-friendly

+    in both the amount of code and the runtime overhead. Here is an an overview

+    of JavaNano features compared with the official Java protobuf:

+

+    - No descriptors or message builders.

+    - All messages are mutable; fields are public Java fields.

+    - For optional fields only, encapsulation behind setter/getter/hazzer/

+      clearer functions is opt-in, which provide proper 'has' state support.

+    - For proto2, if not opted in, has state (field presence) is not available.

+      Serialization outputs all fields not equal to their defaults.

+      The behavior is consistent with proto3 semantics.

+    - Required fields (proto2 only) are always serialized.

+    - Enum constants are integers; protection against invalid values only

+      when parsing from the wire.

+    - Enum constants can be generated into container interfaces bearing

+      the enum's name (so the referencing code is in Java style).

+    - CodedInputByteBufferNano can only take byte[] (not InputStream).

+    - Similarly CodedOutputByteBufferNano can only write to byte[].

+    - Repeated fields are in arrays, not ArrayList or Vector. Null array

+      elements are allowed and silently ignored.

+    - Full support for serializing/deserializing repeated packed fields.

+    - Support  extensions (in proto2).

+    - Unset messages/groups are null, not an immutable empty default

+      instance.

+    - toByteArray(...) and mergeFrom(...) are now static functions of

+      MessageNano.

+    - The 'bytes' type translates to the Java type byte[].

+

+    See javanano/README.txt for details.

+

+2014-12-01 version 3.0.0-alpha-1 (C++/Java):

+

+  General

+  * Introduced Protocol Buffers language version 3 (aka proto3).

+

+    When protobuf was initially opensourced it implemented Protocol Buffers

+    language version 2 (aka proto2), which is why the version number

+    started from v2.0.0. From v3.0.0, a new language version (proto3) is

+    introduced while the old version (proto2) will continue to be supported.

+

+    The main intent of introducing proto3 is to clean up protobuf before

+    pushing the language as the foundation of Google's new API platform.

+    In proto3, the language is simplified, both for ease of use and  to

+    make it available in a wider range of programming languages. At the

+    same time a few features are added to better support common idioms

+    found in APIs.

+

+    The following are the main new features in language version 3:

+

+      1. Removal of field presence logic for primitive value fields, removal

+         of required fields, and removal of default values. This makes proto3

+         significantly easier to implement with open struct representations,

+         as in languages like Android Java, Objective C, or Go.

+      2. Removal of unknown fields.

+      3. Removal of extensions, which are instead replaced by a new standard

+         type called Any.

+      4. Fix semantics for unknown enum values.

+      5. Addition of maps.

+      6. Addition of a small set of standard types for representation of time,

+         dynamic data, etc.

+      7. A well-defined encoding in JSON as an alternative to binary proto

+         encoding.

+

+    This release (v3.0.0-alpha-1) includes partial proto3 support for C++ and

+    Java. Items 6 (well-known types) and 7 (JSON format) in the above feature

+    list are not implemented.

+

+    A new notion "syntax" is introduced to specify whether a .proto file

+    uses proto2 or proto3:

+

+      // foo.proto

+      syntax = "proto3";

+      message Bar {...}

+

+    If omitted, the protocol compiler will generate a warning and "proto2" will

+    be used as the default. This warning will be turned into an error in a

+    future release.

+

+    We recommend that new Protocol Buffers users use proto3. However, we do not

+    generally recommend that existing users migrate from proto2 from proto3 due

+    to API incompatibility, and we will continue to support proto2 for a long

+    time.

+

+  * Added support for map fields (implemented in C++/Java for both proto2 and

+    proto3).

+

+    Map fields can be declared using the following syntax:

+

+      message Foo {

+        map<string, string> values = 1;

+      }

+

+    Data of a map field will be stored in memory as an unordered map and it

+    can be accessed through generated accessors.

+

+  C++

+  * Added arena allocation support (for both proto2 and proto3).

+

+    Profiling shows memory allocation and deallocation constitutes a significant

+    fraction of CPU-time spent in protobuf code and arena allocation is a

+    technique introduced to reduce this cost. With arena allocation, new

+    objects will be allocated from a large piece of preallocated memory and

+    deallocation of these objects is almost free. Early adoption shows 20% to

+    50% improvement in some Google binaries.

+

+    To enable arena support, add the following option to your .proto file:

+

+      option cc_enable_arenas = true;

+

+    Protocol compiler will generate additional code to make the generated

+    message classes work with arenas. This does not change the existing API

+    of protobuf messages and does not affect wire format. Your existing code

+    should continue to work after adding this option. In the future we will

+    make this option enabled by default.

+

+    To actually take advantage of arena allocation, you need to use the arena

+    APIs when creating messages. A quick example of using the arena API:

+

+      {

+        google::protobuf::Arena arena;

+        // Allocate a protobuf message in the arena.

+        MyMessage* message = Arena::CreateMessage<MyMessage>(&arena);

+        // All submessages will be allocated in the same arena.

+        if (!message->ParseFromString(data)) {

+          // Deal with malformed input data.

+        }

+        // Must not delete the message here. It will be deleted automatically

+        // when the arena is destroyed.

+      }

+

+    Currently arena does not work with map fields. Enabling arena in a .proto

+    file containing map fields will result in compile errors in the generated

+    code. This will be addressed in a future release.

+

+2014-10-20 version 2.6.1:

+

+  C++

+  * Added atomicops support for Solaris.

+  * Released memory allocated by InitializeDefaultRepeatedFields() and

+    GetEmptyString(). Some memory sanitizers reported them as memory leaks.

+

+  Java

+  * Updated DynamicMessage.setField() to handle repeated enum values

+    correctly.

+  * Fixed a bug that caused NullPointerException to be thrown when

+    converting manually constructed FileDescriptorProto to

+    FileDescriptor.

+

+  Python

+  * Fixed WhichOneof() to work with de-serialized protobuf messages.

+  * Fixed a missing file problem of Python C++ implementation.

+

+2014-08-15 version 2.6.0:

+

+  General

+  * Added oneofs(unions) feature. Fields in the same oneof will share

+    memory and at most one field can be set at the same time. Use the

+    oneof keyword to define a oneof like:

+      message SampleMessage {

+        oneof test_oneof {

+          string name = 4;

+          YourMessage sub_message = 9;

+        }

+      }

+  * Files, services, enums, messages, methods and enum values can be marked

+    as deprecated now.

+  * Added Support for list values, including lists of messages, when

+    parsing text-formatted protos in C++ and Java.

+      For example:  foo: [1, 2, 3]

+

+  C++

+  * Enhanced customization on TestFormat printing.

+  * Added SwapFields() in reflection API to swap a subset of fields.

+    Added SetAllocatedMessage() in reflection API.

+  * Repeated primitive extensions are now packable. The

+    [packed=true] option only affects serializers. Therefore, it is

+    possible to switch a repeated extension field to packed format

+    without breaking backwards-compatibility.

+  * Various speed optimizations.

+

+  Java

+  * writeTo() method in ByteString can now write a substring to an

+    output stream. Added endWith() method for ByteString.

+  * ByteString and ByteBuffer are now supported in CodedInputStream

+    and CodedOutputStream.

+  * java_generate_equals_and_hash can now be used with the LITE_RUNTIME.

+

+  Python

+  * A new C++-backed extension module (aka "cpp api v2") that replaces the

+    old ("cpp api v1") one.  Much faster than the pure Python code.  This one

+    resolves many bugs and is recommended for general use over the

+    pure Python when possible.

+  * Descriptors now have enum_types_by_name and extension_types_by_name dict

+    attributes.

+  * Support for Python 3.

+

+2013-02-27 version 2.5.0:

+

+  General

+  * New notion "import public" that allows a proto file to forward the content

+    it imports to its importers. For example,

+      // foo.proto

+      import public "bar.proto";

+      import "baz.proto";

+

+      // qux.proto

+      import "foo.proto";

+      // Stuff defined in bar.proto may be used in this file, but stuff from

+      // baz.proto may NOT be used without importing it explicitly.

+    This is useful for moving proto files. To move a proto file, just leave

+    a single "import public" in the old proto file.

+  * New enum option "allow_alias" that specifies whether different symbols can

+    be assigned the same numeric value. Default value is "true". Setting it to

+    false causes the compiler to reject enum definitions where multiple symbols

+    have the same numeric value.

+    Note: We plan to flip the default value to "false" in a future release.

+    Projects using enum aliases should set the option to "true" in their .proto

+    files.

+

+  C++

+  * New generated method set_allocated_foo(Type* foo) for message and string

+    fields. This method allows you to set the field to a pre-allocated object

+    and the containing message takes the ownership of that object.

+  * Added SetAllocatedExtension() and ReleaseExtension() to extensions API.

+  * Custom options are now formatted correctly when descriptors are printed in

+    text format.

+  * Various speed optimizations.

+

+  Java

+  * Comments in proto files are now collected and put into generated code as

+    comments for corresponding classes and data members.

+  * Added Parser to parse directly into messages without a Builder. For

+    example,

+      Foo foo = Foo.PARSER.ParseFrom(input);

+    Using Parser is ~25% faster than using Builder to parse messages.

+  * Added getters/setters to access the underlying ByteString of a string field

+    directly.

+  * ByteString now supports more operations: substring(), prepend(), and

+    append(). The implementation of ByteString uses a binary tree structure

+    to support these operations efficiently.

+  * New method findInitializationErrors() that lists all missing required

+    fields.

+  * Various code size and speed optimizations.

+

+  Python

+  * Added support for dynamic message creation. DescriptorDatabase,

+    DescriptorPool, and MessageFactory work like their C++ counterparts to

+    simplify Descriptor construction from *DescriptorProtos, and MessageFactory

+    provides a message instance from a Descriptor.

+  * Added pickle support for protobuf messages.

+  * Unknown fields are now preserved after parsing.

+  * Fixed bug where custom options were not correctly populated. Custom

+    options can be accessed now.

+  * Added EnumTypeWrapper that provides better accessibility to enum types.

+  * Added ParseMessage(descriptor, bytes) to generate a new Message instance

+    from a descriptor and a byte string.

+

+2011-05-01 version 2.4.1:

+

+  C++

+  * Fixed the friendship problem for old compilers to make the library now gcc 3

+    compatible again.

+  * Fixed vcprojects/extract_includes.bat to extract compiler/plugin.h.

+

+  Java

+  * Removed usages of JDK 1.6 only features to make the library now JDK 1.5

+    compatible again.

+  * Fixed a bug about negative enum values.

+  * serialVersionUID is now defined in generated messages for java serializing.

+  * Fixed protoc to use java.lang.Object, which makes "Object" now a valid

+    message name again.

+

+  Python

+  * Experimental C++ implementation now requires C++ protobuf library installed.

+    See the README.txt in the python directory for details.

+

+2011-02-02 version 2.4.0:

+

+  General

+  * The RPC (cc|java|py)_generic_services default value is now false instead of

+    true.

+  * Custom options can have aggregate types. For example,

+      message MyOption {

+        optional string comment = 1;

+        optional string author = 2;

+      }

+      extend google.protobuf.FieldOptions {

+        optional MyOption myoption = 12345;

+      }

+    This option can now be set as follows:

+      message SomeType {

+        optional int32 field = 1 [(myoption) = { comment:'x' author:'y' }];

+      }

+

+  C++

+  * Various speed and code size optimizations.

+  * Added a release_foo() method on string and message fields.

+  * Fixed gzip_output_stream sub-stream handling.

+

+  Java

+  * Builders now maintain sub-builders for sub-messages. Use getFooBuilder() to

+    get the builder for the sub-message "foo". This allows you to repeatedly

+    modify deeply-nested sub-messages without rebuilding them.

+  * Builder.build() no longer invalidates the Builder for generated messages

+    (You may continue to modify it and then build another message).

+  * Code generator will generate efficient equals() and hashCode()

+    implementations if new option java_generate_equals_and_hash is enabled.

+    (Otherwise, reflection-based implementations are used.)

+  * Generated messages now implement Serializable.

+  * Fields with [deprecated=true] will be marked with @Deprecated in Java.

+  * Added lazy conversion of UTF-8 encoded strings to String objects to improve

+    performance.

+  * Various optimizations.

+  * Enum value can be accessed directly, instead of calling getNumber() on the

+    enum member.

+  * For each enum value, an integer constant is also generated with the suffix

+    _VALUE.

+

+  Python

+  * Added an experimental  C++ implementation for Python messages via a Python

+    extension. Implementation type is controlled by an environment variable

+    PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION (valid values: "cpp" and "python")

+    The default value is currently "python" but will be changed to "cpp" in

+    future release.

+  * Improved performance on message instantiation significantly.

+    Most of the work on message instantiation is done just once per message

+    class, instead of once per message instance.

+  * Improved performance on text message parsing.

+  * Allow add() to forward keyword arguments to the concrete class.

+      E.g. instead of

+        item = repeated_field.add()

+        item.foo = bar

+        item.baz = quux

+      You can do:

+        repeated_field.add(foo=bar, baz=quux)

+  * Added a sort() interface to the BaseContainer.

+  * Added an extend() method to repeated composite fields.

+  * Added UTF8 debug string support.

+

+2010-01-08 version 2.3.0:

+

+  General

+  * Parsers for repeated numeric fields now always accept both packed and

+    unpacked input.  The [packed=true] option only affects serializers.

+    Therefore, it is possible to switch a field to packed format without

+    breaking backwards-compatibility -- as long as all parties are using

+    protobuf 2.3.0 or above, at least.

+  * The generic RPC service code generated by the C++, Java, and Python

+    generators can be disabled via file options:

+      option cc_generic_services = false;

+      option java_generic_services = false;

+      option py_generic_services = false;

+    This allows plugins to generate alternative code, possibly specific to some

+    particular RPC implementation.

+

+  protoc

+  * Now supports a plugin system for code generators.  Plugins can generate

+    code for new languages or inject additional code into the output of other

+    code generators.  Plugins are just binaries which accept a protocol buffer

+    on stdin and write a protocol buffer to stdout, so they may be written in

+    any language.  See src/google/protobuf/compiler/plugin.proto.

+    **WARNING**:  Plugins are experimental.  The interface may change in a

+    future version.

+  * If the output location ends in .zip or .jar, protoc will write its output

+    to a zip/jar archive instead of a directory.  For example:

+      protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto

+    Currently the archive contents are not compressed, though this could change

+    in the future.

+  * inf, -inf, and nan can now be used as default values for float and double

+    fields.

+

+  C++

+  * Various speed and code size optimizations.

+  * DynamicMessageFactory is now fully thread-safe.

+  * Message::Utf8DebugString() method is like DebugString() but avoids escaping

+    UTF-8 bytes.

+  * Compiled-in message types can now contain dynamic extensions, through use

+    of CodedInputStream::SetExtensionRegistry().

+  * Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to

+    match other platforms.  Use --disable-shared to avoid this.

+

+  Java

+  * parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return

+    false/null instead of throwing an exception.

+  * Fixed some initialization ordering bugs.

+  * Fixes for OpenJDK 7.

+

+  Python

+  * 10-25 times faster than 2.2.0, still pure-Python.

+  * Calling a mutating method on a sub-message always instantiates the message

+    in its parent even if the mutating method doesn't actually mutate anything

+    (e.g. parsing from an empty string).

+  * Expanded descriptors a bit.

+

+2009-08-11 version 2.2.0:

+

+  C++

+  * Lite mode:  The "optimize_for = LITE_RUNTIME" option causes the compiler

+    to generate code which only depends libprotobuf-lite, which is much smaller

+    than libprotobuf but lacks descriptors, reflection, and some other features.

+  * Fixed bug where Message.Swap(Message) was only implemented for

+    optimize_for_speed.  Swap now properly implemented in both modes

+    (Issue 91).

+  * Added RemoveLast and SwapElements(index1, index2) to Reflection

+    interface for repeated elements.

+  * Added Swap(Message) to Reflection interface.

+  * Floating-point literals in generated code that are intended to be

+    single-precision now explicitly have 'f' suffix to avoid pedantic warnings

+    produced by some compilers.

+  * The [deprecated=true] option now causes the C++ code generator to generate

+    a GCC-style deprecation annotation (no-op on other compilers).

+  * google::protobuf::GetEnumDescriptor<SomeGeneratedEnumType>() returns the

+    EnumDescriptor for that type -- useful for templates which cannot call

+    SomeGeneratedEnumType_descriptor().

+  * Various optimizations and obscure bug fixes.

+

+  Java

+  * Lite mode:  The "optimize_for = LITE_RUNTIME" option causes the compiler

+    to generate code which only depends libprotobuf-lite, which is much smaller

+    than libprotobuf but lacks descriptors, reflection, and some other features.

+  * Lots of style cleanups.

+

+  Python

+  * Fixed endianness bug with floats and doubles.

+  * Text format parsing support.

+  * Fix bug with parsing packed repeated fields in embedded messages.

+  * Ability to initialize fields by passing keyword args to constructor.

+  * Support iterators in extend and __setslice__ for containers.

+

+2009-05-13 version 2.1.0:

+

+  General

+  * Repeated fields of primitive types (types other that string, group, and

+    nested messages) may now use the option [packed = true] to get a more

+    efficient encoding.  In the new encoding, the entire list is written

+    as a single byte blob using the "length-delimited" wire type.  Within

+    this blob, the individual values are encoded the same way they would

+    be normally except without a tag before each value (thus, they are

+    tightly "packed").

+  * For each field, the generated code contains an integer constant assigned

+    to the field number.  For example, the .proto file:

+      message Foo { optional int bar_baz = 123; }

+    would generate the following constants, all with the integer value 123:

+      C++:     Foo::kBarBazFieldNumber

+      Java:    Foo.BAR_BAZ_FIELD_NUMBER

+      Python:  Foo.BAR_BAZ_FIELD_NUMBER

+    Constants are also generated for extensions, with the same naming scheme.

+    These constants may be used as switch cases.

+  * Updated bundled Google Test to version 1.3.0.  Google Test is now bundled

+    in its verbatim form as a nested autoconf package, so you can drop in any

+    other version of Google Test if needed.

+  * optimize_for = SPEED is now the default, by popular demand.  Use

+    optimize_for = CODE_SIZE if code size is more important in your app.

+  * It is now an error to define a default value for a repeated field.

+    Previously, this was silently ignored (it had no effect on the generated

+    code).

+  * Fields can now be marked deprecated like:

+      optional int32 foo = 1 [deprecated = true];

+    Currently this does not have any actual effect, but in the future the code

+    generators may generate deprecation annotations in each language.

+  * Cross-compiling should now be possible using the --with-protoc option to

+    configure.  See README.txt for more info.

+

+  protoc

+  * --error_format=msvs option causes errors to be printed in Visual Studio

+    format, which should allow them to be clicked on in the build log to go

+    directly to the error location.

+  * The type name resolver will no longer resolve type names to fields.  For

+    example, this now works:

+      message Foo {}

+      message Bar {

+        optional int32 Foo = 1;

+        optional Foo baz = 2;

+      }

+    Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get

+    an error because Bar.Foo is a field, not a type.  Now the type of "baz"

+    resolves to the message type Foo.  This change is unlikely to make a

+    difference to anyone who follows the Protocol Buffers style guide.

+

+  C++

+  * Several optimizations, including but not limited to:

+    - Serialization, especially to flat arrays, is 10%-50% faster, possibly

+      more for small objects.

+    - Several descriptor operations which previously required locking no longer

+      do.

+    - Descriptors are now constructed lazily on first use, rather than at

+      process startup time.  This should save memory in programs which do not

+      use descriptors or reflection.

+    - UnknownFieldSet completely redesigned to be more efficient (especially in

+      terms of memory usage).

+    - Various optimizations to reduce code size (though the serialization speed

+      optimizations increased code size).

+  * Message interface has method ParseFromBoundedZeroCopyStream() which parses

+    a limited number of bytes from an input stream rather than parsing until

+    EOF.

+  * GzipInputStream and GzipOutputStream support reading/writing gzip- or

+    zlib-compressed streams if zlib is available.

+    (google/protobuf/io/gzip_stream.h)

+  * DescriptorPool::FindAllExtensions() and corresponding

+    DescriptorDatabase::FindAllExtensions() can be used to enumerate all

+    extensions of a given type.

+  * For each enum type Foo, protoc will generate functions:

+      const string& Foo_Name(Foo value);

+      bool Foo_Parse(const string& name, Foo* result);

+    The former returns the name of the enum constant corresponding to the given

+    value while the latter finds the value corresponding to a name.

+  * RepeatedField and RepeatedPtrField now have back-insertion iterators.

+  * String fields now have setters that take a char* and a size, in addition

+    to the existing ones that took char* or const string&.

+  * DescriptorPool::AllowUnknownDependencies() may be used to tell

+    DescriptorPool to create placeholder descriptors for unknown entities

+    referenced in a FileDescriptorProto.  This can allow you to parse a .proto

+    file without having access to other .proto files that it imports, for

+    example.

+  * Updated gtest to latest version.  The gtest package is now included as a

+    nested autoconf package, so it should be able to drop new versions into the

+    "gtest" subdirectory without modification.

+

+  Java

+  * Fixed bug where Message.mergeFrom(Message) failed to merge extensions.

+  * Message interface has new method toBuilder() which is equivalent to

+    newBuilderForType().mergeFrom(this).

+  * All enums now implement the ProtocolMessageEnum interface.

+  * Setting a field to null now throws NullPointerException.

+  * Fixed tendency for TextFormat's parsing to overflow the stack when

+    parsing large string values.  The underlying problem is with Java's

+    regex implementation (which unfortunately uses recursive backtracking

+    rather than building an NFA).  Worked around by making use of possessive

+    quantifiers.

+  * Generated service classes now also generate pure interfaces.  For a service

+    Foo, Foo.Interface is a pure interface containing all of the service's

+    defined methods.  Foo.newReflectiveService() can be called to wrap an

+    instance of this interface in a class that implements the generic

+    RpcService interface, which provides reflection support that is usually

+    needed by RPC server implementations.

+  * RPC interfaces now support blocking operation in addition to non-blocking.

+    The protocol compiler generates separate blocking and non-blocking stubs

+    which operate against separate blocking and non-blocking RPC interfaces.

+    RPC implementations will have to implement the new interfaces in order to

+    support blocking mode.

+  * New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and

+    writeDelimitedTo() read and write "delimited" messages from/to a stream,

+    meaning that the message size precedes the data.  This way, you can write

+    multiple messages to a stream without having to worry about delimiting

+    them yourself.

+  * Throw a more descriptive exception when build() is double-called.

+  * Add a method to query whether CodedInputStream is at the end of the input

+    stream.

+  * Add a method to reset a CodedInputStream's size counter; useful when

+    reading many messages with the same stream.

+  * equals() and hashCode() now account for unknown fields.

+

+  Python

+  * Added slicing support for repeated scalar fields. Added slice retrieval and

+    removal of repeated composite fields.

+  * Updated RPC interfaces to allow for blocking operation.  A client may

+    now pass None for a callback when making an RPC, in which case the

+    call will block until the response is received, and the response

+    object will be returned directly to the caller.  This interface change

+    cannot be used in practice until RPC implementations are updated to

+    implement it.

+  * Changes to input_stream.py should make protobuf compatible with appengine.

+

+2008-11-25 version 2.0.3:

+

+  protoc

+  * Enum values may now have custom options, using syntax similar to field

+    options.

+  * Fixed bug where .proto files which use custom options but don't actually

+    define them (i.e. they import another .proto file defining the options)

+    had to explicitly import descriptor.proto.

+  * Adjacent string literals in .proto files will now be concatenated, like in

+    C.

+  * If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and

+    the import path only contains "." (or contains "." but does not contain

+    the file), protoc incorrectly thought that the file was under ".", because

+    it thought that the path was relative (since it didn't start with a slash).

+    This has been fixed.

+

+  C++

+  * Generated message classes now have a Swap() method which efficiently swaps

+    the contents of two objects.

+  * All message classes now have a SpaceUsed() method which returns an estimate

+    of the number of bytes of allocated memory currently owned by the object.

+    This is particularly useful when you are reusing a single message object

+    to improve performance but want to make sure it doesn't bloat up too large.

+  * New method Message::SerializeAsString() returns a string containing the

+    serialized data.  May be more convenient than calling

+    SerializeToString(string*).

+  * In debug mode, log error messages when string-type fields are found to

+    contain bytes that are not valid UTF-8.

+  * Fixed bug where a message with multiple extension ranges couldn't parse

+    extensions.

+  * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on

+    a message that contained no fields (but possibly contained extensions).

+  * Fixed ShortDebugString() to not be O(n^2).  Durr.

+  * Fixed crash in TextFormat parsing if the first token in the input caused a

+    tokenization error.

+  * Fixed obscure bugs in zero_copy_stream_impl.cc.

+  * Added support for HP C++ on Tru64.

+  * Only build tests on "make check", not "make".

+  * Fixed alignment issue that caused crashes when using DynamicMessage on

+    64-bit Sparc machines.

+  * Simplify template usage to work with MSVC 2003.

+  * Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup.

+    (This affected Fedora 9 in particular.)

+  * Now works on "Solaris 10 using recent Sun Studio".

+

+  Java

+  * New overload of mergeFrom() which parses a slice of a byte array instead

+    of the whole thing.

+  * New method ByteString.asReadOnlyByteBuffer() does what it sounds like.

+  * Improved performance of isInitialized() when optimizing for code size.

+

+  Python

+  * Corrected ListFields() signature in Message base class to match what

+    subclasses actually implement.

+  * Some minor refactoring.

+  * Don't pass self as first argument to superclass constructor (no longer

+    allowed in Python 2.6).

+

+2008-09-29 version 2.0.2:

+

+  General

+  * License changed from Apache 2.0 to 3-Clause BSD.

+  * It is now possible to define custom "options", which are basically

+    annotations which may be placed on definitions in a .proto file.

+    For example, you might define a field option called "foo" like so:

+      import "google/protobuf/descriptor.proto"

+      extend google.protobuf.FieldOptions {

+        optional string foo = 12345;

+      }

+    Then you annotate a field using the "foo" option:

+      message MyMessage {

+        optional int32 some_field = 1 [(foo) = "bar"]

+      }

+    The value of this option is then visible via the message's

+    Descriptor:

+      const FieldDescriptor* field =

+        MyMessage::descriptor()->FindFieldByName("some_field");

+      assert(field->options().GetExtension(foo) == "bar");

+    This feature has been implemented and tested in C++ and Java.

+    Other languages may or may not need to do extra work to support

+    custom options, depending on how they construct descriptors.

+

+  C++

+  * Fixed some GCC warnings that only occur when using -pedantic.

+  * Improved static initialization code, making ordering more

+    predictable among other things.

+  * TextFormat will no longer accept messages which contain multiple

+    instances of a singular field.  Previously, the latter instance

+    would overwrite the former.

+  * Now works on systems that don't have hash_map.

+

+  Java

+  * Print @Override annotation in generated code where appropriate.

+

+  Python

+  * Strings now use the "unicode" type rather than the "str" type.

+    String fields may still be assigned ASCII "str" values; they will

+    automatically be converted.

+  * Adding a property to an object representing a repeated field now

+    raises an exception.  For example:

+      # No longer works (and never should have).

+      message.some_repeated_field.foo = 1

+

+  Windows

+  * We now build static libraries rather than DLLs by default on MSVC.

+    See vsprojects/readme.txt for more information.

+

+2008-08-15 version 2.0.1:

+

+  protoc

+  * New flags --encode and --decode can be used to convert between protobuf text

+    format and binary format from the command-line.

+  * New flag --descriptor_set_out can be used to write FileDescriptorProtos for

+    all parsed files directly into a single output file.  This is particularly

+    useful if you wish to parse .proto files from programs written in languages

+    other than C++: just run protoc as a background process and have it output

+    a FileDescriptorList, then parse that natively.

+  * Improved error message when an enum value's name conflicts with another

+    symbol defined in the enum type's scope, e.g. if two enum types declared

+    in the same scope have values with the same name.  This is disallowed for

+    compatibility with C++, but this wasn't clear from the error.

+  * Fixed absolute output paths on Windows.

+  * Allow trailing slashes in --proto_path mappings.

+

+  C++

+  * Reflection objects are now per-class rather than per-instance.  To make this

+    possible, the Reflection interface had to be changed such that all methods

+    take the Message instance as a parameter.  This change improves performance

+    significantly in memory-bandwidth-limited use cases, since it makes the

+    message objects smaller.  Note that source-incompatible interface changes

+    like this will not be made again after the library leaves beta.

+  * Heuristically detect sub-messages when printing unknown fields.

+  * Fix static initialization ordering bug that caused crashes at startup when

+    compiling on Mac with static linking.

+  * Fixed TokenizerTest when compiling with -DNDEBUG on Linux.

+  * Fixed incorrect definition of kint32min.

+  * Fix bytes type setter to work with byte sequences with embedded NULLs.

+  * Other irrelevant tweaks.

+

+  Java

+  * Fixed UnknownFieldSet's parsing of varints larger than 32 bits.

+  * Fixed TextFormat's parsing of "inf" and "nan".

+  * Fixed TextFormat's parsing of comments.

+  * Added info to Java POM that will be required when we upload the

+    package to a Maven repo.

+

+  Python

+  * MergeFrom(message) and CopyFrom(message) are now implemented.

+  * SerializeToString() raises an exception if the message is missing required

+    fields.

+  * Code organization improvements.

+  * Fixed doc comments for RpcController and RpcChannel, which had somehow been

+    swapped.

+  * Fixed text_format_test on Windows where floating-point exponents sometimes

+    contain extra zeros.

+  * Fix Python service CallMethod() implementation.

+

+  Other

+  * Improved readmes.

+  * VIM syntax highlighting improvements.

+

+2008-07-07 version 2.0.0:

+

+  * First public release.

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..19b305b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,32 @@
+Copyright 2008 Google Inc.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+    * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it.  This code is not
+standalone and requires a support library to be linked with it.  This
+support library is itself covered by the above license.
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..cb22baf
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,12 @@
+name: "protobuf"
+description:
+    "Prebuilts protoc binary and protobuf python library."
+
+third_party {
+  url {
+    type: GIT
+    value: "https://github.com/protocolbuffers/protobuf/releases/download/v21.9/"
+  }
+  version: "21.9"
+  last_upgrade_date { year: 2022 month: 10 }
+}
diff --git a/bin/protoc b/bin/protoc
new file mode 100755
index 0000000..01cfb64
--- /dev/null
+++ b/bin/protoc
Binary files differ
diff --git a/include/google/protobuf/any.proto b/include/google/protobuf/any.proto
new file mode 100644
index 0000000..e2c2042
--- /dev/null
+++ b/include/google/protobuf/any.proto
@@ -0,0 +1,158 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option go_package = "google.golang.org/protobuf/types/known/anypb";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "AnyProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+
+// `Any` contains an arbitrary serialized protocol buffer message along with a
+// URL that describes the type of the serialized message.
+//
+// Protobuf library provides support to pack/unpack Any values in the form
+// of utility functions or additional generated methods of the Any type.
+//
+// Example 1: Pack and unpack a message in C++.
+//
+//     Foo foo = ...;
+//     Any any;
+//     any.PackFrom(foo);
+//     ...
+//     if (any.UnpackTo(&foo)) {
+//       ...
+//     }
+//
+// Example 2: Pack and unpack a message in Java.
+//
+//     Foo foo = ...;
+//     Any any = Any.pack(foo);
+//     ...
+//     if (any.is(Foo.class)) {
+//       foo = any.unpack(Foo.class);
+//     }
+//
+// Example 3: Pack and unpack a message in Python.
+//
+//     foo = Foo(...)
+//     any = Any()
+//     any.Pack(foo)
+//     ...
+//     if any.Is(Foo.DESCRIPTOR):
+//       any.Unpack(foo)
+//       ...
+//
+// Example 4: Pack and unpack a message in Go
+//
+//      foo := &pb.Foo{...}
+//      any, err := anypb.New(foo)
+//      if err != nil {
+//        ...
+//      }
+//      ...
+//      foo := &pb.Foo{}
+//      if err := any.UnmarshalTo(foo); err != nil {
+//        ...
+//      }
+//
+// The pack methods provided by protobuf library will by default use
+// 'type.googleapis.com/full.type.name' as the type URL and the unpack
+// methods only use the fully qualified type name after the last '/'
+// in the type URL, for example "foo.bar.com/x/y.z" will yield type
+// name "y.z".
+//
+//
+// JSON
+//
+// The JSON representation of an `Any` value uses the regular
+// representation of the deserialized, embedded message, with an
+// additional field `@type` which contains the type URL. Example:
+//
+//     package google.profile;
+//     message Person {
+//       string first_name = 1;
+//       string last_name = 2;
+//     }
+//
+//     {
+//       "@type": "type.googleapis.com/google.profile.Person",
+//       "firstName": <string>,
+//       "lastName": <string>
+//     }
+//
+// If the embedded message type is well-known and has a custom JSON
+// representation, that representation will be embedded adding a field
+// `value` which holds the custom JSON in addition to the `@type`
+// field. Example (for message [google.protobuf.Duration][]):
+//
+//     {
+//       "@type": "type.googleapis.com/google.protobuf.Duration",
+//       "value": "1.212s"
+//     }
+//
+message Any {
+  // A URL/resource name that uniquely identifies the type of the serialized
+  // protocol buffer message. This string must contain at least
+  // one "/" character. The last segment of the URL's path must represent
+  // the fully qualified name of the type (as in
+  // `path/google.protobuf.Duration`). The name should be in a canonical form
+  // (e.g., leading "." is not accepted).
+  //
+  // In practice, teams usually precompile into the binary all types that they
+  // expect it to use in the context of Any. However, for URLs which use the
+  // scheme `http`, `https`, or no scheme, one can optionally set up a type
+  // server that maps type URLs to message definitions as follows:
+  //
+  // * If no scheme is provided, `https` is assumed.
+  // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+  //   value in binary format, or produce an error.
+  // * Applications are allowed to cache lookup results based on the
+  //   URL, or have them precompiled into a binary to avoid any
+  //   lookup. Therefore, binary compatibility needs to be preserved
+  //   on changes to types. (Use versioned type names to manage
+  //   breaking changes.)
+  //
+  // Note: this functionality is not currently available in the official
+  // protobuf release, and it is not used for type URLs beginning with
+  // type.googleapis.com.
+  //
+  // Schemes other than `http`, `https` (or the empty scheme) might be
+  // used with implementation specific semantics.
+  //
+  string type_url = 1;
+
+  // Must be a valid serialized protocol buffer of the above specified type.
+  bytes value = 2;
+}
diff --git a/include/google/protobuf/api.proto b/include/google/protobuf/api.proto
new file mode 100644
index 0000000..3d598fc
--- /dev/null
+++ b/include/google/protobuf/api.proto
@@ -0,0 +1,208 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+import "google/protobuf/source_context.proto";
+import "google/protobuf/type.proto";
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "ApiProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+option go_package = "google.golang.org/protobuf/types/known/apipb";
+
+// Api is a light-weight descriptor for an API Interface.
+//
+// Interfaces are also described as "protocol buffer services" in some contexts,
+// such as by the "service" keyword in a .proto file, but they are different
+// from API Services, which represent a concrete implementation of an interface
+// as opposed to simply a description of methods and bindings. They are also
+// sometimes simply referred to as "APIs" in other contexts, such as the name of
+// this message itself. See https://cloud.google.com/apis/design/glossary for
+// detailed terminology.
+message Api {
+  // The fully qualified name of this interface, including package name
+  // followed by the interface's simple name.
+  string name = 1;
+
+  // The methods of this interface, in unspecified order.
+  repeated Method methods = 2;
+
+  // Any metadata attached to the interface.
+  repeated Option options = 3;
+
+  // A version string for this interface. If specified, must have the form
+  // `major-version.minor-version`, as in `1.10`. If the minor version is
+  // omitted, it defaults to zero. If the entire version field is empty, the
+  // major version is derived from the package name, as outlined below. If the
+  // field is not empty, the version in the package name will be verified to be
+  // consistent with what is provided here.
+  //
+  // The versioning schema uses [semantic
+  // versioning](http://semver.org) where the major version number
+  // indicates a breaking change and the minor version an additive,
+  // non-breaking change. Both version numbers are signals to users
+  // what to expect from different versions, and should be carefully
+  // chosen based on the product plan.
+  //
+  // The major version is also reflected in the package name of the
+  // interface, which must end in `v<major-version>`, as in
+  // `google.feature.v1`. For major versions 0 and 1, the suffix can
+  // be omitted. Zero major versions must only be used for
+  // experimental, non-GA interfaces.
+  //
+  //
+  string version = 4;
+
+  // Source context for the protocol buffer service represented by this
+  // message.
+  SourceContext source_context = 5;
+
+  // Included interfaces. See [Mixin][].
+  repeated Mixin mixins = 6;
+
+  // The source syntax of the service.
+  Syntax syntax = 7;
+}
+
+// Method represents a method of an API interface.
+message Method {
+  // The simple name of this method.
+  string name = 1;
+
+  // A URL of the input message type.
+  string request_type_url = 2;
+
+  // If true, the request is streamed.
+  bool request_streaming = 3;
+
+  // The URL of the output message type.
+  string response_type_url = 4;
+
+  // If true, the response is streamed.
+  bool response_streaming = 5;
+
+  // Any metadata attached to the method.
+  repeated Option options = 6;
+
+  // The source syntax of this method.
+  Syntax syntax = 7;
+}
+
+// Declares an API Interface to be included in this interface. The including
+// interface must redeclare all the methods from the included interface, but
+// documentation and options are inherited as follows:
+//
+// - If after comment and whitespace stripping, the documentation
+//   string of the redeclared method is empty, it will be inherited
+//   from the original method.
+//
+// - Each annotation belonging to the service config (http,
+//   visibility) which is not set in the redeclared method will be
+//   inherited.
+//
+// - If an http annotation is inherited, the path pattern will be
+//   modified as follows. Any version prefix will be replaced by the
+//   version of the including interface plus the [root][] path if
+//   specified.
+//
+// Example of a simple mixin:
+//
+//     package google.acl.v1;
+//     service AccessControl {
+//       // Get the underlying ACL object.
+//       rpc GetAcl(GetAclRequest) returns (Acl) {
+//         option (google.api.http).get = "/v1/{resource=**}:getAcl";
+//       }
+//     }
+//
+//     package google.storage.v2;
+//     service Storage {
+//       rpc GetAcl(GetAclRequest) returns (Acl);
+//
+//       // Get a data record.
+//       rpc GetData(GetDataRequest) returns (Data) {
+//         option (google.api.http).get = "/v2/{resource=**}";
+//       }
+//     }
+//
+// Example of a mixin configuration:
+//
+//     apis:
+//     - name: google.storage.v2.Storage
+//       mixins:
+//       - name: google.acl.v1.AccessControl
+//
+// The mixin construct implies that all methods in `AccessControl` are
+// also declared with same name and request/response types in
+// `Storage`. A documentation generator or annotation processor will
+// see the effective `Storage.GetAcl` method after inheriting
+// documentation and annotations as follows:
+//
+//     service Storage {
+//       // Get the underlying ACL object.
+//       rpc GetAcl(GetAclRequest) returns (Acl) {
+//         option (google.api.http).get = "/v2/{resource=**}:getAcl";
+//       }
+//       ...
+//     }
+//
+// Note how the version in the path pattern changed from `v1` to `v2`.
+//
+// If the `root` field in the mixin is specified, it should be a
+// relative path under which inherited HTTP paths are placed. Example:
+//
+//     apis:
+//     - name: google.storage.v2.Storage
+//       mixins:
+//       - name: google.acl.v1.AccessControl
+//         root: acls
+//
+// This implies the following inherited HTTP annotation:
+//
+//     service Storage {
+//       // Get the underlying ACL object.
+//       rpc GetAcl(GetAclRequest) returns (Acl) {
+//         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+//       }
+//       ...
+//     }
+message Mixin {
+  // The fully qualified name of the interface which is included.
+  string name = 1;
+
+  // If non-empty specifies a path under which inherited HTTP paths
+  // are rooted.
+  string root = 2;
+}
diff --git a/include/google/protobuf/compiler/plugin.proto b/include/google/protobuf/compiler/plugin.proto
new file mode 100644
index 0000000..9242aac
--- /dev/null
+++ b/include/google/protobuf/compiler/plugin.proto
@@ -0,0 +1,183 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+//
+// WARNING:  The plugin interface is currently EXPERIMENTAL and is subject to
+//   change.
+//
+// protoc (aka the Protocol Compiler) can be extended via plugins.  A plugin is
+// just a program that reads a CodeGeneratorRequest from stdin and writes a
+// CodeGeneratorResponse to stdout.
+//
+// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
+// of dealing with the raw protocol defined here.
+//
+// A plugin executable needs only to be placed somewhere in the path.  The
+// plugin should be named "protoc-gen-$NAME", and will then be used when the
+// flag "--${NAME}_out" is passed to protoc.
+
+syntax = "proto2";
+
+package google.protobuf.compiler;
+option java_package = "com.google.protobuf.compiler";
+option java_outer_classname = "PluginProtos";
+
+option go_package = "google.golang.org/protobuf/types/pluginpb";
+
+import "google/protobuf/descriptor.proto";
+
+// The version number of protocol compiler.
+message Version {
+  optional int32 major = 1;
+  optional int32 minor = 2;
+  optional int32 patch = 3;
+  // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
+  // be empty for mainline stable releases.
+  optional string suffix = 4;
+}
+
+// An encoded CodeGeneratorRequest is written to the plugin's stdin.
+message CodeGeneratorRequest {
+  // The .proto files that were explicitly listed on the command-line.  The
+  // code generator should generate code only for these files.  Each file's
+  // descriptor will be included in proto_file, below.
+  repeated string file_to_generate = 1;
+
+  // The generator parameter passed on the command-line.
+  optional string parameter = 2;
+
+  // FileDescriptorProtos for all files in files_to_generate and everything
+  // they import.  The files will appear in topological order, so each file
+  // appears before any file that imports it.
+  //
+  // protoc guarantees that all proto_files will be written after
+  // the fields above, even though this is not technically guaranteed by the
+  // protobuf wire format.  This theoretically could allow a plugin to stream
+  // in the FileDescriptorProtos and handle them one by one rather than read
+  // the entire set into memory at once.  However, as of this writing, this
+  // is not similarly optimized on protoc's end -- it will store all fields in
+  // memory at once before sending them to the plugin.
+  //
+  // Type names of fields and extensions in the FileDescriptorProto are always
+  // fully qualified.
+  repeated FileDescriptorProto proto_file = 15;
+
+  // The version number of protocol compiler.
+  optional Version compiler_version = 3;
+
+}
+
+// The plugin writes an encoded CodeGeneratorResponse to stdout.
+message CodeGeneratorResponse {
+  // Error message.  If non-empty, code generation failed.  The plugin process
+  // should exit with status code zero even if it reports an error in this way.
+  //
+  // This should be used to indicate errors in .proto files which prevent the
+  // code generator from generating correct code.  Errors which indicate a
+  // problem in protoc itself -- such as the input CodeGeneratorRequest being
+  // unparseable -- should be reported by writing a message to stderr and
+  // exiting with a non-zero status code.
+  optional string error = 1;
+
+  // A bitmask of supported features that the code generator supports.
+  // This is a bitwise "or" of values from the Feature enum.
+  optional uint64 supported_features = 2;
+
+  // Sync with code_generator.h.
+  enum Feature {
+    FEATURE_NONE = 0;
+    FEATURE_PROTO3_OPTIONAL = 1;
+  }
+
+  // Represents a single generated file.
+  message File {
+    // The file name, relative to the output directory.  The name must not
+    // contain "." or ".." components and must be relative, not be absolute (so,
+    // the file cannot lie outside the output directory).  "/" must be used as
+    // the path separator, not "\".
+    //
+    // If the name is omitted, the content will be appended to the previous
+    // file.  This allows the generator to break large files into small chunks,
+    // and allows the generated text to be streamed back to protoc so that large
+    // files need not reside completely in memory at one time.  Note that as of
+    // this writing protoc does not optimize for this -- it will read the entire
+    // CodeGeneratorResponse before writing files to disk.
+    optional string name = 1;
+
+    // If non-empty, indicates that the named file should already exist, and the
+    // content here is to be inserted into that file at a defined insertion
+    // point.  This feature allows a code generator to extend the output
+    // produced by another code generator.  The original generator may provide
+    // insertion points by placing special annotations in the file that look
+    // like:
+    //   @@protoc_insertion_point(NAME)
+    // The annotation can have arbitrary text before and after it on the line,
+    // which allows it to be placed in a comment.  NAME should be replaced with
+    // an identifier naming the point -- this is what other generators will use
+    // as the insertion_point.  Code inserted at this point will be placed
+    // immediately above the line containing the insertion point (thus multiple
+    // insertions to the same point will come out in the order they were added).
+    // The double-@ is intended to make it unlikely that the generated code
+    // could contain things that look like insertion points by accident.
+    //
+    // For example, the C++ code generator places the following line in the
+    // .pb.h files that it generates:
+    //   // @@protoc_insertion_point(namespace_scope)
+    // This line appears within the scope of the file's package namespace, but
+    // outside of any particular class.  Another plugin can then specify the
+    // insertion_point "namespace_scope" to generate additional classes or
+    // other declarations that should be placed in this scope.
+    //
+    // Note that if the line containing the insertion point begins with
+    // whitespace, the same whitespace will be added to every line of the
+    // inserted text.  This is useful for languages like Python, where
+    // indentation matters.  In these languages, the insertion point comment
+    // should be indented the same amount as any inserted code will need to be
+    // in order to work correctly in that context.
+    //
+    // The code generator that generates the initial file and the one which
+    // inserts into it must both run as part of a single invocation of protoc.
+    // Code generators are executed in the order in which they appear on the
+    // command line.
+    //
+    // If |insertion_point| is present, |name| must also be present.
+    optional string insertion_point = 2;
+
+    // The file contents.
+    optional string content = 15;
+
+    // Information describing the file content being inserted. If an insertion
+    // point is used, this information will be appropriately offset and inserted
+    // into the code generation metadata for the generated files.
+    optional GeneratedCodeInfo generated_code_info = 16;
+  }
+  repeated File file = 15;
+}
diff --git a/include/google/protobuf/descriptor.proto b/include/google/protobuf/descriptor.proto
new file mode 100644
index 0000000..f8eb216
--- /dev/null
+++ b/include/google/protobuf/descriptor.proto
@@ -0,0 +1,921 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+//  Based on original Protocol Buffers design by
+//  Sanjay Ghemawat, Jeff Dean, and others.
+//
+// The messages in this file describe the definitions found in .proto files.
+// A valid .proto file can be translated directly to a FileDescriptorProto
+// without any other information (e.g. without reading its imports).
+
+
+syntax = "proto2";
+
+package google.protobuf;
+
+option go_package = "google.golang.org/protobuf/types/descriptorpb";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "DescriptorProtos";
+option csharp_namespace = "Google.Protobuf.Reflection";
+option objc_class_prefix = "GPB";
+option cc_enable_arenas = true;
+
+// descriptor.proto must be optimized for speed because reflection-based
+// algorithms don't work during bootstrapping.
+option optimize_for = SPEED;
+
+// The protocol compiler can output a FileDescriptorSet containing the .proto
+// files it parses.
+message FileDescriptorSet {
+  repeated FileDescriptorProto file = 1;
+}
+
+// Describes a complete .proto file.
+message FileDescriptorProto {
+  optional string name = 1;     // file name, relative to root of source tree
+  optional string package = 2;  // e.g. "foo", "foo.bar", etc.
+
+  // Names of files imported by this file.
+  repeated string dependency = 3;
+  // Indexes of the public imported files in the dependency list above.
+  repeated int32 public_dependency = 10;
+  // Indexes of the weak imported files in the dependency list.
+  // For Google-internal migration only. Do not use.
+  repeated int32 weak_dependency = 11;
+
+  // All top-level definitions in this file.
+  repeated DescriptorProto message_type = 4;
+  repeated EnumDescriptorProto enum_type = 5;
+  repeated ServiceDescriptorProto service = 6;
+  repeated FieldDescriptorProto extension = 7;
+
+  optional FileOptions options = 8;
+
+  // This field contains optional information about the original source code.
+  // You may safely remove this entire field without harming runtime
+  // functionality of the descriptors -- the information is needed only by
+  // development tools.
+  optional SourceCodeInfo source_code_info = 9;
+
+  // The syntax of the proto file.
+  // The supported values are "proto2" and "proto3".
+  optional string syntax = 12;
+}
+
+// Describes a message type.
+message DescriptorProto {
+  optional string name = 1;
+
+  repeated FieldDescriptorProto field = 2;
+  repeated FieldDescriptorProto extension = 6;
+
+  repeated DescriptorProto nested_type = 3;
+  repeated EnumDescriptorProto enum_type = 4;
+
+  message ExtensionRange {
+    optional int32 start = 1;  // Inclusive.
+    optional int32 end = 2;    // Exclusive.
+
+    optional ExtensionRangeOptions options = 3;
+  }
+  repeated ExtensionRange extension_range = 5;
+
+  repeated OneofDescriptorProto oneof_decl = 8;
+
+  optional MessageOptions options = 7;
+
+  // Range of reserved tag numbers. Reserved tag numbers may not be used by
+  // fields or extension ranges in the same message. Reserved ranges may
+  // not overlap.
+  message ReservedRange {
+    optional int32 start = 1;  // Inclusive.
+    optional int32 end = 2;    // Exclusive.
+  }
+  repeated ReservedRange reserved_range = 9;
+  // Reserved field names, which may not be used by fields in the same message.
+  // A given name may only be reserved once.
+  repeated string reserved_name = 10;
+}
+
+message ExtensionRangeOptions {
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+// Describes a field within a message.
+message FieldDescriptorProto {
+  enum Type {
+    // 0 is reserved for errors.
+    // Order is weird for historical reasons.
+    TYPE_DOUBLE = 1;
+    TYPE_FLOAT = 2;
+    // Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT64 if
+    // negative values are likely.
+    TYPE_INT64 = 3;
+    TYPE_UINT64 = 4;
+    // Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT32 if
+    // negative values are likely.
+    TYPE_INT32 = 5;
+    TYPE_FIXED64 = 6;
+    TYPE_FIXED32 = 7;
+    TYPE_BOOL = 8;
+    TYPE_STRING = 9;
+    // Tag-delimited aggregate.
+    // Group type is deprecated and not supported in proto3. However, Proto3
+    // implementations should still be able to parse the group wire format and
+    // treat group fields as unknown fields.
+    TYPE_GROUP = 10;
+    TYPE_MESSAGE = 11;  // Length-delimited aggregate.
+
+    // New in version 2.
+    TYPE_BYTES = 12;
+    TYPE_UINT32 = 13;
+    TYPE_ENUM = 14;
+    TYPE_SFIXED32 = 15;
+    TYPE_SFIXED64 = 16;
+    TYPE_SINT32 = 17;  // Uses ZigZag encoding.
+    TYPE_SINT64 = 18;  // Uses ZigZag encoding.
+  }
+
+  enum Label {
+    // 0 is reserved for errors
+    LABEL_OPTIONAL = 1;
+    LABEL_REQUIRED = 2;
+    LABEL_REPEATED = 3;
+  }
+
+  optional string name = 1;
+  optional int32 number = 3;
+  optional Label label = 4;
+
+  // If type_name is set, this need not be set.  If both this and type_name
+  // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+  optional Type type = 5;
+
+  // For message and enum types, this is the name of the type.  If the name
+  // starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
+  // rules are used to find the type (i.e. first the nested types within this
+  // message are searched, then within the parent, on up to the root
+  // namespace).
+  optional string type_name = 6;
+
+  // For extensions, this is the name of the type being extended.  It is
+  // resolved in the same manner as type_name.
+  optional string extendee = 2;
+
+  // For numeric types, contains the original text representation of the value.
+  // For booleans, "true" or "false".
+  // For strings, contains the default text contents (not escaped in any way).
+  // For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
+  optional string default_value = 7;
+
+  // If set, gives the index of a oneof in the containing type's oneof_decl
+  // list.  This field is a member of that oneof.
+  optional int32 oneof_index = 9;
+
+  // JSON name of this field. The value is set by protocol compiler. If the
+  // user has set a "json_name" option on this field, that option's value
+  // will be used. Otherwise, it's deduced from the field's name by converting
+  // it to camelCase.
+  optional string json_name = 10;
+
+  optional FieldOptions options = 8;
+
+  // If true, this is a proto3 "optional". When a proto3 field is optional, it
+  // tracks presence regardless of field type.
+  //
+  // When proto3_optional is true, this field must be belong to a oneof to
+  // signal to old proto3 clients that presence is tracked for this field. This
+  // oneof is known as a "synthetic" oneof, and this field must be its sole
+  // member (each proto3 optional field gets its own synthetic oneof). Synthetic
+  // oneofs exist in the descriptor only, and do not generate any API. Synthetic
+  // oneofs must be ordered after all "real" oneofs.
+  //
+  // For message fields, proto3_optional doesn't create any semantic change,
+  // since non-repeated message fields always track presence. However it still
+  // indicates the semantic detail of whether the user wrote "optional" or not.
+  // This can be useful for round-tripping the .proto file. For consistency we
+  // give message fields a synthetic oneof also, even though it is not required
+  // to track presence. This is especially important because the parser can't
+  // tell if a field is a message or an enum, so it must always create a
+  // synthetic oneof.
+  //
+  // Proto2 optional fields do not set this flag, because they already indicate
+  // optional with `LABEL_OPTIONAL`.
+  optional bool proto3_optional = 17;
+}
+
+// Describes a oneof.
+message OneofDescriptorProto {
+  optional string name = 1;
+  optional OneofOptions options = 2;
+}
+
+// Describes an enum type.
+message EnumDescriptorProto {
+  optional string name = 1;
+
+  repeated EnumValueDescriptorProto value = 2;
+
+  optional EnumOptions options = 3;
+
+  // Range of reserved numeric values. Reserved values may not be used by
+  // entries in the same enum. Reserved ranges may not overlap.
+  //
+  // Note that this is distinct from DescriptorProto.ReservedRange in that it
+  // is inclusive such that it can appropriately represent the entire int32
+  // domain.
+  message EnumReservedRange {
+    optional int32 start = 1;  // Inclusive.
+    optional int32 end = 2;    // Inclusive.
+  }
+
+  // Range of reserved numeric values. Reserved numeric values may not be used
+  // by enum values in the same enum declaration. Reserved ranges may not
+  // overlap.
+  repeated EnumReservedRange reserved_range = 4;
+
+  // Reserved enum value names, which may not be reused. A given name may only
+  // be reserved once.
+  repeated string reserved_name = 5;
+}
+
+// Describes a value within an enum.
+message EnumValueDescriptorProto {
+  optional string name = 1;
+  optional int32 number = 2;
+
+  optional EnumValueOptions options = 3;
+}
+
+// Describes a service.
+message ServiceDescriptorProto {
+  optional string name = 1;
+  repeated MethodDescriptorProto method = 2;
+
+  optional ServiceOptions options = 3;
+}
+
+// Describes a method of a service.
+message MethodDescriptorProto {
+  optional string name = 1;
+
+  // Input and output type names.  These are resolved in the same way as
+  // FieldDescriptorProto.type_name, but must refer to a message type.
+  optional string input_type = 2;
+  optional string output_type = 3;
+
+  optional MethodOptions options = 4;
+
+  // Identifies if client streams multiple client messages
+  optional bool client_streaming = 5 [default = false];
+  // Identifies if server streams multiple server messages
+  optional bool server_streaming = 6 [default = false];
+}
+
+
+// ===================================================================
+// Options
+
+// Each of the definitions above may have "options" attached.  These are
+// just annotations which may cause code to be generated slightly differently
+// or may contain hints for code that manipulates protocol messages.
+//
+// Clients may define custom options as extensions of the *Options messages.
+// These extensions may not yet be known at parsing time, so the parser cannot
+// store the values in them.  Instead it stores them in a field in the *Options
+// message called uninterpreted_option. This field must have the same name
+// across all *Options messages. We then use this field to populate the
+// extensions when we build a descriptor, at which point all protos have been
+// parsed and so all extensions are known.
+//
+// Extension numbers for custom options may be chosen as follows:
+// * For options which will only be used within a single application or
+//   organization, or for experimental options, use field numbers 50000
+//   through 99999.  It is up to you to ensure that you do not use the
+//   same number for multiple options.
+// * For options which will be published and used publicly by multiple
+//   independent entities, e-mail protobuf-global-extension-registry@google.com
+//   to reserve extension numbers. Simply provide your project name (e.g.
+//   Objective-C plugin) and your project website (if available) -- there's no
+//   need to explain how you intend to use them. Usually you only need one
+//   extension number. You can declare multiple options with only one extension
+//   number by putting them in a sub-message. See the Custom Options section of
+//   the docs for examples:
+//   https://developers.google.com/protocol-buffers/docs/proto#options
+//   If this turns out to be popular, a web service will be set up
+//   to automatically assign option numbers.
+
+message FileOptions {
+
+  // Sets the Java package where classes generated from this .proto will be
+  // placed.  By default, the proto package is used, but this is often
+  // inappropriate because proto packages do not normally start with backwards
+  // domain names.
+  optional string java_package = 1;
+
+
+  // Controls the name of the wrapper Java class generated for the .proto file.
+  // That class will always contain the .proto file's getDescriptor() method as
+  // well as any top-level extensions defined in the .proto file.
+  // If java_multiple_files is disabled, then all the other classes from the
+  // .proto file will be nested inside the single wrapper outer class.
+  optional string java_outer_classname = 8;
+
+  // If enabled, then the Java code generator will generate a separate .java
+  // file for each top-level message, enum, and service defined in the .proto
+  // file.  Thus, these types will *not* be nested inside the wrapper class
+  // named by java_outer_classname.  However, the wrapper class will still be
+  // generated to contain the file's getDescriptor() method as well as any
+  // top-level extensions defined in the file.
+  optional bool java_multiple_files = 10 [default = false];
+
+  // This option does nothing.
+  optional bool java_generate_equals_and_hash = 20 [deprecated=true];
+
+  // If set true, then the Java2 code generator will generate code that
+  // throws an exception whenever an attempt is made to assign a non-UTF-8
+  // byte sequence to a string field.
+  // Message reflection will do the same.
+  // However, an extension field still accepts non-UTF-8 byte sequences.
+  // This option has no effect on when used with the lite runtime.
+  optional bool java_string_check_utf8 = 27 [default = false];
+
+
+  // Generated classes can be optimized for speed or code size.
+  enum OptimizeMode {
+    SPEED = 1;         // Generate complete code for parsing, serialization,
+                       // etc.
+    CODE_SIZE = 2;     // Use ReflectionOps to implement these methods.
+    LITE_RUNTIME = 3;  // Generate code using MessageLite and the lite runtime.
+  }
+  optional OptimizeMode optimize_for = 9 [default = SPEED];
+
+  // Sets the Go package where structs generated from this .proto will be
+  // placed. If omitted, the Go package will be derived from the following:
+  //   - The basename of the package import path, if provided.
+  //   - Otherwise, the package statement in the .proto file, if present.
+  //   - Otherwise, the basename of the .proto file, without extension.
+  optional string go_package = 11;
+
+
+
+
+  // Should generic services be generated in each language?  "Generic" services
+  // are not specific to any particular RPC system.  They are generated by the
+  // main code generators in each language (without additional plugins).
+  // Generic services were the only kind of service generation supported by
+  // early versions of google.protobuf.
+  //
+  // Generic services are now considered deprecated in favor of using plugins
+  // that generate code specific to your particular RPC system.  Therefore,
+  // these default to false.  Old code which depends on generic services should
+  // explicitly set them to true.
+  optional bool cc_generic_services = 16 [default = false];
+  optional bool java_generic_services = 17 [default = false];
+  optional bool py_generic_services = 18 [default = false];
+  optional bool php_generic_services = 42 [default = false];
+
+  // Is this file deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for everything in the file, or it will be completely ignored; in the very
+  // least, this is a formalization for deprecating files.
+  optional bool deprecated = 23 [default = false];
+
+  // Enables the use of arenas for the proto messages in this file. This applies
+  // only to generated classes for C++.
+  optional bool cc_enable_arenas = 31 [default = true];
+
+
+  // Sets the objective c class prefix which is prepended to all objective c
+  // generated classes from this .proto. There is no default.
+  optional string objc_class_prefix = 36;
+
+  // Namespace for generated classes; defaults to the package.
+  optional string csharp_namespace = 37;
+
+  // By default Swift generators will take the proto package and CamelCase it
+  // replacing '.' with underscore and use that to prefix the types/symbols
+  // defined. When this options is provided, they will use this value instead
+  // to prefix the types/symbols defined.
+  optional string swift_prefix = 39;
+
+  // Sets the php class prefix which is prepended to all php generated classes
+  // from this .proto. Default is empty.
+  optional string php_class_prefix = 40;
+
+  // Use this option to change the namespace of php generated classes. Default
+  // is empty. When this option is empty, the package name will be used for
+  // determining the namespace.
+  optional string php_namespace = 41;
+
+  // Use this option to change the namespace of php generated metadata classes.
+  // Default is empty. When this option is empty, the proto file name will be
+  // used for determining the namespace.
+  optional string php_metadata_namespace = 44;
+
+  // Use this option to change the package of ruby generated classes. Default
+  // is empty. When this option is not set, the package name will be used for
+  // determining the ruby package.
+  optional string ruby_package = 45;
+
+
+  // The parser stores options it doesn't recognize here.
+  // See the documentation for the "Options" section above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message.
+  // See the documentation for the "Options" section above.
+  extensions 1000 to max;
+
+  reserved 38;
+}
+
+message MessageOptions {
+  // Set true to use the old proto1 MessageSet wire format for extensions.
+  // This is provided for backwards-compatibility with the MessageSet wire
+  // format.  You should not use this for any other reason:  It's less
+  // efficient, has fewer features, and is more complicated.
+  //
+  // The message must be defined exactly as follows:
+  //   message Foo {
+  //     option message_set_wire_format = true;
+  //     extensions 4 to max;
+  //   }
+  // Note that the message cannot have any defined fields; MessageSets only
+  // have extensions.
+  //
+  // All extensions of your type must be singular messages; e.g. they cannot
+  // be int32s, enums, or repeated messages.
+  //
+  // Because this is an option, the above two restrictions are not enforced by
+  // the protocol compiler.
+  optional bool message_set_wire_format = 1 [default = false];
+
+  // Disables the generation of the standard "descriptor()" accessor, which can
+  // conflict with a field of the same name.  This is meant to make migration
+  // from proto1 easier; new code should avoid fields named "descriptor".
+  optional bool no_standard_descriptor_accessor = 2 [default = false];
+
+  // Is this message deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for the message, or it will be completely ignored; in the very least,
+  // this is a formalization for deprecating messages.
+  optional bool deprecated = 3 [default = false];
+
+  reserved 4, 5, 6;
+
+  // Whether the message is an automatically generated map entry type for the
+  // maps field.
+  //
+  // For maps fields:
+  //     map<KeyType, ValueType> map_field = 1;
+  // The parsed descriptor looks like:
+  //     message MapFieldEntry {
+  //         option map_entry = true;
+  //         optional KeyType key = 1;
+  //         optional ValueType value = 2;
+  //     }
+  //     repeated MapFieldEntry map_field = 1;
+  //
+  // Implementations may choose not to generate the map_entry=true message, but
+  // use a native map in the target language to hold the keys and values.
+  // The reflection APIs in such implementations still need to work as
+  // if the field is a repeated message field.
+  //
+  // NOTE: Do not set the option in .proto files. Always use the maps syntax
+  // instead. The option should only be implicitly set by the proto compiler
+  // parser.
+  optional bool map_entry = 7;
+
+  reserved 8;  // javalite_serializable
+  reserved 9;  // javanano_as_lite
+
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message FieldOptions {
+  // The ctype option instructs the C++ code generator to use a different
+  // representation of the field than it normally would.  See the specific
+  // options below.  This option is not yet implemented in the open source
+  // release -- sorry, we'll try to include it in a future version!
+  optional CType ctype = 1 [default = STRING];
+  enum CType {
+    // Default mode.
+    STRING = 0;
+
+    CORD = 1;
+
+    STRING_PIECE = 2;
+  }
+  // The packed option can be enabled for repeated primitive fields to enable
+  // a more efficient representation on the wire. Rather than repeatedly
+  // writing the tag and type for each element, the entire array is encoded as
+  // a single length-delimited blob. In proto3, only explicit setting it to
+  // false will avoid using packed encoding.
+  optional bool packed = 2;
+
+  // The jstype option determines the JavaScript type used for values of the
+  // field.  The option is permitted only for 64 bit integral and fixed types
+  // (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING
+  // is represented as JavaScript string, which avoids loss of precision that
+  // can happen when a large value is converted to a floating point JavaScript.
+  // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
+  // use the JavaScript "number" type.  The behavior of the default option
+  // JS_NORMAL is implementation dependent.
+  //
+  // This option is an enum to permit additional types to be added, e.g.
+  // goog.math.Integer.
+  optional JSType jstype = 6 [default = JS_NORMAL];
+  enum JSType {
+    // Use the default type.
+    JS_NORMAL = 0;
+
+    // Use JavaScript strings.
+    JS_STRING = 1;
+
+    // Use JavaScript numbers.
+    JS_NUMBER = 2;
+  }
+
+  // Should this field be parsed lazily?  Lazy applies only to message-type
+  // fields.  It means that when the outer message is initially parsed, the
+  // inner message's contents will not be parsed but instead stored in encoded
+  // form.  The inner message will actually be parsed when it is first accessed.
+  //
+  // This is only a hint.  Implementations are free to choose whether to use
+  // eager or lazy parsing regardless of the value of this option.  However,
+  // setting this option true suggests that the protocol author believes that
+  // using lazy parsing on this field is worth the additional bookkeeping
+  // overhead typically needed to implement it.
+  //
+  // This option does not affect the public interface of any generated code;
+  // all method signatures remain the same.  Furthermore, thread-safety of the
+  // interface is not affected by this option; const methods remain safe to
+  // call from multiple threads concurrently, while non-const methods continue
+  // to require exclusive access.
+  //
+  //
+  // Note that implementations may choose not to check required fields within
+  // a lazy sub-message.  That is, calling IsInitialized() on the outer message
+  // may return true even if the inner message has missing required fields.
+  // This is necessary because otherwise the inner message would have to be
+  // parsed in order to perform the check, defeating the purpose of lazy
+  // parsing.  An implementation which chooses not to check required fields
+  // must be consistent about it.  That is, for any particular sub-message, the
+  // implementation must either *always* check its required fields, or *never*
+  // check its required fields, regardless of whether or not the message has
+  // been parsed.
+  //
+  // As of 2021, lazy does no correctness checks on the byte stream during
+  // parsing.  This may lead to crashes if and when an invalid byte stream is
+  // finally parsed upon access.
+  //
+  // TODO(b/211906113):  Enable validation on lazy fields.
+  optional bool lazy = 5 [default = false];
+
+  // unverified_lazy does no correctness checks on the byte stream. This should
+  // only be used where lazy with verification is prohibitive for performance
+  // reasons.
+  optional bool unverified_lazy = 15 [default = false];
+
+  // Is this field deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for accessors, or it will be completely ignored; in the very least, this
+  // is a formalization for deprecating fields.
+  optional bool deprecated = 3 [default = false];
+
+  // For Google-internal migration only. Do not use.
+  optional bool weak = 10 [default = false];
+
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+
+  reserved 4;  // removed jtype
+}
+
+message OneofOptions {
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message EnumOptions {
+
+  // Set this option to true to allow mapping different tag names to the same
+  // value.
+  optional bool allow_alias = 2;
+
+  // Is this enum deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for the enum, or it will be completely ignored; in the very least, this
+  // is a formalization for deprecating enums.
+  optional bool deprecated = 3 [default = false];
+
+  reserved 5;  // javanano_as_lite
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message EnumValueOptions {
+  // Is this enum value deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for the enum value, or it will be completely ignored; in the very least,
+  // this is a formalization for deprecating enum values.
+  optional bool deprecated = 1 [default = false];
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message ServiceOptions {
+
+  // Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
+  //   framework.  We apologize for hoarding these numbers to ourselves, but
+  //   we were already using them long before we decided to release Protocol
+  //   Buffers.
+
+  // Is this service deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for the service, or it will be completely ignored; in the very least,
+  // this is a formalization for deprecating services.
+  optional bool deprecated = 33 [default = false];
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message MethodOptions {
+
+  // Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
+  //   framework.  We apologize for hoarding these numbers to ourselves, but
+  //   we were already using them long before we decided to release Protocol
+  //   Buffers.
+
+  // Is this method deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for the method, or it will be completely ignored; in the very least,
+  // this is a formalization for deprecating methods.
+  optional bool deprecated = 33 [default = false];
+
+  // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
+  // or neither? HTTP based RPC implementation may choose GET verb for safe
+  // methods, and PUT verb for idempotent methods instead of the default POST.
+  enum IdempotencyLevel {
+    IDEMPOTENCY_UNKNOWN = 0;
+    NO_SIDE_EFFECTS = 1;  // implies idempotent
+    IDEMPOTENT = 2;       // idempotent, but may have side effects
+  }
+  optional IdempotencyLevel idempotency_level = 34
+      [default = IDEMPOTENCY_UNKNOWN];
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+
+// A message representing a option the parser does not recognize. This only
+// appears in options protos created by the compiler::Parser class.
+// DescriptorPool resolves these when building Descriptor objects. Therefore,
+// options protos in descriptor objects (e.g. returned by Descriptor::options(),
+// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
+// in them.
+message UninterpretedOption {
+  // The name of the uninterpreted option.  Each string represents a segment in
+  // a dot-separated name.  is_extension is true iff a segment represents an
+  // extension (denoted with parentheses in options specs in .proto files).
+  // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
+  // "foo.(bar.baz).moo".
+  message NamePart {
+    required string name_part = 1;
+    required bool is_extension = 2;
+  }
+  repeated NamePart name = 2;
+
+  // The value of the uninterpreted option, in whatever type the tokenizer
+  // identified it as during parsing. Exactly one of these should be set.
+  optional string identifier_value = 3;
+  optional uint64 positive_int_value = 4;
+  optional int64 negative_int_value = 5;
+  optional double double_value = 6;
+  optional bytes string_value = 7;
+  optional string aggregate_value = 8;
+}
+
+// ===================================================================
+// Optional source code info
+
+// Encapsulates information about the original source file from which a
+// FileDescriptorProto was generated.
+message SourceCodeInfo {
+  // A Location identifies a piece of source code in a .proto file which
+  // corresponds to a particular definition.  This information is intended
+  // to be useful to IDEs, code indexers, documentation generators, and similar
+  // tools.
+  //
+  // For example, say we have a file like:
+  //   message Foo {
+  //     optional string foo = 1;
+  //   }
+  // Let's look at just the field definition:
+  //   optional string foo = 1;
+  //   ^       ^^     ^^  ^  ^^^
+  //   a       bc     de  f  ghi
+  // We have the following locations:
+  //   span   path               represents
+  //   [a,i)  [ 4, 0, 2, 0 ]     The whole field definition.
+  //   [a,b)  [ 4, 0, 2, 0, 4 ]  The label (optional).
+  //   [c,d)  [ 4, 0, 2, 0, 5 ]  The type (string).
+  //   [e,f)  [ 4, 0, 2, 0, 1 ]  The name (foo).
+  //   [g,h)  [ 4, 0, 2, 0, 3 ]  The number (1).
+  //
+  // Notes:
+  // - A location may refer to a repeated field itself (i.e. not to any
+  //   particular index within it).  This is used whenever a set of elements are
+  //   logically enclosed in a single code segment.  For example, an entire
+  //   extend block (possibly containing multiple extension definitions) will
+  //   have an outer location whose path refers to the "extensions" repeated
+  //   field without an index.
+  // - Multiple locations may have the same path.  This happens when a single
+  //   logical declaration is spread out across multiple places.  The most
+  //   obvious example is the "extend" block again -- there may be multiple
+  //   extend blocks in the same scope, each of which will have the same path.
+  // - A location's span is not always a subset of its parent's span.  For
+  //   example, the "extendee" of an extension declaration appears at the
+  //   beginning of the "extend" block and is shared by all extensions within
+  //   the block.
+  // - Just because a location's span is a subset of some other location's span
+  //   does not mean that it is a descendant.  For example, a "group" defines
+  //   both a type and a field in a single declaration.  Thus, the locations
+  //   corresponding to the type and field and their components will overlap.
+  // - Code which tries to interpret locations should probably be designed to
+  //   ignore those that it doesn't understand, as more types of locations could
+  //   be recorded in the future.
+  repeated Location location = 1;
+  message Location {
+    // Identifies which part of the FileDescriptorProto was defined at this
+    // location.
+    //
+    // Each element is a field number or an index.  They form a path from
+    // the root FileDescriptorProto to the place where the definition occurs.
+    // For example, this path:
+    //   [ 4, 3, 2, 7, 1 ]
+    // refers to:
+    //   file.message_type(3)  // 4, 3
+    //       .field(7)         // 2, 7
+    //       .name()           // 1
+    // This is because FileDescriptorProto.message_type has field number 4:
+    //   repeated DescriptorProto message_type = 4;
+    // and DescriptorProto.field has field number 2:
+    //   repeated FieldDescriptorProto field = 2;
+    // and FieldDescriptorProto.name has field number 1:
+    //   optional string name = 1;
+    //
+    // Thus, the above path gives the location of a field name.  If we removed
+    // the last element:
+    //   [ 4, 3, 2, 7 ]
+    // this path refers to the whole field declaration (from the beginning
+    // of the label to the terminating semicolon).
+    repeated int32 path = 1 [packed = true];
+
+    // Always has exactly three or four elements: start line, start column,
+    // end line (optional, otherwise assumed same as start line), end column.
+    // These are packed into a single field for efficiency.  Note that line
+    // and column numbers are zero-based -- typically you will want to add
+    // 1 to each before displaying to a user.
+    repeated int32 span = 2 [packed = true];
+
+    // If this SourceCodeInfo represents a complete declaration, these are any
+    // comments appearing before and after the declaration which appear to be
+    // attached to the declaration.
+    //
+    // A series of line comments appearing on consecutive lines, with no other
+    // tokens appearing on those lines, will be treated as a single comment.
+    //
+    // leading_detached_comments will keep paragraphs of comments that appear
+    // before (but not connected to) the current element. Each paragraph,
+    // separated by empty lines, will be one comment element in the repeated
+    // field.
+    //
+    // Only the comment content is provided; comment markers (e.g. //) are
+    // stripped out.  For block comments, leading whitespace and an asterisk
+    // will be stripped from the beginning of each line other than the first.
+    // Newlines are included in the output.
+    //
+    // Examples:
+    //
+    //   optional int32 foo = 1;  // Comment attached to foo.
+    //   // Comment attached to bar.
+    //   optional int32 bar = 2;
+    //
+    //   optional string baz = 3;
+    //   // Comment attached to baz.
+    //   // Another line attached to baz.
+    //
+    //   // Comment attached to moo.
+    //   //
+    //   // Another line attached to moo.
+    //   optional double moo = 4;
+    //
+    //   // Detached comment for corge. This is not leading or trailing comments
+    //   // to moo or corge because there are blank lines separating it from
+    //   // both.
+    //
+    //   // Detached comment for corge paragraph 2.
+    //
+    //   optional string corge = 5;
+    //   /* Block comment attached
+    //    * to corge.  Leading asterisks
+    //    * will be removed. */
+    //   /* Block comment attached to
+    //    * grault. */
+    //   optional int32 grault = 6;
+    //
+    //   // ignored detached comments.
+    optional string leading_comments = 3;
+    optional string trailing_comments = 4;
+    repeated string leading_detached_comments = 6;
+  }
+}
+
+// Describes the relationship between generated code and its original source
+// file. A GeneratedCodeInfo message is associated with only one generated
+// source file, but may contain references to different source .proto files.
+message GeneratedCodeInfo {
+  // An Annotation connects some span of text in generated code to an element
+  // of its generating .proto file.
+  repeated Annotation annotation = 1;
+  message Annotation {
+    // Identifies the element in the original source .proto file. This field
+    // is formatted the same as SourceCodeInfo.Location.path.
+    repeated int32 path = 1 [packed = true];
+
+    // Identifies the filesystem path to the original source .proto.
+    optional string source_file = 2;
+
+    // Identifies the starting offset in bytes in the generated code
+    // that relates to the identified object.
+    optional int32 begin = 3;
+
+    // Identifies the ending offset in bytes in the generated code that
+    // relates to the identified offset. The end offset should be one past
+    // the last relevant byte (so the length of the text = end - begin).
+    optional int32 end = 4;
+  }
+}
diff --git a/include/google/protobuf/duration.proto b/include/google/protobuf/duration.proto
new file mode 100644
index 0000000..81c3e36
--- /dev/null
+++ b/include/google/protobuf/duration.proto
@@ -0,0 +1,116 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/protobuf/types/known/durationpb";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "DurationProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+
+// A Duration represents a signed, fixed-length span of time represented
+// as a count of seconds and fractions of seconds at nanosecond
+// resolution. It is independent of any calendar and concepts like "day"
+// or "month". It is related to Timestamp in that the difference between
+// two Timestamp values is a Duration and it can be added or subtracted
+// from a Timestamp. Range is approximately +-10,000 years.
+//
+// # Examples
+//
+// Example 1: Compute Duration from two Timestamps in pseudo code.
+//
+//     Timestamp start = ...;
+//     Timestamp end = ...;
+//     Duration duration = ...;
+//
+//     duration.seconds = end.seconds - start.seconds;
+//     duration.nanos = end.nanos - start.nanos;
+//
+//     if (duration.seconds < 0 && duration.nanos > 0) {
+//       duration.seconds += 1;
+//       duration.nanos -= 1000000000;
+//     } else if (duration.seconds > 0 && duration.nanos < 0) {
+//       duration.seconds -= 1;
+//       duration.nanos += 1000000000;
+//     }
+//
+// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+//
+//     Timestamp start = ...;
+//     Duration duration = ...;
+//     Timestamp end = ...;
+//
+//     end.seconds = start.seconds + duration.seconds;
+//     end.nanos = start.nanos + duration.nanos;
+//
+//     if (end.nanos < 0) {
+//       end.seconds -= 1;
+//       end.nanos += 1000000000;
+//     } else if (end.nanos >= 1000000000) {
+//       end.seconds += 1;
+//       end.nanos -= 1000000000;
+//     }
+//
+// Example 3: Compute Duration from datetime.timedelta in Python.
+//
+//     td = datetime.timedelta(days=3, minutes=10)
+//     duration = Duration()
+//     duration.FromTimedelta(td)
+//
+// # JSON Mapping
+//
+// In JSON format, the Duration type is encoded as a string rather than an
+// object, where the string ends in the suffix "s" (indicating seconds) and
+// is preceded by the number of seconds, with nanoseconds expressed as
+// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
+// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
+// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
+// microsecond should be expressed in JSON format as "3.000001s".
+//
+//
+message Duration {
+  // Signed seconds of the span of time. Must be from -315,576,000,000
+  // to +315,576,000,000 inclusive. Note: these bounds are computed from:
+  // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+  int64 seconds = 1;
+
+  // Signed fractions of a second at nanosecond resolution of the span
+  // of time. Durations less than one second are represented with a 0
+  // `seconds` field and a positive or negative `nanos` field. For durations
+  // of one second or more, a non-zero value for the `nanos` field must be
+  // of the same sign as the `seconds` field. Must be from -999,999,999
+  // to +999,999,999 inclusive.
+  int32 nanos = 2;
+}
diff --git a/include/google/protobuf/empty.proto b/include/google/protobuf/empty.proto
new file mode 100644
index 0000000..2227462
--- /dev/null
+++ b/include/google/protobuf/empty.proto
@@ -0,0 +1,51 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option go_package = "google.golang.org/protobuf/types/known/emptypb";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "EmptyProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+option cc_enable_arenas = true;
+
+// A generic empty message that you can re-use to avoid defining duplicated
+// empty messages in your APIs. A typical example is to use it as the request
+// or the response type of an API method. For instance:
+//
+//     service Foo {
+//       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+//     }
+//
+message Empty {}
diff --git a/include/google/protobuf/field_mask.proto b/include/google/protobuf/field_mask.proto
new file mode 100644
index 0000000..6b5104f
--- /dev/null
+++ b/include/google/protobuf/field_mask.proto
@@ -0,0 +1,245 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "FieldMaskProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+option go_package = "google.golang.org/protobuf/types/known/fieldmaskpb";
+option cc_enable_arenas = true;
+
+// `FieldMask` represents a set of symbolic field paths, for example:
+//
+//     paths: "f.a"
+//     paths: "f.b.d"
+//
+// Here `f` represents a field in some root message, `a` and `b`
+// fields in the message found in `f`, and `d` a field found in the
+// message in `f.b`.
+//
+// Field masks are used to specify a subset of fields that should be
+// returned by a get operation or modified by an update operation.
+// Field masks also have a custom JSON encoding (see below).
+//
+// # Field Masks in Projections
+//
+// When used in the context of a projection, a response message or
+// sub-message is filtered by the API to only contain those fields as
+// specified in the mask. For example, if the mask in the previous
+// example is applied to a response message as follows:
+//
+//     f {
+//       a : 22
+//       b {
+//         d : 1
+//         x : 2
+//       }
+//       y : 13
+//     }
+//     z: 8
+//
+// The result will not contain specific values for fields x,y and z
+// (their value will be set to the default, and omitted in proto text
+// output):
+//
+//
+//     f {
+//       a : 22
+//       b {
+//         d : 1
+//       }
+//     }
+//
+// A repeated field is not allowed except at the last position of a
+// paths string.
+//
+// If a FieldMask object is not present in a get operation, the
+// operation applies to all fields (as if a FieldMask of all fields
+// had been specified).
+//
+// Note that a field mask does not necessarily apply to the
+// top-level response message. In case of a REST get operation, the
+// field mask applies directly to the response, but in case of a REST
+// list operation, the mask instead applies to each individual message
+// in the returned resource list. In case of a REST custom method,
+// other definitions may be used. Where the mask applies will be
+// clearly documented together with its declaration in the API.  In
+// any case, the effect on the returned resource/resources is required
+// behavior for APIs.
+//
+// # Field Masks in Update Operations
+//
+// A field mask in update operations specifies which fields of the
+// targeted resource are going to be updated. The API is required
+// to only change the values of the fields as specified in the mask
+// and leave the others untouched. If a resource is passed in to
+// describe the updated values, the API ignores the values of all
+// fields not covered by the mask.
+//
+// If a repeated field is specified for an update operation, new values will
+// be appended to the existing repeated field in the target resource. Note that
+// a repeated field is only allowed in the last position of a `paths` string.
+//
+// If a sub-message is specified in the last position of the field mask for an
+// update operation, then new value will be merged into the existing sub-message
+// in the target resource.
+//
+// For example, given the target message:
+//
+//     f {
+//       b {
+//         d: 1
+//         x: 2
+//       }
+//       c: [1]
+//     }
+//
+// And an update message:
+//
+//     f {
+//       b {
+//         d: 10
+//       }
+//       c: [2]
+//     }
+//
+// then if the field mask is:
+//
+//  paths: ["f.b", "f.c"]
+//
+// then the result will be:
+//
+//     f {
+//       b {
+//         d: 10
+//         x: 2
+//       }
+//       c: [1, 2]
+//     }
+//
+// An implementation may provide options to override this default behavior for
+// repeated and message fields.
+//
+// In order to reset a field's value to the default, the field must
+// be in the mask and set to the default value in the provided resource.
+// Hence, in order to reset all fields of a resource, provide a default
+// instance of the resource and set all fields in the mask, or do
+// not provide a mask as described below.
+//
+// If a field mask is not present on update, the operation applies to
+// all fields (as if a field mask of all fields has been specified).
+// Note that in the presence of schema evolution, this may mean that
+// fields the client does not know and has therefore not filled into
+// the request will be reset to their default. If this is unwanted
+// behavior, a specific service may require a client to always specify
+// a field mask, producing an error if not.
+//
+// As with get operations, the location of the resource which
+// describes the updated values in the request message depends on the
+// operation kind. In any case, the effect of the field mask is
+// required to be honored by the API.
+//
+// ## Considerations for HTTP REST
+//
+// The HTTP kind of an update operation which uses a field mask must
+// be set to PATCH instead of PUT in order to satisfy HTTP semantics
+// (PUT must only be used for full updates).
+//
+// # JSON Encoding of Field Masks
+//
+// In JSON, a field mask is encoded as a single string where paths are
+// separated by a comma. Fields name in each path are converted
+// to/from lower-camel naming conventions.
+//
+// As an example, consider the following message declarations:
+//
+//     message Profile {
+//       User user = 1;
+//       Photo photo = 2;
+//     }
+//     message User {
+//       string display_name = 1;
+//       string address = 2;
+//     }
+//
+// In proto a field mask for `Profile` may look as such:
+//
+//     mask {
+//       paths: "user.display_name"
+//       paths: "photo"
+//     }
+//
+// In JSON, the same mask is represented as below:
+//
+//     {
+//       mask: "user.displayName,photo"
+//     }
+//
+// # Field Masks and Oneof Fields
+//
+// Field masks treat fields in oneofs just as regular fields. Consider the
+// following message:
+//
+//     message SampleMessage {
+//       oneof test_oneof {
+//         string name = 4;
+//         SubMessage sub_message = 9;
+//       }
+//     }
+//
+// The field mask can be:
+//
+//     mask {
+//       paths: "name"
+//     }
+//
+// Or:
+//
+//     mask {
+//       paths: "sub_message"
+//     }
+//
+// Note that oneof type names ("test_oneof" in this case) cannot be used in
+// paths.
+//
+// ## Field Mask Verification
+//
+// The implementation of any API method which has a FieldMask type field in the
+// request should verify the included field paths, and return an
+// `INVALID_ARGUMENT` error if any path is unmappable.
+message FieldMask {
+  // The set of field mask paths.
+  repeated string paths = 1;
+}
diff --git a/include/google/protobuf/source_context.proto b/include/google/protobuf/source_context.proto
new file mode 100644
index 0000000..06bfc43
--- /dev/null
+++ b/include/google/protobuf/source_context.proto
@@ -0,0 +1,48 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "SourceContextProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+option go_package = "google.golang.org/protobuf/types/known/sourcecontextpb";
+
+// `SourceContext` represents information about the source of a
+// protobuf element, like the file in which it is defined.
+message SourceContext {
+  // The path-qualified name of the .proto file that contained the associated
+  // protobuf element.  For example: `"google/protobuf/source_context.proto"`.
+  string file_name = 1;
+}
diff --git a/include/google/protobuf/struct.proto b/include/google/protobuf/struct.proto
new file mode 100644
index 0000000..0ac843c
--- /dev/null
+++ b/include/google/protobuf/struct.proto
@@ -0,0 +1,95 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/protobuf/types/known/structpb";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "StructProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+
+// `Struct` represents a structured data value, consisting of fields
+// which map to dynamically typed values. In some languages, `Struct`
+// might be supported by a native representation. For example, in
+// scripting languages like JS a struct is represented as an
+// object. The details of that representation are described together
+// with the proto support for the language.
+//
+// The JSON representation for `Struct` is JSON object.
+message Struct {
+  // Unordered map of dynamically typed values.
+  map<string, Value> fields = 1;
+}
+
+// `Value` represents a dynamically typed value which can be either
+// null, a number, a string, a boolean, a recursive struct value, or a
+// list of values. A producer of value is expected to set one of these
+// variants. Absence of any variant indicates an error.
+//
+// The JSON representation for `Value` is JSON value.
+message Value {
+  // The kind of value.
+  oneof kind {
+    // Represents a null value.
+    NullValue null_value = 1;
+    // Represents a double value.
+    double number_value = 2;
+    // Represents a string value.
+    string string_value = 3;
+    // Represents a boolean value.
+    bool bool_value = 4;
+    // Represents a structured value.
+    Struct struct_value = 5;
+    // Represents a repeated `Value`.
+    ListValue list_value = 6;
+  }
+}
+
+// `NullValue` is a singleton enumeration to represent the null value for the
+// `Value` type union.
+//
+//  The JSON representation for `NullValue` is JSON `null`.
+enum NullValue {
+  // Null value.
+  NULL_VALUE = 0;
+}
+
+// `ListValue` is a wrapper around a repeated field of values.
+//
+// The JSON representation for `ListValue` is JSON array.
+message ListValue {
+  // Repeated field of dynamically typed values.
+  repeated Value values = 1;
+}
diff --git a/include/google/protobuf/timestamp.proto b/include/google/protobuf/timestamp.proto
new file mode 100644
index 0000000..3b2df6d
--- /dev/null
+++ b/include/google/protobuf/timestamp.proto
@@ -0,0 +1,147 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/protobuf/types/known/timestamppb";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "TimestampProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+
+// A Timestamp represents a point in time independent of any time zone or local
+// calendar, encoded as a count of seconds and fractions of seconds at
+// nanosecond resolution. The count is relative to an epoch at UTC midnight on
+// January 1, 1970, in the proleptic Gregorian calendar which extends the
+// Gregorian calendar backwards to year one.
+//
+// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
+// second table is needed for interpretation, using a [24-hour linear
+// smear](https://developers.google.com/time/smear).
+//
+// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
+// restricting to that range, we ensure that we can convert to and from [RFC
+// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
+//
+// # Examples
+//
+// Example 1: Compute Timestamp from POSIX `time()`.
+//
+//     Timestamp timestamp;
+//     timestamp.set_seconds(time(NULL));
+//     timestamp.set_nanos(0);
+//
+// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
+//
+//     struct timeval tv;
+//     gettimeofday(&tv, NULL);
+//
+//     Timestamp timestamp;
+//     timestamp.set_seconds(tv.tv_sec);
+//     timestamp.set_nanos(tv.tv_usec * 1000);
+//
+// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
+//
+//     FILETIME ft;
+//     GetSystemTimeAsFileTime(&ft);
+//     UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
+//
+//     // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
+//     // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
+//     Timestamp timestamp;
+//     timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
+//     timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
+//
+// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
+//
+//     long millis = System.currentTimeMillis();
+//
+//     Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
+//         .setNanos((int) ((millis % 1000) * 1000000)).build();
+//
+//
+// Example 5: Compute Timestamp from Java `Instant.now()`.
+//
+//     Instant now = Instant.now();
+//
+//     Timestamp timestamp =
+//         Timestamp.newBuilder().setSeconds(now.getEpochSecond())
+//             .setNanos(now.getNano()).build();
+//
+//
+// Example 6: Compute Timestamp from current time in Python.
+//
+//     timestamp = Timestamp()
+//     timestamp.GetCurrentTime()
+//
+// # JSON Mapping
+//
+// In JSON format, the Timestamp type is encoded as a string in the
+// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
+// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
+// where {year} is always expressed using four digits while {month}, {day},
+// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
+// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
+// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
+// is required. A proto3 JSON serializer should always use UTC (as indicated by
+// "Z") when printing the Timestamp type and a proto3 JSON parser should be
+// able to accept both UTC and other timezones (as indicated by an offset).
+//
+// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
+// 01:30 UTC on January 15, 2017.
+//
+// In JavaScript, one can convert a Date object to this format using the
+// standard
+// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
+// method. In Python, a standard `datetime.datetime` object can be converted
+// to this format using
+// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
+// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
+// the Joda Time's [`ISODateTimeFormat.dateTime()`](
+// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
+// ) to obtain a formatter capable of generating timestamps in this format.
+//
+//
+message Timestamp {
+  // Represents seconds of UTC time since Unix epoch
+  // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+  // 9999-12-31T23:59:59Z inclusive.
+  int64 seconds = 1;
+
+  // Non-negative fractions of a second at nanosecond resolution. Negative
+  // second values with fractions must still have non-negative nanos values
+  // that count forward in time. Must be from 0 to 999,999,999
+  // inclusive.
+  int32 nanos = 2;
+}
diff --git a/include/google/protobuf/type.proto b/include/google/protobuf/type.proto
new file mode 100644
index 0000000..d3f6a68
--- /dev/null
+++ b/include/google/protobuf/type.proto
@@ -0,0 +1,187 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/source_context.proto";
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option cc_enable_arenas = true;
+option java_package = "com.google.protobuf";
+option java_outer_classname = "TypeProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+option go_package = "google.golang.org/protobuf/types/known/typepb";
+
+// A protocol buffer message type.
+message Type {
+  // The fully qualified message name.
+  string name = 1;
+  // The list of fields.
+  repeated Field fields = 2;
+  // The list of types appearing in `oneof` definitions in this type.
+  repeated string oneofs = 3;
+  // The protocol buffer options.
+  repeated Option options = 4;
+  // The source context.
+  SourceContext source_context = 5;
+  // The source syntax.
+  Syntax syntax = 6;
+}
+
+// A single field of a message type.
+message Field {
+  // Basic field types.
+  enum Kind {
+    // Field type unknown.
+    TYPE_UNKNOWN = 0;
+    // Field type double.
+    TYPE_DOUBLE = 1;
+    // Field type float.
+    TYPE_FLOAT = 2;
+    // Field type int64.
+    TYPE_INT64 = 3;
+    // Field type uint64.
+    TYPE_UINT64 = 4;
+    // Field type int32.
+    TYPE_INT32 = 5;
+    // Field type fixed64.
+    TYPE_FIXED64 = 6;
+    // Field type fixed32.
+    TYPE_FIXED32 = 7;
+    // Field type bool.
+    TYPE_BOOL = 8;
+    // Field type string.
+    TYPE_STRING = 9;
+    // Field type group. Proto2 syntax only, and deprecated.
+    TYPE_GROUP = 10;
+    // Field type message.
+    TYPE_MESSAGE = 11;
+    // Field type bytes.
+    TYPE_BYTES = 12;
+    // Field type uint32.
+    TYPE_UINT32 = 13;
+    // Field type enum.
+    TYPE_ENUM = 14;
+    // Field type sfixed32.
+    TYPE_SFIXED32 = 15;
+    // Field type sfixed64.
+    TYPE_SFIXED64 = 16;
+    // Field type sint32.
+    TYPE_SINT32 = 17;
+    // Field type sint64.
+    TYPE_SINT64 = 18;
+  }
+
+  // Whether a field is optional, required, or repeated.
+  enum Cardinality {
+    // For fields with unknown cardinality.
+    CARDINALITY_UNKNOWN = 0;
+    // For optional fields.
+    CARDINALITY_OPTIONAL = 1;
+    // For required fields. Proto2 syntax only.
+    CARDINALITY_REQUIRED = 2;
+    // For repeated fields.
+    CARDINALITY_REPEATED = 3;
+  }
+
+  // The field type.
+  Kind kind = 1;
+  // The field cardinality.
+  Cardinality cardinality = 2;
+  // The field number.
+  int32 number = 3;
+  // The field name.
+  string name = 4;
+  // The field type URL, without the scheme, for message or enumeration
+  // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+  string type_url = 6;
+  // The index of the field type in `Type.oneofs`, for message or enumeration
+  // types. The first type has index 1; zero means the type is not in the list.
+  int32 oneof_index = 7;
+  // Whether to use alternative packed wire representation.
+  bool packed = 8;
+  // The protocol buffer options.
+  repeated Option options = 9;
+  // The field JSON name.
+  string json_name = 10;
+  // The string value of the default value of this field. Proto2 syntax only.
+  string default_value = 11;
+}
+
+// Enum type definition.
+message Enum {
+  // Enum type name.
+  string name = 1;
+  // Enum value definitions.
+  repeated EnumValue enumvalue = 2;
+  // Protocol buffer options.
+  repeated Option options = 3;
+  // The source context.
+  SourceContext source_context = 4;
+  // The source syntax.
+  Syntax syntax = 5;
+}
+
+// Enum value definition.
+message EnumValue {
+  // Enum value name.
+  string name = 1;
+  // Enum value number.
+  int32 number = 2;
+  // Protocol buffer options.
+  repeated Option options = 3;
+}
+
+// A protocol buffer option, which can be attached to a message, field,
+// enumeration, etc.
+message Option {
+  // The option's name. For protobuf built-in options (options defined in
+  // descriptor.proto), this is the short name. For example, `"map_entry"`.
+  // For custom options, it should be the fully-qualified name. For example,
+  // `"google.api.http"`.
+  string name = 1;
+  // The option's value packed in an Any message. If the value is a primitive,
+  // the corresponding wrapper type defined in google/protobuf/wrappers.proto
+  // should be used. If the value is an enum, it should be stored as an int32
+  // value using the google.protobuf.Int32Value type.
+  Any value = 2;
+}
+
+// The syntax in which a protocol buffer element is defined.
+enum Syntax {
+  // Syntax `proto2`.
+  SYNTAX_PROTO2 = 0;
+  // Syntax `proto3`.
+  SYNTAX_PROTO3 = 1;
+}
diff --git a/include/google/protobuf/wrappers.proto b/include/google/protobuf/wrappers.proto
new file mode 100644
index 0000000..d49dd53
--- /dev/null
+++ b/include/google/protobuf/wrappers.proto
@@ -0,0 +1,123 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Wrappers for primitive (non-message) types. These types are useful
+// for embedding primitives in the `google.protobuf.Any` type and for places
+// where we need to distinguish between the absence of a primitive
+// typed field and its default value.
+//
+// These wrappers have no meaningful use within repeated fields as they lack
+// the ability to detect presence on individual elements.
+// These wrappers have no meaningful use within a map or a oneof since
+// individual entries of a map or fields of a oneof can already detect presence.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/protobuf/types/known/wrapperspb";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "WrappersProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+
+// Wrapper message for `double`.
+//
+// The JSON representation for `DoubleValue` is JSON number.
+message DoubleValue {
+  // The double value.
+  double value = 1;
+}
+
+// Wrapper message for `float`.
+//
+// The JSON representation for `FloatValue` is JSON number.
+message FloatValue {
+  // The float value.
+  float value = 1;
+}
+
+// Wrapper message for `int64`.
+//
+// The JSON representation for `Int64Value` is JSON string.
+message Int64Value {
+  // The int64 value.
+  int64 value = 1;
+}
+
+// Wrapper message for `uint64`.
+//
+// The JSON representation for `UInt64Value` is JSON string.
+message UInt64Value {
+  // The uint64 value.
+  uint64 value = 1;
+}
+
+// Wrapper message for `int32`.
+//
+// The JSON representation for `Int32Value` is JSON number.
+message Int32Value {
+  // The int32 value.
+  int32 value = 1;
+}
+
+// Wrapper message for `uint32`.
+//
+// The JSON representation for `UInt32Value` is JSON number.
+message UInt32Value {
+  // The uint32 value.
+  uint32 value = 1;
+}
+
+// Wrapper message for `bool`.
+//
+// The JSON representation for `BoolValue` is JSON `true` and `false`.
+message BoolValue {
+  // The bool value.
+  bool value = 1;
+}
+
+// Wrapper message for `string`.
+//
+// The JSON representation for `StringValue` is JSON string.
+message StringValue {
+  // The string value.
+  string value = 1;
+}
+
+// Wrapper message for `bytes`.
+//
+// The JSON representation for `BytesValue` is JSON string.
+message BytesValue {
+  // The bytes value.
+  bytes value = 1;
+}
diff --git a/python/MANIFEST.in b/python/MANIFEST.in
new file mode 100644
index 0000000..a81760f
--- /dev/null
+++ b/python/MANIFEST.in
@@ -0,0 +1,19 @@
+prune google/protobuf/internal/import_test_package
+exclude google/protobuf/internal/*_pb2.py
+exclude google/protobuf/internal/*_test.py
+exclude google/protobuf/internal/*.proto
+exclude google/protobuf/internal/test_util.py
+
+recursive-include google *.cc
+recursive-include google *.h
+
+recursive-exclude google *_test.py
+recursive-exclude google *_test.proto
+recursive-exclude google unittest*_pb2.py
+
+global-exclude *.dll
+global-exclude *.pyc
+global-exclude *.pyo
+global-exclude *.so
+
+include LICENSE
diff --git a/python/README.md b/python/README.md
new file mode 100644
index 0000000..27f22c8
--- /dev/null
+++ b/python/README.md
@@ -0,0 +1,130 @@
+Protocol Buffers - Google's data interchange format
+===================================================
+
+Copyright 2008 Google Inc.
+
+This directory contains the Python Protocol Buffers runtime library.
+
+Normally, this directory comes as part of the protobuf package, available
+from:
+
+  https://developers.google.com/protocol-buffers/
+
+The complete package includes the C++ source code, which includes the
+Protocol Compiler (protoc).  If you downloaded this package from PyPI
+or some other Python-specific source, you may have received only the
+Python part of the code.  In this case, you will need to obtain the
+Protocol Compiler from some other source before you can use this
+package.
+
+Development Warning
+===================
+
+The pure python performance is slow. For better performance please
+use python c++ implementation.
+
+Installation
+============
+
+1) Make sure you have Python 3.7 or newer.  If in doubt, run:
+
+       $ python -V
+
+2) If you do not have setuptools installed, note that it will be
+   downloaded and installed automatically as soon as you run `setup.py`.
+   If you would rather install it manually, you may do so by following
+   the instructions on [this page](https://packaging.python.org/en/latest/installing.html#setup-for-installing-packages).
+
+3) Build the C++ code, or install a binary distribution of `protoc`.  If
+   you install a binary distribution, make sure that it is the same
+   version as this package.  If in doubt, run:
+
+       $ protoc --version
+
+4) Build and run the tests:
+
+       $ python setup.py build
+       $ python setup.py test
+
+   To build, test, and use the C++ implementation, you must first compile
+   `libprotobuf.so`:
+
+       $ (cd .. && make)
+
+   On OS X:
+
+   If you are running a Homebrew-provided Python, you must make sure another
+   version of protobuf is not already installed, as Homebrew's Python will
+   search `/usr/local/lib` for `libprotobuf.so` before it searches
+   `../src/.libs`.
+
+   You can either unlink Homebrew's protobuf or install the `libprotobuf` you
+   built earlier:
+
+       $ brew unlink protobuf
+
+   or
+
+       $ (cd .. && make install)
+
+    On other *nix:
+
+    You must make `libprotobuf.so` dynamically available. You can either
+    install libprotobuf you built earlier, or set `LD_LIBRARY_PATH`:
+
+       $ export LD_LIBRARY_PATH=../src/.libs
+
+    or
+
+       $ (cd .. && make install)
+
+   To build the C++ implementation run:
+
+       $ python setup.py build --cpp_implementation
+
+   Then run the tests like so:
+
+       $ python setup.py test --cpp_implementation
+
+   If some tests fail, this library may not work correctly on your
+   system.  Continue at your own risk.
+
+   Please note that there is a known problem with some versions of
+   Python on Cygwin which causes the tests to fail after printing the
+   error:  `sem_init: Resource temporarily unavailable`.  This appears
+   to be a [bug either in Cygwin or in
+   Python](http://www.cygwin.com/ml/cygwin/2005-07/msg01378.html).
+
+   We do not know if or when it might be fixed.  We also do not know
+   how likely it is that this bug will affect users in practice.
+
+5) Install:
+
+       $ python setup.py install
+
+   or:
+
+       $ (cd .. && make install)
+       $ python setup.py install --cpp_implementation
+
+   This step may require superuser privileges.
+   NOTE: To use C++ implementation, you need to export an environment
+   variable before running your program.  See the "C++ Implementation"
+   section below for more details.
+
+Usage
+=====
+
+The complete documentation for Protocol Buffers is available via the
+web at:
+
+  https://developers.google.com/protocol-buffers/
+
+C++ Implementation
+==================
+
+The C++ implementation for Python messages is built as a Python extension to
+improve the overall protobuf Python performance.
+
+To use the C++ implementation, you need to install the C++ protobuf runtime
+library, please see instructions in the parent directory.
diff --git a/python/google/__init__.py b/python/google/__init__.py
new file mode 100644
index 0000000..5585614
--- /dev/null
+++ b/python/google/__init__.py
@@ -0,0 +1,4 @@
+try:
+  __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+  __path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py
new file mode 100644
index 0000000..e7b197e
--- /dev/null
+++ b/python/google/protobuf/__init__.py
@@ -0,0 +1,33 @@
+# Protocol Buffers - Google's data interchange format
+# Copyright 2008 Google Inc.  All rights reserved.
+# https://developers.google.com/protocol-buffers/
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Copyright 2007 Google Inc. All Rights Reserved.
+
+__version__ = '4.21.9'
diff --git a/python/google/protobuf/any_pb2.py b/python/google/protobuf/any_pb2.py
new file mode 100644
index 0000000..e3b6ad8
--- /dev/null
+++ b/python/google/protobuf/any_pb2.py
@@ -0,0 +1,78 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: google/protobuf/any.proto
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='google/protobuf/any.proto',
+  package='google.protobuf',
+  syntax='proto3',
+  serialized_options=b'\n\023com.google.protobufB\010AnyProtoP\001Z,google.golang.org/protobuf/types/known/anypb\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTypes',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x19google/protobuf/any.proto\x12\x0fgoogle.protobuf\"&\n\x03\x41ny\x12\x10\n\x08type_url\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\x42v\n\x13\x63om.google.protobufB\x08\x41nyProtoP\x01Z,google.golang.org/protobuf/types/known/anypb\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3'
+)
+
+
+
+
+_ANY = _descriptor.Descriptor(
+  name='Any',
+  full_name='google.protobuf.Any',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='type_url', full_name='google.protobuf.Any.type_url', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='google.protobuf.Any.value', index=1,
+      number=2, type=12, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"",
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=46,
+  serialized_end=84,
+)
+
+DESCRIPTOR.message_types_by_name['Any'] = _ANY
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Any = _reflection.GeneratedProtocolMessageType('Any', (_message.Message,), {
+  'DESCRIPTOR' : _ANY,
+  '__module__' : 'google.protobuf.any_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.Any)
+  })
+_sym_db.RegisterMessage(Any)
+
+
+DESCRIPTOR._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/python/google/protobuf/any_test_pb2.py b/python/google/protobuf/any_test_pb2.py
new file mode 100644
index 0000000..18e5383
--- /dev/null
+++ b/python/google/protobuf/any_test_pb2.py
@@ -0,0 +1,96 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: google/protobuf/any_test.proto
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='google/protobuf/any_test.proto',
+  package='protobuf_unittest',
+  syntax='proto3',
+  serialized_options=b'B\014TestAnyProto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x1egoogle/protobuf/any_test.proto\x12\x11protobuf_unittest\x1a\x19google/protobuf/any.proto\"\x87\x01\n\x07TestAny\x12\x13\n\x0bint32_value\x18\x01 \x01(\x05\x12\'\n\tany_value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x30\n\x12repeated_any_value\x18\x03 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x0c\n\x04text\x18\x04 \x01(\tB\x0e\x42\x0cTestAnyProtob\x06proto3'
+  ,
+  dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,])
+
+
+
+
+_TESTANY = _descriptor.Descriptor(
+  name='TestAny',
+  full_name='protobuf_unittest.TestAny',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='int32_value', full_name='protobuf_unittest.TestAny.int32_value', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='any_value', full_name='protobuf_unittest.TestAny.any_value', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='repeated_any_value', full_name='protobuf_unittest.TestAny.repeated_any_value', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='text', full_name='protobuf_unittest.TestAny.text', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=81,
+  serialized_end=216,
+)
+
+_TESTANY.fields_by_name['any_value'].message_type = google_dot_protobuf_dot_any__pb2._ANY
+_TESTANY.fields_by_name['repeated_any_value'].message_type = google_dot_protobuf_dot_any__pb2._ANY
+DESCRIPTOR.message_types_by_name['TestAny'] = _TESTANY
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+TestAny = _reflection.GeneratedProtocolMessageType('TestAny', (_message.Message,), {
+  'DESCRIPTOR' : _TESTANY,
+  '__module__' : 'google.protobuf.any_test_pb2'
+  # @@protoc_insertion_point(class_scope:protobuf_unittest.TestAny)
+  })
+_sym_db.RegisterMessage(TestAny)
+
+
+DESCRIPTOR._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/python/google/protobuf/api_pb2.py b/python/google/protobuf/api_pb2.py
new file mode 100644
index 0000000..5ecc064
--- /dev/null
+++ b/python/google/protobuf/api_pb2.py
@@ -0,0 +1,252 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: google/protobuf/api.proto
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import source_context_pb2 as google_dot_protobuf_dot_source__context__pb2
+from google.protobuf import type_pb2 as google_dot_protobuf_dot_type__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='google/protobuf/api.proto',
+  package='google.protobuf',
+  syntax='proto3',
+  serialized_options=b'\n\023com.google.protobufB\010ApiProtoP\001Z,google.golang.org/protobuf/types/known/apipb\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTypes',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x19google/protobuf/api.proto\x12\x0fgoogle.protobuf\x1a$google/protobuf/source_context.proto\x1a\x1agoogle/protobuf/type.proto\"\x81\x02\n\x03\x41pi\x12\x0c\n\x04name\x18\x01 \x01(\t\x12(\n\x07methods\x18\x02 \x03(\x0b\x32\x17.google.protobuf.Method\x12(\n\x07options\x18\x03 \x03(\x0b\x32\x17.google.protobuf.Option\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x36\n\x0esource_context\x18\x05 \x01(\x0b\x32\x1e.google.protobuf.SourceContext\x12&\n\x06mixins\x18\x06 \x03(\x0b\x32\x16.google.protobuf.Mixin\x12\'\n\x06syntax\x18\x07 \x01(\x0e\x32\x17.google.protobuf.Syntax\"\xd5\x01\n\x06Method\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x10request_type_url\x18\x02 \x01(\t\x12\x19\n\x11request_streaming\x18\x03 \x01(\x08\x12\x19\n\x11response_type_url\x18\x04 \x01(\t\x12\x1a\n\x12response_streaming\x18\x05 \x01(\x08\x12(\n\x07options\x18\x06 \x03(\x0b\x32\x17.google.protobuf.Option\x12\'\n\x06syntax\x18\x07 \x01(\x0e\x32\x17.google.protobuf.Syntax\"#\n\x05Mixin\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04root\x18\x02 \x01(\tBv\n\x13\x63om.google.protobufB\x08\x41piProtoP\x01Z,google.golang.org/protobuf/types/known/apipb\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3'
+  ,
+  dependencies=[google_dot_protobuf_dot_source__context__pb2.DESCRIPTOR,google_dot_protobuf_dot_type__pb2.DESCRIPTOR,])
+
+
+
+
+_API = _descriptor.Descriptor(
+  name='Api',
+  full_name='google.protobuf.Api',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.Api.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='methods', full_name='google.protobuf.Api.methods', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.Api.options', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='version', full_name='google.protobuf.Api.version', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='source_context', full_name='google.protobuf.Api.source_context', index=4,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='mixins', full_name='google.protobuf.Api.mixins', index=5,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='syntax', full_name='google.protobuf.Api.syntax', index=6,
+      number=7, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=113,
+  serialized_end=370,
+)
+
+
+_METHOD = _descriptor.Descriptor(
+  name='Method',
+  full_name='google.protobuf.Method',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.Method.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='request_type_url', full_name='google.protobuf.Method.request_type_url', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='request_streaming', full_name='google.protobuf.Method.request_streaming', index=2,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='response_type_url', full_name='google.protobuf.Method.response_type_url', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='response_streaming', full_name='google.protobuf.Method.response_streaming', index=4,
+      number=5, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.Method.options', index=5,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='syntax', full_name='google.protobuf.Method.syntax', index=6,
+      number=7, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=373,
+  serialized_end=586,
+)
+
+
+_MIXIN = _descriptor.Descriptor(
+  name='Mixin',
+  full_name='google.protobuf.Mixin',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.Mixin.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='root', full_name='google.protobuf.Mixin.root', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=588,
+  serialized_end=623,
+)
+
+_API.fields_by_name['methods'].message_type = _METHOD
+_API.fields_by_name['options'].message_type = google_dot_protobuf_dot_type__pb2._OPTION
+_API.fields_by_name['source_context'].message_type = google_dot_protobuf_dot_source__context__pb2._SOURCECONTEXT
+_API.fields_by_name['mixins'].message_type = _MIXIN
+_API.fields_by_name['syntax'].enum_type = google_dot_protobuf_dot_type__pb2._SYNTAX
+_METHOD.fields_by_name['options'].message_type = google_dot_protobuf_dot_type__pb2._OPTION
+_METHOD.fields_by_name['syntax'].enum_type = google_dot_protobuf_dot_type__pb2._SYNTAX
+DESCRIPTOR.message_types_by_name['Api'] = _API
+DESCRIPTOR.message_types_by_name['Method'] = _METHOD
+DESCRIPTOR.message_types_by_name['Mixin'] = _MIXIN
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Api = _reflection.GeneratedProtocolMessageType('Api', (_message.Message,), {
+  'DESCRIPTOR' : _API,
+  '__module__' : 'google.protobuf.api_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.Api)
+  })
+_sym_db.RegisterMessage(Api)
+
+Method = _reflection.GeneratedProtocolMessageType('Method', (_message.Message,), {
+  'DESCRIPTOR' : _METHOD,
+  '__module__' : 'google.protobuf.api_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.Method)
+  })
+_sym_db.RegisterMessage(Method)
+
+Mixin = _reflection.GeneratedProtocolMessageType('Mixin', (_message.Message,), {
+  'DESCRIPTOR' : _MIXIN,
+  '__module__' : 'google.protobuf.api_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.Mixin)
+  })
+_sym_db.RegisterMessage(Mixin)
+
+
+DESCRIPTOR._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/python/google/protobuf/compiler/__init__.py b/python/google/protobuf/compiler/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/google/protobuf/compiler/__init__.py
diff --git a/python/google/protobuf/compiler/plugin_pb2.py b/python/google/protobuf/compiler/plugin_pb2.py
new file mode 100644
index 0000000..ff90d18
--- /dev/null
+++ b/python/google/protobuf/compiler/plugin_pb2.py
@@ -0,0 +1,301 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: google/protobuf/compiler/plugin.proto
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='google/protobuf/compiler/plugin.proto',
+  package='google.protobuf.compiler',
+  syntax='proto2',
+  serialized_options=b'\n\034com.google.protobuf.compilerB\014PluginProtosZ)google.golang.org/protobuf/types/pluginpb',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n%google/protobuf/compiler/plugin.proto\x12\x18google.protobuf.compiler\x1a google/protobuf/descriptor.proto\"F\n\x07Version\x12\r\n\x05major\x18\x01 \x01(\x05\x12\r\n\x05minor\x18\x02 \x01(\x05\x12\r\n\x05patch\x18\x03 \x01(\x05\x12\x0e\n\x06suffix\x18\x04 \x01(\t\"\xba\x01\n\x14\x43odeGeneratorRequest\x12\x18\n\x10\x66ile_to_generate\x18\x01 \x03(\t\x12\x11\n\tparameter\x18\x02 \x01(\t\x12\x38\n\nproto_file\x18\x0f \x03(\x0b\x32$.google.protobuf.FileDescriptorProto\x12;\n\x10\x63ompiler_version\x18\x03 \x01(\x0b\x32!.google.protobuf.compiler.Version\"\xc1\x02\n\x15\x43odeGeneratorResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\x12\x1a\n\x12supported_features\x18\x02 \x01(\x04\x12\x42\n\x04\x66ile\x18\x0f \x03(\x0b\x32\x34.google.protobuf.compiler.CodeGeneratorResponse.File\x1a\x7f\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0finsertion_point\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x0f \x01(\t\x12?\n\x13generated_code_info\x18\x10 \x01(\x0b\x32\".google.protobuf.GeneratedCodeInfo\"8\n\x07\x46\x65\x61ture\x12\x10\n\x0c\x46\x45\x41TURE_NONE\x10\x00\x12\x1b\n\x17\x46\x45\x41TURE_PROTO3_OPTIONAL\x10\x01\x42W\n\x1c\x63om.google.protobuf.compilerB\x0cPluginProtosZ)google.golang.org/protobuf/types/pluginpb'
+  ,
+  dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,])
+
+
+
+_CODEGENERATORRESPONSE_FEATURE = _descriptor.EnumDescriptor(
+  name='Feature',
+  full_name='google.protobuf.compiler.CodeGeneratorResponse.Feature',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='FEATURE_NONE', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='FEATURE_PROTO3_OPTIONAL', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=628,
+  serialized_end=684,
+)
+_sym_db.RegisterEnumDescriptor(_CODEGENERATORRESPONSE_FEATURE)
+
+
+_VERSION = _descriptor.Descriptor(
+  name='Version',
+  full_name='google.protobuf.compiler.Version',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='major', full_name='google.protobuf.compiler.Version.major', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='minor', full_name='google.protobuf.compiler.Version.minor', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='patch', full_name='google.protobuf.compiler.Version.patch', index=2,
+      number=3, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='suffix', full_name='google.protobuf.compiler.Version.suffix', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=101,
+  serialized_end=171,
+)
+
+
+_CODEGENERATORREQUEST = _descriptor.Descriptor(
+  name='CodeGeneratorRequest',
+  full_name='google.protobuf.compiler.CodeGeneratorRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='file_to_generate', full_name='google.protobuf.compiler.CodeGeneratorRequest.file_to_generate', index=0,
+      number=1, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='parameter', full_name='google.protobuf.compiler.CodeGeneratorRequest.parameter', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='proto_file', full_name='google.protobuf.compiler.CodeGeneratorRequest.proto_file', index=2,
+      number=15, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='compiler_version', full_name='google.protobuf.compiler.CodeGeneratorRequest.compiler_version', index=3,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=174,
+  serialized_end=360,
+)
+
+
+_CODEGENERATORRESPONSE_FILE = _descriptor.Descriptor(
+  name='File',
+  full_name='google.protobuf.compiler.CodeGeneratorResponse.File',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.compiler.CodeGeneratorResponse.File.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='insertion_point', full_name='google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='content', full_name='google.protobuf.compiler.CodeGeneratorResponse.File.content', index=2,
+      number=15, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='generated_code_info', full_name='google.protobuf.compiler.CodeGeneratorResponse.File.generated_code_info', index=3,
+      number=16, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=499,
+  serialized_end=626,
+)
+
+_CODEGENERATORRESPONSE = _descriptor.Descriptor(
+  name='CodeGeneratorResponse',
+  full_name='google.protobuf.compiler.CodeGeneratorResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='error', full_name='google.protobuf.compiler.CodeGeneratorResponse.error', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='supported_features', full_name='google.protobuf.compiler.CodeGeneratorResponse.supported_features', index=1,
+      number=2, type=4, cpp_type=4, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='file', full_name='google.protobuf.compiler.CodeGeneratorResponse.file', index=2,
+      number=15, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_CODEGENERATORRESPONSE_FILE, ],
+  enum_types=[
+    _CODEGENERATORRESPONSE_FEATURE,
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=363,
+  serialized_end=684,
+)
+
+_CODEGENERATORREQUEST.fields_by_name['proto_file'].message_type = google_dot_protobuf_dot_descriptor__pb2._FILEDESCRIPTORPROTO
+_CODEGENERATORREQUEST.fields_by_name['compiler_version'].message_type = _VERSION
+_CODEGENERATORRESPONSE_FILE.fields_by_name['generated_code_info'].message_type = google_dot_protobuf_dot_descriptor__pb2._GENERATEDCODEINFO
+_CODEGENERATORRESPONSE_FILE.containing_type = _CODEGENERATORRESPONSE
+_CODEGENERATORRESPONSE.fields_by_name['file'].message_type = _CODEGENERATORRESPONSE_FILE
+_CODEGENERATORRESPONSE_FEATURE.containing_type = _CODEGENERATORRESPONSE
+DESCRIPTOR.message_types_by_name['Version'] = _VERSION
+DESCRIPTOR.message_types_by_name['CodeGeneratorRequest'] = _CODEGENERATORREQUEST
+DESCRIPTOR.message_types_by_name['CodeGeneratorResponse'] = _CODEGENERATORRESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Version = _reflection.GeneratedProtocolMessageType('Version', (_message.Message,), {
+  'DESCRIPTOR' : _VERSION,
+  '__module__' : 'google.protobuf.compiler.plugin_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.compiler.Version)
+  })
+_sym_db.RegisterMessage(Version)
+
+CodeGeneratorRequest = _reflection.GeneratedProtocolMessageType('CodeGeneratorRequest', (_message.Message,), {
+  'DESCRIPTOR' : _CODEGENERATORREQUEST,
+  '__module__' : 'google.protobuf.compiler.plugin_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest)
+  })
+_sym_db.RegisterMessage(CodeGeneratorRequest)
+
+CodeGeneratorResponse = _reflection.GeneratedProtocolMessageType('CodeGeneratorResponse', (_message.Message,), {
+
+  'File' : _reflection.GeneratedProtocolMessageType('File', (_message.Message,), {
+    'DESCRIPTOR' : _CODEGENERATORRESPONSE_FILE,
+    '__module__' : 'google.protobuf.compiler.plugin_pb2'
+    # @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse.File)
+    })
+  ,
+  'DESCRIPTOR' : _CODEGENERATORRESPONSE,
+  '__module__' : 'google.protobuf.compiler.plugin_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse)
+  })
+_sym_db.RegisterMessage(CodeGeneratorResponse)
+_sym_db.RegisterMessage(CodeGeneratorResponse.File)
+
+
+DESCRIPTOR._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/python/google/protobuf/descriptor.py b/python/google/protobuf/descriptor.py
new file mode 100644
index 0000000..f5a0caa
--- /dev/null
+++ b/python/google/protobuf/descriptor.py
@@ -0,0 +1,1228 @@
+# Protocol Buffers - Google's data interchange format
+# Copyright 2008 Google Inc.  All rights reserved.
+# https://developers.google.com/protocol-buffers/
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Descriptors essentially contain exactly the information found in a .proto
+file, in types that make this information accessible in Python.
+"""
+
+__author__ = 'robinson@google.com (Will Robinson)'
+
+import threading
+import warnings
+
+from google.protobuf.internal import api_implementation
+
+_USE_C_DESCRIPTORS = False
+if api_implementation.Type() != 'python':
+  # Used by MakeDescriptor in cpp mode
+  import binascii
+  import os
+  # pylint: disable=protected-access
+  _message = api_implementation._c_module
+  # TODO(jieluo): Remove this import after fix api_implementation
+  if _message is None:
+    from google.protobuf.pyext import _message
+  _USE_C_DESCRIPTORS = True
+
+
+class Error(Exception):
+  """Base error for this module."""
+
+
+class TypeTransformationError(Error):
+  """Error transforming between python proto type and corresponding C++ type."""
+
+
+if _USE_C_DESCRIPTORS:
+  # This metaclass allows to override the behavior of code like
+  #     isinstance(my_descriptor, FieldDescriptor)
+  # and make it return True when the descriptor is an instance of the extension
+  # type written in C++.
+  class DescriptorMetaclass(type):
+    def __instancecheck__(cls, obj):
+      if super(DescriptorMetaclass, cls).__instancecheck__(obj):
+        return True
+      if isinstance(obj, cls._C_DESCRIPTOR_CLASS):
+        return True
+      return False
+else:
+  # The standard metaclass; nothing changes.
+  DescriptorMetaclass = type
+
+
+class _Lock(object):
+  """Wrapper class of threading.Lock(), which is allowed by 'with'."""
+
+  def __new__(cls):
+    self = object.__new__(cls)
+    self._lock = threading.Lock()  # pylint: disable=protected-access
+    return self
+
+  def __enter__(self):
+    self._lock.acquire()
+
+  def __exit__(self, exc_type, exc_value, exc_tb):
+    self._lock.release()
+
+
+_lock = threading.Lock()
+
+
+def _Deprecated(name):
+  if _Deprecated.count > 0:
+    _Deprecated.count -= 1
+    warnings.warn(
+        'Call to deprecated create function %s(). Note: Create unlinked '
+        'descriptors is going to go away. Please use get/find descriptors from '
+        'generated code or query the descriptor_pool.'
+        % name,
+        category=DeprecationWarning, stacklevel=3)
+
+
+# Deprecated warnings will print 100 times at most which should be enough for
+# users to notice and do not cause timeout.
+_Deprecated.count = 100
+
+
+_internal_create_key = object()
+
+
+class DescriptorBase(metaclass=DescriptorMetaclass):
+
+  """Descriptors base class.
+
+  This class is the base of all descriptor classes. It provides common options
+  related functionality.
+
+  Attributes:
+    has_options:  True if the descriptor has non-default options.  Usually it
+        is not necessary to read this -- just call GetOptions() which will
+        happily return the default instance.  However, it's sometimes useful
+        for efficiency, and also useful inside the protobuf implementation to
+        avoid some bootstrapping issues.
+  """
+
+  if _USE_C_DESCRIPTORS:
+    # The class, or tuple of classes, that are considered as "virtual
+    # subclasses" of this descriptor class.
+    _C_DESCRIPTOR_CLASS = ()
+
+  def __init__(self, options, serialized_options, options_class_name):
+    """Initialize the descriptor given its options message and the name of the
+    class of the options message. The name of the class is required in case
+    the options message is None and has to be created.
+    """
+    self._options = options
+    self._options_class_name = options_class_name
+    self._serialized_options = serialized_options
+
+    # Does this descriptor have non-default options?
+    self.has_options = (options is not None) or (serialized_options is not None)
+
+  def _SetOptions(self, options, options_class_name):
+    """Sets the descriptor's options
+
+    This function is used in generated proto2 files to update descriptor
+    options. It must not be used outside proto2.
+    """
+    self._options = options
+    self._options_class_name = options_class_name
+
+    # Does this descriptor have non-default options?
+    self.has_options = options is not None
+
+  def GetOptions(self):
+    """Retrieves descriptor options.
+
+    This method returns the options set or creates the default options for the
+    descriptor.
+    """
+    if self._options:
+      return self._options
+
+    from google.protobuf import descriptor_pb2
+    try:
+      options_class = getattr(descriptor_pb2,
+                              self._options_class_name)
+    except AttributeError:
+      raise RuntimeError('Unknown options class name %s!' %
+                         (self._options_class_name))
+
+    with _lock:
+      if self._serialized_options is None:
+        self._options = options_class()
+      else:
+        self._options = _ParseOptions(options_class(),
+                                      self._serialized_options)
+
+      return self._options
+
+
+class _NestedDescriptorBase(DescriptorBase):
+  """Common class for descriptors that can be nested."""
+
+  def __init__(self, options, options_class_name, name, full_name,
+               file, containing_type, serialized_start=None,
+               serialized_end=None, serialized_options=None):
+    """Constructor.
+
+    Args:
+      options: Protocol message options or None
+        to use default message options.
+      options_class_name (str): The class name of the above options.
+      name (str): Name of this protocol message type.
+      full_name (str): Fully-qualified name of this protocol message type,
+        which will include protocol "package" name and the name of any
+        enclosing types.
+      file (FileDescriptor): Reference to file info.
+      containing_type: if provided, this is a nested descriptor, with this
+        descriptor as parent, otherwise None.
+      serialized_start: The start index (inclusive) in block in the
+        file.serialized_pb that describes this descriptor.
+      serialized_end: The end index (exclusive) in block in the
+        file.serialized_pb that describes this descriptor.
+      serialized_options: Protocol message serialized options or None.
+    """
+    super(_NestedDescriptorBase, self).__init__(
+        options, serialized_options, options_class_name)
+
+    self.name = name
+    # TODO(falk): Add function to calculate full_name instead of having it in
+    #             memory?
+    self.full_name = full_name
+    self.file = file
+    self.containing_type = containing_type
+
+    self._serialized_start = serialized_start
+    self._serialized_end = serialized_end
+
+  def CopyToProto(self, proto):
+    """Copies this to the matching proto in descriptor_pb2.
+
+    Args:
+      proto: An empty proto instance from descriptor_pb2.
+
+    Raises:
+      Error: If self couldn't be serialized, due to to few constructor
+        arguments.
+    """
+    if (self.file is not None and
+        self._serialized_start is not None and
+        self._serialized_end is not None):
+      proto.ParseFromString(self.file.serialized_pb[
+          self._serialized_start:self._serialized_end])
+    else:
+      raise Error('Descriptor does not contain serialization.')
+
+
+class Descriptor(_NestedDescriptorBase):
+
+  """Descriptor for a protocol message type.
+
+  Attributes:
+      name (str): Name of this protocol message type.
+      full_name (str): Fully-qualified name of this protocol message type,
+          which will include protocol "package" name and the name of any
+          enclosing types.
+      containing_type (Descriptor): Reference to the descriptor of the type
+          containing us, or None if this is top-level.
+      fields (list[FieldDescriptor]): Field descriptors for all fields in
+          this type.
+      fields_by_number (dict(int, FieldDescriptor)): Same
+          :class:`FieldDescriptor` objects as in :attr:`fields`, but indexed
+          by "number" attribute in each FieldDescriptor.
+      fields_by_name (dict(str, FieldDescriptor)): Same
+          :class:`FieldDescriptor` objects as in :attr:`fields`, but indexed by
+          "name" attribute in each :class:`FieldDescriptor`.
+      nested_types (list[Descriptor]): Descriptor references
+          for all protocol message types nested within this one.
+      nested_types_by_name (dict(str, Descriptor)): Same Descriptor
+          objects as in :attr:`nested_types`, but indexed by "name" attribute
+          in each Descriptor.
+      enum_types (list[EnumDescriptor]): :class:`EnumDescriptor` references
+          for all enums contained within this type.
+      enum_types_by_name (dict(str, EnumDescriptor)): Same
+          :class:`EnumDescriptor` objects as in :attr:`enum_types`, but
+          indexed by "name" attribute in each EnumDescriptor.
+      enum_values_by_name (dict(str, EnumValueDescriptor)): Dict mapping
+          from enum value name to :class:`EnumValueDescriptor` for that value.
+      extensions (list[FieldDescriptor]): All extensions defined directly
+          within this message type (NOT within a nested type).
+      extensions_by_name (dict(str, FieldDescriptor)): Same FieldDescriptor
+          objects as :attr:`extensions`, but indexed by "name" attribute of each
+          FieldDescriptor.
+      is_extendable (bool):  Does this type define any extension ranges?
+      oneofs (list[OneofDescriptor]): The list of descriptors for oneof fields
+          in this message.
+      oneofs_by_name (dict(str, OneofDescriptor)): Same objects as in
+          :attr:`oneofs`, but indexed by "name" attribute.
+      file (FileDescriptor): Reference to file descriptor.
+
+  """
+
+  if _USE_C_DESCRIPTORS:
+    _C_DESCRIPTOR_CLASS = _message.Descriptor
+
+    def __new__(
+        cls,
+        name=None,
+        full_name=None,
+        filename=None,
+        containing_type=None,
+        fields=None,
+        nested_types=None,
+        enum_types=None,
+        extensions=None,
+        options=None,
+        serialized_options=None,
+        is_extendable=True,
+        extension_ranges=None,
+        oneofs=None,
+        file=None,  # pylint: disable=redefined-builtin
+        serialized_start=None,
+        serialized_end=None,
+        syntax=None,
+        create_key=None):
+      _message.Message._CheckCalledFromGeneratedFile()
+      return _message.default_pool.FindMessageTypeByName(full_name)
+
+  # NOTE(tmarek): The file argument redefining a builtin is nothing we can
+  # fix right now since we don't know how many clients already rely on the
+  # name of the argument.
+  def __init__(self, name, full_name, filename, containing_type, fields,
+               nested_types, enum_types, extensions, options=None,
+               serialized_options=None,
+               is_extendable=True, extension_ranges=None, oneofs=None,
+               file=None, serialized_start=None, serialized_end=None,  # pylint: disable=redefined-builtin
+               syntax=None, create_key=None):
+    """Arguments to __init__() are as described in the description
+    of Descriptor fields above.
+
+    Note that filename is an obsolete argument, that is not used anymore.
+    Please use file.name to access this as an attribute.
+    """
+    if create_key is not _internal_create_key:
+      _Deprecated('Descriptor')
+
+    super(Descriptor, self).__init__(
+        options, 'MessageOptions', name, full_name, file,
+        containing_type, serialized_start=serialized_start,
+        serialized_end=serialized_end, serialized_options=serialized_options)
+
+    # We have fields in addition to fields_by_name and fields_by_number,
+    # so that:
+    #   1. Clients can index fields by "order in which they're listed."
+    #   2. Clients can easily iterate over all fields with the terse
+    #      syntax: for f in descriptor.fields: ...
+    self.fields = fields
+    for field in self.fields:
+      field.containing_type = self
+    self.fields_by_number = dict((f.number, f) for f in fields)
+    self.fields_by_name = dict((f.name, f) for f in fields)
+    self._fields_by_camelcase_name = None
+
+    self.nested_types = nested_types
+    for nested_type in nested_types:
+      nested_type.containing_type = self
+    self.nested_types_by_name = dict((t.name, t) for t in nested_types)
+
+    self.enum_types = enum_types
+    for enum_type in self.enum_types:
+      enum_type.containing_type = self
+    self.enum_types_by_name = dict((t.name, t) for t in enum_types)
+    self.enum_values_by_name = dict(
+        (v.name, v) for t in enum_types for v in t.values)
+
+    self.extensions = extensions
+    for extension in self.extensions:
+      extension.extension_scope = self
+    self.extensions_by_name = dict((f.name, f) for f in extensions)
+    self.is_extendable = is_extendable
+    self.extension_ranges = extension_ranges
+    self.oneofs = oneofs if oneofs is not None else []
+    self.oneofs_by_name = dict((o.name, o) for o in self.oneofs)
+    for oneof in self.oneofs:
+      oneof.containing_type = self
+    self.syntax = syntax or "proto2"
+
+  @property
+  def fields_by_camelcase_name(self):
+    """Same FieldDescriptor objects as in :attr:`fields`, but indexed by
+    :attr:`FieldDescriptor.camelcase_name`.
+    """
+    if self._fields_by_camelcase_name is None:
+      self._fields_by_camelcase_name = dict(
+          (f.camelcase_name, f) for f in self.fields)
+    return self._fields_by_camelcase_name
+
+  def EnumValueName(self, enum, value):
+    """Returns the string name of an enum value.
+
+    This is just a small helper method to simplify a common operation.
+
+    Args:
+      enum: string name of the Enum.
+      value: int, value of the enum.
+
+    Returns:
+      string name of the enum value.
+
+    Raises:
+      KeyError if either the Enum doesn't exist or the value is not a valid
+        value for the enum.
+    """
+    return self.enum_types_by_name[enum].values_by_number[value].name
+
+  def CopyToProto(self, proto):
+    """Copies this to a descriptor_pb2.DescriptorProto.
+
+    Args:
+      proto: An empty descriptor_pb2.DescriptorProto.
+    """
+    # This function is overridden to give a better doc comment.
+    super(Descriptor, self).CopyToProto(proto)
+
+
+# TODO(robinson): We should have aggressive checking here,
+# for example:
+#   * If you specify a repeated field, you should not be allowed
+#     to specify a default value.
+#   * [Other examples here as needed].
+#
+# TODO(robinson): for this and other *Descriptor classes, we
+# might also want to lock things down aggressively (e.g.,
+# prevent clients from setting the attributes).  Having
+# stronger invariants here in general will reduce the number
+# of runtime checks we must do in reflection.py...
+class FieldDescriptor(DescriptorBase):
+
+  """Descriptor for a single field in a .proto file.
+
+  Attributes:
+    name (str): Name of this field, exactly as it appears in .proto.
+    full_name (str): Name of this field, including containing scope.  This is
+      particularly relevant for extensions.
+    index (int): Dense, 0-indexed index giving the order that this
+      field textually appears within its message in the .proto file.
+    number (int): Tag number declared for this field in the .proto file.
+
+    type (int): (One of the TYPE_* constants below) Declared type.
+    cpp_type (int): (One of the CPPTYPE_* constants below) C++ type used to
+      represent this field.
+
+    label (int): (One of the LABEL_* constants below) Tells whether this
+      field is optional, required, or repeated.
+    has_default_value (bool): True if this field has a default value defined,
+      otherwise false.
+    default_value (Varies): Default value of this field.  Only
+      meaningful for non-repeated scalar fields.  Repeated fields
+      should always set this to [], and non-repeated composite
+      fields should always set this to None.
+
+    containing_type (Descriptor): Descriptor of the protocol message
+      type that contains this field.  Set by the Descriptor constructor
+      if we're passed into one.
+      Somewhat confusingly, for extension fields, this is the
+      descriptor of the EXTENDED message, not the descriptor
+      of the message containing this field.  (See is_extension and
+      extension_scope below).
+    message_type (Descriptor): If a composite field, a descriptor
+      of the message type contained in this field.  Otherwise, this is None.
+    enum_type (EnumDescriptor): If this field contains an enum, a
+      descriptor of that enum.  Otherwise, this is None.
+
+    is_extension: True iff this describes an extension field.
+    extension_scope (Descriptor): Only meaningful if is_extension is True.
+      Gives the message that immediately contains this extension field.
+      Will be None iff we're a top-level (file-level) extension field.
+
+    options (descriptor_pb2.FieldOptions): Protocol message field options or
+      None to use default field options.
+
+    containing_oneof (OneofDescriptor): If the field is a member of a oneof
+      union, contains its descriptor. Otherwise, None.
+
+    file (FileDescriptor): Reference to file descriptor.
+  """
+
+  # Must be consistent with C++ FieldDescriptor::Type enum in
+  # descriptor.h.
+  #
+  # TODO(robinson): Find a way to eliminate this repetition.
+  TYPE_DOUBLE         = 1
+  TYPE_FLOAT          = 2
+  TYPE_INT64          = 3
+  TYPE_UINT64         = 4
+  TYPE_INT32          = 5
+  TYPE_FIXED64        = 6
+  TYPE_FIXED32        = 7
+  TYPE_BOOL           = 8
+  TYPE_STRING         = 9
+  TYPE_GROUP          = 10
+  TYPE_MESSAGE        = 11
+  TYPE_BYTES          = 12
+  TYPE_UINT32         = 13
+  TYPE_ENUM           = 14
+  TYPE_SFIXED32       = 15
+  TYPE_SFIXED64       = 16
+  TYPE_SINT32         = 17
+  TYPE_SINT64         = 18
+  MAX_TYPE            = 18
+
+  # Must be consistent with C++ FieldDescriptor::CppType enum in
+  # descriptor.h.
+  #
+  # TODO(robinson): Find a way to eliminate this repetition.
+  CPPTYPE_INT32       = 1
+  CPPTYPE_INT64       = 2
+  CPPTYPE_UINT32      = 3
+  CPPTYPE_UINT64      = 4
+  CPPTYPE_DOUBLE      = 5
+  CPPTYPE_FLOAT       = 6
+  CPPTYPE_BOOL        = 7
+  CPPTYPE_ENUM        = 8
+  CPPTYPE_STRING      = 9
+  CPPTYPE_MESSAGE     = 10
+  MAX_CPPTYPE         = 10
+
+  _PYTHON_TO_CPP_PROTO_TYPE_MAP = {
+      TYPE_DOUBLE: CPPTYPE_DOUBLE,
+      TYPE_FLOAT: CPPTYPE_FLOAT,
+      TYPE_ENUM: CPPTYPE_ENUM,
+      TYPE_INT64: CPPTYPE_INT64,
+      TYPE_SINT64: CPPTYPE_INT64,
+      TYPE_SFIXED64: CPPTYPE_INT64,
+      TYPE_UINT64: CPPTYPE_UINT64,
+      TYPE_FIXED64: CPPTYPE_UINT64,
+      TYPE_INT32: CPPTYPE_INT32,
+      TYPE_SFIXED32: CPPTYPE_INT32,
+      TYPE_SINT32: CPPTYPE_INT32,
+      TYPE_UINT32: CPPTYPE_UINT32,
+      TYPE_FIXED32: CPPTYPE_UINT32,
+      TYPE_BYTES: CPPTYPE_STRING,
+      TYPE_STRING: CPPTYPE_STRING,
+      TYPE_BOOL: CPPTYPE_BOOL,
+      TYPE_MESSAGE: CPPTYPE_MESSAGE,
+      TYPE_GROUP: CPPTYPE_MESSAGE
+      }
+
+  # Must be consistent with C++ FieldDescriptor::Label enum in
+  # descriptor.h.
+  #
+  # TODO(robinson): Find a way to eliminate this repetition.
+  LABEL_OPTIONAL      = 1
+  LABEL_REQUIRED      = 2
+  LABEL_REPEATED      = 3
+  MAX_LABEL           = 3
+
+  # Must be consistent with C++ constants kMaxNumber, kFirstReservedNumber,
+  # and kLastReservedNumber in descriptor.h
+  MAX_FIELD_NUMBER = (1 << 29) - 1
+  FIRST_RESERVED_FIELD_NUMBER = 19000
+  LAST_RESERVED_FIELD_NUMBER = 19999
+
+  if _USE_C_DESCRIPTORS:
+    _C_DESCRIPTOR_CLASS = _message.FieldDescriptor
+
+    def __new__(cls, name, full_name, index, number, type, cpp_type, label,
+                default_value, message_type, enum_type, containing_type,
+                is_extension, extension_scope, options=None,
+                serialized_options=None,
+                has_default_value=True, containing_oneof=None, json_name=None,
+                file=None, create_key=None):  # pylint: disable=redefined-builtin
+      _message.Message._CheckCalledFromGeneratedFile()
+      if is_extension:
+        return _message.default_pool.FindExtensionByName(full_name)
+      else:
+        return _message.default_pool.FindFieldByName(full_name)
+
+  def __init__(self, name, full_name, index, number, type, cpp_type, label,
+               default_value, message_type, enum_type, containing_type,
+               is_extension, extension_scope, options=None,
+               serialized_options=None,
+               has_default_value=True, containing_oneof=None, json_name=None,
+               file=None, create_key=None):  # pylint: disable=redefined-builtin
+    """The arguments are as described in the description of FieldDescriptor
+    attributes above.
+
+    Note that containing_type may be None, and may be set later if necessary
+    (to deal with circular references between message types, for example).
+    Likewise for extension_scope.
+    """
+    if create_key is not _internal_create_key:
+      _Deprecated('FieldDescriptor')
+
+    super(FieldDescriptor, self).__init__(
+        options, serialized_options, 'FieldOptions')
+    self.name = name
+    self.full_name = full_name
+    self.file = file
+    self._camelcase_name = None
+    if json_name is None:
+      self.json_name = _ToJsonName(name)
+    else:
+      self.json_name = json_name
+    self.index = index
+    self.number = number
+    self.type = type
+    self.cpp_type = cpp_type
+    self.label = label
+    self.has_default_value = has_default_value
+    self.default_value = default_value
+    self.containing_type = containing_type
+    self.message_type = message_type
+    self.enum_type = enum_type
+    self.is_extension = is_extension
+    self.extension_scope = extension_scope
+    self.containing_oneof = containing_oneof
+    if api_implementation.Type() == 'python':
+      self._cdescriptor = None
+    else:
+      if is_extension:
+        self._cdescriptor = _message.default_pool.FindExtensionByName(full_name)
+      else:
+        self._cdescriptor = _message.default_pool.FindFieldByName(full_name)
+
+  @property
+  def camelcase_name(self):
+    """Camelcase name of this field.
+
+    Returns:
+      str: the name in CamelCase.
+    """
+    if self._camelcase_name is None:
+      self._camelcase_name = _ToCamelCase(self.name)
+    return self._camelcase_name
+
+  @property
+  def has_presence(self):
+    """Whether the field distinguishes between unpopulated and default values.
+
+    Raises:
+      RuntimeError: singular field that is not linked with message nor file.
+    """
+    if self.label == FieldDescriptor.LABEL_REPEATED:
+      return False
+    if (self.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE or
+        self.containing_oneof):
+      return True
+    if hasattr(self.file, 'syntax'):
+      return self.file.syntax == 'proto2'
+    if hasattr(self.message_type, 'syntax'):
+      return self.message_type.syntax == 'proto2'
+    raise RuntimeError(
+        'has_presence is not ready to use because field %s is not'
+        ' linked with message type nor file' % self.full_name)
+
+  @staticmethod
+  def ProtoTypeToCppProtoType(proto_type):
+    """Converts from a Python proto type to a C++ Proto Type.
+
+    The Python ProtocolBuffer classes specify both the 'Python' datatype and the
+    'C++' datatype - and they're not the same. This helper method should
+    translate from one to another.
+
+    Args:
+      proto_type: the Python proto type (descriptor.FieldDescriptor.TYPE_*)
+    Returns:
+      int: descriptor.FieldDescriptor.CPPTYPE_*, the C++ type.
+    Raises:
+      TypeTransformationError: when the Python proto type isn't known.
+    """
+    try:
+      return FieldDescriptor._PYTHON_TO_CPP_PROTO_TYPE_MAP[proto_type]
+    except KeyError:
+      raise TypeTransformationError('Unknown proto_type: %s' % proto_type)
+
+
+class EnumDescriptor(_NestedDescriptorBase):
+
+  """Descriptor for an enum defined in a .proto file.
+
+  Attributes:
+    name (str): Name of the enum type.
+    full_name (str): Full name of the type, including package name
+      and any enclosing type(s).
+
+    values (list[EnumValueDescriptor]): List of the values
+      in this enum.
+    values_by_name (dict(str, EnumValueDescriptor)): Same as :attr:`values`,
+      but indexed by the "name" field of each EnumValueDescriptor.
+    values_by_number (dict(int, EnumValueDescriptor)): Same as :attr:`values`,
+      but indexed by the "number" field of each EnumValueDescriptor.
+    containing_type (Descriptor): Descriptor of the immediate containing
+      type of this enum, or None if this is an enum defined at the
+      top level in a .proto file.  Set by Descriptor's constructor
+      if we're passed into one.
+    file (FileDescriptor): Reference to file descriptor.
+    options (descriptor_pb2.EnumOptions): Enum options message or
+      None to use default enum options.
+  """
+
+  if _USE_C_DESCRIPTORS:
+    _C_DESCRIPTOR_CLASS = _message.EnumDescriptor
+
+    def __new__(cls, name, full_name, filename, values,
+                containing_type=None, options=None,
+                serialized_options=None, file=None,  # pylint: disable=redefined-builtin
+                serialized_start=None, serialized_end=None, create_key=None):
+      _message.Message._CheckCalledFromGeneratedFile()
+      return _message.default_pool.FindEnumTypeByName(full_name)
+
+  def __init__(self, name, full_name, filename, values,
+               containing_type=None, options=None,
+               serialized_options=None, file=None,  # pylint: disable=redefined-builtin
+               serialized_start=None, serialized_end=None, create_key=None):
+    """Arguments are as described in the attribute description above.
+
+    Note that filename is an obsolete argument, that is not used anymore.
+    Please use file.name to access this as an attribute.
+    """
+    if create_key is not _internal_create_key:
+      _Deprecated('EnumDescriptor')
+
+    super(EnumDescriptor, self).__init__(
+        options, 'EnumOptions', name, full_name, file,
+        containing_type, serialized_start=serialized_start,
+        serialized_end=serialized_end, serialized_options=serialized_options)
+
+    self.values = values
+    for value in self.values:
+      value.type = self
+    self.values_by_name = dict((v.name, v) for v in values)
+    # Values are reversed to ensure that the first alias is retained.
+    self.values_by_number = dict((v.number, v) for v in reversed(values))
+
+  def CopyToProto(self, proto):
+    """Copies this to a descriptor_pb2.EnumDescriptorProto.
+
+    Args:
+      proto (descriptor_pb2.EnumDescriptorProto): An empty descriptor proto.
+    """
+    # This function is overridden to give a better doc comment.
+    super(EnumDescriptor, self).CopyToProto(proto)
+
+
+class EnumValueDescriptor(DescriptorBase):
+
+  """Descriptor for a single value within an enum.
+
+  Attributes:
+    name (str): Name of this value.
+    index (int): Dense, 0-indexed index giving the order that this
+      value appears textually within its enum in the .proto file.
+    number (int): Actual number assigned to this enum value.
+    type (EnumDescriptor): :class:`EnumDescriptor` to which this value
+      belongs.  Set by :class:`EnumDescriptor`'s constructor if we're
+      passed into one.
+    options (descriptor_pb2.EnumValueOptions): Enum value options message or
+      None to use default enum value options options.
+  """
+
+  if _USE_C_DESCRIPTORS:
+    _C_DESCRIPTOR_CLASS = _message.EnumValueDescriptor
+
+    def __new__(cls, name, index, number,
+                type=None,  # pylint: disable=redefined-builtin
+                options=None, serialized_options=None, create_key=None):
+      _message.Message._CheckCalledFromGeneratedFile()
+      # There is no way we can build a complete EnumValueDescriptor with the
+      # given parameters (the name of the Enum is not known, for example).
+      # Fortunately generated files just pass it to the EnumDescriptor()
+      # constructor, which will ignore it, so returning None is good enough.
+      return None
+
+  def __init__(self, name, index, number,
+               type=None,  # pylint: disable=redefined-builtin
+               options=None, serialized_options=None, create_key=None):
+    """Arguments are as described in the attribute description above."""
+    if create_key is not _internal_create_key:
+      _Deprecated('EnumValueDescriptor')
+
+    super(EnumValueDescriptor, self).__init__(
+        options, serialized_options, 'EnumValueOptions')
+    self.name = name
+    self.index = index
+    self.number = number
+    self.type = type
+
+
+class OneofDescriptor(DescriptorBase):
+  """Descriptor for a oneof field.
+
+  Attributes:
+    name (str): Name of the oneof field.
+    full_name (str): Full name of the oneof field, including package name.
+    index (int): 0-based index giving the order of the oneof field inside
+      its containing type.
+    containing_type (Descriptor): :class:`Descriptor` of the protocol message
+      type that contains this field.  Set by the :class:`Descriptor` constructor
+      if we're passed into one.
+    fields (list[FieldDescriptor]): The list of field descriptors this
+      oneof can contain.
+  """
+
+  if _USE_C_DESCRIPTORS:
+    _C_DESCRIPTOR_CLASS = _message.OneofDescriptor
+
+    def __new__(
+        cls, name, full_name, index, containing_type, fields, options=None,
+        serialized_options=None, create_key=None):
+      _message.Message._CheckCalledFromGeneratedFile()
+      return _message.default_pool.FindOneofByName(full_name)
+
+  def __init__(
+      self, name, full_name, index, containing_type, fields, options=None,
+      serialized_options=None, create_key=None):
+    """Arguments are as described in the attribute description above."""
+    if create_key is not _internal_create_key:
+      _Deprecated('OneofDescriptor')
+
+    super(OneofDescriptor, self).__init__(
+        options, serialized_options, 'OneofOptions')
+    self.name = name
+    self.full_name = full_name
+    self.index = index
+    self.containing_type = containing_type
+    self.fields = fields
+
+
+class ServiceDescriptor(_NestedDescriptorBase):
+
+  """Descriptor for a service.
+
+  Attributes:
+    name (str): Name of the service.
+    full_name (str): Full name of the service, including package name.
+    index (int): 0-indexed index giving the order that this services
+      definition appears within the .proto file.
+    methods (list[MethodDescriptor]): List of methods provided by this
+      service.
+    methods_by_name (dict(str, MethodDescriptor)): Same
+      :class:`MethodDescriptor` objects as in :attr:`methods_by_name`, but
+      indexed by "name" attribute in each :class:`MethodDescriptor`.
+    options (descriptor_pb2.ServiceOptions): Service options message or
+      None to use default service options.
+    file (FileDescriptor): Reference to file info.
+  """
+
+  if _USE_C_DESCRIPTORS:
+    _C_DESCRIPTOR_CLASS = _message.ServiceDescriptor
+
+    def __new__(
+        cls,
+        name=None,
+        full_name=None,
+        index=None,
+        methods=None,
+        options=None,
+        serialized_options=None,
+        file=None,  # pylint: disable=redefined-builtin
+        serialized_start=None,
+        serialized_end=None,
+        create_key=None):
+      _message.Message._CheckCalledFromGeneratedFile()  # pylint: disable=protected-access
+      return _message.default_pool.FindServiceByName(full_name)
+
+  def __init__(self, name, full_name, index, methods, options=None,
+               serialized_options=None, file=None,  # pylint: disable=redefined-builtin
+               serialized_start=None, serialized_end=None, create_key=None):
+    if create_key is not _internal_create_key:
+      _Deprecated('ServiceDescriptor')
+
+    super(ServiceDescriptor, self).__init__(
+        options, 'ServiceOptions', name, full_name, file,
+        None, serialized_start=serialized_start,
+        serialized_end=serialized_end, serialized_options=serialized_options)
+    self.index = index
+    self.methods = methods
+    self.methods_by_name = dict((m.name, m) for m in methods)
+    # Set the containing service for each method in this service.
+    for method in self.methods:
+      method.containing_service = self
+
+  def FindMethodByName(self, name):
+    """Searches for the specified method, and returns its descriptor.
+
+    Args:
+      name (str): Name of the method.
+    Returns:
+      MethodDescriptor or None: the descriptor for the requested method, if
+      found.
+    """
+    return self.methods_by_name.get(name, None)
+
+  def CopyToProto(self, proto):
+    """Copies this to a descriptor_pb2.ServiceDescriptorProto.
+
+    Args:
+      proto (descriptor_pb2.ServiceDescriptorProto): An empty descriptor proto.
+    """
+    # This function is overridden to give a better doc comment.
+    super(ServiceDescriptor, self).CopyToProto(proto)
+
+
+class MethodDescriptor(DescriptorBase):
+
+  """Descriptor for a method in a service.
+
+  Attributes:
+    name (str): Name of the method within the service.
+    full_name (str): Full name of method.
+    index (int): 0-indexed index of the method inside the service.
+    containing_service (ServiceDescriptor): The service that contains this
+      method.
+    input_type (Descriptor): The descriptor of the message that this method
+      accepts.
+    output_type (Descriptor): The descriptor of the message that this method
+      returns.
+    client_streaming (bool): Whether this method uses client streaming.
+    server_streaming (bool): Whether this method uses server streaming.
+    options (descriptor_pb2.MethodOptions or None): Method options message, or
+      None to use default method options.
+  """
+
+  if _USE_C_DESCRIPTORS:
+    _C_DESCRIPTOR_CLASS = _message.MethodDescriptor
+
+    def __new__(cls,
+                name,
+                full_name,
+                index,
+                containing_service,
+                input_type,
+                output_type,
+                client_streaming=False,
+                server_streaming=False,
+                options=None,
+                serialized_options=None,
+                create_key=None):
+      _message.Message._CheckCalledFromGeneratedFile()  # pylint: disable=protected-access
+      return _message.default_pool.FindMethodByName(full_name)
+
+  def __init__(self,
+               name,
+               full_name,
+               index,
+               containing_service,
+               input_type,
+               output_type,
+               client_streaming=False,
+               server_streaming=False,
+               options=None,
+               serialized_options=None,
+               create_key=None):
+    """The arguments are as described in the description of MethodDescriptor
+    attributes above.
+
+    Note that containing_service may be None, and may be set later if necessary.
+    """
+    if create_key is not _internal_create_key:
+      _Deprecated('MethodDescriptor')
+
+    super(MethodDescriptor, self).__init__(
+        options, serialized_options, 'MethodOptions')
+    self.name = name
+    self.full_name = full_name
+    self.index = index
+    self.containing_service = containing_service
+    self.input_type = input_type
+    self.output_type = output_type
+    self.client_streaming = client_streaming
+    self.server_streaming = server_streaming
+
+  def CopyToProto(self, proto):
+    """Copies this to a descriptor_pb2.MethodDescriptorProto.
+
+    Args:
+      proto (descriptor_pb2.MethodDescriptorProto): An empty descriptor proto.
+
+    Raises:
+      Error: If self couldn't be serialized, due to too few constructor
+        arguments.
+    """
+    if self.containing_service is not None:
+      from google.protobuf import descriptor_pb2
+      service_proto = descriptor_pb2.ServiceDescriptorProto()
+      self.containing_service.CopyToProto(service_proto)
+      proto.CopyFrom(service_proto.method[self.index])
+    else:
+      raise Error('Descriptor does not contain a service.')
+
+
+class FileDescriptor(DescriptorBase):
+  """Descriptor for a file. Mimics the descriptor_pb2.FileDescriptorProto.
+
+  Note that :attr:`enum_types_by_name`, :attr:`extensions_by_name`, and
+  :attr:`dependencies` fields are only set by the
+  :py:mod:`google.protobuf.message_factory` module, and not by the generated
+  proto code.
+
+  Attributes:
+    name (str): Name of file, relative to root of source tree.
+    package (str): Name of the package
+    syntax (str): string indicating syntax of the file (can be "proto2" or
+      "proto3")
+    serialized_pb (bytes): Byte string of serialized
+      :class:`descriptor_pb2.FileDescriptorProto`.
+    dependencies (list[FileDescriptor]): List of other :class:`FileDescriptor`
+      objects this :class:`FileDescriptor` depends on.
+    public_dependencies (list[FileDescriptor]): A subset of
+      :attr:`dependencies`, which were declared as "public".
+    message_types_by_name (dict(str, Descriptor)): Mapping from message names
+      to their :class:`Descriptor`.
+    enum_types_by_name (dict(str, EnumDescriptor)): Mapping from enum names to
+      their :class:`EnumDescriptor`.
+    extensions_by_name (dict(str, FieldDescriptor)): Mapping from extension
+      names declared at file scope to their :class:`FieldDescriptor`.
+    services_by_name (dict(str, ServiceDescriptor)): Mapping from services'
+      names to their :class:`ServiceDescriptor`.
+    pool (DescriptorPool): The pool this descriptor belongs to.  When not
+      passed to the constructor, the global default pool is used.
+  """
+
+  if _USE_C_DESCRIPTORS:
+    _C_DESCRIPTOR_CLASS = _message.FileDescriptor
+
+    def __new__(cls, name, package, options=None,
+                serialized_options=None, serialized_pb=None,
+                dependencies=None, public_dependencies=None,
+                syntax=None, pool=None, create_key=None):
+      # FileDescriptor() is called from various places, not only from generated
+      # files, to register dynamic proto files and messages.
+      # pylint: disable=g-explicit-bool-comparison
+      if serialized_pb == b'':
+        # Cpp generated code must be linked in if serialized_pb is ''
+        try:
+          return _message.default_pool.FindFileByName(name)
+        except KeyError:
+          raise RuntimeError('Please link in cpp generated lib for %s' % (name))
+      elif serialized_pb:
+        return _message.default_pool.AddSerializedFile(serialized_pb)
+      else:
+        return super(FileDescriptor, cls).__new__(cls)
+
+  def __init__(self, name, package, options=None,
+               serialized_options=None, serialized_pb=None,
+               dependencies=None, public_dependencies=None,
+               syntax=None, pool=None, create_key=None):
+    """Constructor."""
+    if create_key is not _internal_create_key:
+      _Deprecated('FileDescriptor')
+
+    super(FileDescriptor, self).__init__(
+        options, serialized_options, 'FileOptions')
+
+    if pool is None:
+      from google.protobuf import descriptor_pool
+      pool = descriptor_pool.Default()
+    self.pool = pool
+    self.message_types_by_name = {}
+    self.name = name
+    self.package = package
+    self.syntax = syntax or "proto2"
+    self.serialized_pb = serialized_pb
+
+    self.enum_types_by_name = {}
+    self.extensions_by_name = {}
+    self.services_by_name = {}
+    self.dependencies = (dependencies or [])
+    self.public_dependencies = (public_dependencies or [])
+
+  def CopyToProto(self, proto):
+    """Copies this to a descriptor_pb2.FileDescriptorProto.
+
+    Args:
+      proto: An empty descriptor_pb2.FileDescriptorProto.
+    """
+    proto.ParseFromString(self.serialized_pb)
+
+
+def _ParseOptions(message, string):
+  """Parses serialized options.
+
+  This helper function is used to parse serialized options in generated
+  proto2 files. It must not be used outside proto2.
+  """
+  message.ParseFromString(string)
+  return message
+
+
+def _ToCamelCase(name):
+  """Converts name to camel-case and returns it."""
+  capitalize_next = False
+  result = []
+
+  for c in name:
+    if c == '_':
+      if result:
+        capitalize_next = True
+    elif capitalize_next:
+      result.append(c.upper())
+      capitalize_next = False
+    else:
+      result += c
+
+  # Lower-case the first letter.
+  if result and result[0].isupper():
+    result[0] = result[0].lower()
+  return ''.join(result)
+
+
+def _OptionsOrNone(descriptor_proto):
+  """Returns the value of the field `options`, or None if it is not set."""
+  if descriptor_proto.HasField('options'):
+    return descriptor_proto.options
+  else:
+    return None
+
+
+def _ToJsonName(name):
+  """Converts name to Json name and returns it."""
+  capitalize_next = False
+  result = []
+
+  for c in name:
+    if c == '_':
+      capitalize_next = True
+    elif capitalize_next:
+      result.append(c.upper())
+      capitalize_next = False
+    else:
+      result += c
+
+  return ''.join(result)
+
+
+def MakeDescriptor(desc_proto, package='', build_file_if_cpp=True,
+                   syntax=None):
+  """Make a protobuf Descriptor given a DescriptorProto protobuf.
+
+  Handles nested descriptors. Note that this is limited to the scope of defining
+  a message inside of another message. Composite fields can currently only be
+  resolved if the message is defined in the same scope as the field.
+
+  Args:
+    desc_proto: The descriptor_pb2.DescriptorProto protobuf message.
+    package: Optional package name for the new message Descriptor (string).
+    build_file_if_cpp: Update the C++ descriptor pool if api matches.
+                       Set to False on recursion, so no duplicates are created.
+    syntax: The syntax/semantics that should be used.  Set to "proto3" to get
+            proto3 field presence semantics.
+  Returns:
+    A Descriptor for protobuf messages.
+  """
+  if api_implementation.Type() != 'python' and build_file_if_cpp:
+    # The C++ implementation requires all descriptors to be backed by the same
+    # definition in the C++ descriptor pool. To do this, we build a
+    # FileDescriptorProto with the same definition as this descriptor and build
+    # it into the pool.
+    from google.protobuf import descriptor_pb2
+    file_descriptor_proto = descriptor_pb2.FileDescriptorProto()
+    file_descriptor_proto.message_type.add().MergeFrom(desc_proto)
+
+    # Generate a random name for this proto file to prevent conflicts with any
+    # imported ones. We need to specify a file name so the descriptor pool
+    # accepts our FileDescriptorProto, but it is not important what that file
+    # name is actually set to.
+    proto_name = binascii.hexlify(os.urandom(16)).decode('ascii')
+
+    if package:
+      file_descriptor_proto.name = os.path.join(package.replace('.', '/'),
+                                                proto_name + '.proto')
+      file_descriptor_proto.package = package
+    else:
+      file_descriptor_proto.name = proto_name + '.proto'
+
+    _message.default_pool.Add(file_descriptor_proto)
+    result = _message.default_pool.FindFileByName(file_descriptor_proto.name)
+
+    if _USE_C_DESCRIPTORS:
+      return result.message_types_by_name[desc_proto.name]
+
+  full_message_name = [desc_proto.name]
+  if package: full_message_name.insert(0, package)
+
+  # Create Descriptors for enum types
+  enum_types = {}
+  for enum_proto in desc_proto.enum_type:
+    full_name = '.'.join(full_message_name + [enum_proto.name])
+    enum_desc = EnumDescriptor(
+        enum_proto.name, full_name, None, [
+            EnumValueDescriptor(enum_val.name, ii, enum_val.number,
+                                create_key=_internal_create_key)
+            for ii, enum_val in enumerate(enum_proto.value)],
+        create_key=_internal_create_key)
+    enum_types[full_name] = enum_desc
+
+  # Create Descriptors for nested types
+  nested_types = {}
+  for nested_proto in desc_proto.nested_type:
+    full_name = '.'.join(full_message_name + [nested_proto.name])
+    # Nested types are just those defined inside of the message, not all types
+    # used by fields in the message, so no loops are possible here.
+    nested_desc = MakeDescriptor(nested_proto,
+                                 package='.'.join(full_message_name),
+                                 build_file_if_cpp=False,
+                                 syntax=syntax)
+    nested_types[full_name] = nested_desc
+
+  fields = []
+  for field_proto in desc_proto.field:
+    full_name = '.'.join(full_message_name + [field_proto.name])
+    enum_desc = None
+    nested_desc = None
+    if field_proto.json_name:
+      json_name = field_proto.json_name
+    else:
+      json_name = None
+    if field_proto.HasField('type_name'):
+      type_name = field_proto.type_name
+      full_type_name = '.'.join(full_message_name +
+                                [type_name[type_name.rfind('.')+1:]])
+      if full_type_name in nested_types:
+        nested_desc = nested_types[full_type_name]
+      elif full_type_name in enum_types:
+        enum_desc = enum_types[full_type_name]
+      # Else type_name references a non-local type, which isn't implemented
+    field = FieldDescriptor(
+        field_proto.name, full_name, field_proto.number - 1,
+        field_proto.number, field_proto.type,
+        FieldDescriptor.ProtoTypeToCppProtoType(field_proto.type),
+        field_proto.label, None, nested_desc, enum_desc, None, False, None,
+        options=_OptionsOrNone(field_proto), has_default_value=False,
+        json_name=json_name, create_key=_internal_create_key)
+    fields.append(field)
+
+  desc_name = '.'.join(full_message_name)
+  return Descriptor(desc_proto.name, desc_name, None, None, fields,
+                    list(nested_types.values()), list(enum_types.values()), [],
+                    options=_OptionsOrNone(desc_proto),
+                    create_key=_internal_create_key)
diff --git a/python/google/protobuf/descriptor_database.py b/python/google/protobuf/descriptor_database.py
new file mode 100644
index 0000000..073eddc
--- /dev/null
+++ b/python/google/protobuf/descriptor_database.py
@@ -0,0 +1,177 @@
+# Protocol Buffers - Google's data interchange format
+# Copyright 2008 Google Inc.  All rights reserved.
+# https://developers.google.com/protocol-buffers/
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Provides a container for DescriptorProtos."""
+
+__author__ = 'matthewtoia@google.com (Matt Toia)'
+
+import warnings
+
+
+class Error(Exception):
+  pass
+
+
+class DescriptorDatabaseConflictingDefinitionError(Error):
+  """Raised when a proto is added with the same name & different descriptor."""
+
+
+class DescriptorDatabase(object):
+  """A container accepting FileDescriptorProtos and maps DescriptorProtos."""
+
+  def __init__(self):
+    self._file_desc_protos_by_file = {}
+    self._file_desc_protos_by_symbol = {}
+
+  def Add(self, file_desc_proto):
+    """Adds the FileDescriptorProto and its types to this database.
+
+    Args:
+      file_desc_proto: The FileDescriptorProto to add.
+    Raises:
+      DescriptorDatabaseConflictingDefinitionError: if an attempt is made to
+        add a proto with the same name but different definition than an
+        existing proto in the database.
+    """
+    proto_name = file_desc_proto.name
+    if proto_name not in self._file_desc_protos_by_file:
+      self._file_desc_protos_by_file[proto_name] = file_desc_proto
+    elif self._file_desc_protos_by_file[proto_name] != file_desc_proto:
+      raise DescriptorDatabaseConflictingDefinitionError(
+          '%s already added, but with different descriptor.' % proto_name)
+    else:
+      return
+
+    # Add all the top-level descriptors to the index.
+    package = file_desc_proto.package
+    for message in file_desc_proto.message_type:
+      for name in _ExtractSymbols(message, package):
+        self._AddSymbol(name, file_desc_proto)
+    for enum in file_desc_proto.enum_type:
+      self._AddSymbol(('.'.join((package, enum.name))), file_desc_proto)
+      for enum_value in enum.value:
+        self._file_desc_protos_by_symbol[
+            '.'.join((package, enum_value.name))] = file_desc_proto
+    for extension in file_desc_proto.extension:
+      self._AddSymbol(('.'.join((package, extension.name))), file_desc_proto)
+    for service in file_desc_proto.service:
+      self._AddSymbol(('.'.join((package, service.name))), file_desc_proto)
+
+  def FindFileByName(self, name):
+    """Finds the file descriptor proto by file name.
+
+    Typically the file name is a relative path ending to a .proto file. The
+    proto with the given name will have to have been added to this database
+    using the Add method or else an error will be raised.
+
+    Args:
+      name: The file name to find.
+
+    Returns:
+      The file descriptor proto matching the name.
+
+    Raises:
+      KeyError if no file by the given name was added.
+    """
+
+    return self._file_desc_protos_by_file[name]
+
+  def FindFileContainingSymbol(self, symbol):
+    """Finds the file descriptor proto containing the specified symbol.
+
+    The symbol should be a fully qualified name including the file descriptor's
+    package and any containing messages. Some examples:
+
+    'some.package.name.Message'
+    'some.package.name.Message.NestedEnum'
+    'some.package.name.Message.some_field'
+
+    The file descriptor proto containing the specified symbol must be added to
+    this database using the Add method or else an error will be raised.
+
+    Args:
+      symbol: The fully qualified symbol name.
+
+    Returns:
+      The file descriptor proto containing the symbol.
+
+    Raises:
+      KeyError if no file contains the specified symbol.
+    """
+    try:
+      return self._file_desc_protos_by_symbol[symbol]
+    except KeyError:
+      # Fields, enum values, and nested extensions are not in
+      # _file_desc_protos_by_symbol. Try to find the top level
+      # descriptor. Non-existent nested symbol under a valid top level
+      # descriptor can also be found. The behavior is the same with
+      # protobuf C++.
+      top_level, _, _ = symbol.rpartition('.')
+      try:
+        return self._file_desc_protos_by_symbol[top_level]
+      except KeyError:
+        # Raise the original symbol as a KeyError for better diagnostics.
+        raise KeyError(symbol)
+
+  def FindFileContainingExtension(self, extendee_name, extension_number):
+    # TODO(jieluo): implement this API.
+    return None
+
+  def FindAllExtensionNumbers(self, extendee_name):
+    # TODO(jieluo): implement this API.
+    return []
+
+  def _AddSymbol(self, name, file_desc_proto):
+    if name in self._file_desc_protos_by_symbol:
+      warn_msg = ('Conflict register for file "' + file_desc_proto.name +
+                  '": ' + name +
+                  ' is already defined in file "' +
+                  self._file_desc_protos_by_symbol[name].name + '"')
+      warnings.warn(warn_msg, RuntimeWarning)
+    self._file_desc_protos_by_symbol[name] = file_desc_proto
+
+
+def _ExtractSymbols(desc_proto, package):
+  """Pulls out all the symbols from a descriptor proto.
+
+  Args:
+    desc_proto: The proto to extract symbols from.
+    package: The package containing the descriptor type.
+
+  Yields:
+    The fully qualified name found in the descriptor.
+  """
+  message_name = package + '.' + desc_proto.name if package else desc_proto.name
+  yield message_name
+  for nested_type in desc_proto.nested_type:
+    for symbol in _ExtractSymbols(nested_type, message_name):
+      yield symbol
+  for enum_type in desc_proto.enum_type:
+    yield '.'.join((message_name, enum_type.name))
diff --git a/python/google/protobuf/descriptor_pb2.py b/python/google/protobuf/descriptor_pb2.py
new file mode 100644
index 0000000..dbd05e7
--- /dev/null
+++ b/python/google/protobuf/descriptor_pb2.py
@@ -0,0 +1,2113 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='google/protobuf/descriptor.proto',
+  package='google.protobuf',
+  syntax='proto2',
+  serialized_options=None,
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n google/protobuf/descriptor.proto\x12\x0fgoogle.protobuf\"G\n\x11\x46ileDescriptorSet\x12\x32\n\x04\x66ile\x18\x01 \x03(\x0b\x32$.google.protobuf.FileDescriptorProto\"\xdb\x03\n\x13\x46ileDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07package\x18\x02 \x01(\t\x12\x12\n\ndependency\x18\x03 \x03(\t\x12\x19\n\x11public_dependency\x18\n \x03(\x05\x12\x17\n\x0fweak_dependency\x18\x0b \x03(\x05\x12\x36\n\x0cmessage_type\x18\x04 \x03(\x0b\x32 .google.protobuf.DescriptorProto\x12\x37\n\tenum_type\x18\x05 \x03(\x0b\x32$.google.protobuf.EnumDescriptorProto\x12\x38\n\x07service\x18\x06 \x03(\x0b\x32\'.google.protobuf.ServiceDescriptorProto\x12\x38\n\textension\x18\x07 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12-\n\x07options\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.FileOptions\x12\x39\n\x10source_code_info\x18\t \x01(\x0b\x32\x1f.google.protobuf.SourceCodeInfo\x12\x0e\n\x06syntax\x18\x0c \x01(\t\"\xa9\x05\n\x0f\x44\x65scriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x05\x66ield\x18\x02 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12\x38\n\textension\x18\x06 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12\x35\n\x0bnested_type\x18\x03 \x03(\x0b\x32 .google.protobuf.DescriptorProto\x12\x37\n\tenum_type\x18\x04 \x03(\x0b\x32$.google.protobuf.EnumDescriptorProto\x12H\n\x0f\x65xtension_range\x18\x05 \x03(\x0b\x32/.google.protobuf.DescriptorProto.ExtensionRange\x12\x39\n\noneof_decl\x18\x08 \x03(\x0b\x32%.google.protobuf.OneofDescriptorProto\x12\x30\n\x07options\x18\x07 \x01(\x0b\x32\x1f.google.protobuf.MessageOptions\x12\x46\n\x0ereserved_range\x18\t \x03(\x0b\x32..google.protobuf.DescriptorProto.ReservedRange\x12\x15\n\rreserved_name\x18\n \x03(\t\x1a\x65\n\x0e\x45xtensionRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x12\x37\n\x07options\x18\x03 \x01(\x0b\x32&.google.protobuf.ExtensionRangeOptions\x1a+\n\rReservedRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\"g\n\x15\x45xtensionRangeOptions\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xd5\x05\n\x14\x46ieldDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x03 \x01(\x05\x12:\n\x05label\x18\x04 \x01(\x0e\x32+.google.protobuf.FieldDescriptorProto.Label\x12\x38\n\x04type\x18\x05 \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.Type\x12\x11\n\ttype_name\x18\x06 \x01(\t\x12\x10\n\x08\x65xtendee\x18\x02 \x01(\t\x12\x15\n\rdefault_value\x18\x07 \x01(\t\x12\x13\n\x0boneof_index\x18\t \x01(\x05\x12\x11\n\tjson_name\x18\n \x01(\t\x12.\n\x07options\x18\x08 \x01(\x0b\x32\x1d.google.protobuf.FieldOptions\x12\x17\n\x0fproto3_optional\x18\x11 \x01(\x08\"\xb6\x02\n\x04Type\x12\x0f\n\x0bTYPE_DOUBLE\x10\x01\x12\x0e\n\nTYPE_FLOAT\x10\x02\x12\x0e\n\nTYPE_INT64\x10\x03\x12\x0f\n\x0bTYPE_UINT64\x10\x04\x12\x0e\n\nTYPE_INT32\x10\x05\x12\x10\n\x0cTYPE_FIXED64\x10\x06\x12\x10\n\x0cTYPE_FIXED32\x10\x07\x12\r\n\tTYPE_BOOL\x10\x08\x12\x0f\n\x0bTYPE_STRING\x10\t\x12\x0e\n\nTYPE_GROUP\x10\n\x12\x10\n\x0cTYPE_MESSAGE\x10\x0b\x12\x0e\n\nTYPE_BYTES\x10\x0c\x12\x0f\n\x0bTYPE_UINT32\x10\r\x12\r\n\tTYPE_ENUM\x10\x0e\x12\x11\n\rTYPE_SFIXED32\x10\x0f\x12\x11\n\rTYPE_SFIXED64\x10\x10\x12\x0f\n\x0bTYPE_SINT32\x10\x11\x12\x0f\n\x0bTYPE_SINT64\x10\x12\"C\n\x05Label\x12\x12\n\x0eLABEL_OPTIONAL\x10\x01\x12\x12\n\x0eLABEL_REQUIRED\x10\x02\x12\x12\n\x0eLABEL_REPEATED\x10\x03\"T\n\x14OneofDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\x07options\x18\x02 \x01(\x0b\x32\x1d.google.protobuf.OneofOptions\"\xa4\x02\n\x13\x45numDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x03(\x0b\x32).google.protobuf.EnumValueDescriptorProto\x12-\n\x07options\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.EnumOptions\x12N\n\x0ereserved_range\x18\x04 \x03(\x0b\x32\x36.google.protobuf.EnumDescriptorProto.EnumReservedRange\x12\x15\n\rreserved_name\x18\x05 \x03(\t\x1a/\n\x11\x45numReservedRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\"l\n\x18\x45numValueDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x02 \x01(\x05\x12\x32\n\x07options\x18\x03 \x01(\x0b\x32!.google.protobuf.EnumValueOptions\"\x90\x01\n\x16ServiceDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\x06method\x18\x02 \x03(\x0b\x32&.google.protobuf.MethodDescriptorProto\x12\x30\n\x07options\x18\x03 \x01(\x0b\x32\x1f.google.protobuf.ServiceOptions\"\xc1\x01\n\x15MethodDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ninput_type\x18\x02 \x01(\t\x12\x13\n\x0boutput_type\x18\x03 \x01(\t\x12/\n\x07options\x18\x04 \x01(\x0b\x32\x1e.google.protobuf.MethodOptions\x12\x1f\n\x10\x63lient_streaming\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1f\n\x10server_streaming\x18\x06 \x01(\x08:\x05\x66\x61lse\"\xa5\x06\n\x0b\x46ileOptions\x12\x14\n\x0cjava_package\x18\x01 \x01(\t\x12\x1c\n\x14java_outer_classname\x18\x08 \x01(\t\x12\"\n\x13java_multiple_files\x18\n \x01(\x08:\x05\x66\x61lse\x12)\n\x1djava_generate_equals_and_hash\x18\x14 \x01(\x08\x42\x02\x18\x01\x12%\n\x16java_string_check_utf8\x18\x1b \x01(\x08:\x05\x66\x61lse\x12\x46\n\x0coptimize_for\x18\t \x01(\x0e\x32).google.protobuf.FileOptions.OptimizeMode:\x05SPEED\x12\x12\n\ngo_package\x18\x0b \x01(\t\x12\"\n\x13\x63\x63_generic_services\x18\x10 \x01(\x08:\x05\x66\x61lse\x12$\n\x15java_generic_services\x18\x11 \x01(\x08:\x05\x66\x61lse\x12\"\n\x13py_generic_services\x18\x12 \x01(\x08:\x05\x66\x61lse\x12#\n\x14php_generic_services\x18* \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x17 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x10\x63\x63_enable_arenas\x18\x1f \x01(\x08:\x04true\x12\x19\n\x11objc_class_prefix\x18$ \x01(\t\x12\x18\n\x10\x63sharp_namespace\x18% \x01(\t\x12\x14\n\x0cswift_prefix\x18\' \x01(\t\x12\x18\n\x10php_class_prefix\x18( \x01(\t\x12\x15\n\rphp_namespace\x18) \x01(\t\x12\x1e\n\x16php_metadata_namespace\x18, \x01(\t\x12\x14\n\x0cruby_package\x18- \x01(\t\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\":\n\x0cOptimizeMode\x12\t\n\x05SPEED\x10\x01\x12\r\n\tCODE_SIZE\x10\x02\x12\x10\n\x0cLITE_RUNTIME\x10\x03*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08&\x10\'\"\x84\x02\n\x0eMessageOptions\x12&\n\x17message_set_wire_format\x18\x01 \x01(\x08:\x05\x66\x61lse\x12.\n\x1fno_standard_descriptor_accessor\x18\x02 \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x11\n\tmap_entry\x18\x07 \x01(\x08\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n\"\xbe\x03\n\x0c\x46ieldOptions\x12:\n\x05\x63type\x18\x01 \x01(\x0e\x32#.google.protobuf.FieldOptions.CType:\x06STRING\x12\x0e\n\x06packed\x18\x02 \x01(\x08\x12?\n\x06jstype\x18\x06 \x01(\x0e\x32$.google.protobuf.FieldOptions.JSType:\tJS_NORMAL\x12\x13\n\x04lazy\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x0funverified_lazy\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x13\n\x04weak\x18\n \x01(\x08:\x05\x66\x61lse\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\"/\n\x05\x43Type\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x43ORD\x10\x01\x12\x10\n\x0cSTRING_PIECE\x10\x02\"5\n\x06JSType\x12\r\n\tJS_NORMAL\x10\x00\x12\r\n\tJS_STRING\x10\x01\x12\r\n\tJS_NUMBER\x10\x02*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\x10\x05\"^\n\x0cOneofOptions\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x93\x01\n\x0b\x45numOptions\x12\x13\n\x0b\x61llow_alias\x18\x02 \x01(\x08\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x05\x10\x06\"}\n\x10\x45numValueOptions\x12\x19\n\ndeprecated\x18\x01 \x01(\x08:\x05\x66\x61lse\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"{\n\x0eServiceOptions\x12\x19\n\ndeprecated\x18! \x01(\x08:\x05\x66\x61lse\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xad\x02\n\rMethodOptions\x12\x19\n\ndeprecated\x18! \x01(\x08:\x05\x66\x61lse\x12_\n\x11idempotency_level\x18\" \x01(\x0e\x32/.google.protobuf.MethodOptions.IdempotencyLevel:\x13IDEMPOTENCY_UNKNOWN\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\"P\n\x10IdempotencyLevel\x12\x17\n\x13IDEMPOTENCY_UNKNOWN\x10\x00\x12\x13\n\x0fNO_SIDE_EFFECTS\x10\x01\x12\x0e\n\nIDEMPOTENT\x10\x02*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x9e\x02\n\x13UninterpretedOption\x12;\n\x04name\x18\x02 \x03(\x0b\x32-.google.protobuf.UninterpretedOption.NamePart\x12\x18\n\x10identifier_value\x18\x03 \x01(\t\x12\x1a\n\x12positive_int_value\x18\x04 \x01(\x04\x12\x1a\n\x12negative_int_value\x18\x05 \x01(\x03\x12\x14\n\x0c\x64ouble_value\x18\x06 \x01(\x01\x12\x14\n\x0cstring_value\x18\x07 \x01(\x0c\x12\x17\n\x0f\x61ggregate_value\x18\x08 \x01(\t\x1a\x33\n\x08NamePart\x12\x11\n\tname_part\x18\x01 \x02(\t\x12\x14\n\x0cis_extension\x18\x02 \x02(\x08\"\xd5\x01\n\x0eSourceCodeInfo\x12:\n\x08location\x18\x01 \x03(\x0b\x32(.google.protobuf.SourceCodeInfo.Location\x1a\x86\x01\n\x08Location\x12\x10\n\x04path\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x10\n\x04span\x18\x02 \x03(\x05\x42\x02\x10\x01\x12\x18\n\x10leading_comments\x18\x03 \x01(\t\x12\x19\n\x11trailing_comments\x18\x04 \x01(\t\x12!\n\x19leading_detached_comments\x18\x06 \x03(\t\"\xa7\x01\n\x11GeneratedCodeInfo\x12\x41\n\nannotation\x18\x01 \x03(\x0b\x32-.google.protobuf.GeneratedCodeInfo.Annotation\x1aO\n\nAnnotation\x12\x10\n\x04path\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x13\n\x0bsource_file\x18\x02 \x01(\t\x12\r\n\x05\x62\x65gin\x18\x03 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x04 \x01(\x05\x42~\n\x13\x63om.google.protobufB\x10\x44\x65scriptorProtosH\x01Z-google.golang.org/protobuf/types/descriptorpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1aGoogle.Protobuf.Reflection'
+)
+
+
+
+_FIELDDESCRIPTORPROTO_TYPE = _descriptor.EnumDescriptor(
+  name='Type',
+  full_name='google.protobuf.FieldDescriptorProto.Type',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_DOUBLE', index=0, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_FLOAT', index=1, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_INT64', index=2, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_UINT64', index=3, number=4,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_INT32', index=4, number=5,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_FIXED64', index=5, number=6,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_FIXED32', index=6, number=7,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_BOOL', index=7, number=8,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_STRING', index=8, number=9,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_GROUP', index=9, number=10,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_MESSAGE', index=10, number=11,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_BYTES', index=11, number=12,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_UINT32', index=12, number=13,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_ENUM', index=13, number=14,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_SFIXED32', index=14, number=15,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_SFIXED64', index=15, number=16,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_SINT32', index=16, number=17,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_SINT64', index=17, number=18,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=1740,
+  serialized_end=2050,
+)
+_sym_db.RegisterEnumDescriptor(_FIELDDESCRIPTORPROTO_TYPE)
+
+_FIELDDESCRIPTORPROTO_LABEL = _descriptor.EnumDescriptor(
+  name='Label',
+  full_name='google.protobuf.FieldDescriptorProto.Label',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='LABEL_OPTIONAL', index=0, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='LABEL_REQUIRED', index=1, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='LABEL_REPEATED', index=2, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=2052,
+  serialized_end=2119,
+)
+_sym_db.RegisterEnumDescriptor(_FIELDDESCRIPTORPROTO_LABEL)
+
+_FILEOPTIONS_OPTIMIZEMODE = _descriptor.EnumDescriptor(
+  name='OptimizeMode',
+  full_name='google.protobuf.FileOptions.OptimizeMode',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='SPEED', index=0, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='CODE_SIZE', index=1, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='LITE_RUNTIME', index=2, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=3686,
+  serialized_end=3744,
+)
+_sym_db.RegisterEnumDescriptor(_FILEOPTIONS_OPTIMIZEMODE)
+
+_FIELDOPTIONS_CTYPE = _descriptor.EnumDescriptor(
+  name='CType',
+  full_name='google.protobuf.FieldOptions.CType',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='STRING', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='CORD', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='STRING_PIECE', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=4354,
+  serialized_end=4401,
+)
+_sym_db.RegisterEnumDescriptor(_FIELDOPTIONS_CTYPE)
+
+_FIELDOPTIONS_JSTYPE = _descriptor.EnumDescriptor(
+  name='JSType',
+  full_name='google.protobuf.FieldOptions.JSType',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='JS_NORMAL', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='JS_STRING', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='JS_NUMBER', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=4403,
+  serialized_end=4456,
+)
+_sym_db.RegisterEnumDescriptor(_FIELDOPTIONS_JSTYPE)
+
+_METHODOPTIONS_IDEMPOTENCYLEVEL = _descriptor.EnumDescriptor(
+  name='IdempotencyLevel',
+  full_name='google.protobuf.MethodOptions.IdempotencyLevel',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='IDEMPOTENCY_UNKNOWN', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NO_SIDE_EFFECTS', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='IDEMPOTENT', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=5184,
+  serialized_end=5264,
+)
+_sym_db.RegisterEnumDescriptor(_METHODOPTIONS_IDEMPOTENCYLEVEL)
+
+
+_FILEDESCRIPTORSET = _descriptor.Descriptor(
+  name='FileDescriptorSet',
+  full_name='google.protobuf.FileDescriptorSet',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='file', full_name='google.protobuf.FileDescriptorSet.file', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=53,
+  serialized_end=124,
+)
+
+
+_FILEDESCRIPTORPROTO = _descriptor.Descriptor(
+  name='FileDescriptorProto',
+  full_name='google.protobuf.FileDescriptorProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.FileDescriptorProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='package', full_name='google.protobuf.FileDescriptorProto.package', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='dependency', full_name='google.protobuf.FileDescriptorProto.dependency', index=2,
+      number=3, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='public_dependency', full_name='google.protobuf.FileDescriptorProto.public_dependency', index=3,
+      number=10, type=5, cpp_type=1, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='weak_dependency', full_name='google.protobuf.FileDescriptorProto.weak_dependency', index=4,
+      number=11, type=5, cpp_type=1, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='message_type', full_name='google.protobuf.FileDescriptorProto.message_type', index=5,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='enum_type', full_name='google.protobuf.FileDescriptorProto.enum_type', index=6,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='service', full_name='google.protobuf.FileDescriptorProto.service', index=7,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='extension', full_name='google.protobuf.FileDescriptorProto.extension', index=8,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.FileDescriptorProto.options', index=9,
+      number=8, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='source_code_info', full_name='google.protobuf.FileDescriptorProto.source_code_info', index=10,
+      number=9, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='syntax', full_name='google.protobuf.FileDescriptorProto.syntax', index=11,
+      number=12, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=127,
+  serialized_end=602,
+)
+
+
+_DESCRIPTORPROTO_EXTENSIONRANGE = _descriptor.Descriptor(
+  name='ExtensionRange',
+  full_name='google.protobuf.DescriptorProto.ExtensionRange',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='start', full_name='google.protobuf.DescriptorProto.ExtensionRange.start', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='end', full_name='google.protobuf.DescriptorProto.ExtensionRange.end', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.DescriptorProto.ExtensionRange.options', index=2,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1140,
+  serialized_end=1241,
+)
+
+_DESCRIPTORPROTO_RESERVEDRANGE = _descriptor.Descriptor(
+  name='ReservedRange',
+  full_name='google.protobuf.DescriptorProto.ReservedRange',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='start', full_name='google.protobuf.DescriptorProto.ReservedRange.start', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='end', full_name='google.protobuf.DescriptorProto.ReservedRange.end', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1243,
+  serialized_end=1286,
+)
+
+_DESCRIPTORPROTO = _descriptor.Descriptor(
+  name='DescriptorProto',
+  full_name='google.protobuf.DescriptorProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.DescriptorProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='field', full_name='google.protobuf.DescriptorProto.field', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='extension', full_name='google.protobuf.DescriptorProto.extension', index=2,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='nested_type', full_name='google.protobuf.DescriptorProto.nested_type', index=3,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='enum_type', full_name='google.protobuf.DescriptorProto.enum_type', index=4,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='extension_range', full_name='google.protobuf.DescriptorProto.extension_range', index=5,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='oneof_decl', full_name='google.protobuf.DescriptorProto.oneof_decl', index=6,
+      number=8, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.DescriptorProto.options', index=7,
+      number=7, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='reserved_range', full_name='google.protobuf.DescriptorProto.reserved_range', index=8,
+      number=9, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='reserved_name', full_name='google.protobuf.DescriptorProto.reserved_name', index=9,
+      number=10, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_DESCRIPTORPROTO_EXTENSIONRANGE, _DESCRIPTORPROTO_RESERVEDRANGE, ],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=605,
+  serialized_end=1286,
+)
+
+
+_EXTENSIONRANGEOPTIONS = _descriptor.Descriptor(
+  name='ExtensionRangeOptions',
+  full_name='google.protobuf.ExtensionRangeOptions',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='uninterpreted_option', full_name='google.protobuf.ExtensionRangeOptions.uninterpreted_option', index=0,
+      number=999, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=True,
+  syntax='proto2',
+  extension_ranges=[(1000, 536870912), ],
+  oneofs=[
+  ],
+  serialized_start=1288,
+  serialized_end=1391,
+)
+
+
+_FIELDDESCRIPTORPROTO = _descriptor.Descriptor(
+  name='FieldDescriptorProto',
+  full_name='google.protobuf.FieldDescriptorProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.FieldDescriptorProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='number', full_name='google.protobuf.FieldDescriptorProto.number', index=1,
+      number=3, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='label', full_name='google.protobuf.FieldDescriptorProto.label', index=2,
+      number=4, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=1,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='type', full_name='google.protobuf.FieldDescriptorProto.type', index=3,
+      number=5, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=1,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='type_name', full_name='google.protobuf.FieldDescriptorProto.type_name', index=4,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='extendee', full_name='google.protobuf.FieldDescriptorProto.extendee', index=5,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='default_value', full_name='google.protobuf.FieldDescriptorProto.default_value', index=6,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='oneof_index', full_name='google.protobuf.FieldDescriptorProto.oneof_index', index=7,
+      number=9, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='json_name', full_name='google.protobuf.FieldDescriptorProto.json_name', index=8,
+      number=10, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.FieldDescriptorProto.options', index=9,
+      number=8, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='proto3_optional', full_name='google.protobuf.FieldDescriptorProto.proto3_optional', index=10,
+      number=17, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _FIELDDESCRIPTORPROTO_TYPE,
+    _FIELDDESCRIPTORPROTO_LABEL,
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1394,
+  serialized_end=2119,
+)
+
+
+_ONEOFDESCRIPTORPROTO = _descriptor.Descriptor(
+  name='OneofDescriptorProto',
+  full_name='google.protobuf.OneofDescriptorProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.OneofDescriptorProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.OneofDescriptorProto.options', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2121,
+  serialized_end=2205,
+)
+
+
+_ENUMDESCRIPTORPROTO_ENUMRESERVEDRANGE = _descriptor.Descriptor(
+  name='EnumReservedRange',
+  full_name='google.protobuf.EnumDescriptorProto.EnumReservedRange',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='start', full_name='google.protobuf.EnumDescriptorProto.EnumReservedRange.start', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='end', full_name='google.protobuf.EnumDescriptorProto.EnumReservedRange.end', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2453,
+  serialized_end=2500,
+)
+
+_ENUMDESCRIPTORPROTO = _descriptor.Descriptor(
+  name='EnumDescriptorProto',
+  full_name='google.protobuf.EnumDescriptorProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.EnumDescriptorProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='google.protobuf.EnumDescriptorProto.value', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.EnumDescriptorProto.options', index=2,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='reserved_range', full_name='google.protobuf.EnumDescriptorProto.reserved_range', index=3,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='reserved_name', full_name='google.protobuf.EnumDescriptorProto.reserved_name', index=4,
+      number=5, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_ENUMDESCRIPTORPROTO_ENUMRESERVEDRANGE, ],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2208,
+  serialized_end=2500,
+)
+
+
+_ENUMVALUEDESCRIPTORPROTO = _descriptor.Descriptor(
+  name='EnumValueDescriptorProto',
+  full_name='google.protobuf.EnumValueDescriptorProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.EnumValueDescriptorProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='number', full_name='google.protobuf.EnumValueDescriptorProto.number', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.EnumValueDescriptorProto.options', index=2,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2502,
+  serialized_end=2610,
+)
+
+
+_SERVICEDESCRIPTORPROTO = _descriptor.Descriptor(
+  name='ServiceDescriptorProto',
+  full_name='google.protobuf.ServiceDescriptorProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.ServiceDescriptorProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='method', full_name='google.protobuf.ServiceDescriptorProto.method', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.ServiceDescriptorProto.options', index=2,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2613,
+  serialized_end=2757,
+)
+
+
+_METHODDESCRIPTORPROTO = _descriptor.Descriptor(
+  name='MethodDescriptorProto',
+  full_name='google.protobuf.MethodDescriptorProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.MethodDescriptorProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='input_type', full_name='google.protobuf.MethodDescriptorProto.input_type', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='output_type', full_name='google.protobuf.MethodDescriptorProto.output_type', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='options', full_name='google.protobuf.MethodDescriptorProto.options', index=3,
+      number=4, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='client_streaming', full_name='google.protobuf.MethodDescriptorProto.client_streaming', index=4,
+      number=5, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='server_streaming', full_name='google.protobuf.MethodDescriptorProto.server_streaming', index=5,
+      number=6, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2760,
+  serialized_end=2953,
+)
+
+
+_FILEOPTIONS = _descriptor.Descriptor(
+  name='FileOptions',
+  full_name='google.protobuf.FileOptions',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='java_package', full_name='google.protobuf.FileOptions.java_package', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='java_outer_classname', full_name='google.protobuf.FileOptions.java_outer_classname', index=1,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='java_multiple_files', full_name='google.protobuf.FileOptions.java_multiple_files', index=2,
+      number=10, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='java_generate_equals_and_hash', full_name='google.protobuf.FileOptions.java_generate_equals_and_hash', index=3,
+      number=20, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='java_string_check_utf8', full_name='google.protobuf.FileOptions.java_string_check_utf8', index=4,
+      number=27, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='optimize_for', full_name='google.protobuf.FileOptions.optimize_for', index=5,
+      number=9, type=14, cpp_type=8, label=1,
+      has_default_value=True, default_value=1,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='go_package', full_name='google.protobuf.FileOptions.go_package', index=6,
+      number=11, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='cc_generic_services', full_name='google.protobuf.FileOptions.cc_generic_services', index=7,
+      number=16, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='java_generic_services', full_name='google.protobuf.FileOptions.java_generic_services', index=8,
+      number=17, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='py_generic_services', full_name='google.protobuf.FileOptions.py_generic_services', index=9,
+      number=18, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='php_generic_services', full_name='google.protobuf.FileOptions.php_generic_services', index=10,
+      number=42, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='deprecated', full_name='google.protobuf.FileOptions.deprecated', index=11,
+      number=23, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='cc_enable_arenas', full_name='google.protobuf.FileOptions.cc_enable_arenas', index=12,
+      number=31, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=True,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='objc_class_prefix', full_name='google.protobuf.FileOptions.objc_class_prefix', index=13,
+      number=36, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='csharp_namespace', full_name='google.protobuf.FileOptions.csharp_namespace', index=14,
+      number=37, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='swift_prefix', full_name='google.protobuf.FileOptions.swift_prefix', index=15,
+      number=39, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='php_class_prefix', full_name='google.protobuf.FileOptions.php_class_prefix', index=16,
+      number=40, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='php_namespace', full_name='google.protobuf.FileOptions.php_namespace', index=17,
+      number=41, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='php_metadata_namespace', full_name='google.protobuf.FileOptions.php_metadata_namespace', index=18,
+      number=44, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='ruby_package', full_name='google.protobuf.FileOptions.ruby_package', index=19,
+      number=45, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='uninterpreted_option', full_name='google.protobuf.FileOptions.uninterpreted_option', index=20,
+      number=999, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _FILEOPTIONS_OPTIMIZEMODE,
+  ],
+  serialized_options=None,
+  is_extendable=True,
+  syntax='proto2',
+  extension_ranges=[(1000, 536870912), ],
+  oneofs=[
+  ],
+  serialized_start=2956,
+  serialized_end=3761,
+)
+
+
+_MESSAGEOPTIONS = _descriptor.Descriptor(
+  name='MessageOptions',
+  full_name='google.protobuf.MessageOptions',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='message_set_wire_format', full_name='google.protobuf.MessageOptions.message_set_wire_format', index=0,
+      number=1, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='no_standard_descriptor_accessor', full_name='google.protobuf.MessageOptions.no_standard_descriptor_accessor', index=1,
+      number=2, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='deprecated', full_name='google.protobuf.MessageOptions.deprecated', index=2,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='map_entry', full_name='google.protobuf.MessageOptions.map_entry', index=3,
+      number=7, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='uninterpreted_option', full_name='google.protobuf.MessageOptions.uninterpreted_option', index=4,
+      number=999, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=True,
+  syntax='proto2',
+  extension_ranges=[(1000, 536870912), ],
+  oneofs=[
+  ],
+  serialized_start=3764,
+  serialized_end=4024,
+)
+
+
+_FIELDOPTIONS = _descriptor.Descriptor(
+  name='FieldOptions',
+  full_name='google.protobuf.FieldOptions',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='ctype', full_name='google.protobuf.FieldOptions.ctype', index=0,
+      number=1, type=14, cpp_type=8, label=1,
+      has_default_value=True, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='packed', full_name='google.protobuf.FieldOptions.packed', index=1,
+      number=2, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='jstype', full_name='google.protobuf.FieldOptions.jstype', index=2,
+      number=6, type=14, cpp_type=8, label=1,
+      has_default_value=True, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='lazy', full_name='google.protobuf.FieldOptions.lazy', index=3,
+      number=5, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='unverified_lazy', full_name='google.protobuf.FieldOptions.unverified_lazy', index=4,
+      number=15, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='deprecated', full_name='google.protobuf.FieldOptions.deprecated', index=5,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='weak', full_name='google.protobuf.FieldOptions.weak', index=6,
+      number=10, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='uninterpreted_option', full_name='google.protobuf.FieldOptions.uninterpreted_option', index=7,
+      number=999, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _FIELDOPTIONS_CTYPE,
+    _FIELDOPTIONS_JSTYPE,
+  ],
+  serialized_options=None,
+  is_extendable=True,
+  syntax='proto2',
+  extension_ranges=[(1000, 536870912), ],
+  oneofs=[
+  ],
+  serialized_start=4027,
+  serialized_end=4473,
+)
+
+
+_ONEOFOPTIONS = _descriptor.Descriptor(
+  name='OneofOptions',
+  full_name='google.protobuf.OneofOptions',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='uninterpreted_option', full_name='google.protobuf.OneofOptions.uninterpreted_option', index=0,
+      number=999, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=True,
+  syntax='proto2',
+  extension_ranges=[(1000, 536870912), ],
+  oneofs=[
+  ],
+  serialized_start=4475,
+  serialized_end=4569,
+)
+
+
+_ENUMOPTIONS = _descriptor.Descriptor(
+  name='EnumOptions',
+  full_name='google.protobuf.EnumOptions',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='allow_alias', full_name='google.protobuf.EnumOptions.allow_alias', index=0,
+      number=2, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='deprecated', full_name='google.protobuf.EnumOptions.deprecated', index=1,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='uninterpreted_option', full_name='google.protobuf.EnumOptions.uninterpreted_option', index=2,
+      number=999, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=True,
+  syntax='proto2',
+  extension_ranges=[(1000, 536870912), ],
+  oneofs=[
+  ],
+  serialized_start=4572,
+  serialized_end=4719,
+)
+
+
+_ENUMVALUEOPTIONS = _descriptor.Descriptor(
+  name='EnumValueOptions',
+  full_name='google.protobuf.EnumValueOptions',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='deprecated', full_name='google.protobuf.EnumValueOptions.deprecated', index=0,
+      number=1, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='uninterpreted_option', full_name='google.protobuf.EnumValueOptions.uninterpreted_option', index=1,
+      number=999, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=True,
+  syntax='proto2',
+  extension_ranges=[(1000, 536870912), ],
+  oneofs=[
+  ],
+  serialized_start=4721,
+  serialized_end=4846,
+)
+
+
+_SERVICEOPTIONS = _descriptor.Descriptor(
+  name='ServiceOptions',
+  full_name='google.protobuf.ServiceOptions',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='deprecated', full_name='google.protobuf.ServiceOptions.deprecated', index=0,
+      number=33, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='uninterpreted_option', full_name='google.protobuf.ServiceOptions.uninterpreted_option', index=1,
+      number=999, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=True,
+  syntax='proto2',
+  extension_ranges=[(1000, 536870912), ],
+  oneofs=[
+  ],
+  serialized_start=4848,
+  serialized_end=4971,
+)
+
+
+_METHODOPTIONS = _descriptor.Descriptor(
+  name='MethodOptions',
+  full_name='google.protobuf.MethodOptions',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='deprecated', full_name='google.protobuf.MethodOptions.deprecated', index=0,
+      number=33, type=8, cpp_type=7, label=1,
+      has_default_value=True, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='idempotency_level', full_name='google.protobuf.MethodOptions.idempotency_level', index=1,
+      number=34, type=14, cpp_type=8, label=1,
+      has_default_value=True, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='uninterpreted_option', full_name='google.protobuf.MethodOptions.uninterpreted_option', index=2,
+      number=999, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _METHODOPTIONS_IDEMPOTENCYLEVEL,
+  ],
+  serialized_options=None,
+  is_extendable=True,
+  syntax='proto2',
+  extension_ranges=[(1000, 536870912), ],
+  oneofs=[
+  ],
+  serialized_start=4974,
+  serialized_end=5275,
+)
+
+
+_UNINTERPRETEDOPTION_NAMEPART = _descriptor.Descriptor(
+  name='NamePart',
+  full_name='google.protobuf.UninterpretedOption.NamePart',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name_part', full_name='google.protobuf.UninterpretedOption.NamePart.name_part', index=0,
+      number=1, type=9, cpp_type=9, label=2,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='is_extension', full_name='google.protobuf.UninterpretedOption.NamePart.is_extension', index=1,
+      number=2, type=8, cpp_type=7, label=2,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=5513,
+  serialized_end=5564,
+)
+
+_UNINTERPRETEDOPTION = _descriptor.Descriptor(
+  name='UninterpretedOption',
+  full_name='google.protobuf.UninterpretedOption',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.protobuf.UninterpretedOption.name', index=0,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='identifier_value', full_name='google.protobuf.UninterpretedOption.identifier_value', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='positive_int_value', full_name='google.protobuf.UninterpretedOption.positive_int_value', index=2,
+      number=4, type=4, cpp_type=4, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='negative_int_value', full_name='google.protobuf.UninterpretedOption.negative_int_value', index=3,
+      number=5, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='double_value', full_name='google.protobuf.UninterpretedOption.double_value', index=4,
+      number=6, type=1, cpp_type=5, label=1,
+      has_default_value=False, default_value=float(0),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='string_value', full_name='google.protobuf.UninterpretedOption.string_value', index=5,
+      number=7, type=12, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"",
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='aggregate_value', full_name='google.protobuf.UninterpretedOption.aggregate_value', index=6,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_UNINTERPRETEDOPTION_NAMEPART, ],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=5278,
+  serialized_end=5564,
+)
+
+
+_SOURCECODEINFO_LOCATION = _descriptor.Descriptor(
+  name='Location',
+  full_name='google.protobuf.SourceCodeInfo.Location',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='path', full_name='google.protobuf.SourceCodeInfo.Location.path', index=0,
+      number=1, type=5, cpp_type=1, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='span', full_name='google.protobuf.SourceCodeInfo.Location.span', index=1,
+      number=2, type=5, cpp_type=1, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='leading_comments', full_name='google.protobuf.SourceCodeInfo.Location.leading_comments', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='trailing_comments', full_name='google.protobuf.SourceCodeInfo.Location.trailing_comments', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='leading_detached_comments', full_name='google.protobuf.SourceCodeInfo.Location.leading_detached_comments', index=4,
+      number=6, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=5646,
+  serialized_end=5780,
+)
+
+_SOURCECODEINFO = _descriptor.Descriptor(
+  name='SourceCodeInfo',
+  full_name='google.protobuf.SourceCodeInfo',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='location', full_name='google.protobuf.SourceCodeInfo.location', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_SOURCECODEINFO_LOCATION, ],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=5567,
+  serialized_end=5780,
+)
+
+
+_GENERATEDCODEINFO_ANNOTATION = _descriptor.Descriptor(
+  name='Annotation',
+  full_name='google.protobuf.GeneratedCodeInfo.Annotation',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='path', full_name='google.protobuf.GeneratedCodeInfo.Annotation.path', index=0,
+      number=1, type=5, cpp_type=1, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='source_file', full_name='google.protobuf.GeneratedCodeInfo.Annotation.source_file', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='begin', full_name='google.protobuf.GeneratedCodeInfo.Annotation.begin', index=2,
+      number=3, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='end', full_name='google.protobuf.GeneratedCodeInfo.Annotation.end', index=3,
+      number=4, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=5871,
+  serialized_end=5950,
+)
+
+_GENERATEDCODEINFO = _descriptor.Descriptor(
+  name='GeneratedCodeInfo',
+  full_name='google.protobuf.GeneratedCodeInfo',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='annotation', full_name='google.protobuf.GeneratedCodeInfo.annotation', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_GENERATEDCODEINFO_ANNOTATION, ],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=5783,
+  serialized_end=5950,
+)
+
+_FILEDESCRIPTORSET.fields_by_name['file'].message_type = _FILEDESCRIPTORPROTO
+_FILEDESCRIPTORPROTO.fields_by_name['message_type'].message_type = _DESCRIPTORPROTO
+_FILEDESCRIPTORPROTO.fields_by_name['enum_type'].message_type = _ENUMDESCRIPTORPROTO
+_FILEDESCRIPTORPROTO.fields_by_name['service'].message_type = _SERVICEDESCRIPTORPROTO
+_FILEDESCRIPTORPROTO.fields_by_name['extension'].message_type = _FIELDDESCRIPTORPROTO
+_FILEDESCRIPTORPROTO.fields_by_name['options'].message_type = _FILEOPTIONS
+_FILEDESCRIPTORPROTO.fields_by_name['source_code_info'].message_type = _SOURCECODEINFO
+_DESCRIPTORPROTO_EXTENSIONRANGE.fields_by_name['options'].message_type = _EXTENSIONRANGEOPTIONS
+_DESCRIPTORPROTO_EXTENSIONRANGE.containing_type = _DESCRIPTORPROTO
+_DESCRIPTORPROTO_RESERVEDRANGE.containing_type = _DESCRIPTORPROTO
+_DESCRIPTORPROTO.fields_by_name['field'].message_type = _FIELDDESCRIPTORPROTO
+_DESCRIPTORPROTO.fields_by_name['extension'].message_type = _FIELDDESCRIPTORPROTO
+_DESCRIPTORPROTO.fields_by_name['nested_type'].message_type = _DESCRIPTORPROTO
+_DESCRIPTORPROTO.fields_by_name['enum_type'].message_type = _ENUMDESCRIPTORPROTO
+_DESCRIPTORPROTO.fields_by_name['extension_range'].message_type = _DESCRIPTORPROTO_EXTENSIONRANGE
+_DESCRIPTORPROTO.fields_by_name['oneof_decl'].message_type = _ONEOFDESCRIPTORPROTO
+_DESCRIPTORPROTO.fields_by_name['options'].message_type = _MESSAGEOPTIONS
+_DESCRIPTORPROTO.fields_by_name['reserved_range'].message_type = _DESCRIPTORPROTO_RESERVEDRANGE
+_EXTENSIONRANGEOPTIONS.fields_by_name['uninterpreted_option'].message_type = _UNINTERPRETEDOPTION
+_FIELDDESCRIPTORPROTO.fields_by_name['label'].enum_type = _FIELDDESCRIPTORPROTO_LABEL
+_FIELDDESCRIPTORPROTO.fields_by_name['type'].enum_type = _FIELDDESCRIPTORPROTO_TYPE
+_FIELDDESCRIPTORPROTO.fields_by_name['options'].message_type = _FIELDOPTIONS
+_FIELDDESCRIPTORPROTO_TYPE.containing_type = _FIELDDESCRIPTORPROTO
+_FIELDDESCRIPTORPROTO_LABEL.containing_type = _FIELDDESCRIPTORPROTO
+_ONEOFDESCRIPTORPROTO.fields_by_name['options'].message_type = _ONEOFOPTIONS
+_ENUMDESCRIPTORPROTO_ENUMRESERVEDRANGE.containing_type = _ENUMDESCRIPTORPROTO
+_ENUMDESCRIPTORPROTO.fields_by_name['value'].message_type = _ENUMVALUEDESCRIPTORPROTO
+_ENUMDESCRIPTORPROTO.fields_by_name['options'].message_type = _ENUMOPTIONS
+_ENUMDESCRIPTORPROTO.fields_by_name['reserved_range'].message_type = _ENUMDESCRIPTORPROTO_ENUMRESERVEDRANGE
+_ENUMVALUEDESCRIPTORPROTO.fields_by_name['options'].message_type = _ENUMVALUEOPTIONS
+_SERVICEDESCRIPTORPROTO.fields_by_name['method'].message_type = _METHODDESCRIPTORPROTO
+_SERVICEDESCRIPTORPROTO.fields_by_name['options'].message_type = _SERVICEOPTIONS
+_METHODDESCRIPTORPROTO.fields_by_name['options'].message_type = _METHODOPTIONS
+_FILEOPTIONS.fields_by_name['optimize_for'].enum_type = _FILEOPTIONS_OPTIMIZEMODE
+_FILEOPTIONS.fields_by_name['uninterpreted_option'].message_type = _UNINTERPRETEDOPTION
+_FILEOPTIONS_OPTIMIZEMODE.containing_type = _FILEOPTIONS
+_MESSAGEOPTIONS.fields_by_name['uninterpreted_option'].message_type = _UNINTERPRETEDOPTION
+_FIELDOPTIONS.fields_by_name['ctype'].enum_type = _FIELDOPTIONS_CTYPE
+_FIELDOPTIONS.fields_by_name['jstype'].enum_type = _FIELDOPTIONS_JSTYPE
+_FIELDOPTIONS.fields_by_name['uninterpreted_option'].message_type = _UNINTERPRETEDOPTION
+_FIELDOPTIONS_CTYPE.containing_type = _FIELDOPTIONS
+_FIELDOPTIONS_JSTYPE.containing_type = _FIELDOPTIONS
+_ONEOFOPTIONS.fields_by_name['uninterpreted_option'].message_type = _UNINTERPRETEDOPTION
+_ENUMOPTIONS.fields_by_name['uninterpreted_option'].message_type = _UNINTERPRETEDOPTION
+_ENUMVALUEOPTIONS.fields_by_name['uninterpreted_option'].message_type = _UNINTERPRETEDOPTION
+_SERVICEOPTIONS.fields_by_name['uninterpreted_option'].message_type = _UNINTERPRETEDOPTION
+_METHODOPTIONS.fields_by_name['idempotency_level'].enum_type = _METHODOPTIONS_IDEMPOTENCYLEVEL
+_METHODOPTIONS.fields_by_name['uninterpreted_option'].message_type = _UNINTERPRETEDOPTION
+_METHODOPTIONS_IDEMPOTENCYLEVEL.containing_type = _METHODOPTIONS
+_UNINTERPRETEDOPTION_NAMEPART.containing_type = _UNINTERPRETEDOPTION
+_UNINTERPRETEDOPTION.fields_by_name['name'].message_type = _UNINTERPRETEDOPTION_NAMEPART
+_SOURCECODEINFO_LOCATION.containing_type = _SOURCECODEINFO
+_SOURCECODEINFO.fields_by_name['location'].message_type = _SOURCECODEINFO_LOCATION
+_GENERATEDCODEINFO_ANNOTATION.containing_type = _GENERATEDCODEINFO
+_GENERATEDCODEINFO.fields_by_name['annotation'].message_type = _GENERATEDCODEINFO_ANNOTATION
+DESCRIPTOR.message_types_by_name['FileDescriptorSet'] = _FILEDESCRIPTORSET
+DESCRIPTOR.message_types_by_name['FileDescriptorProto'] = _FILEDESCRIPTORPROTO
+DESCRIPTOR.message_types_by_name['DescriptorProto'] = _DESCRIPTORPROTO
+DESCRIPTOR.message_types_by_name['ExtensionRangeOptions'] = _EXTENSIONRANGEOPTIONS
+DESCRIPTOR.message_types_by_name['FieldDescriptorProto'] = _FIELDDESCRIPTORPROTO
+DESCRIPTOR.message_types_by_name['OneofDescriptorProto'] = _ONEOFDESCRIPTORPROTO
+DESCRIPTOR.message_types_by_name['EnumDescriptorProto'] = _ENUMDESCRIPTORPROTO
+DESCRIPTOR.message_types_by_name['EnumValueDescriptorProto'] = _ENUMVALUEDESCRIPTORPROTO
+DESCRIPTOR.message_types_by_name['ServiceDescriptorProto'] = _SERVICEDESCRIPTORPROTO
+DESCRIPTOR.message_types_by_name['MethodDescriptorProto'] = _METHODDESCRIPTORPROTO
+DESCRIPTOR.message_types_by_name['FileOptions'] = _FILEOPTIONS
+DESCRIPTOR.message_types_by_name['MessageOptions'] = _MESSAGEOPTIONS
+DESCRIPTOR.message_types_by_name['FieldOptions'] = _FIELDOPTIONS
+DESCRIPTOR.message_types_by_name['OneofOptions'] = _ONEOFOPTIONS
+DESCRIPTOR.message_types_by_name['EnumOptions'] = _ENUMOPTIONS
+DESCRIPTOR.message_types_by_name['EnumValueOptions'] = _ENUMVALUEOPTIONS
+DESCRIPTOR.message_types_by_name['ServiceOptions'] = _SERVICEOPTIONS
+DESCRIPTOR.message_types_by_name['MethodOptions'] = _METHODOPTIONS
+DESCRIPTOR.message_types_by_name['UninterpretedOption'] = _UNINTERPRETEDOPTION
+DESCRIPTOR.message_types_by_name['SourceCodeInfo'] = _SOURCECODEINFO
+DESCRIPTOR.message_types_by_name['GeneratedCodeInfo'] = _GENERATEDCODEINFO
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+FileDescriptorSet = _reflection.GeneratedProtocolMessageType('FileDescriptorSet', (_message.Message,), {
+  'DESCRIPTOR' : _FILEDESCRIPTORSET,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorSet)
+  })
+_sym_db.RegisterMessage(FileDescriptorSet)
+
+FileDescriptorProto = _reflection.GeneratedProtocolMessageType('FileDescriptorProto', (_message.Message,), {
+  'DESCRIPTOR' : _FILEDESCRIPTORPROTO,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorProto)
+  })
+_sym_db.RegisterMessage(FileDescriptorProto)
+
+DescriptorProto = _reflection.GeneratedProtocolMessageType('DescriptorProto', (_message.Message,), {
+
+  'ExtensionRange' : _reflection.GeneratedProtocolMessageType('ExtensionRange', (_message.Message,), {
+    'DESCRIPTOR' : _DESCRIPTORPROTO_EXTENSIONRANGE,
+    '__module__' : 'google.protobuf.descriptor_pb2'
+    # @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ExtensionRange)
+    })
+  ,
+
+  'ReservedRange' : _reflection.GeneratedProtocolMessageType('ReservedRange', (_message.Message,), {
+    'DESCRIPTOR' : _DESCRIPTORPROTO_RESERVEDRANGE,
+    '__module__' : 'google.protobuf.descriptor_pb2'
+    # @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ReservedRange)
+    })
+  ,
+  'DESCRIPTOR' : _DESCRIPTORPROTO,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto)
+  })
+_sym_db.RegisterMessage(DescriptorProto)
+_sym_db.RegisterMessage(DescriptorProto.ExtensionRange)
+_sym_db.RegisterMessage(DescriptorProto.ReservedRange)
+
+ExtensionRangeOptions = _reflection.GeneratedProtocolMessageType('ExtensionRangeOptions', (_message.Message,), {
+  'DESCRIPTOR' : _EXTENSIONRANGEOPTIONS,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.ExtensionRangeOptions)
+  })
+_sym_db.RegisterMessage(ExtensionRangeOptions)
+
+FieldDescriptorProto = _reflection.GeneratedProtocolMessageType('FieldDescriptorProto', (_message.Message,), {
+  'DESCRIPTOR' : _FIELDDESCRIPTORPROTO,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.FieldDescriptorProto)
+  })
+_sym_db.RegisterMessage(FieldDescriptorProto)
+
+OneofDescriptorProto = _reflection.GeneratedProtocolMessageType('OneofDescriptorProto', (_message.Message,), {
+  'DESCRIPTOR' : _ONEOFDESCRIPTORPROTO,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.OneofDescriptorProto)
+  })
+_sym_db.RegisterMessage(OneofDescriptorProto)
+
+EnumDescriptorProto = _reflection.GeneratedProtocolMessageType('EnumDescriptorProto', (_message.Message,), {
+
+  'EnumReservedRange' : _reflection.GeneratedProtocolMessageType('EnumReservedRange', (_message.Message,), {
+    'DESCRIPTOR' : _ENUMDESCRIPTORPROTO_ENUMRESERVEDRANGE,
+    '__module__' : 'google.protobuf.descriptor_pb2'
+    # @@protoc_insertion_point(class_scope:google.protobuf.EnumDescriptorProto.EnumReservedRange)
+    })
+  ,
+  'DESCRIPTOR' : _ENUMDESCRIPTORPROTO,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.EnumDescriptorProto)
+  })
+_sym_db.RegisterMessage(EnumDescriptorProto)
+_sym_db.RegisterMessage(EnumDescriptorProto.EnumReservedRange)
+
+EnumValueDescriptorProto = _reflection.GeneratedProtocolMessageType('EnumValueDescriptorProto', (_message.Message,), {
+  'DESCRIPTOR' : _ENUMVALUEDESCRIPTORPROTO,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.EnumValueDescriptorProto)
+  })
+_sym_db.RegisterMessage(EnumValueDescriptorProto)
+
+ServiceDescriptorProto = _reflection.GeneratedProtocolMessageType('ServiceDescriptorProto', (_message.Message,), {
+  'DESCRIPTOR' : _SERVICEDESCRIPTORPROTO,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.ServiceDescriptorProto)
+  })
+_sym_db.RegisterMessage(ServiceDescriptorProto)
+
+MethodDescriptorProto = _reflection.GeneratedProtocolMessageType('MethodDescriptorProto', (_message.Message,), {
+  'DESCRIPTOR' : _METHODDESCRIPTORPROTO,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.MethodDescriptorProto)
+  })
+_sym_db.RegisterMessage(MethodDescriptorProto)
+
+FileOptions = _reflection.GeneratedProtocolMessageType('FileOptions', (_message.Message,), {
+  'DESCRIPTOR' : _FILEOPTIONS,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.FileOptions)
+  })
+_sym_db.RegisterMessage(FileOptions)
+
+MessageOptions = _reflection.GeneratedProtocolMessageType('MessageOptions', (_message.Message,), {
+  'DESCRIPTOR' : _MESSAGEOPTIONS,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.MessageOptions)
+  })
+_sym_db.RegisterMessage(MessageOptions)
+
+FieldOptions = _reflection.GeneratedProtocolMessageType('FieldOptions', (_message.Message,), {
+  'DESCRIPTOR' : _FIELDOPTIONS,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.FieldOptions)
+  })
+_sym_db.RegisterMessage(FieldOptions)
+
+OneofOptions = _reflection.GeneratedProtocolMessageType('OneofOptions', (_message.Message,), {
+  'DESCRIPTOR' : _ONEOFOPTIONS,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.OneofOptions)
+  })
+_sym_db.RegisterMessage(OneofOptions)
+
+EnumOptions = _reflection.GeneratedProtocolMessageType('EnumOptions', (_message.Message,), {
+  'DESCRIPTOR' : _ENUMOPTIONS,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.EnumOptions)
+  })
+_sym_db.RegisterMessage(EnumOptions)
+
+EnumValueOptions = _reflection.GeneratedProtocolMessageType('EnumValueOptions', (_message.Message,), {
+  'DESCRIPTOR' : _ENUMVALUEOPTIONS,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.EnumValueOptions)
+  })
+_sym_db.RegisterMessage(EnumValueOptions)
+
+ServiceOptions = _reflection.GeneratedProtocolMessageType('ServiceOptions', (_message.Message,), {
+  'DESCRIPTOR' : _SERVICEOPTIONS,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.ServiceOptions)
+  })
+_sym_db.RegisterMessage(ServiceOptions)
+
+MethodOptions = _reflection.GeneratedProtocolMessageType('MethodOptions', (_message.Message,), {
+  'DESCRIPTOR' : _METHODOPTIONS,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.MethodOptions)
+  })
+_sym_db.RegisterMessage(MethodOptions)
+
+UninterpretedOption = _reflection.GeneratedProtocolMessageType('UninterpretedOption', (_message.Message,), {
+
+  'NamePart' : _reflection.GeneratedProtocolMessageType('NamePart', (_message.Message,), {
+    'DESCRIPTOR' : _UNINTERPRETEDOPTION_NAMEPART,
+    '__module__' : 'google.protobuf.descriptor_pb2'
+    # @@protoc_insertion_point(class_scope:google.protobuf.UninterpretedOption.NamePart)
+    })
+  ,
+  'DESCRIPTOR' : _UNINTERPRETEDOPTION,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.UninterpretedOption)
+  })
+_sym_db.RegisterMessage(UninterpretedOption)
+_sym_db.RegisterMessage(UninterpretedOption.NamePart)
+
+SourceCodeInfo = _reflection.GeneratedProtocolMessageType('SourceCodeInfo', (_message.Message,), {
+
+  'Location' : _reflection.GeneratedProtocolMessageType('Location', (_message.Message,), {
+    'DESCRIPTOR' : _SOURCECODEINFO_LOCATION,
+    '__module__' : 'google.protobuf.descriptor_pb2'
+    # @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo.Location)
+    })
+  ,
+  'DESCRIPTOR' : _SOURCECODEINFO,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo)
+  })
+_sym_db.RegisterMessage(SourceCodeInfo)
+_sym_db.RegisterMessage(SourceCodeInfo.Location)
+
+GeneratedCodeInfo = _reflection.GeneratedProtocolMessageType('GeneratedCodeInfo', (_message.Message,), {
+
+  'Annotation' : _reflection.GeneratedProtocolMessageType('Annotation', (_message.Message,), {
+    'DESCRIPTOR' : _GENERATEDCODEINFO_ANNOTATION,
+    '__module__' : 'google.protobuf.descriptor_pb2'
+    # @@protoc_insertion_point(class_scope:google.protobuf.GeneratedCodeInfo.Annotation)
+    })
+  ,
+  'DESCRIPTOR' : _GENERATEDCODEINFO,
+  '__module__' : 'google.protobuf.descriptor_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.GeneratedCodeInfo)
+  })
+_sym_db.RegisterMessage(GeneratedCodeInfo)
+_sym_db.RegisterMessage(GeneratedCodeInfo.Annotation)
+
+
+# @@protoc_insertion_point(module_scope)
diff --git a/python/google/protobuf/descriptor_pool.py b/python/google/protobuf/descriptor_pool.py
new file mode 100644
index 0000000..911372a
--- /dev/null
+++ b/python/google/protobuf/descriptor_pool.py
@@ -0,0 +1,1295 @@
+# Protocol Buffers - Google's data interchange format
+# Copyright 2008 Google Inc.  All rights reserved.
+# https://developers.google.com/protocol-buffers/
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Provides DescriptorPool to use as a container for proto2 descriptors.
+
+The DescriptorPool is used in conjection with a DescriptorDatabase to maintain
+a collection of protocol buffer descriptors for use when dynamically creating
+message types at runtime.
+
+For most applications protocol buffers should be used via modules generated by
+the protocol buffer compiler tool. This should only be used when the type of
+protocol buffers used in an application or library cannot be predetermined.
+
+Below is a straightforward example on how to use this class::
+
+  pool = DescriptorPool()
+  file_descriptor_protos = [ ... ]
+  for file_descriptor_proto in file_descriptor_protos:
+    pool.Add(file_descriptor_proto)
+  my_message_descriptor = pool.FindMessageTypeByName('some.package.MessageType')
+
+The message descriptor can be used in conjunction with the message_factory
+module in order to create a protocol buffer class that can be encoded and
+decoded.
+
+If you want to get a Python class for the specified proto, use the
+helper functions inside google.protobuf.message_factory
+directly instead of this class.
+"""
+
+__author__ = 'matthewtoia@google.com (Matt Toia)'
+
+import collections
+import warnings
+
+from google.protobuf import descriptor
+from google.protobuf import descriptor_database
+from google.protobuf import text_encoding
+
+
+_USE_C_DESCRIPTORS = descriptor._USE_C_DESCRIPTORS  # pylint: disable=protected-access
+
+
+def _Deprecated(func):
+  """Mark functions as deprecated."""
+
+  def NewFunc(*args, **kwargs):
+    warnings.warn(
+        'Call to deprecated function %s(). Note: Do add unlinked descriptors '
+        'to descriptor_pool is wrong. Use Add() or AddSerializedFile() '
+        'instead.' % func.__name__,
+        category=DeprecationWarning)
+    return func(*args, **kwargs)
+  NewFunc.__name__ = func.__name__
+  NewFunc.__doc__ = func.__doc__
+  NewFunc.__dict__.update(func.__dict__)
+  return NewFunc
+
+
+def _NormalizeFullyQualifiedName(name):
+  """Remove leading period from fully-qualified type name.
+
+  Due to b/13860351 in descriptor_database.py, types in the root namespace are
+  generated with a leading period. This function removes that prefix.
+
+  Args:
+    name (str): The fully-qualified symbol name.
+
+  Returns:
+    str: The normalized fully-qualified symbol name.
+  """
+  return name.lstrip('.')
+
+
+def _OptionsOrNone(descriptor_proto):
+  """Returns the value of the field `options`, or None if it is not set."""
+  if descriptor_proto.HasField('options'):
+    return descriptor_proto.options
+  else:
+    return None
+
+
+def _IsMessageSetExtension(field):
+  return (field.is_extension and
+          field.containing_type.has_options and
+          field.containing_type.GetOptions().message_set_wire_format and
+          field.type == descriptor.FieldDescriptor.TYPE_MESSAGE and
+          field.label == descriptor.FieldDescriptor.LABEL_OPTIONAL)
+
+
+class DescriptorPool(object):
+  """A collection of protobufs dynamically constructed by descriptor protos."""
+
+  if _USE_C_DESCRIPTORS:
+
+    def __new__(cls, descriptor_db=None):
+      # pylint: disable=protected-access
+      return descriptor._message.DescriptorPool(descriptor_db)
+
+  def __init__(self, descriptor_db=None):
+    """Initializes a Pool of proto buffs.
+
+    The descriptor_db argument to the constructor is provided to allow
+    specialized file descriptor proto lookup code to be triggered on demand. An
+    example would be an implementation which will read and compile a file
+    specified in a call to FindFileByName() and not require the call to Add()
+    at all. Results from this database will be cached internally here as well.
+
+    Args:
+      descriptor_db: A secondary source of file descriptors.
+    """
+
+    self._internal_db = descriptor_database.DescriptorDatabase()
+    self._descriptor_db = descriptor_db
+    self._descriptors = {}
+    self._enum_descriptors = {}
+    self._service_descriptors = {}
+    self._file_descriptors = {}
+    self._toplevel_extensions = {}
+    # TODO(jieluo): Remove _file_desc_by_toplevel_extension after
+    # maybe year 2020 for compatibility issue (with 3.4.1 only).
+    self._file_desc_by_toplevel_extension = {}
+    self._top_enum_values = {}
+    # We store extensions in two two-level mappings: The first key is the
+    # descriptor of the message being extended, the second key is the extension
+    # full name or its tag number.
+    self._extensions_by_name = collections.defaultdict(dict)
+    self._extensions_by_number = collections.defaultdict(dict)
+
+  def _CheckConflictRegister(self, desc, desc_name, file_name):
+    """Check if the descriptor name conflicts with another of the same name.
+
+    Args:
+      desc: Descriptor of a message, enum, service, extension or enum value.
+      desc_name (str): the full name of desc.
+      file_name (str): The file name of descriptor.
+    """
+    for register, descriptor_type in [
+        (self._descriptors, descriptor.Descriptor),
+        (self._enum_descriptors, descriptor.EnumDescriptor),
+        (self._service_descriptors, descriptor.ServiceDescriptor),
+        (self._toplevel_extensions, descriptor.FieldDescriptor),
+        (self._top_enum_values, descriptor.EnumValueDescriptor)]:
+      if desc_name in register:
+        old_desc = register[desc_name]
+        if isinstance(old_desc, descriptor.EnumValueDescriptor):
+          old_file = old_desc.type.file.name
+        else:
+          old_file = old_desc.file.name
+
+        if not isinstance(desc, descriptor_type) or (
+            old_file != file_name):
+          error_msg = ('Conflict register for file "' + file_name +
+                       '": ' + desc_name +
+                       ' is already defined in file "' +
+                       old_file + '". Please fix the conflict by adding '
+                       'package name on the proto file, or use different '
+                       'name for the duplication.')
+          if isinstance(desc, descriptor.EnumValueDescriptor):
+            error_msg += ('\nNote: enum values appear as '
+                          'siblings of the enum type instead of '
+                          'children of it.')
+
+          raise TypeError(error_msg)
+
+        return
+
+  def Add(self, file_desc_proto):
+    """Adds the FileDescriptorProto and its types to this pool.
+
+    Args:
+      file_desc_proto (FileDescriptorProto): The file descriptor to add.
+    """
+
+    self._internal_db.Add(file_desc_proto)
+
+  def AddSerializedFile(self, serialized_file_desc_proto):
+    """Adds the FileDescriptorProto and its types to this pool.
+
+    Args:
+      serialized_file_desc_proto (bytes): A bytes string, serialization of the
+        :class:`FileDescriptorProto` to add.
+
+    Returns:
+      FileDescriptor: Descriptor for the added file.
+    """
+
+    # pylint: disable=g-import-not-at-top
+    from google.protobuf import descriptor_pb2
+    file_desc_proto = descriptor_pb2.FileDescriptorProto.FromString(
+        serialized_file_desc_proto)
+    file_desc = self._ConvertFileProtoToFileDescriptor(file_desc_proto)
+    file_desc.serialized_pb = serialized_file_desc_proto
+    return file_desc
+
+  # Add Descriptor to descriptor pool is dreprecated. Please use Add()
+  # or AddSerializedFile() to add a FileDescriptorProto instead.
+  @_Deprecated
+  def AddDescriptor(self, desc):
+    self._AddDescriptor(desc)
+
+  # Never call this method. It is for internal usage only.
+  def _AddDescriptor(self, desc):
+    """Adds a Descriptor to the pool, non-recursively.
+
+    If the Descriptor contains nested messages or enums, the caller must
+    explicitly register them. This method also registers the FileDescriptor
+    associated with the message.
+
+    Args:
+      desc: A Descriptor.
+    """
+    if not isinstance(desc, descriptor.Descriptor):
+      raise TypeError('Expected instance of descriptor.Descriptor.')
+
+    self._CheckConflictRegister(desc, desc.full_name, desc.file.name)
+
+    self._descriptors[desc.full_name] = desc
+    self._AddFileDescriptor(desc.file)
+
+  # Add EnumDescriptor to descriptor pool is dreprecated. Please use Add()
+  # or AddSerializedFile() to add a FileDescriptorProto instead.
+  @_Deprecated
+  def AddEnumDescriptor(self, enum_desc):
+    self._AddEnumDescriptor(enum_desc)
+
+  # Never call this method. It is for internal usage only.
+  def _AddEnumDescriptor(self, enum_desc):
+    """Adds an EnumDescriptor to the pool.
+
+    This method also registers the FileDescriptor associated with the enum.
+
+    Args:
+      enum_desc: An EnumDescriptor.
+    """
+
+    if not isinstance(enum_desc, descriptor.EnumDescriptor):
+      raise TypeError('Expected instance of descriptor.EnumDescriptor.')
+
+    file_name = enum_desc.file.name
+    self._CheckConflictRegister(enum_desc, enum_desc.full_name, file_name)
+    self._enum_descriptors[enum_desc.full_name] = enum_desc
+
+    # Top enum values need to be indexed.
+    # Count the number of dots to see whether the enum is toplevel or nested
+    # in a message. We cannot use enum_desc.containing_type at this stage.
+    if enum_desc.file.package:
+      top_level = (enum_desc.full_name.count('.')
+                   - enum_desc.file.package.count('.') == 1)
+    else:
+      top_level = enum_desc.full_name.count('.') == 0
+    if top_level:
+      file_name = enum_desc.file.name
+      package = enum_desc.file.package
+      for enum_value in enum_desc.values:
+        full_name = _NormalizeFullyQualifiedName(
+            '.'.join((package, enum_value.name)))
+        self._CheckConflictRegister(enum_value, full_name, file_name)
+        self._top_enum_values[full_name] = enum_value
+    self._AddFileDescriptor(enum_desc.file)
+
+  # Add ServiceDescriptor to descriptor pool is dreprecated. Please use Add()
+  # or AddSerializedFile() to add a FileDescriptorProto instead.
+  @_Deprecated
+  def AddServiceDescriptor(self, service_desc):
+    self._AddServiceDescriptor(service_desc)
+
+  # Never call this method. It is for internal usage only.
+  def _AddServiceDescriptor(self, service_desc):
+    """Adds a ServiceDescriptor to the pool.
+
+    Args:
+      service_desc: A ServiceDescriptor.
+    """
+
+    if not isinstance(service_desc, descriptor.ServiceDescriptor):
+      raise TypeError('Expected instance of descriptor.ServiceDescriptor.')
+
+    self._CheckConflictRegister(service_desc, service_desc.full_name,
+                                service_desc.file.name)
+    self._service_descriptors[service_desc.full_name] = service_desc
+
+  # Add ExtensionDescriptor to descriptor pool is dreprecated. Please use Add()
+  # or AddSerializedFile() to add a FileDescriptorProto instead.
+  @_Deprecated
+  def AddExtensionDescriptor(self, extension):
+    self._AddExtensionDescriptor(extension)
+
+  # Never call this method. It is for internal usage only.
+  def _AddExtensionDescriptor(self, extension):
+    """Adds a FieldDescriptor describing an extension to the pool.
+
+    Args:
+      extension: A FieldDescriptor.
+
+    Raises:
+      AssertionError: when another extension with the same number extends the
+        same message.
+      TypeError: when the specified extension is not a
+        descriptor.FieldDescriptor.
+    """
+    if not (isinstance(extension, descriptor.FieldDescriptor) and
+            extension.is_extension):
+      raise TypeError('Expected an extension descriptor.')
+
+    if extension.extension_scope is None:
+      self._toplevel_extensions[extension.full_name] = extension
+
+    try:
+      existing_desc = self._extensions_by_number[
+          extension.containing_type][extension.number]
+    except KeyError:
+      pass
+    else:
+      if extension is not existing_desc:
+        raise AssertionError(
+            'Extensions "%s" and "%s" both try to extend message type "%s" '
+            'with field number %d.' %
+            (extension.full_name, existing_desc.full_name,
+             extension.containing_type.full_name, extension.number))
+
+    self._extensions_by_number[extension.containing_type][
+        extension.number] = extension
+    self._extensions_by_name[extension.containing_type][
+        extension.full_name] = extension
+
+    # Also register MessageSet extensions with the type name.
+    if _IsMessageSetExtension(extension):
+      self._extensions_by_name[extension.containing_type][
+          extension.message_type.full_name] = extension
+
+  @_Deprecated
+  def AddFileDescriptor(self, file_desc):
+    self._InternalAddFileDescriptor(file_desc)
+
+  # Never call this method. It is for internal usage only.
+  def _InternalAddFileDescriptor(self, file_desc):
+    """Adds a FileDescriptor to the pool, non-recursively.
+
+    If the FileDescriptor contains messages or enums, the caller must explicitly
+    register them.
+
+    Args:
+      file_desc: A FileDescriptor.
+    """
+
+    self._AddFileDescriptor(file_desc)
+    # TODO(jieluo): This is a temporary solution for FieldDescriptor.file.
+    # FieldDescriptor.file is added in code gen. Remove this solution after
+    # maybe 2020 for compatibility reason (with 3.4.1 only).
+    for extension in file_desc.extensions_by_name.values():
+      self._file_desc_by_toplevel_extension[
+          extension.full_name] = file_desc
+
+  def _AddFileDescriptor(self, file_desc):
+    """Adds a FileDescriptor to the pool, non-recursively.
+
+    If the FileDescriptor contains messages or enums, the caller must explicitly
+    register them.
+
+    Args:
+      file_desc: A FileDescriptor.
+    """
+
+    if not isinstance(file_desc, descriptor.FileDescriptor):
+      raise TypeError('Expected instance of descriptor.FileDescriptor.')
+    self._file_descriptors[file_desc.name] = file_desc
+
+  def FindFileByName(self, file_name):
+    """Gets a FileDescriptor by file name.
+
+    Args:
+      file_name (str): The path to the file to get a descriptor for.
+
+    Returns:
+      FileDescriptor: The descriptor for the named file.
+
+    Raises:
+      KeyError: if the file cannot be found in the pool.
+    """
+
+    try:
+      return self._file_descriptors[file_name]
+    except KeyError:
+      pass
+
+    try:
+      file_proto = self._internal_db.FindFileByName(file_name)
+    except KeyError as error:
+      if self._descriptor_db:
+        file_proto = self._descriptor_db.FindFileByName(file_name)
+      else:
+        raise error
+    if not file_proto:
+      raise KeyError('Cannot find a file named %s' % file_name)
+    return self._ConvertFileProtoToFileDescriptor(file_proto)
+
+  def FindFileContainingSymbol(self, symbol):
+    """Gets the FileDescriptor for the file containing the specified symbol.
+
+    Args:
+      symbol (str): The name of the symbol to search for.
+
+    Returns:
+      FileDescriptor: Descriptor for the file that contains the specified
+      symbol.
+
+    Raises:
+      KeyError: if the file cannot be found in the pool.
+    """
+
+    symbol = _NormalizeFullyQualifiedName(symbol)
+    try:
+      return self._InternalFindFileContainingSymbol(symbol)
+    except KeyError:
+      pass
+
+    try:
+      # Try fallback database. Build and find again if possible.
+      self._FindFileContainingSymbolInDb(symbol)
+      return self._InternalFindFileContainingSymbol(symbol)
+    except KeyError:
+      raise KeyError('Cannot find a file containing %s' % symbol)
+
+  def _InternalFindFileContainingSymbol(self, symbol):
+    """Gets the already built FileDescriptor containing the specified symbol.
+
+    Args:
+      symbol (str): The name of the symbol to search for.
+
+    Returns:
+      FileDescriptor: Descriptor for the file that contains the specified
+      symbol.
+
+    Raises:
+      KeyError: if the file cannot be found in the pool.
+    """
+    try:
+      return self._descriptors[symbol].file
+    except KeyError:
+      pass
+
+    try:
+      return self._enum_descriptors[symbol].file
+    except KeyError:
+      pass
+
+    try:
+      return self._service_descriptors[symbol].file
+    except KeyError:
+      pass
+
+    try:
+      return self._top_enum_values[symbol].type.file
+    except KeyError:
+      pass
+
+    try:
+      return self._file_desc_by_toplevel_extension[symbol]
+    except KeyError:
+      pass
+
+    # Try fields, enum values and nested extensions inside a message.
+    top_name, _, sub_name = symbol.rpartition('.')
+    try:
+      message = self.FindMessageTypeByName(top_name)
+      assert (sub_name in message.extensions_by_name or
+              sub_name in message.fields_by_name or
+              sub_name in message.enum_values_by_name)
+      return message.file
+    except (KeyError, AssertionError):
+      raise KeyError('Cannot find a file containing %s' % symbol)
+
+  def FindMessageTypeByName(self, full_name):
+    """Loads the named descriptor from the pool.
+
+    Args:
+      full_name (str): The full name of the descriptor to load.
+
+    Returns:
+      Descriptor: The descriptor for the named type.
+
+    Raises:
+      KeyError: if the message cannot be found in the pool.
+    """
+
+    full_name = _NormalizeFullyQualifiedName(full_name)
+    if full_name not in self._descriptors:
+      self._FindFileContainingSymbolInDb(full_name)
+    return self._descriptors[full_name]
+
+  def FindEnumTypeByName(self, full_name):
+    """Loads the named enum descriptor from the pool.
+
+    Args:
+      full_name (str): The full name of the enum descriptor to load.
+
+    Returns:
+      EnumDescriptor: The enum descriptor for the named type.
+
+    Raises:
+      KeyError: if the enum cannot be found in the pool.
+    """
+
+    full_name = _NormalizeFullyQualifiedName(full_name)
+    if full_name not in self._enum_descriptors:
+      self._FindFileContainingSymbolInDb(full_name)
+    return self._enum_descriptors[full_name]
+
+  def FindFieldByName(self, full_name):
+    """Loads the named field descriptor from the pool.
+
+    Args:
+      full_name (str): The full name of the field descriptor to load.
+
+    Returns:
+      FieldDescriptor: The field descriptor for the named field.
+
+    Raises:
+      KeyError: if the field cannot be found in the pool.
+    """
+    full_name = _NormalizeFullyQualifiedName(full_name)
+    message_name, _, field_name = full_name.rpartition('.')
+    message_descriptor = self.FindMessageTypeByName(message_name)
+    return message_descriptor.fields_by_name[field_name]
+
+  def FindOneofByName(self, full_name):
+    """Loads the named oneof descriptor from the pool.
+
+    Args:
+      full_name (str): The full name of the oneof descriptor to load.
+
+    Returns:
+      OneofDescriptor: The oneof descriptor for the named oneof.
+
+    Raises:
+      KeyError: if the oneof cannot be found in the pool.
+    """
+    full_name = _NormalizeFullyQualifiedName(full_name)
+    message_name, _, oneof_name = full_name.rpartition('.')
+    message_descriptor = self.FindMessageTypeByName(message_name)
+    return message_descriptor.oneofs_by_name[oneof_name]
+
+  def FindExtensionByName(self, full_name):
+    """Loads the named extension descriptor from the pool.
+
+    Args:
+      full_name (str): The full name of the extension descriptor to load.
+
+    Returns:
+      FieldDescriptor: The field descriptor for the named extension.
+
+    Raises:
+      KeyError: if the extension cannot be found in the pool.
+    """
+    full_name = _NormalizeFullyQualifiedName(full_name)
+    try:
+      # The proto compiler does not give any link between the FileDescriptor
+      # and top-level extensions unless the FileDescriptorProto is added to
+      # the DescriptorDatabase, but this can impact memory usage.
+      # So we registered these extensions by name explicitly.
+      return self._toplevel_extensions[full_name]
+    except KeyError:
+      pass
+    message_name, _, extension_name = full_name.rpartition('.')
+    try:
+      # Most extensions are nested inside a message.
+      scope = self.FindMessageTypeByName(message_name)
+    except KeyError:
+      # Some extensions are defined at file scope.
+      scope = self._FindFileContainingSymbolInDb(full_name)
+    return scope.extensions_by_name[extension_name]
+
+  def FindExtensionByNumber(self, message_descriptor, number):
+    """Gets the extension of the specified message with the specified number.
+
+    Extensions have to be registered to this pool by calling :func:`Add` or
+    :func:`AddExtensionDescriptor`.
+
+    Args:
+      message_descriptor (Descriptor): descriptor of the extended message.
+      number (int): Number of the extension field.
+
+    Returns:
+      FieldDescriptor: The descriptor for the extension.
+
+    Raises:
+      KeyError: when no extension with the given number is known for the
+        specified message.
+    """
+    try:
+      return self._extensions_by_number[message_descriptor][number]
+    except KeyError:
+      self._TryLoadExtensionFromDB(message_descriptor, number)
+      return self._extensions_by_number[message_descriptor][number]
+
+  def FindAllExtensions(self, message_descriptor):
+    """Gets all the known extensions of a given message.
+
+    Extensions have to be registered to this pool by build related
+    :func:`Add` or :func:`AddExtensionDescriptor`.
+
+    Args:
+      message_descriptor (Descriptor): Descriptor of the extended message.
+
+    Returns:
+      list[FieldDescriptor]: Field descriptors describing the extensions.
+    """
+    # Fallback to descriptor db if FindAllExtensionNumbers is provided.
+    if self._descriptor_db and hasattr(
+        self._descriptor_db, 'FindAllExtensionNumbers'):
+      full_name = message_descriptor.full_name
+      all_numbers = self._descriptor_db.FindAllExtensionNumbers(full_name)
+      for number in all_numbers:
+        if number in self._extensions_by_number[message_descriptor]:
+          continue
+        self._TryLoadExtensionFromDB(message_descriptor, number)
+
+    return list(self._extensions_by_number[message_descriptor].values())
+
+  def _TryLoadExtensionFromDB(self, message_descriptor, number):
+    """Try to Load extensions from descriptor db.
+
+    Args:
+      message_descriptor: descriptor of the extended message.
+      number: the extension number that needs to be loaded.
+    """
+    if not self._descriptor_db:
+      return
+    # Only supported when FindFileContainingExtension is provided.
+    if not hasattr(
+        self._descriptor_db, 'FindFileContainingExtension'):
+      return
+
+    full_name = message_descriptor.full_name
+    file_proto = self._descriptor_db.FindFileContainingExtension(
+        full_name, number)
+
+    if file_proto is None:
+      return
+
+    try:
+      self._ConvertFileProtoToFileDescriptor(file_proto)
+    except:
+      warn_msg = ('Unable to load proto file %s for extension number %d.' %
+                  (file_proto.name, number))
+      warnings.warn(warn_msg, RuntimeWarning)
+
+  def FindServiceByName(self, full_name):
+    """Loads the named service descriptor from the pool.
+
+    Args:
+      full_name (str): The full name of the service descriptor to load.
+
+    Returns:
+      ServiceDescriptor: The service descriptor for the named service.
+
+    Raises:
+      KeyError: if the service cannot be found in the pool.
+    """
+    full_name = _NormalizeFullyQualifiedName(full_name)
+    if full_name not in self._service_descriptors:
+      self._FindFileContainingSymbolInDb(full_name)
+    return self._service_descriptors[full_name]
+
+  def FindMethodByName(self, full_name):
+    """Loads the named service method descriptor from the pool.
+
+    Args:
+      full_name (str): The full name of the method descriptor to load.
+
+    Returns:
+      MethodDescriptor: The method descriptor for the service method.
+
+    Raises:
+      KeyError: if the method cannot be found in the pool.
+    """
+    full_name = _NormalizeFullyQualifiedName(full_name)
+    service_name, _, method_name = full_name.rpartition('.')
+    service_descriptor = self.FindServiceByName(service_name)
+    return service_descriptor.methods_by_name[method_name]
+
+  def _FindFileContainingSymbolInDb(self, symbol):
+    """Finds the file in descriptor DB containing the specified symbol.
+
+    Args:
+      symbol (str): The name of the symbol to search for.
+
+    Returns:
+      FileDescriptor: The file that contains the specified symbol.
+
+    Raises:
+      KeyError: if the file cannot be found in the descriptor database.
+    """
+    try:
+      file_proto = self._internal_db.FindFileContainingSymbol(symbol)
+    except KeyError as error:
+      if self._descriptor_db:
+        file_proto = self._descriptor_db.FindFileContainingSymbol(symbol)
+      else:
+        raise error
+    if not file_proto:
+      raise KeyError('Cannot find a file containing %s' % symbol)
+    return self._ConvertFileProtoToFileDescriptor(file_proto)
+
+  def _ConvertFileProtoToFileDescriptor(self, file_proto):
+    """Creates a FileDescriptor from a proto or returns a cached copy.
+
+    This method also has the side effect of loading all the symbols found in
+    the file into the appropriate dictionaries in the pool.
+
+    Args:
+      file_proto: The proto to convert.
+
+    Returns:
+      A FileDescriptor matching the passed in proto.
+    """
+    if file_proto.name not in self._file_descriptors:
+      built_deps = list(self._GetDeps(file_proto.dependency))
+      direct_deps = [self.FindFileByName(n) for n in file_proto.dependency]
+      public_deps = [direct_deps[i] for i in file_proto.public_dependency]
+
+      file_descriptor = descriptor.FileDescriptor(
+          pool=self,
+          name=file_proto.name,
+          package=file_proto.package,
+          syntax=file_proto.syntax,
+          options=_OptionsOrNone(file_proto),
+          serialized_pb=file_proto.SerializeToString(),
+          dependencies=direct_deps,
+          public_dependencies=public_deps,
+          # pylint: disable=protected-access
+          create_key=descriptor._internal_create_key)
+      scope = {}
+
+      # This loop extracts all the message and enum types from all the
+      # dependencies of the file_proto. This is necessary to create the
+      # scope of available message types when defining the passed in
+      # file proto.
+      for dependency in built_deps:
+        scope.update(self._ExtractSymbols(
+            dependency.message_types_by_name.values()))
+        scope.update((_PrefixWithDot(enum.full_name), enum)
+                     for enum in dependency.enum_types_by_name.values())
+
+      for message_type in file_proto.message_type:
+        message_desc = self._ConvertMessageDescriptor(
+            message_type, file_proto.package, file_descriptor, scope,
+            file_proto.syntax)
+        file_descriptor.message_types_by_name[message_desc.name] = (
+            message_desc)
+
+      for enum_type in file_proto.enum_type:
+        file_descriptor.enum_types_by_name[enum_type.name] = (
+            self._ConvertEnumDescriptor(enum_type, file_proto.package,
+                                        file_descriptor, None, scope, True))
+
+      for index, extension_proto in enumerate(file_proto.extension):
+        extension_desc = self._MakeFieldDescriptor(
+            extension_proto, file_proto.package, index, file_descriptor,
+            is_extension=True)
+        extension_desc.containing_type = self._GetTypeFromScope(
+            file_descriptor.package, extension_proto.extendee, scope)
+        self._SetFieldType(extension_proto, extension_desc,
+                           file_descriptor.package, scope)
+        file_descriptor.extensions_by_name[extension_desc.name] = (
+            extension_desc)
+        self._file_desc_by_toplevel_extension[extension_desc.full_name] = (
+            file_descriptor)
+
+      for desc_proto in file_proto.message_type:
+        self._SetAllFieldTypes(file_proto.package, desc_proto, scope)
+
+      if file_proto.package:
+        desc_proto_prefix = _PrefixWithDot(file_proto.package)
+      else:
+        desc_proto_prefix = ''
+
+      for desc_proto in file_proto.message_type:
+        desc = self._GetTypeFromScope(
+            desc_proto_prefix, desc_proto.name, scope)
+        file_descriptor.message_types_by_name[desc_proto.name] = desc
+
+      for index, service_proto in enumerate(file_proto.service):
+        file_descriptor.services_by_name[service_proto.name] = (
+            self._MakeServiceDescriptor(service_proto, index, scope,
+                                        file_proto.package, file_descriptor))
+
+      self._file_descriptors[file_proto.name] = file_descriptor
+
+    # Add extensions to the pool
+    file_desc = self._file_descriptors[file_proto.name]
+    for extension in file_desc.extensions_by_name.values():
+      self._AddExtensionDescriptor(extension)
+    for message_type in file_desc.message_types_by_name.values():
+      for extension in message_type.extensions:
+        self._AddExtensionDescriptor(extension)
+
+    return file_desc
+
+  def _ConvertMessageDescriptor(self, desc_proto, package=None, file_desc=None,
+                                scope=None, syntax=None):
+    """Adds the proto to the pool in the specified package.
+
+    Args:
+      desc_proto: The descriptor_pb2.DescriptorProto protobuf message.
+      package: The package the proto should be located in.
+      file_desc: The file containing this message.
+      scope: Dict mapping short and full symbols to message and enum types.
+      syntax: string indicating syntax of the file ("proto2" or "proto3")
+
+    Returns:
+      The added descriptor.
+    """
+
+    if package:
+      desc_name = '.'.join((package, desc_proto.name))
+    else:
+      desc_name = desc_proto.name
+
+    if file_desc is None:
+      file_name = None
+    else:
+      file_name = file_desc.name
+
+    if scope is None:
+      scope = {}
+
+    nested = [
+        self._ConvertMessageDescriptor(
+            nested, desc_name, file_desc, scope, syntax)
+        for nested in desc_proto.nested_type]
+    enums = [
+        self._ConvertEnumDescriptor(enum, desc_name, file_desc, None,
+                                    scope, False)
+        for enum in desc_proto.enum_type]
+    fields = [self._MakeFieldDescriptor(field, desc_name, index, file_desc)
+              for index, field in enumerate(desc_proto.field)]
+    extensions = [
+        self._MakeFieldDescriptor(extension, desc_name, index, file_desc,
+                                  is_extension=True)
+        for index, extension in enumerate(desc_proto.extension)]
+    oneofs = [
+        # pylint: disable=g-complex-comprehension
+        descriptor.OneofDescriptor(
+            desc.name,
+            '.'.join((desc_name, desc.name)),
+            index,
+            None,
+            [],
+            _OptionsOrNone(desc),
+            # pylint: disable=protected-access
+            create_key=descriptor._internal_create_key)
+        for index, desc in enumerate(desc_proto.oneof_decl)
+    ]
+    extension_ranges = [(r.start, r.end) for r in desc_proto.extension_range]
+    if extension_ranges:
+      is_extendable = True
+    else:
+      is_extendable = False
+    desc = descriptor.Descriptor(
+        name=desc_proto.name,
+        full_name=desc_name,
+        filename=file_name,
+        containing_type=None,
+        fields=fields,
+        oneofs=oneofs,
+        nested_types=nested,
+        enum_types=enums,
+        extensions=extensions,
+        options=_OptionsOrNone(desc_proto),
+        is_extendable=is_extendable,
+        extension_ranges=extension_ranges,
+        file=file_desc,
+        serialized_start=None,
+        serialized_end=None,
+        syntax=syntax,
+        # pylint: disable=protected-access
+        create_key=descriptor._internal_create_key)
+    for nested in desc.nested_types:
+      nested.containing_type = desc
+    for enum in desc.enum_types:
+      enum.containing_type = desc
+    for field_index, field_desc in enumerate(desc_proto.field):
+      if field_desc.HasField('oneof_index'):
+        oneof_index = field_desc.oneof_index
+        oneofs[oneof_index].fields.append(fields[field_index])
+        fields[field_index].containing_oneof = oneofs[oneof_index]
+
+    scope[_PrefixWithDot(desc_name)] = desc
+    self._CheckConflictRegister(desc, desc.full_name, desc.file.name)
+    self._descriptors[desc_name] = desc
+    return desc
+
+  def _ConvertEnumDescriptor(self, enum_proto, package=None, file_desc=None,
+                             containing_type=None, scope=None, top_level=False):
+    """Make a protobuf EnumDescriptor given an EnumDescriptorProto protobuf.
+
+    Args:
+      enum_proto: The descriptor_pb2.EnumDescriptorProto protobuf message.
+      package: Optional package name for the new message EnumDescriptor.
+      file_desc: The file containing the enum descriptor.
+      containing_type: The type containing this enum.
+      scope: Scope containing available types.
+      top_level: If True, the enum is a top level symbol. If False, the enum
+          is defined inside a message.
+
+    Returns:
+      The added descriptor
+    """
+
+    if package:
+      enum_name = '.'.join((package, enum_proto.name))
+    else:
+      enum_name = enum_proto.name
+
+    if file_desc is None:
+      file_name = None
+    else:
+      file_name = file_desc.name
+
+    values = [self._MakeEnumValueDescriptor(value, index)
+              for index, value in enumerate(enum_proto.value)]
+    desc = descriptor.EnumDescriptor(name=enum_proto.name,
+                                     full_name=enum_name,
+                                     filename=file_name,
+                                     file=file_desc,
+                                     values=values,
+                                     containing_type=containing_type,
+                                     options=_OptionsOrNone(enum_proto),
+                                     # pylint: disable=protected-access
+                                     create_key=descriptor._internal_create_key)
+    scope['.%s' % enum_name] = desc
+    self._CheckConflictRegister(desc, desc.full_name, desc.file.name)
+    self._enum_descriptors[enum_name] = desc
+
+    # Add top level enum values.
+    if top_level:
+      for value in values:
+        full_name = _NormalizeFullyQualifiedName(
+            '.'.join((package, value.name)))
+        self._CheckConflictRegister(value, full_name, file_name)
+        self._top_enum_values[full_name] = value
+
+    return desc
+
+  def _MakeFieldDescriptor(self, field_proto, message_name, index,
+                           file_desc, is_extension=False):
+    """Creates a field descriptor from a FieldDescriptorProto.
+
+    For message and enum type fields, this method will do a look up
+    in the pool for the appropriate descriptor for that type. If it
+    is unavailable, it will fall back to the _source function to
+    create it. If this type is still unavailable, construction will
+    fail.
+
+    Args:
+      field_proto: The proto describing the field.
+      message_name: The name of the containing message.
+      index: Index of the field
+      file_desc: The file containing the field descriptor.
+      is_extension: Indication that this field is for an extension.
+
+    Returns:
+      An initialized FieldDescriptor object
+    """
+
+    if message_name:
+      full_name = '.'.join((message_name, field_proto.name))
+    else:
+      full_name = field_proto.name
+
+    if field_proto.json_name:
+      json_name = field_proto.json_name
+    else:
+      json_name = None
+
+    return descriptor.FieldDescriptor(
+        name=field_proto.name,
+        full_name=full_name,
+        index=index,
+        number=field_proto.number,
+        type=field_proto.type,
+        cpp_type=None,
+        message_type=None,
+        enum_type=None,
+        containing_type=None,
+        label=field_proto.label,
+        has_default_value=False,
+        default_value=None,
+        is_extension=is_extension,
+        extension_scope=None,
+        options=_OptionsOrNone(field_proto),
+        json_name=json_name,
+        file=file_desc,
+        # pylint: disable=protected-access
+        create_key=descriptor._internal_create_key)
+
+  def _SetAllFieldTypes(self, package, desc_proto, scope):
+    """Sets all the descriptor's fields's types.
+
+    This method also sets the containing types on any extensions.
+
+    Args:
+      package: The current package of desc_proto.
+      desc_proto: The message descriptor to update.
+      scope: Enclosing scope of available types.
+    """
+
+    package = _PrefixWithDot(package)
+
+    main_desc = self._GetTypeFromScope(package, desc_proto.name, scope)
+
+    if package == '.':
+      nested_package = _PrefixWithDot(desc_proto.name)
+    else:
+      nested_package = '.'.join([package, desc_proto.name])
+
+    for field_proto, field_desc in zip(desc_proto.field, main_desc.fields):
+      self._SetFieldType(field_proto, field_desc, nested_package, scope)
+
+    for extension_proto, extension_desc in (
+        zip(desc_proto.extension, main_desc.extensions)):
+      extension_desc.containing_type = self._GetTypeFromScope(
+          nested_package, extension_proto.extendee, scope)
+      self._SetFieldType(extension_proto, extension_desc, nested_package, scope)
+
+    for nested_type in desc_proto.nested_type:
+      self._SetAllFieldTypes(nested_package, nested_type, scope)
+
+  def _SetFieldType(self, field_proto, field_desc, package, scope):
+    """Sets the field's type, cpp_type, message_type and enum_type.
+
+    Args:
+      field_proto: Data about the field in proto format.
+      field_desc: The descriptor to modify.
+      package: The package the field's container is in.
+      scope: Enclosing scope of available types.
+    """
+    if field_proto.type_name:
+      desc = self._GetTypeFromScope(package, field_proto.type_name, scope)
+    else:
+      desc = None
+
+    if not field_proto.HasField('type'):
+      if isinstance(desc, descriptor.Descriptor):
+        field_proto.type = descriptor.FieldDescriptor.TYPE_MESSAGE
+      else:
+        field_proto.type = descriptor.FieldDescriptor.TYPE_ENUM
+
+    field_desc.cpp_type = descriptor.FieldDescriptor.ProtoTypeToCppProtoType(
+        field_proto.type)
+
+    if (field_proto.type == descriptor.FieldDescriptor.TYPE_MESSAGE
+        or field_proto.type == descriptor.FieldDescriptor.TYPE_GROUP):
+      field_desc.message_type = desc
+
+    if field_proto.type == descriptor.FieldDescriptor.TYPE_ENUM:
+      field_desc.enum_type = desc
+
+    if field_proto.label == descriptor.FieldDescriptor.LABEL_REPEATED:
+      field_desc.has_default_value = False
+      field_desc.default_value = []
+    elif field_proto.HasField('default_value'):
+      field_desc.has_default_value = True
+      if (field_proto.type == descriptor.FieldDescriptor.TYPE_DOUBLE or
+          field_proto.type == descriptor.FieldDescriptor.TYPE_FLOAT):
+        field_desc.default_value = float(field_proto.default_value)
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_STRING:
+        field_desc.default_value = field_proto.default_value
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_BOOL:
+        field_desc.default_value = field_proto.default_value.lower() == 'true'
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_ENUM:
+        field_desc.default_value = field_desc.enum_type.values_by_name[
+            field_proto.default_value].number
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_BYTES:
+        field_desc.default_value = text_encoding.CUnescape(
+            field_proto.default_value)
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_MESSAGE:
+        field_desc.default_value = None
+      else:
+        # All other types are of the "int" type.
+        field_desc.default_value = int(field_proto.default_value)
+    else:
+      field_desc.has_default_value = False
+      if (field_proto.type == descriptor.FieldDescriptor.TYPE_DOUBLE or
+          field_proto.type == descriptor.FieldDescriptor.TYPE_FLOAT):
+        field_desc.default_value = 0.0
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_STRING:
+        field_desc.default_value = u''
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_BOOL:
+        field_desc.default_value = False
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_ENUM:
+        field_desc.default_value = field_desc.enum_type.values[0].number
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_BYTES:
+        field_desc.default_value = b''
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_MESSAGE:
+        field_desc.default_value = None
+      elif field_proto.type == descriptor.FieldDescriptor.TYPE_GROUP:
+        field_desc.default_value = None
+      else:
+        # All other types are of the "int" type.
+        field_desc.default_value = 0
+
+    field_desc.type = field_proto.type
+
+  def _MakeEnumValueDescriptor(self, value_proto, index):
+    """Creates a enum value descriptor object from a enum value proto.
+
+    Args:
+      value_proto: The proto describing the enum value.
+      index: The index of the enum value.
+
+    Returns:
+      An initialized EnumValueDescriptor object.
+    """
+
+    return descriptor.EnumValueDescriptor(
+        name=value_proto.name,
+        index=index,
+        number=value_proto.number,
+        options=_OptionsOrNone(value_proto),
+        type=None,
+        # pylint: disable=protected-access
+        create_key=descriptor._internal_create_key)
+
+  def _MakeServiceDescriptor(self, service_proto, service_index, scope,
+                             package, file_desc):
+    """Make a protobuf ServiceDescriptor given a ServiceDescriptorProto.
+
+    Args:
+      service_proto: The descriptor_pb2.ServiceDescriptorProto protobuf message.
+      service_index: The index of the service in the File.
+      scope: Dict mapping short and full symbols to message and enum types.
+      package: Optional package name for the new message EnumDescriptor.
+      file_desc: The file containing the service descriptor.
+
+    Returns:
+      The added descriptor.
+    """
+
+    if package:
+      service_name = '.'.join((package, service_proto.name))
+    else:
+      service_name = service_proto.name
+
+    methods = [self._MakeMethodDescriptor(method_proto, service_name, package,
+                                          scope, index)
+               for index, method_proto in enumerate(service_proto.method)]
+    desc = descriptor.ServiceDescriptor(
+        name=service_proto.name,
+        full_name=service_name,
+        index=service_index,
+        methods=methods,
+        options=_OptionsOrNone(service_proto),
+        file=file_desc,
+        # pylint: disable=protected-access
+        create_key=descriptor._internal_create_key)
+    self._CheckConflictRegister(desc, desc.full_name, desc.file.name)
+    self._service_descriptors[service_name] = desc
+    return desc
+
+  def _MakeMethodDescriptor(self, method_proto, service_name, package, scope,
+                            index):
+    """Creates a method descriptor from a MethodDescriptorProto.
+
+    Args:
+      method_proto: The proto describing the method.
+      service_name: The name of the containing service.
+      package: Optional package name to look up for types.
+      scope: Scope containing available types.
+      index: Index of the method in the service.
+
+    Returns:
+      An initialized MethodDescriptor object.
+    """
+    full_name = '.'.join((service_name, method_proto.name))
+    input_type = self._GetTypeFromScope(
+        package, method_proto.input_type, scope)
+    output_type = self._GetTypeFromScope(
+        package, method_proto.output_type, scope)
+    return descriptor.MethodDescriptor(
+        name=method_proto.name,
+        full_name=full_name,
+        index=index,
+        containing_service=None,
+        input_type=input_type,
+        output_type=output_type,
+        client_streaming=method_proto.client_streaming,
+        server_streaming=method_proto.server_streaming,
+        options=_OptionsOrNone(method_proto),
+        # pylint: disable=protected-access
+        create_key=descriptor._internal_create_key)
+
+  def _ExtractSymbols(self, descriptors):
+    """Pulls out all the symbols from descriptor protos.
+
+    Args:
+      descriptors: The messages to extract descriptors from.
+    Yields:
+      A two element tuple of the type name and descriptor object.
+    """
+
+    for desc in descriptors:
+      yield (_PrefixWithDot(desc.full_name), desc)
+      for symbol in self._ExtractSymbols(desc.nested_types):
+        yield symbol
+      for enum in desc.enum_types:
+        yield (_PrefixWithDot(enum.full_name), enum)
+
+  def _GetDeps(self, dependencies, visited=None):
+    """Recursively finds dependencies for file protos.
+
+    Args:
+      dependencies: The names of the files being depended on.
+      visited: The names of files already found.
+
+    Yields:
+      Each direct and indirect dependency.
+    """
+
+    visited = visited or set()
+    for dependency in dependencies:
+      if dependency not in visited:
+        visited.add(dependency)
+        dep_desc = self.FindFileByName(dependency)
+        yield dep_desc
+        public_files = [d.name for d in dep_desc.public_dependencies]
+        yield from self._GetDeps(public_files, visited)
+
+  def _GetTypeFromScope(self, package, type_name, scope):
+    """Finds a given type name in the current scope.
+
+    Args:
+      package: The package the proto should be located in.
+      type_name: The name of the type to be found in the scope.
+      scope: Dict mapping short and full symbols to message and enum types.
+
+    Returns:
+      The descriptor for the requested type.
+    """
+    if type_name not in scope:
+      components = _PrefixWithDot(package).split('.')
+      while components:
+        possible_match = '.'.join(components + [type_name])
+        if possible_match in scope:
+          type_name = possible_match
+          break
+        else:
+          components.pop(-1)
+    return scope[type_name]
+
+
+def _PrefixWithDot(name):
+  return name if name.startswith('.') else '.%s' % name
+
+
+if _USE_C_DESCRIPTORS:
+  # TODO(amauryfa): This pool could be constructed from Python code, when we
+  # support a flag like 'use_cpp_generated_pool=True'.
+  # pylint: disable=protected-access
+  _DEFAULT = descriptor._message.default_pool
+else:
+  _DEFAULT = DescriptorPool()
+
+
+def Default():
+  return _DEFAULT
diff --git a/python/google/protobuf/duration_pb2.py b/python/google/protobuf/duration_pb2.py
new file mode 100644
index 0000000..813a92d
--- /dev/null
+++ b/python/google/protobuf/duration_pb2.py
@@ -0,0 +1,78 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: google/protobuf/duration.proto
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='google/protobuf/duration.proto',
+  package='google.protobuf',
+  syntax='proto3',
+  serialized_options=b'\n\023com.google.protobufB\rDurationProtoP\001Z1google.golang.org/protobuf/types/known/durationpb\370\001\001\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTypes',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x1egoogle/protobuf/duration.proto\x12\x0fgoogle.protobuf\"*\n\x08\x44uration\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x12\r\n\x05nanos\x18\x02 \x01(\x05\x42\x83\x01\n\x13\x63om.google.protobufB\rDurationProtoP\x01Z1google.golang.org/protobuf/types/known/durationpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3'
+)
+
+
+
+
+_DURATION = _descriptor.Descriptor(
+  name='Duration',
+  full_name='google.protobuf.Duration',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='seconds', full_name='google.protobuf.Duration.seconds', index=0,
+      number=1, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='nanos', full_name='google.protobuf.Duration.nanos', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=51,
+  serialized_end=93,
+)
+
+DESCRIPTOR.message_types_by_name['Duration'] = _DURATION
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Duration = _reflection.GeneratedProtocolMessageType('Duration', (_message.Message,), {
+  'DESCRIPTOR' : _DURATION,
+  '__module__' : 'google.protobuf.duration_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.Duration)
+  })
+_sym_db.RegisterMessage(Duration)
+
+
+DESCRIPTOR._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/python/google/protobuf/empty_pb2.py b/python/google/protobuf/empty_pb2.py
new file mode 100644
index 0000000..009d4d5
--- /dev/null
+++ b/python/google/protobuf/empty_pb2.py
@@ -0,0 +1,64 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: google/protobuf/empty.proto
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='google/protobuf/empty.proto',
+  package='google.protobuf',
+  syntax='proto3',
+  serialized_options=b'\n\023com.google.protobufB\nEmptyProtoP\001Z.google.golang.org/protobuf/types/known/emptypb\370\001\001\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTypes',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x1bgoogle/protobuf/empty.proto\x12\x0fgoogle.protobuf\"\x07\n\x05\x45mptyB}\n\x13\x63om.google.protobufB\nEmptyProtoP\x01Z.google.golang.org/protobuf/types/known/emptypb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3'
+)
+
+
+
+
+_EMPTY = _descriptor.Descriptor(
+  name='Empty',
+  full_name='google.protobuf.Empty',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=48,
+  serialized_end=55,
+)
+
+DESCRIPTOR.message_types_by_name['Empty'] = _EMPTY
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), {
+  'DESCRIPTOR' : _EMPTY,
+  '__module__' : 'google.protobuf.empty_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.Empty)
+  })
+_sym_db.RegisterMessage(Empty)
+
+
+DESCRIPTOR._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/python/google/protobuf/field_mask_pb2.py b/python/google/protobuf/field_mask_pb2.py
new file mode 100644
index 0000000..c749424
--- /dev/null
+++ b/python/google/protobuf/field_mask_pb2.py
@@ -0,0 +1,71 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: google/protobuf/field_mask.proto
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='google/protobuf/field_mask.proto',
+  package='google.protobuf',
+  syntax='proto3',
+  serialized_options=b'\n\023com.google.protobufB\016FieldMaskProtoP\001Z2google.golang.org/protobuf/types/known/fieldmaskpb\370\001\001\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTypes',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n google/protobuf/field_mask.proto\x12\x0fgoogle.protobuf\"\x1a\n\tFieldMask\x12\r\n\x05paths\x18\x01 \x03(\tB\x85\x01\n\x13\x63om.google.protobufB\x0e\x46ieldMaskProtoP\x01Z2google.golang.org/protobuf/types/known/fieldmaskpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3'
+)
+
+
+
+
+_FIELDMASK = _descriptor.Descriptor(
+  name='FieldMask',
+  full_name='google.protobuf.FieldMask',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='paths', full_name='google.protobuf.FieldMask.paths', index=0,
+      number=1, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=53,
+  serialized_end=79,
+)
+
+DESCRIPTOR.message_types_by_name['FieldMask'] = _FIELDMASK
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+FieldMask = _reflection.GeneratedProtocolMessageType('FieldMask', (_message.Message,), {
+  'DESCRIPTOR' : _FIELDMASK,
+  '__module__' : 'google.protobuf.field_mask_pb2'
+  # @@protoc_insertion_point(class_scope:google.protobuf.FieldMask)
+  })
+_sym_db.RegisterMessage(FieldMask)
+
+
+DESCRIPTOR._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/python/google/protobuf/internal/__init__.py b/python/google/protobuf/internal/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/google/protobuf/internal/__init__.py
diff --git a/python/google/protobuf/internal/_parameterized.py b/python/google/protobuf/internal/_parameterized.py
new file mode 100755
index 0000000..afdbb78
--- /dev/null
+++ b/python/google/protobuf/internal/_parameterized.py
@@ -0,0 +1,443 @@
+#! /usr/bin/env python
+#
+# Protocol Buffers - Google's data interchange format
+# Copyright 2008 Google Inc.  All rights reserved.
+# https://developers.google.com/protocol-buffers/
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Adds support for parameterized tests to Python's unittest TestCase class.
+
+A parameterized test is a method in a test case that is invoked with different
+argument tuples.
+
+A simple example:
+
+  class AdditionExample(parameterized.TestCase):
+    @parameterized.parameters(
+       (1, 2, 3),
+       (4, 5, 9),
+       (1, 1, 3))
+    def testAddition(self, op1, op2, result):
+      self.assertEqual(result, op1 + op2)
+
+
+Each invocation is a separate test case and properly isolated just
+like a normal test method, with its own setUp/tearDown cycle. In the
+example above, there are three separate testcases, one of which will
+fail due to an assertion error (1 + 1 != 3).
+
+Parameters for individual test cases can be tuples (with positional parameters)
+or dictionaries (with named parameters):
+
+  class AdditionExample(parameterized.TestCase):
+    @parameterized.parameters(
+       {'op1': 1, 'op2': 2, 'result': 3},
+       {'op1': 4, 'op2': 5, 'result': 9},
+    )
+    def testAddition(self, op1, op2, result):
+      self.assertEqual(result, op1 + op2)
+
+If a parameterized test fails, the error message will show the
+original test name (which is modified internally) and the arguments
+for the specific invocation, which are part of the string returned by
+the shortDescription() method on test cases.
+
+The id method of the test, used internally by the unittest framework,
+is also modified to show the arguments. To make sure that test names
+stay the same across several invocations, object representations like
+
+  >>> class Foo(object):
+  ...  pass
+  >>> repr(Foo())
+  '<__main__.Foo object at 0x23d8610>'
+
+are turned into '<__main__.Foo>'. For even more descriptive names,
+especially in test logs, you can use the named_parameters decorator. In
+this case, only tuples are supported, and the first parameters has to
+be a string (or an object that returns an apt name when converted via
+str()):
+
+  class NamedExample(parameterized.TestCase):
+    @parameterized.named_parameters(
+       ('Normal', 'aa', 'aaa', True),
+       ('EmptyPrefix', '', 'abc', True),
+       ('BothEmpty', '', '', True))
+    def testStartsWith(self, prefix, string, result):
+      self.assertEqual(result, strings.startswith(prefix))
+
+Named tests also have the benefit that they can be run individually
+from the command line:
+
+  $ testmodule.py NamedExample.testStartsWithNormal
+  .
+  --------------------------------------------------------------------
+  Ran 1 test in 0.000s
+
+  OK
+
+Parameterized Classes
+=====================
+If invocation arguments are shared across test methods in a single
+TestCase class, instead of decorating all test methods
+individually, the class itself can be decorated:
+
+  @parameterized.parameters(
+    (1, 2, 3)
+    (4, 5, 9))
+  class ArithmeticTest(parameterized.TestCase):
+    def testAdd(self, arg1, arg2, result):
+      self.assertEqual(arg1 + arg2, result)
+
+    def testSubtract(self, arg2, arg2, result):
+      self.assertEqual(result - arg1, arg2)
+
+Inputs from Iterables
+=====================
+If parameters should be shared across several test cases, or are dynamically
+created from other sources, a single non-tuple iterable can be passed into
+the decorator. This iterable will be used to obtain the test cases:
+
+  class AdditionExample(parameterized.TestCase):
+    @parameterized.parameters(
+      c.op1, c.op2, c.result for c in testcases
+    )
+    def testAddition(self, op1, op2, result):
+      self.assertEqual(result, op1 + op2)
+
+
+Single-Argument Test Methods
+============================
+If a test method takes only one argument, the single argument does not need to
+be wrapped into a tuple:
+
+  class NegativeNumberExample(parameterized.TestCase):
+    @parameterized.parameters(
+       -1, -3, -4, -5
+    )
+    def testIsNegative(self, arg):
+      self.assertTrue(IsNegative(arg))
+"""
+
+__author__ = 'tmarek@google.com (Torsten Marek)'
+
+import functools
+import re
+import types
+import unittest
+import uuid
+
+try:
+  # Since python 3
+  import collections.abc as collections_abc
+except ImportError:
+  # Won't work after python 3.8
+  import collections as collections_abc
+
+ADDR_RE = re.compile(r'\<([a-zA-Z0-9_\-\.]+) object at 0x[a-fA-F0-9]+\>')
+_SEPARATOR = uuid.uuid1().hex
+_FIRST_ARG = object()
+_ARGUMENT_REPR = object()
+
+
+def _CleanRepr(obj):
+  return ADDR_RE.sub(r'<\1>', repr(obj))
+
+
+# Helper function formerly from the unittest module, removed from it in
+# Python 2.7.
+def _StrClass(cls):
+  return '%s.%s' % (cls.__module__, cls.__name__)
+
+
+def _NonStringIterable(obj):
+  return (isinstance(obj, collections_abc.Iterable) and
+          not isinstance(obj, str))
+
+
+def _FormatParameterList(testcase_params):
+  if isinstance(testcase_params, collections_abc.Mapping):
+    return ', '.join('%s=%s' % (argname, _CleanRepr(value))
+                     for argname, value in testcase_params.items())
+  elif _NonStringIterable(testcase_params):
+    return ', '.join(map(_CleanRepr, testcase_params))
+  else:
+    return _FormatParameterList((testcase_params,))
+
+
+class _ParameterizedTestIter(object):
+  """Callable and iterable class for producing new test cases."""
+
+  def __init__(self, test_method, testcases, naming_type):
+    """Returns concrete test functions for a test and a list of parameters.
+
+    The naming_type is used to determine the name of the concrete
+    functions as reported by the unittest framework. If naming_type is
+    _FIRST_ARG, the testcases must be tuples, and the first element must
+    have a string representation that is a valid Python identifier.
+
+    Args:
+      test_method: The decorated test method.
+      testcases: (list of tuple/dict) A list of parameter
+                 tuples/dicts for individual test invocations.
+      naming_type: The test naming type, either _NAMED or _ARGUMENT_REPR.
+    """
+    self._test_method = test_method
+    self.testcases = testcases
+    self._naming_type = naming_type
+
+  def __call__(self, *args, **kwargs):
+    raise RuntimeError('You appear to be running a parameterized test case '
+                       'without having inherited from parameterized.'
+                       'TestCase. This is bad because none of '
+                       'your test cases are actually being run.')
+
+  def __iter__(self):
+    test_method = self._test_method
+    naming_type = self._naming_type
+
+    def MakeBoundParamTest(testcase_params):
+      @functools.wraps(test_method)
+      def BoundParamTest(self):
+        if isinstance(testcase_params, collections_abc.Mapping):
+          test_method(self, **testcase_params)
+        elif _NonStringIterable(testcase_params):
+          test_method(self, *testcase_params)
+        else:
+          test_method(self, testcase_params)
+
+      if naming_type is _FIRST_ARG:
+        # Signal the metaclass that the name of the test function is unique
+        # and descriptive.
+        BoundParamTest.__x_use_name__ = True
+        BoundParamTest.__name__ += str(testcase_params[0])
+        testcase_params = testcase_params[1:]
+      elif naming_type is _ARGUMENT_REPR:
+        # __x_extra_id__ is used to pass naming information to the __new__
+        # method of TestGeneratorMetaclass.
+        # The metaclass will make sure to create a unique, but nondescriptive
+        # name for this test.
+        BoundParamTest.__x_extra_id__ = '(%s)' % (
+            _FormatParameterList(testcase_params),)
+      else:
+        raise RuntimeError('%s is not a valid naming type.' % (naming_type,))
+
+      BoundParamTest.__doc__ = '%s(%s)' % (
+          BoundParamTest.__name__, _FormatParameterList(testcase_params))
+      if test_method.__doc__:
+        BoundParamTest.__doc__ += '\n%s' % (test_method.__doc__,)
+      return BoundParamTest
+    return (MakeBoundParamTest(c) for c in self.testcases)
+
+
+def _IsSingletonList(testcases):
+  """True iff testcases contains only a single non-tuple element."""
+  return len(testcases) == 1 and not isinstance(testcases[0], tuple)
+
+
+def _ModifyClass(class_object, testcases, naming_type):
+  assert not getattr(class_object, '_id_suffix', None), (
+      'Cannot add parameters to %s,'
+      ' which already has parameterized methods.' % (class_object,))
+  class_object._id_suffix = id_suffix = {}
+  # We change the size of __dict__ while we iterate over it,
+  # which Python 3.x will complain about, so use copy().
+  for name, obj in class_object.__dict__.copy().items():
+    if (name.startswith(unittest.TestLoader.testMethodPrefix)
+        and isinstance(obj, types.FunctionType)):
+      delattr(class_object, name)
+      methods = {}
+      _UpdateClassDictForParamTestCase(
+          methods, id_suffix, name,
+          _ParameterizedTestIter(obj, testcases, naming_type))
+      for name, meth in methods.items():
+        setattr(class_object, name, meth)
+
+
+def _ParameterDecorator(naming_type, testcases):
+  """Implementation of the parameterization decorators.
+
+  Args:
+    naming_type: The naming type.
+    testcases: Testcase parameters.
+
+  Returns:
+    A function for modifying the decorated object.
+  """
+  def _Apply(obj):
+    if isinstance(obj, type):
+      _ModifyClass(
+          obj,
+          list(testcases) if not isinstance(testcases, collections_abc.Sequence)
+          else testcases,
+          naming_type)
+      return obj
+    else:
+      return _ParameterizedTestIter(obj, testcases, naming_type)
+
+  if _IsSingletonList(testcases):
+    assert _NonStringIterable(testcases[0]), (
+        'Single parameter argument must be a non-string iterable')
+    testcases = testcases[0]
+
+  return _Apply
+
+
+def parameters(*testcases):  # pylint: disable=invalid-name
+  """A decorator for creating parameterized tests.
+
+  See the module docstring for a usage example.
+  Args:
+    *testcases: Parameters for the decorated method, either a single
+                iterable, or a list of tuples/dicts/objects (for tests
+                with only one argument).
+
+  Returns:
+     A test generator to be handled by TestGeneratorMetaclass.
+  """
+  return _ParameterDecorator(_ARGUMENT_REPR, testcases)
+
+
+def named_parameters(*testcases):  # pylint: disable=invalid-name
+  """A decorator for creating parameterized tests.
+
+  See the module docstring for a usage example. The first element of
+  each parameter tuple should be a string and will be appended to the
+  name of the test method.
+
+  Args:
+    *testcases: Parameters for the decorated method, either a single
+                iterable, or a list of tuples.
+
+  Returns:
+     A test generator to be handled by TestGeneratorMetaclass.
+  """
+  return _ParameterDecorator(_FIRST_ARG, testcases)
+
+
+class TestGeneratorMetaclass(type):
+  """Metaclass for test cases with test generators.
+
+  A test generator is an iterable in a testcase that produces callables. These
+  callables must be single-argument methods. These methods are injected into
+  the class namespace and the original iterable is removed. If the name of the
+  iterable conforms to the test pattern, the injected methods will be picked
+  up as tests by the unittest framework.
+
+  In general, it is supposed to be used in conjunction with the
+  parameters decorator.
+  """
+
+  def __new__(mcs, class_name, bases, dct):
+    dct['_id_suffix'] = id_suffix = {}
+    for name, obj in dct.copy().items():
+      if (name.startswith(unittest.TestLoader.testMethodPrefix) and
+          _NonStringIterable(obj)):
+        iterator = iter(obj)
+        dct.pop(name)
+        _UpdateClassDictForParamTestCase(dct, id_suffix, name, iterator)
+
+    return type.__new__(mcs, class_name, bases, dct)
+
+
+def _UpdateClassDictForParamTestCase(dct, id_suffix, name, iterator):
+  """Adds individual test cases to a dictionary.
+
+  Args:
+    dct: The target dictionary.
+    id_suffix: The dictionary for mapping names to test IDs.
+    name: The original name of the test case.
+    iterator: The iterator generating the individual test cases.
+  """
+  for idx, func in enumerate(iterator):
+    assert callable(func), 'Test generators must yield callables, got %r' % (
+        func,)
+    if getattr(func, '__x_use_name__', False):
+      new_name = func.__name__
+    else:
+      new_name = '%s%s%d' % (name, _SEPARATOR, idx)
+    assert new_name not in dct, (
+        'Name of parameterized test case "%s" not unique' % (new_name,))
+    dct[new_name] = func
+    id_suffix[new_name] = getattr(func, '__x_extra_id__', '')
+
+
+class TestCase(unittest.TestCase, metaclass=TestGeneratorMetaclass):
+  """Base class for test cases using the parameters decorator."""
+
+  def _OriginalName(self):
+    return self._testMethodName.split(_SEPARATOR)[0]
+
+  def __str__(self):
+    return '%s (%s)' % (self._OriginalName(), _StrClass(self.__class__))
+
+  def id(self):  # pylint: disable=invalid-name
+    """Returns the descriptive ID of the test.
+
+    This is used internally by the unittesting framework to get a name
+    for the test to be used in reports.
+
+    Returns:
+      The test id.
+    """
+    return '%s.%s%s' % (_StrClass(self.__class__),
+                        self._OriginalName(),
+                        self._id_suffix.get(self._testMethodName, ''))
+
+
+def CoopTestCase(other_base_class):
+  """Returns a new base class with a cooperative metaclass base.
+
+  This enables the TestCase to be used in combination
+  with other base classes that have custom metaclasses, such as
+  mox.MoxTestBase.
+
+  Only works with metaclasses that do not override type.__new__.
+
+  Example:
+
+    import google3
+    import mox
+
+    from google3.testing.pybase import parameterized
+
+    class ExampleTest(parameterized.CoopTestCase(mox.MoxTestBase)):
+      ...
+
+  Args:
+    other_base_class: (class) A test case base class.
+
+  Returns:
+    A new class object.
+  """
+  metaclass = type(
+      'CoopMetaclass',
+      (other_base_class.__metaclass__,
+       TestGeneratorMetaclass), {})
+  return metaclass(
+      'CoopTestCase',
+      (other_base_class, TestCase), {})
diff --git a/python/google/protobuf/internal/any_test.proto b/python/google/protobuf/internal/any_test.proto
new file mode 100644
index 0000000..1a563fd
--- /dev/null
+++ b/python/google/protobuf/internal/any_test.proto
@@ -0,0 +1,51 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: jieluo@google.com (Jie Luo)
+
+syntax = "proto2";
+
+package google.protobuf.internal;
+
+import "google/protobuf/any.proto";
+
+message TestAny {
+  optional google.protobuf.Any value = 1;
+  optional int32 int_value = 2;
+  map<string,int32> map_value = 3;
+  extensions 10 to max;
+}
+
+message TestAnyExtension1 {
+  extend TestAny {
+    optional TestAnyExtension1 extension1 = 98418603;
+  }
+  optional int32 i = 15;
+}
diff --git a/python/google/protobuf/internal/api_implementation.cc b/python/google/protobuf/internal/api_implementation.cc
new file mode 100644
index 0000000..33f5b04
--- /dev/null
+++ b/python/google/protobuf/internal/api_implementation.cc
@@ -0,0 +1,111 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#define PY_SSIZE_T_CLEAN
+#include <Python.h>
+
+namespace google {
+namespace protobuf {
+namespace python {
+
+// Version constant.
+// This is either 0 for python, 1 for CPP V1, 2 for CPP V2.
+//
+// 0 is default and is equivalent to
+//   PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
+//
+// 1 is set with -DPYTHON_PROTO2_CPP_IMPL_V1 and is equivalent to
+//   PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
+// and
+//   PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=1
+//
+// 2 is set with -DPYTHON_PROTO2_CPP_IMPL_V2 and is equivalent to
+//   PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
+// and
+//   PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2
+#ifdef PYTHON_PROTO2_CPP_IMPL_V1
+#error "PYTHON_PROTO2_CPP_IMPL_V1 is no longer supported."
+#else
+#ifdef PYTHON_PROTO2_CPP_IMPL_V2
+static int kImplVersion = 2;
+#else
+#ifdef PYTHON_PROTO2_PYTHON_IMPL
+static int kImplVersion = 0;
+#else
+
+static int kImplVersion = -1;  // -1 means "Unspecified by compiler flags".
+
+#endif  // PYTHON_PROTO2_PYTHON_IMPL
+#endif  // PYTHON_PROTO2_CPP_IMPL_V2
+#endif  // PYTHON_PROTO2_CPP_IMPL_V1
+
+static const char* kImplVersionName = "api_version";
+
+static const char* kModuleName = "_api_implementation";
+static const char kModuleDocstring[] =
+    "_api_implementation is a module that exposes compile-time constants that\n"
+    "determine the default API implementation to use for Python proto2.\n"
+    "\n"
+    "It complements api_implementation.py by setting defaults using "
+    "compile-time\n"
+    "constants defined in C, such that one can set defaults at compilation\n"
+    "(e.g. with blaze flag --copt=-DPYTHON_PROTO2_CPP_IMPL_V2).";
+
+static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT,
+                                     kModuleName,
+                                     kModuleDocstring,
+                                     -1,
+                                     nullptr,
+                                     nullptr,
+                                     nullptr,
+                                     nullptr,
+                                     nullptr};
+
+extern "C" {
+PyMODINIT_FUNC PyInit__api_implementation() {
+  PyObject* module = PyModule_Create(&_module);
+  if (module == nullptr) {
+    return nullptr;
+  }
+
+  // Adds the module variable "api_version".
+  if (PyModule_AddIntConstant(module, const_cast<char*>(kImplVersionName),
+                              kImplVersion)) {
+    Py_DECREF(module);
+    return nullptr;
+  }
+
+  return module;
+}
+}
+
+}  // namespace python
+}  // namespace protobuf
+}  // namespace google
diff --git a/python/google/protobuf/internal/api_implementation.py b/python/google/protobuf/internal/api_implementation.py
new file mode 100644
index 0000000..7458648
--- /dev/null
+++ b/python/google/protobuf/internal/api_implementation.py
@@ -0,0 +1,168 @@
+# Protocol Buffers - Google's data interchange format
+# Copyright 2008 Google Inc.  All rights reserved.
+# https://developers.google.com/protocol-buffers/
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Determine which implementation of the protobuf API is used in this process.
+"""
+
+import importlib
+import os
+import sys
+import warnings
+
+
+def _ApiVersionToImplementationType(api_version):
+  if api_version == 2:
+    return 'cpp'
+  if api_version == 1:
+    raise ValueError('api_version=1 is no longer supported.')
+  if api_version == 0:
+    return 'python'
+  return None
+
+
+_implementation_type = None
+try:
+  # pylint: disable=g-import-not-at-top
+  from google.protobuf.internal import _api_implementation
+  # The compile-time constants in the _api_implementation module can be used to
+  # switch to a certain implementation of the Python API at build time.
+  _implementation_type = _ApiVersionToImplementationType(
+      _api_implementation.api_version)
+except ImportError:
+  pass  # Unspecified by compiler flags.
+
+
+def _CanImport(mod_name):
+  try:
+    mod = importlib.import_module(mod_name)
+    # Work around a known issue in the classic bootstrap .par import hook.
+    if not mod:
+      raise ImportError(mod_name + ' import succeeded but was None')
+    return True
+  except ImportError:
+    return False
+
+
+if _implementation_type is None:
+  if _CanImport('google._upb._message'):
+    _implementation_type = 'upb'
+  elif _CanImport('google.protobuf.pyext._message'):
+    _implementation_type = 'cpp'
+  else:
+    _implementation_type = 'python'
+
+
+# This environment variable can be used to switch to a certain implementation
+# of the Python API, overriding the compile-time constants in the
+# _api_implementation module. Right now only 'python', 'cpp' and 'upb' are
+# valid values. Any other value will raise error.
+_implementation_type = os.getenv('PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION',
+                                 _implementation_type)
+
+if _implementation_type not in ('python', 'cpp', 'upb'):
+  raise ValueError('PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION {0} is not '
+                   'supported. Please set to \'python\', \'cpp\' or '
+                   '\'upb\'.'.format(_implementation_type))
+
+if 'PyPy' in sys.version and _implementation_type == 'cpp':
+  warnings.warn('PyPy does not work yet with cpp protocol buffers. '
+                'Falling back to the python implementation.')
+  _implementation_type = 'python'
+
+_c_module = None
+
+if _implementation_type == 'cpp':
+  try:
+    # pylint: disable=g-import-not-at-top
+    from google.protobuf.pyext import _message
+    _c_module = _message
+    del _message
+  except ImportError:
+    # TODO(jieluo): fail back to python
+    warnings.warn(
+        'Selected implementation cpp is not available.')
+    pass
+
+if _implementation_type == 'upb':
+  try:
+    # pylint: disable=g-import-not-at-top
+    from google._upb import _message
+    _c_module = _message
+    del _message
+  except ImportError:
+    warnings.warn('Selected implementation upb is not available. '
+                  'Falling back to the python implementation.')
+    _implementation_type = 'python'
+    pass
+
+# Detect if serialization should be deterministic by default
+try:
+  # The presence of this module in a build allows the proto implementation to
+  # be upgraded merely via build deps.
+  #
+  # NOTE: Merely importing this automatically enables deterministic proto
+  # serialization for C++ code, but we still need to export it as a boolean so
+  # that we can do the same for `_implementation_type == 'python'`.
+  #
+  # NOTE2: It is possible for C++ code to enable deterministic serialization by
+  # default _without_ affecting Python code, if the C++ implementation is not in
+  # use by this module.  That is intended behavior, so we don't actually expose
+  # this boolean outside of this module.
+  #
+  # pylint: disable=g-import-not-at-top,unused-import
+  from google.protobuf import enable_deterministic_proto_serialization
+  _python_deterministic_proto_serialization = True
+except ImportError:
+  _python_deterministic_proto_serialization = False
+
+
+# Usage of this function is discouraged. Clients shouldn't care which
+# implementation of the API is in use. Note that there is no guarantee
+# that differences between APIs will be maintained.
+# Please don't use this function if possible.
+def Type():
+  return _implementation_type
+
+
+def _SetType(implementation_type):
+  """Never use! Only for protobuf benchmark."""
+  global _implementation_type
+  _implementation_type = implementation_type
+
+
+# See comment on 'Type' above.
+# TODO(jieluo): Remove the API, it returns a constant. b/228102101
+def Version():
+  return 2
+
+
+# For internal use only
+def IsPythonDefaultSerializationDeterministic():
+  return _python_deterministic_proto_serialization
diff --git a/python/google/protobuf/internal/builder.py b/python/google/protobuf/internal/builder.py
new file mode 100644
index 0000000..64353ee
--- /dev/null
+++ b/python/google/protobuf/internal/builder.py
@@ -0,0 +1,130 @@
+# Protocol Buffers - Google's data interchange format
+# Copyright 2008 Google Inc.  All rights reserved.
+# https://developers.google.com/protocol-buffers/
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Builds descriptors, message classes and services for generated _pb2.py.
+
+This file is only called in python generated _pb2.py files. It builds
+descriptors, message classes and services that users can directly use
+in generated code.
+"""
+
+__author__ = 'jieluo@google.com (Jie Luo)'
+
+from google.protobuf.internal import enum_type_wrapper
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+
+_sym_db = _symbol_database.Default()
+
+
+def BuildMessageAndEnumDescriptors(file_des, module):
+  """Builds message and enum descriptors.
+
+  Args:
+    file_des: FileDescriptor of the .proto file
+    module: Generated _pb2 module
+  """
+
+  def BuildNestedDescriptors(msg_des, prefix):
+    for (name, nested_msg) in msg_des.nested_types_by_name.items():
+      module_name = prefix + name.upper()
+      module[module_name] = nested_msg
+      BuildNestedDescriptors(nested_msg, module_name + '_')
+    for enum_des in msg_des.enum_types:
+      module[prefix + enum_des.name.upper()] = enum_des
+
+  for (name, msg_des) in file_des.message_types_by_name.items():
+    module_name = '_' + name.upper()
+    module[module_name] = msg_des
+    BuildNestedDescriptors(msg_des, module_name + '_')
+
+
+def BuildTopDescriptorsAndMessages(file_des, module_name, module):
+  """Builds top level descriptors and message classes.
+
+  Args:
+    file_des: FileDescriptor of the .proto file
+    module_name: str, the name of generated _pb2 module
+    module: Generated _pb2 module
+  """
+
+  def BuildMessage(msg_des):
+    create_dict = {}
+    for (name, nested_msg) in msg_des.nested_types_by_name.items():
+      create_dict[name] = BuildMessage(nested_msg)
+    create_dict['DESCRIPTOR'] = msg_des
+    create_dict['__module__'] = module_name
+    message_class = _reflection.GeneratedProtocolMessageType(
+        msg_des.name, (_message.Message,), create_dict)
+    _sym_db.RegisterMessage(message_class)
+    return message_class
+
+  # top level enums
+  for (name, enum_des) in file_des.enum_types_by_name.items():
+    module['_' + name.upper()] = enum_des
+    module[name] = enum_type_wrapper.EnumTypeWrapper(enum_des)
+    for enum_value in enum_des.values:
+      module[enum_value.name] = enum_value.number
+
+  # top level extensions
+  for (name, extension_des) in file_des.extensions_by_name.items():
+    module[name.upper() + '_FIELD_NUMBER'] = extension_des.number
+    module[name] = extension_des
+
+  # services
+  for (name, service) in file_des.services_by_name.items():
+    module['_' + name.upper()] = service
+
+  # Build messages.
+  for (name, msg_des) in file_des.message_types_by_name.items():
+    module[name] = BuildMessage(msg_des)
+
+
+def BuildServices(file_des, module_name, module):
+  """Builds services classes and services stub class.
+
+  Args:
+    file_des: FileDescriptor of the .proto file
+    module_name: str, the name of generated _pb2 module
+    module: Generated _pb2 module
+  """
+  # pylint: disable=g-import-not-at-top
+  from google.protobuf import service as _service
+  from google.protobuf import service_reflection
+  # pylint: enable=g-import-not-at-top
+  for (name, service) in file_des.services_by_name.items():
+    module[name] = service_reflection.GeneratedServiceType(
+        name, (_service.Service,),
+        dict(DESCRIPTOR=service, __module__=module_name))
+    stub_name = name + '_Stub'
+    module[stub_name] = service_reflection.GeneratedServiceStubType(
+        stub_name, (module[name],),
+        dict(DESCRIPTOR=service, __module__=module_name))
diff --git a/python/google/protobuf/internal/containers.py b/python/google/protobuf/internal/containers.py
new file mode 100644
index 0000000..29fbb53
--- /dev/null
+++ b/python/google/protobuf/internal/containers.py
@@ -0,0 +1,710 @@
+# Protocol Buffers - Google's data interchange format
+# Copyright 2008 Google Inc.  All rights reserved.
+# https://developers.google.com/protocol-buffers/
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Contains container classes to represent different protocol buffer types.
+
+This file defines container classes which represent categories of protocol
+buffer field types which need extra maintenance. Currently these categories
+are:
+
+-   Repeated scalar fields - These are all repeated fields which aren't
+    composite (e.g. they are of simple types like int32, string, etc).
+-   Repeated composite fields - Repeated fields which are composite. This
+    includes groups and nested messages.
+"""
+
+import collections.abc
+import copy
+import pickle
+from typing import (
+    Any,
+    Iterable,
+    Iterator,
+    List,
+    MutableMapping,
+    MutableSequence,
+    NoReturn,
+    Optional,
+    Sequence,
+    TypeVar,
+    Union,
+    overload,
+)
+
+
+_T = TypeVar('_T')
+_K = TypeVar('_K')
+_V = TypeVar('_V')
+
+
+class BaseContainer(Sequence[_T]):
+  """Base container class."""
+
+  # Minimizes memory usage and disallows assignment to other attributes.
+  __slots__ = ['_message_listener', '_values']
+
+  def __init__(self, message_listener: Any) -> None:
+    """
+    Args:
+      message_listener: A MessageListener implementation.
+        The RepeatedScalarFieldContainer will call this object's
+        Modified() method when it is modified.
+    """
+    self._message_listener = message_listener
+    self._values = []
+
+  @overload
+  def __getitem__(self, key: int) -> _T:
+    ...
+
+  @overload
+  def __getitem__(self, key: slice) -> List[_T]:
+    ...
+
+  def __getitem__(self, key):
+    """Retrieves item by the specified key."""
+    return self._values[key]
+
+  def __len__(self) -> int:
+    """Returns the number of elements in the container."""
+    return len(self._values)
+
+  def __ne__(self, other: Any) -> bool:
+    """Checks if another instance isn't equal to this one."""
+    # The concrete classes should define __eq__.
+    return not self == other
+
+  __hash__ = None
+
+  def __repr__(self) -> str:
+    return repr(self._values)
+
+  def sort(self, *args, **kwargs) -> None:
+    # Continue to support the old sort_function keyword argument.
+    # This is expected to be a rare occurrence, so use LBYL to avoid
+    # the overhead of actually catching KeyError.
+    if 'sort_function' in kwargs:
+      kwargs['cmp'] = kwargs.pop('sort_function')
+    self._values.sort(*args, **kwargs)
+
+  def reverse(self) -> None:
+    self._values.reverse()
+
+
+# TODO(slebedev): Remove this. BaseContainer does *not* conform to
+# MutableSequence, only its subclasses do.
+collections.abc.MutableSequence.register(BaseContainer)
+
+
+class RepeatedScalarFieldContainer(BaseContainer[_T], MutableSequence[_T]):
+  """Simple, type-checked, list-like container for holding repeated scalars."""
+
+  # Disallows assignment to other attributes.
+  __slots__ = ['_type_checker']
+
+  def __init__(
+      self,
+      message_listener: Any,
+      type_checker: Any,
+  ) -> None:
+    """Args:
+
+      message_listener: A MessageListener implementation. The
+      RepeatedScalarFieldContainer will call this object's Modified() method
+      when it is modified.
+      type_checker: A type_checkers.ValueChecker instance to run on elements
+      inserted into this container.
+    """
+    super().__init__(message_listener)
+    self._type_checker = type_checker
+
+  def append(self, value: _T) -> None:
+    """Appends an item to the list. Similar to list.append()."""
+    self._values.append(self._type_checker.CheckValue(value))
+    if not self._message_listener.dirty:
+      self._message_listener.Modified()
+
+  def insert(self, key: int, value: _T) -> None:
+    """Inserts the item at the specified position. Similar to list.insert()."""
+    self._values.insert(key, self._type_checker.CheckValue(value))
+    if not self._message_listener.dirty:
+      self._message_listener.Modified()
+
+  def extend(self, elem_seq: Iterable[_T]) -> None:
+    """Extends by appending the given iterable. Similar to list.extend()."""
+    if elem_seq is None:
+      return
+    try:
+      elem_seq_iter = iter(elem_seq)
+    except TypeError:
+      if not elem_seq:
+        # silently ignore falsy inputs :-/.
+        # TODO(ptucker): Deprecate this behavior. b/18413862
+        return
+      raise
+
+    new_values = [self._type_checker.CheckValue(elem) for elem in elem_seq_iter]
+    if new_values:
+      self._values.extend(new_values)
+    self._message_listener.Modified()
+
+  def MergeFrom(
+      self,
+      other: Union['RepeatedScalarFieldContainer[_T]', Iterable[_T]],
+  ) -> None:
+    """Appends the contents of another repeated field of the same type to this
+    one. We do not check the types of the individual fields.
+    """
+    self._values.extend(other)
+    self._message_listener.Modified()
+
+  def remove(self, elem: _T):
+    """Removes an item from the list. Similar to list.remove()."""
+    self._values.remove(elem)
+    self._message_listener.Modified()
+
+  def pop(self, key: Optional[int] = -1) -> _T:
+    """Removes and returns an item at a given index. Similar to list.pop()."""
+    value = self._values[key]
+    self.__delitem__(key)
+    return value
+
+  @overload
+  def __setitem__(self, key: int, value: _T) -> None:
+    ...
+
+  @overload
+  def __setitem__(self, key: slice, value: Iterable[_T]) -> None:
+    ...
+
+  def __setitem__(self, key, value) -> None:
+    """Sets the item on the specified position."""
+    if isinstance(key, slice):
+      if key.step is not None:
+        raise ValueError('Extended slices not supported')
+      self._values[key] = map(self._type_checker.CheckValue, value)
+      self._message_listener.Modified()
+    else:
+      self._values[key] = self._type_checker.CheckValue(value)
+      self._message_listener.Modified()
+
+  def __delitem__(self, key: Union[int, slice]) -> None:
+    """Deletes the item at the specified position."""
+    del self._values[key]
+    self._message_listener.Modified()
+
+  def __eq__(self, other: Any) -> bool:
+    """Compares the current instance with another one."""
+    if self is other:
+      return True
+    # Special case for the same type which should be common and fast.
+    if isinstance(other, self.__class__):
+      return other._values == self._values
+    # We are presumably comparing against some other sequence type.
+    return other == self._values
+
+  def __deepcopy__(
+      self,
+      unused_memo: Any = None,
+  ) -> 'RepeatedScalarFieldContainer[_T]':
+    clone = RepeatedScalarFieldContainer(
+        copy.deepcopy(self._message_listener), self._type_checker)
+    clone.MergeFrom(self)
+    return clone
+
+  def __reduce__(self, **kwargs) -> NoReturn:
+    raise pickle.PickleError(
+        "Can't pickle repeated scalar fields, convert to list first")
+
+
+# TODO(slebedev): Constrain T to be a subtype of Message.
+class RepeatedCompositeFieldContainer(BaseContainer[_T], MutableSequence[_T]):
+  """Simple, list-like container for holding repeated composite fields."""
+
+  # Disallows assignment to other attributes.
+  __slots__ = ['_message_descriptor']
+
+  def __init__(self, message_listener: Any, message_descriptor: Any) -> None:
+    """
+    Note that we pass in a descriptor instead of the generated directly,
+    since at the time we construct a _RepeatedCompositeFieldContainer we
+    haven't yet necessarily initialized the type that will be contained in the
+    container.
+
+    Args:
+      message_listener: A MessageListener implementation.
+        The RepeatedCompositeFieldContainer will call this object's
+        Modified() method when it is modified.
+      message_descriptor: A Descriptor instance describing the protocol type
+        that should be present in this container.  We'll use the
+        _concrete_class field of this descriptor when the client calls add().
+    """
+    super().__init__(message_listener)
+    self._message_descriptor = message_descriptor
+
+  def add(self, **kwargs: Any) -> _T:
+    """Adds a new element at the end of the list and returns it. Keyword
+    arguments may be used to initialize the element.
+    """
+    new_element = self._message_descriptor._concrete_class(**kwargs)
+    new_element._SetListener(self._message_listener)
+    self._values.append(new_element)
+    if not self._message_listener.dirty:
+      self._message_listener.Modified()
+    return new_element
+
+  def append(self, value: _T) -> None:
+    """Appends one element by copying the message."""
+    new_element = self._message_descriptor._concrete_class()
+    new_element._SetListener(self._message_listener)
+    new_element.CopyFrom(value)
+    self._values.append(new_element)
+    if not self._message_listener.dirty:
+      self._message_listener.Modified()
+
+  def insert(self, key: int, value: _T) -> None:
+    """Inserts the item at the specified position by copying."""
+    new_element = self._message_descriptor._concrete_class()
+    new_element._SetListener(self._message_listener)
+    new_element.CopyFrom(value)
+    self._values.insert(key, new_element)
+    if not self._message_listener.dirty:
+      self._message_listener.Modified()
+
+  def extend(self, elem_seq: Iterable[_T]) -> None:
+    """Extends by appending the given sequence of elements of the same type
+
+    as this one, copying each individual message.
+    """
+    message_class = self._message_descriptor._concrete_class
+    listener = self._message_listener
+    values = self._values
+    for message in elem_seq:
+      new_element = message_class()
+      new_element._SetListener(listener)
+      new_element.MergeFrom(message)
+      values.append(new_element)
+    listener.Modified()
+
+  def MergeFrom(
+      self,
+      other: Union['RepeatedCompositeFieldContainer[_T]', Iterable[_T]],
+  ) -> None:
+    """Appends the contents of another repeated field of the same type to this
+    one, copying each individual message.
+    """
+    self.extend(other)
+
+  def remove(self, elem: _T) -> None:
+    """Removes an item from the list. Similar to list.remove()."""
+    self._values.remove(elem)
+    self._message_listener.Modified()
+
+  def pop(self, key: Optional[int] = -1) -> _T:
+    """Removes and returns an item at a given index. Similar to list.pop()."""
+    value = self._values[key]
+    self.__delitem__(key)
+    return value
+
+  @overload
+  def __setitem__(self, key: int, value: _T) -> None:
+    ...
+
+  @overload
+  def __setitem__(self, key: slice, value: Iterable[_T]) -> None:
+    ...
+
+  def __setitem__(self, key, value):
+    # This method is implemented to make RepeatedCompositeFieldContainer
+    # structurally compatible with typing.MutableSequence. It is
+    # otherwise unsupported and will always raise an error.
+    raise TypeError(
+        f'{self.__class__.__name__} object does not support item assignment')
+
+  def __delitem__(self, key: Union[int, slice]) -> None:
+    """Deletes the item at the specified position."""
+    del self._values[key]
+    self._message_listener.Modified()
+
+  def __eq__(self, other: Any) -> bool:
+    """Compares the current instance with another one."""
+    if self is other:
+      return True
+    if not isinstance(other, self.__class__):
+      raise TypeError('Can only compare repeated composite fields against '
+                      'other repeated composite fields.')
+    return self._values == other._values
+
+
+class ScalarMap(MutableMapping[_K, _V]):
+  """Simple, type-checked, dict-like container for holding repeated scalars."""
+
+  # Disallows assignment to other attributes.
+  __slots__ = ['_key_checker', '_value_checker', '_values', '_message_listener',
+               '_entry_descriptor']
+
+  def __init__(
+      self,
+      message_listener: Any,
+      key_checker: Any,
+      value_checker: Any,
+      entry_descriptor: Any,
+  ) -> None:
+    """
+    Args:
+      message_listener: A MessageListener implementation.
+        The ScalarMap will call this object's Modified() method when it
+        is modified.
+      key_checker: A type_checkers.ValueChecker instance to run on keys
+        inserted into this container.
+      value_checker: A type_checkers.ValueChecker instance to run on values
+        inserted into this container.
+      entry_descriptor: The MessageDescriptor of a map entry: key and value.
+    """
+    self._message_listener = message_listener
+    self._key_checker = key_checker
+    self._value_checker = value_checker
+    self._entry_descriptor = entry_descriptor
+    self._values = {}
+
+  def __getitem__(self, key: _K) -> _V:
+    try:
+      return self._values[key]
+    except KeyError:
+      key = self._key_checker.CheckValue(key)
+      val = self._value_checker.DefaultValue()
+      self._values[key] = val
+      return val
+
+  def __contains__(self, item: _K) -> bool:
+    # We check the key's type to match the strong-typing flavor of the API.
+    # Also this makes it easier to match the behavior of the C++ implementation.
+    self._key_checker.CheckValue(item)
+    return item in self._values
+
+  @overload
+  def get(self, key: _K) -> Optional[_V]:
+    ...
+
+  @overload
+  def get(self, key: _K, default: _T) -> Union[_V, _T]:
+    ...
+
+  # We need to override this explicitly, because our defaultdict-like behavior
+  # will make the default implementation (from our base class) always insert
+  # the key.
+  def get(self, key, default=None):
+    if key in self:
+      return self[key]
+    else:
+      return default
+
+  def __setitem__(self, key: _K, value: _V) -> _T:
+    checked_key = self._key_checker.CheckValue(key)
+    checked_value = self._value_checker.CheckValue(value)
+    self._values[checked_key] = checked_value
+    self._message_listener.Modified()
+
+  def __delitem__(self, key: _K) -> None:
+    del self._values[key]
+    self._message_listener.Modified()
+
+  def __len__(self) -> int:
+    return len(self._values)
+
+  def __iter__(self) -> Iterator[_K]:
+    return iter(self._values)
+
+  def __repr__(self) -> str:
+    return repr(self._values)
+
+  def MergeFrom(self, other: 'ScalarMap[_K, _V]') -> None:
+    self._values.update(other._values)
+    self._message_listener.Modified()
+
+  def InvalidateIterators(self) -> None:
+    # It appears that the only way to reliably invalidate iterators to
+    # self._values is to ensure that its size changes.
+    original = self._values
+    self._values = original.copy()
+    original[None] = None
+
+  # This is defined in the abstract base, but we can do it much more cheaply.
+  def clear(self) -> None:
+    self._values.clear()
+    self._message_listener.Modified()
+
+  def GetEntryClass(self) -> Any:
+    return self._entry_descriptor._concrete_class
+
+
+class MessageMap(MutableMapping[_K, _V]):
+  """Simple, type-checked, dict-like container for with submessage values."""
+
+  # Disallows assignment to other attributes.
+  __slots__ = ['_key_checker', '_values', '_message_listener',
+               '_message_descriptor', '_entry_descriptor']
+
+  def __init__(
+      self,
+      message_l