aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--.travis.yml2
-rw-r--r--BUILD8
-rw-r--r--Makefile.am137
-rw-r--r--README.md2
-rw-r--r--cmake/extract_includes.bat.in1
-rw-r--r--composer.json6
-rw-r--r--configure.ac2
-rw-r--r--conformance/ConformanceJava.java47
-rw-r--r--conformance/Makefile.am20
-rw-r--r--conformance/conformance.proto185
-rw-r--r--conformance/conformance_cpp.cc3
-rw-r--r--conformance/conformance_objc.m1
-rwxr-xr-xconformance/conformance_python.py7
-rwxr-xr-xconformance/conformance_ruby.rb10
-rw-r--r--conformance/conformance_test.cc206
-rw-r--r--conformance/conformance_test.h28
-rwxr-xr-xcsharp/generate_protos.sh5
-rw-r--r--csharp/src/AddressBook/Addressbook.cs6
-rw-r--r--csharp/src/Google.Protobuf.Conformance/Conformance.cs3696
-rw-r--r--csharp/src/Google.Protobuf.Conformance/Program.cs8
-rw-r--r--csharp/src/Google.Protobuf.Conformance/project.json4
-rw-r--r--csharp/src/Google.Protobuf.Test/ByteStringTest.cs13
-rw-r--r--csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.xproj4
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs10
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs3688
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs30
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs84
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs18
-rw-r--r--csharp/src/Google.Protobuf/ByteString.cs2
-rw-r--r--csharp/src/Google.Protobuf/Reflection/Descriptor.cs751
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Any.cs148
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Api.cs198
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs88
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs14
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs380
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs8
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs52
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs88
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Type.cs124
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs54
-rw-r--r--docs/third_party.md4
-rwxr-xr-xgenerate_changelog.py1
-rw-r--r--java/core/src/main/java/com/google/protobuf/CodedInputStream.java7
-rw-r--r--java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java78
-rw-r--r--java/util/src/main/java/com/google/protobuf/util/JsonFormat.java19
-rw-r--r--java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java17
-rw-r--r--jenkins/docker/Dockerfile4
-rw-r--r--jenkins/docker32/Dockerfile4
-rw-r--r--m4/ax_cxx_compile_stdcxx.m4982
-rwxr-xr-xobjectivec/DevTools/compile_testing_protos.sh2
-rwxr-xr-xobjectivec/DevTools/full_mac_build.sh27
-rw-r--r--objectivec/GPBBootstrap.h6
-rw-r--r--objectivec/Tests/GPBARCUnittestProtos.m2
-rw-r--r--objectivec/Tests/GPBUnittestProtos.m2
-rw-r--r--objectivec/Tests/unittest_deprecated.proto95
-rw-r--r--objectivec/Tests/unittest_deprecated_file.proto76
-rw-r--r--php/composer.json27
-rw-r--r--php/ext/google/protobuf/message.c12
-rw-r--r--php/ext/google/protobuf/protobuf.h5
-rw-r--r--php/ext/google/protobuf/storage.c8
-rw-r--r--php/phpunit.xml14
-rw-r--r--php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php260
-rw-r--r--php/src/Google/Protobuf/Internal/DescriptorProto.php325
-rw-r--r--php/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php82
-rw-r--r--php/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php112
-rw-r--r--php/src/Google/Protobuf/Internal/EnumDescriptorProto.php114
-rw-r--r--php/src/Google/Protobuf/Internal/EnumOptions.php158
-rw-r--r--php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php114
-rw-r--r--php/src/Google/Protobuf/Internal/EnumValueOptions.php115
-rw-r--r--php/src/Google/Protobuf/Internal/FieldDescriptorProto.php424
-rw-r--r--php/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php29
-rw-r--r--php/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php120
-rw-r--r--php/src/Google/Protobuf/Internal/FieldOptions.php429
-rw-r--r--php/src/Google/Protobuf/Internal/FieldOptions_CType.php29
-rw-r--r--php/src/Google/Protobuf/Internal/FieldOptions_JSType.php37
-rw-r--r--php/src/Google/Protobuf/Internal/FileDescriptorProto.php477
-rw-r--r--php/src/Google/Protobuf/Internal/FileDescriptorSet.php59
-rw-r--r--php/src/Google/Protobuf/Internal/FileOptions.php741
-rw-r--r--php/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php41
-rw-r--r--php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php75
-rw-r--r--php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php198
-rw-r--r--php/src/Google/Protobuf/Internal/MessageOptions.php334
-rw-r--r--php/src/Google/Protobuf/Internal/MethodDescriptorProto.php237
-rw-r--r--php/src/Google/Protobuf/Internal/MethodOptions.php143
-rw-r--r--php/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php39
-rw-r--r--php/src/Google/Protobuf/Internal/OneofDescriptorProto.php86
-rw-r--r--php/src/Google/Protobuf/Internal/OneofOptions.php66
-rw-r--r--php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php114
-rw-r--r--php/src/Google/Protobuf/Internal/ServiceOptions.php115
-rw-r--r--php/src/Google/Protobuf/Internal/SourceCodeInfo.php191
-rw-r--r--php/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php379
-rw-r--r--php/src/Google/Protobuf/Internal/UninterpretedOption.php246
-rw-r--r--php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php90
-rw-r--r--php/src/Google/Protobuf/descriptor_internal.pb.php2532
-rw-r--r--php/tests/array_test.php1
-rwxr-xr-xphp/tests/autoload.php25
-rw-r--r--php/tests/encode_decode_test.php1
-rwxr-xr-xphp/tests/gdb_test.sh12
-rw-r--r--php/tests/generated_class_test.php3
-rw-r--r--php/tests/google/protobuf/empty.pb.php28
-rw-r--r--php/tests/map_field_test.php1
-rw-r--r--php/tests/memory_leak_test.php10
-rw-r--r--php/tests/php_implementation_test.php1
-rw-r--r--php/tests/proto/test.proto (renamed from php/tests/test.proto)7
-rw-r--r--php/tests/proto/test_include.proto (renamed from php/tests/test_include.proto)0
-rw-r--r--php/tests/proto/test_no_namespace.proto (renamed from php/tests/test_no_namespace.proto)0
-rw-r--r--php/tests/test.pb.php1385
-rwxr-xr-xphp/tests/test.sh7
-rw-r--r--php/tests/test_include.pb.php36
-rw-r--r--php/tests/test_no_namespace.pb.php34
-rw-r--r--php/tests/well_known_test.php2
-rw-r--r--phpunit.xml14
-rwxr-xr-xpython/setup.py1
-rw-r--r--ruby/Rakefile4
-rw-r--r--ruby/lib/google/protobuf/repeated_field.rb2
-rw-r--r--src/google/protobuf/any.pb.h2
-rw-r--r--src/google/protobuf/api.pb.h18
-rw-r--r--src/google/protobuf/compiler/code_generator.cc8
-rw-r--r--src/google/protobuf/compiler/code_generator.h5
-rw-r--r--src/google/protobuf/compiler/command_line_interface.cc7
-rw-r--r--src/google/protobuf/compiler/command_line_interface_unittest.cc16
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_file.cc9
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_doc_comment.cc2
-rw-r--r--src/google/protobuf/compiler/js/embed.cc2
-rwxr-xr-xsrc/google/protobuf/compiler/js/well_known_types_embed.cc2
-rw-r--r--src/google/protobuf/compiler/mock_code_generator.cc10
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_enum.cc2
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_extension.cc5
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_helpers.h14
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_message.cc21
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_message.h1
-rw-r--r--src/google/protobuf/compiler/php/php_generator.cc775
-rw-r--r--src/google/protobuf/compiler/plugin.cc13
-rw-r--r--src/google/protobuf/compiler/plugin.pb.cc699
-rw-r--r--src/google/protobuf/compiler/plugin.pb.h381
-rw-r--r--src/google/protobuf/compiler/plugin.proto13
-rw-r--r--src/google/protobuf/descriptor.pb.cc9
-rw-r--r--src/google/protobuf/descriptor.pb.h50
-rw-r--r--src/google/protobuf/descriptor.proto2
-rw-r--r--src/google/protobuf/duration.pb.h2
-rw-r--r--src/google/protobuf/empty.pb.h2
-rw-r--r--src/google/protobuf/field_mask.pb.h2
-rw-r--r--src/google/protobuf/generated_message_reflection.h8
-rw-r--r--src/google/protobuf/generated_message_util.h6
-rw-r--r--src/google/protobuf/io/coded_stream.h1
-rw-r--r--src/google/protobuf/map.h1
-rw-r--r--src/google/protobuf/message_lite.h1
-rw-r--r--src/google/protobuf/source_context.pb.h2
-rw-r--r--src/google/protobuf/struct.pb.h6
-rw-r--r--src/google/protobuf/stubs/atomicops.h14
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h26
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_arm_gcc.h10
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_arm_qnx.h10
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h10
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_generic_gcc.h2
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_macosx.h18
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_mips_gcc.h34
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_power.h2
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_ppc_gcc.h18
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_solaris.h18
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_tsan.h2
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_x86_gcc.h12
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc7
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_x86_msvc.h4
-rw-r--r--src/google/protobuf/stubs/common.cc13
-rw-r--r--src/google/protobuf/stubs/common.h3
-rw-r--r--src/google/protobuf/stubs/hash.h11
-rw-r--r--src/google/protobuf/stubs/platform_macros.h2
-rw-r--r--src/google/protobuf/stubs/port.h15
-rw-r--r--src/google/protobuf/stubs/strutil.cc2
-rw-r--r--src/google/protobuf/test_messages_proto3.proto227
-rw-r--r--src/google/protobuf/timestamp.pb.h2
-rw-r--r--src/google/protobuf/type.pb.h14
-rw-r--r--src/google/protobuf/wrappers.pb.h18
-rwxr-xr-xtests.sh60
176 files changed, 14663 insertions, 9606 deletions
diff --git a/.gitignore b/.gitignore
index ea865f4e..4383c623 100644
--- a/.gitignore
+++ b/.gitignore
@@ -122,8 +122,7 @@ conformance/succeeding_tests.txt
# php test output
composer.lock
-php/tests/test.pb.php
-php/tests/test_include.pb.php
+php/tests/generated/
php/ext/google/protobuf/.libs/
php/ext/google/protobuf/Makefile.fragments
php/ext/google/protobuf/Makefile.global
diff --git a/.travis.yml b/.travis.yml
index bd9a5dfb..a34cb83b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@ language: cpp
os:
- osx
# The Objective C build needs Xcode 7.0 or later.
-osx_image: xcode8
+osx_image: xcode8.1
script:
- ./tests.sh $CONFIG
env:
diff --git a/BUILD b/BUILD
index f17c500a..c9f40321 100644
--- a/BUILD
+++ b/BUILD
@@ -304,6 +304,7 @@ cc_library(
"src/google/protobuf/compiler/javanano/javanano_message_field.cc",
"src/google/protobuf/compiler/javanano/javanano_primitive_field.cc",
"src/google/protobuf/compiler/js/js_generator.cc",
+ "src/google/protobuf/compiler/js/well_known_types_embed.cc",
"src/google/protobuf/compiler/objectivec/objectivec_enum.cc",
"src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc",
"src/google/protobuf/compiler/objectivec/objectivec_extension.cc",
@@ -749,3 +750,10 @@ internal_protobuf_py_tests(
],
deps = [":python_tests"],
)
+
+proto_lang_toolchain(
+ name = "cc_toolchain",
+ runtime = ":protobuf",
+ command_line = "--cpp_out=$(OUT)",
+ visibility = ["//visibility:public"],
+)
diff --git a/Makefile.am b/Makefile.am
index 0d8fe103..4ece5217 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -100,6 +100,7 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf.Test/TestCornerCases.cs \
csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs \
csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs \
+ csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs \
@@ -557,6 +558,8 @@ objectivec_EXTRA_DIST= \
objectivec/Tests/text_format_map_unittest_data.txt \
objectivec/Tests/text_format_unittest_data.txt \
objectivec/Tests/unittest_cycle.proto \
+ objectivec/Tests/unittest_deprecated.proto \
+ objectivec/Tests/unittest_deprecated_file.proto \
objectivec/Tests/unittest_extension_chain_a.proto \
objectivec/Tests/unittest_extension_chain_b.proto \
objectivec/Tests/unittest_extension_chain_c.proto \
@@ -572,58 +575,88 @@ objectivec_EXTRA_DIST= \
objectivec/Tests/UnitTests-Info.plist \
Protobuf.podspec
-php_EXTRA_DIST= \
- php/src/phpdoc.dist.xml \
- php/src/Google/Protobuf/Internal/DescriptorPool.php \
- php/src/Google/Protobuf/Internal/OneofField.php \
- php/src/Google/Protobuf/Internal/MapEntry.php \
- php/src/Google/Protobuf/Internal/InputStream.php \
- php/src/Google/Protobuf/Internal/OutputStream.php \
- php/src/Google/Protobuf/Internal/MessageBuilderContext.php \
- php/src/Google/Protobuf/Internal/MapField.php \
- php/src/Google/Protobuf/Internal/RepeatedField.php \
- php/src/Google/Protobuf/Internal/Message.php \
- php/src/Google/Protobuf/Internal/GPBWire.php \
- php/src/Google/Protobuf/Internal/GPBType.php \
- php/src/Google/Protobuf/Internal/GPBLabel.php \
- php/src/Google/Protobuf/Internal/EnumBuilderContext.php \
- php/src/Google/Protobuf/Internal/GPBUtil.php \
- php/src/Google/Protobuf/descriptor_internal.pb.php \
- php/src/Google/Protobuf/descriptor.php \
- php/tests/encode_decode_test.php \
- php/tests/test.sh \
- php/tests/generated_class_test.php \
- php/tests/array_test.php \
- php/tests/php_implementation_test.php \
- php/tests/test_include.proto \
- php/tests/test_include.pb.php \
- php/tests/map_field_test.php \
- php/tests/test_base.php \
- php/tests/test_no_namespace.proto \
- php/tests/test_no_namespace.pb.php \
- php/tests/test_util.php \
- php/tests/test.proto \
- php/tests/test.pb.php \
- php/tests/memory_leak_test.php \
- php/tests/google/protobuf/empty.pb.php \
- php/tests/well_known_test.php \
- php/README.md \
- php/ext/google/protobuf/utf8.h \
- php/ext/google/protobuf/message.c \
- php/ext/google/protobuf/utf8.c \
- php/ext/google/protobuf/package.xml \
- php/ext/google/protobuf/upb.h \
- php/ext/google/protobuf/array.c \
- php/ext/google/protobuf/encode_decode.c \
- php/ext/google/protobuf/protobuf.h \
- php/ext/google/protobuf/type_check.c \
- php/ext/google/protobuf/def.c \
- php/ext/google/protobuf/storage.c \
- php/ext/google/protobuf/map.c \
- php/ext/google/protobuf/config.m4 \
- php/ext/google/protobuf/upb.c \
- php/ext/google/protobuf/protobuf.c \
- phpunit.xml \
+php_EXTRA_DIST= \
+ php/src/phpdoc.dist.xml \
+ php/src/Google/Protobuf/Internal/DescriptorPool.php \
+ php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php \
+ php/src/Google/Protobuf/Internal/OneofField.php \
+ php/src/Google/Protobuf/Internal/MessageOptions.php \
+ php/src/Google/Protobuf/Internal/FileDescriptorProto.php \
+ php/src/Google/Protobuf/Internal/MapEntry.php \
+ php/src/Google/Protobuf/Internal/FieldDescriptorProto.php \
+ php/src/Google/Protobuf/Internal/InputStream.php \
+ php/src/Google/Protobuf/Internal/UninterpretedOption.php \
+ php/src/Google/Protobuf/Internal/ServiceOptions.php \
+ php/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php \
+ php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php \
+ php/src/Google/Protobuf/Internal/OneofDescriptorProto.php \
+ php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php \
+ php/src/Google/Protobuf/Internal/OutputStream.php \
+ php/src/Google/Protobuf/Internal/MessageBuilderContext.php \
+ php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php \
+ php/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php \
+ php/src/Google/Protobuf/Internal/DescriptorProto.php \
+ php/src/Google/Protobuf/Internal/MapField.php \
+ php/src/Google/Protobuf/Internal/MethodDescriptorProto.php \
+ php/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php \
+ php/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php \
+ php/src/Google/Protobuf/Internal/RepeatedField.php \
+ php/src/Google/Protobuf/Internal/EnumValueOptions.php \
+ php/src/Google/Protobuf/Internal/MethodOptions.php \
+ php/src/Google/Protobuf/Internal/OneofOptions.php \
+ php/src/Google/Protobuf/Internal/Message.php \
+ php/src/Google/Protobuf/Internal/FileOptions.php \
+ php/src/Google/Protobuf/Internal/FileDescriptorSet.php \
+ php/src/Google/Protobuf/Internal/EnumDescriptorProto.php \
+ php/src/Google/Protobuf/Internal/GPBWire.php \
+ php/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php \
+ php/src/Google/Protobuf/Internal/FieldOptions.php \
+ php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php \
+ php/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php \
+ php/src/Google/Protobuf/Internal/GPBType.php \
+ php/src/Google/Protobuf/Internal/FieldOptions_JSType.php \
+ php/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php \
+ php/src/Google/Protobuf/Internal/SourceCodeInfo.php \
+ php/src/Google/Protobuf/Internal/EnumOptions.php \
+ php/src/Google/Protobuf/Internal/GPBLabel.php \
+ php/src/Google/Protobuf/Internal/EnumBuilderContext.php \
+ php/src/Google/Protobuf/Internal/GPBUtil.php \
+ php/src/Google/Protobuf/Internal/FieldOptions_CType.php \
+ php/src/Google/Protobuf/descriptor.php \
+ php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php \
+ php/tests/autoload.php \
+ php/tests/encode_decode_test.php \
+ php/tests/test.sh \
+ php/tests/gdb_test.sh \
+ php/tests/generated_class_test.php \
+ php/tests/array_test.php \
+ php/tests/php_implementation_test.php \
+ php/tests/proto/test_include.proto \
+ php/tests/map_field_test.php \
+ php/tests/test_base.php \
+ php/tests/proto/test_no_namespace.proto \
+ php/tests/test_util.php \
+ php/tests/proto/test.proto \
+ php/tests/memory_leak_test.php \
+ php/tests/well_known_test.php \
+ php/README.md \
+ php/ext/google/protobuf/utf8.h \
+ php/ext/google/protobuf/message.c \
+ php/ext/google/protobuf/utf8.c \
+ php/ext/google/protobuf/package.xml \
+ php/ext/google/protobuf/upb.h \
+ php/ext/google/protobuf/array.c \
+ php/ext/google/protobuf/encode_decode.c \
+ php/ext/google/protobuf/protobuf.h \
+ php/ext/google/protobuf/type_check.c \
+ php/ext/google/protobuf/def.c \
+ php/ext/google/protobuf/storage.c \
+ php/ext/google/protobuf/map.c \
+ php/ext/google/protobuf/config.m4 \
+ php/ext/google/protobuf/upb.c \
+ php/ext/google/protobuf/protobuf.c \
+ php/phpunit.xml \
+ php/composer.json \
composer.json
python_EXTRA_DIST= \
diff --git a/README.md b/README.md
index 80e556b1..2c1bce1a 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
Protocol Buffers - Google's data interchange format
===================================================
-[![Build Status](https://travis-ci.org/google/protobuf.svg?branch=master)](https://travis-ci.org/google/protobuf) [![Build status](https://ci.appveyor.com/api/projects/status/73ctee6ua4w2ruin?svg=true)](https://ci.appveyor.com/project/protobuf/protobuf) [![Build Status](https://grpc-testing.appspot.com/buildStatus/icon?job=protobuf_branch)](https://grpc-testing.appspot.com/job/protobuf_branch) [![Build Status](https://grpc-testing.appspot.com/job/protobuf_branch_32/badge/icon)](https://grpc-testing.appspot.com/job/protobuf_branch_32)
+[![Build Status](https://travis-ci.org/google/protobuf.svg?branch=master)](https://travis-ci.org/google/protobuf) [![Build status](https://ci.appveyor.com/api/projects/status/73ctee6ua4w2ruin?svg=true)](https://ci.appveyor.com/project/protobuf/protobuf) [![Build Status](https://grpc-testing.appspot.com/buildStatus/icon?job=protobuf_branch)](https://grpc-testing.appspot.com/job/protobuf_branch) [![Build Status](https://grpc-testing.appspot.com/job/protobuf_branch_32/badge/icon)](https://grpc-testing.appspot.com/job/protobuf_branch_32) [![Build Status](http://ci.bazel.io/buildStatus/icon?job=protobuf)](http://ci.bazel.io/job/protobuf/)
Copyright 2008 Google Inc.
diff --git a/cmake/extract_includes.bat.in b/cmake/extract_includes.bat.in
index 4b572bb6..085071db 100644
--- a/cmake/extract_includes.bat.in
+++ b/cmake/extract_includes.bat.in
@@ -29,6 +29,7 @@ copy ${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\java\java_gen
copy ${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\java\java_names.h include\google\protobuf\compiler\java\java_names.h
copy ${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\javanano\javanano_generator.h include\google\protobuf\compiler\javanano\javanano_generator.h
copy ${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\js\js_generator.h include\google\protobuf\compiler\js\js_generator.h
+copy ${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\js\well_known_types_embed.h include\google\protobuf\compiler\js\well_known_types_embed.h
copy ${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\objectivec\objectivec_generator.h include\google\protobuf\compiler\objectivec\objectivec_generator.h
copy ${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\objectivec\objectivec_helpers.h include\google\protobuf\compiler\objectivec\objectivec_helpers.h
copy ${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\parser.h include\google\protobuf\compiler\parser.h
diff --git a/composer.json b/composer.json
index 6afe71ce..2833f0a2 100644
--- a/composer.json
+++ b/composer.json
@@ -13,11 +13,11 @@
},
"autoload": {
"psr-4": {
- "Google\\": "php/src/Google"
+ "Google\\Protobuf\\Internal\\": "src/Google/Protobuf/Internal",
+ "GPBMetadata\\Google\\Protobuf\\Internal\\": "src/GPBMetadata/Google/Protobuf/Internal"
},
"files": [
- "php/src/Google/Protobuf/descriptor.php",
- "php/src/Google/Protobuf/descriptor_internal.pb.php"
+ "src/Google/Protobuf/descriptor.php"
]
}
}
diff --git a/configure.ac b/configure.ac
index 896f3471..d1e913c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,6 +178,8 @@ case "$target_os" in
esac
AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
+AX_CXX_COMPILE_STDCXX([11], [noext], [optional])
+
# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
# too.
diff --git a/conformance/ConformanceJava.java b/conformance/ConformanceJava.java
index 24d206cb..7badf2a5 100644
--- a/conformance/ConformanceJava.java
+++ b/conformance/ConformanceJava.java
@@ -1,9 +1,10 @@
import com.google.protobuf.ByteString;
import com.google.protobuf.CodedInputStream;
-import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.conformance.Conformance;
-import com.google.protobuf.util.JsonFormat.TypeRegistry;
+import com.google.protobuf.InvalidProtocolBufferException;
+import com.google.protobuf_test_messages.proto3.TestMessagesProto3;
import com.google.protobuf.util.JsonFormat;
+import com.google.protobuf.util.JsonFormat.TypeRegistry;
import java.io.IOException;
import java.nio.ByteBuffer;
@@ -53,27 +54,27 @@ class ConformanceJava {
private enum BinaryDecoder {
BYTE_STRING_DECODER() {
@Override
- public Conformance.TestAllTypes parse(ByteString bytes)
+ public TestMessagesProto3.TestAllTypes parse(ByteString bytes)
throws InvalidProtocolBufferException {
- return Conformance.TestAllTypes.parseFrom(bytes);
+ return TestMessagesProto3.TestAllTypes.parseFrom(bytes);
}
},
BYTE_ARRAY_DECODER() {
@Override
- public Conformance.TestAllTypes parse(ByteString bytes)
+ public TestMessagesProto3.TestAllTypes parse(ByteString bytes)
throws InvalidProtocolBufferException {
- return Conformance.TestAllTypes.parseFrom(bytes.toByteArray());
+ return TestMessagesProto3.TestAllTypes.parseFrom(bytes.toByteArray());
}
},
ARRAY_BYTE_BUFFER_DECODER() {
@Override
- public Conformance.TestAllTypes parse(ByteString bytes)
+ public TestMessagesProto3.TestAllTypes parse(ByteString bytes)
throws InvalidProtocolBufferException {
ByteBuffer buffer = ByteBuffer.allocate(bytes.size());
bytes.copyTo(buffer);
buffer.flip();
try {
- return Conformance.TestAllTypes.parseFrom(CodedInputStream.newInstance(buffer));
+ return TestMessagesProto3.TestAllTypes.parseFrom(CodedInputStream.newInstance(buffer));
} catch (InvalidProtocolBufferException e) {
throw e;
} catch (IOException e) {
@@ -84,10 +85,10 @@ class ConformanceJava {
},
READONLY_ARRAY_BYTE_BUFFER_DECODER() {
@Override
- public Conformance.TestAllTypes parse(ByteString bytes)
+ public TestMessagesProto3.TestAllTypes parse(ByteString bytes)
throws InvalidProtocolBufferException {
try {
- return Conformance.TestAllTypes.parseFrom(
+ return TestMessagesProto3.TestAllTypes.parseFrom(
CodedInputStream.newInstance(bytes.asReadOnlyByteBuffer()));
} catch (InvalidProtocolBufferException e) {
throw e;
@@ -99,13 +100,13 @@ class ConformanceJava {
},
DIRECT_BYTE_BUFFER_DECODER() {
@Override
- public Conformance.TestAllTypes parse(ByteString bytes)
+ public TestMessagesProto3.TestAllTypes parse(ByteString bytes)
throws InvalidProtocolBufferException {
ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size());
bytes.copyTo(buffer);
buffer.flip();
try {
- return Conformance.TestAllTypes.parseFrom(CodedInputStream.newInstance(buffer));
+ return TestMessagesProto3.TestAllTypes.parseFrom(CodedInputStream.newInstance(buffer));
} catch (InvalidProtocolBufferException e) {
throw e;
} catch (IOException e) {
@@ -116,13 +117,13 @@ class ConformanceJava {
},
READONLY_DIRECT_BYTE_BUFFER_DECODER() {
@Override
- public Conformance.TestAllTypes parse(ByteString bytes)
+ public TestMessagesProto3.TestAllTypes parse(ByteString bytes)
throws InvalidProtocolBufferException {
ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size());
bytes.copyTo(buffer);
buffer.flip();
try {
- return Conformance.TestAllTypes.parseFrom(
+ return TestMessagesProto3.TestAllTypes.parseFrom(
CodedInputStream.newInstance(buffer.asReadOnlyBuffer()));
} catch (InvalidProtocolBufferException e) {
throw e;
@@ -134,10 +135,10 @@ class ConformanceJava {
},
INPUT_STREAM_DECODER() {
@Override
- public Conformance.TestAllTypes parse(ByteString bytes)
+ public TestMessagesProto3.TestAllTypes parse(ByteString bytes)
throws InvalidProtocolBufferException {
try {
- return Conformance.TestAllTypes.parseFrom(bytes.newInput());
+ return TestMessagesProto3.TestAllTypes.parseFrom(bytes.newInput());
} catch (InvalidProtocolBufferException e) {
throw e;
} catch (IOException e) {
@@ -147,14 +148,14 @@ class ConformanceJava {
}
};
- public abstract Conformance.TestAllTypes parse(ByteString bytes)
+ public abstract TestMessagesProto3.TestAllTypes parse(ByteString bytes)
throws InvalidProtocolBufferException;
}
- private Conformance.TestAllTypes parseBinary(ByteString bytes)
+ private TestMessagesProto3.TestAllTypes parseBinary(ByteString bytes)
throws InvalidProtocolBufferException {
- Conformance.TestAllTypes[] messages =
- new Conformance.TestAllTypes[BinaryDecoder.values().length];
+ TestMessagesProto3.TestAllTypes[] messages =
+ new TestMessagesProto3.TestAllTypes[BinaryDecoder.values().length];
InvalidProtocolBufferException[] exceptions =
new InvalidProtocolBufferException[BinaryDecoder.values().length];
@@ -220,7 +221,7 @@ class ConformanceJava {
}
private Conformance.ConformanceResponse doTest(Conformance.ConformanceRequest request) {
- Conformance.TestAllTypes testMessage;
+ TestMessagesProto3.TestAllTypes testMessage;
switch (request.getPayloadCase()) {
case PROTOBUF_PAYLOAD: {
@@ -233,7 +234,7 @@ class ConformanceJava {
}
case JSON_PAYLOAD: {
try {
- Conformance.TestAllTypes.Builder builder = Conformance.TestAllTypes.newBuilder();
+ TestMessagesProto3.TestAllTypes.Builder builder = TestMessagesProto3.TestAllTypes.newBuilder();
JsonFormat.parser().usingTypeRegistry(typeRegistry)
.merge(request.getJsonPayload(), builder);
testMessage = builder.build();
@@ -299,7 +300,7 @@ class ConformanceJava {
public void run() throws Exception {
typeRegistry = TypeRegistry.newBuilder().add(
- Conformance.TestAllTypes.getDescriptor()).build();
+ TestMessagesProto3.TestAllTypes.getDescriptor()).build();
while (doTestIo()) {
this.testCount++;
}
diff --git a/conformance/Makefile.am b/conformance/Makefile.am
index 5985e1d9..c2b58900 100644
--- a/conformance/Makefile.am
+++ b/conformance/Makefile.am
@@ -1,7 +1,8 @@
## Process this file with automake to produce Makefile.in
conformance_protoc_inputs = \
- conformance.proto
+ conformance.proto \
+ $(top_srcdir)/src/google/protobuf/test_messages_proto3.proto
well_known_type_protoc_inputs = \
$(top_srcdir)/src/google/protobuf/any.proto \
@@ -61,6 +62,7 @@ other_language_protoc_outputs = \
com/google/protobuf/Value.java \
com/google/protobuf/ValueOrBuilder.java \
com/google/protobuf/WrappersProto.java \
+ com/google/protobuf_test_messages/proto3/TestMessagesProto3.java \
google/protobuf/any.pb.cc \
google/protobuf/any.pb.h \
google/protobuf/any.rb \
@@ -77,6 +79,12 @@ other_language_protoc_outputs = \
google/protobuf/struct.pb.h \
google/protobuf/struct.rb \
google/protobuf/struct_pb2.py \
+ google/protobuf/TestMessagesProto3.pbobjc.h \
+ google/protobuf/TestMessagesProto3.pbobjc.m \
+ google/protobuf/test_messages_proto3.pb.cc \
+ google/protobuf/test_messages_proto3.pb.h \
+ google/protobuf/test_messages_proto3_pb.rb \
+ google/protobuf/test_messages_proto3_pb2.py \
google/protobuf/timestamp.pb.cc \
google/protobuf/timestamp.pb.h \
google/protobuf/timestamp.rb \
@@ -152,7 +160,7 @@ conformance_test_runner_SOURCES = conformance_test.h conformance_test.cc \
conformance_test_runner.cc \
third_party/jsoncpp/json.h \
third_party/jsoncpp/jsoncpp.cpp
-nodist_conformance_test_runner_SOURCES = conformance.pb.cc
+nodist_conformance_test_runner_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc
conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir)
conformance_test_runner_CXXFLAGS = -std=c++11
# Explicit deps beacuse BUILT_SOURCES are only done before a "make all/check"
@@ -162,7 +170,7 @@ conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h
conformance_cpp_LDADD = $(top_srcdir)/src/libprotobuf.la
conformance_cpp_SOURCES = conformance_cpp.cc
-nodist_conformance_cpp_SOURCES = conformance.pb.cc
+nodist_conformance_cpp_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc
conformance_cpp_CPPFLAGS = -I$(top_srcdir)/src
# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check"
# so a direct "make test_cpp" could fail if parallel enough.
@@ -173,7 +181,7 @@ if OBJC_CONFORMANCE_TEST
bin_PROGRAMS += conformance-objc
conformance_objc_SOURCES = conformance_objc.m ../objectivec/GPBProtocolBuffers.m
-nodist_conformance_objc_SOURCES = Conformance.pbobjc.m
+nodist_conformance_objc_SOURCES = Conformance.pbobjc.m google/protobuf/TestMessagesProto3.pbobjc.m
# On travis, the build fails without the isysroot because whatever system
# headers are being found don't include generics support for
# NSArray/NSDictionary, the only guess is their image at one time had an odd
@@ -182,7 +190,7 @@ conformance_objc_CPPFLAGS = -I$(top_srcdir)/objectivec -isysroot `xcrun --sdk ma
conformance_objc_LDFLAGS = -framework Foundation
# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check"
# so a direct "make test_objc" could fail if parallel enough.
-conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h
+conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h google/protobuf/TestMessagesProto3.pbobjc.h
endif
@@ -221,7 +229,7 @@ MAINTAINERCLEANFILES = \
Makefile.in
javac_middleman: ConformanceJava.java protoc_middleman $(other_language_protoc_outputs)
- jar=`ls ../java/util/target/*jar-with-dependencies.jar` && javac -classpath ../java/target/classes:$$jar ConformanceJava.java com/google/protobuf/conformance/Conformance.java
+ jar=`ls ../java/util/target/*jar-with-dependencies.jar` && javac -classpath ../java/target/classes:$$jar ConformanceJava.java com/google/protobuf/conformance/Conformance.java com/google/protobuf_test_messages/proto3/TestMessagesProto3.java
@touch javac_middleman
conformance-java: javac_middleman
diff --git a/conformance/conformance.proto b/conformance/conformance.proto
index 95a8fd13..18e4b7bc 100644
--- a/conformance/conformance.proto
+++ b/conformance/conformance.proto
@@ -32,13 +32,6 @@ syntax = "proto3";
package conformance;
option java_package = "com.google.protobuf.conformance";
-import "google/protobuf/any.proto";
-import "google/protobuf/duration.proto";
-import "google/protobuf/field_mask.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/timestamp.proto";
-import "google/protobuf/wrappers.proto";
-
// This defines the conformance testing protocol. This protocol exists between
// the conformance test suite itself and the code being tested. For each test,
// the suite will send a ConformanceRequest message and expect a
@@ -70,8 +63,13 @@ enum WireFormat {
// 2. parse the protobuf or JSON payload in "payload" (which may fail)
// 3. if the parse succeeded, serialize the message in the requested format.
message ConformanceRequest {
- // The payload (whether protobuf of JSON) is always for a TestAllTypes proto
- // (see below).
+ // The payload (whether protobuf of JSON) is always for a
+ // protobuf_test_messages.proto3.TestAllTypes proto (as defined in
+ // src/google/protobuf/proto3_test_messages.proto).
+ //
+ // TODO(haberman): if/when we expand the conformance tests to support proto2,
+ // we will want to include a field that lets the payload/response be a
+ // protobuf_test_messages.proto2.TestAllTypes message instead.
oneof payload {
bytes protobuf_payload = 1;
string json_payload = 2;
@@ -114,172 +112,3 @@ message ConformanceResponse {
string skipped = 5;
}
}
-
-// This proto includes every type of field in both singular and repeated
-// forms.
-message TestAllTypes {
- message NestedMessage {
- int32 a = 1;
- TestAllTypes corecursive = 2;
- }
-
- enum NestedEnum {
- FOO = 0;
- BAR = 1;
- BAZ = 2;
- NEG = -1; // Intentionally negative.
- }
-
- // Singular
- int32 optional_int32 = 1;
- int64 optional_int64 = 2;
- uint32 optional_uint32 = 3;
- uint64 optional_uint64 = 4;
- sint32 optional_sint32 = 5;
- sint64 optional_sint64 = 6;
- fixed32 optional_fixed32 = 7;
- fixed64 optional_fixed64 = 8;
- sfixed32 optional_sfixed32 = 9;
- sfixed64 optional_sfixed64 = 10;
- float optional_float = 11;
- double optional_double = 12;
- bool optional_bool = 13;
- string optional_string = 14;
- bytes optional_bytes = 15;
-
- NestedMessage optional_nested_message = 18;
- ForeignMessage optional_foreign_message = 19;
-
- NestedEnum optional_nested_enum = 21;
- ForeignEnum optional_foreign_enum = 22;
-
- string optional_string_piece = 24 [ctype=STRING_PIECE];
- string optional_cord = 25 [ctype=CORD];
-
- TestAllTypes recursive_message = 27;
-
- // Repeated
- repeated int32 repeated_int32 = 31;
- repeated int64 repeated_int64 = 32;
- repeated uint32 repeated_uint32 = 33;
- repeated uint64 repeated_uint64 = 34;
- repeated sint32 repeated_sint32 = 35;
- repeated sint64 repeated_sint64 = 36;
- repeated fixed32 repeated_fixed32 = 37;
- repeated fixed64 repeated_fixed64 = 38;
- repeated sfixed32 repeated_sfixed32 = 39;
- repeated sfixed64 repeated_sfixed64 = 40;
- repeated float repeated_float = 41;
- repeated double repeated_double = 42;
- repeated bool repeated_bool = 43;
- repeated string repeated_string = 44;
- repeated bytes repeated_bytes = 45;
-
- repeated NestedMessage repeated_nested_message = 48;
- repeated ForeignMessage repeated_foreign_message = 49;
-
- repeated NestedEnum repeated_nested_enum = 51;
- repeated ForeignEnum repeated_foreign_enum = 52;
-
- repeated string repeated_string_piece = 54 [ctype=STRING_PIECE];
- repeated string repeated_cord = 55 [ctype=CORD];
-
- // Map
- map < int32, int32> map_int32_int32 = 56;
- map < int64, int64> map_int64_int64 = 57;
- map < uint32, uint32> map_uint32_uint32 = 58;
- map < uint64, uint64> map_uint64_uint64 = 59;
- map < sint32, sint32> map_sint32_sint32 = 60;
- map < sint64, sint64> map_sint64_sint64 = 61;
- map < fixed32, fixed32> map_fixed32_fixed32 = 62;
- map < fixed64, fixed64> map_fixed64_fixed64 = 63;
- map <sfixed32, sfixed32> map_sfixed32_sfixed32 = 64;
- map <sfixed64, sfixed64> map_sfixed64_sfixed64 = 65;
- map < int32, float> map_int32_float = 66;
- map < int32, double> map_int32_double = 67;
- map < bool, bool> map_bool_bool = 68;
- map < string, string> map_string_string = 69;
- map < string, bytes> map_string_bytes = 70;
- map < string, NestedMessage> map_string_nested_message = 71;
- map < string, ForeignMessage> map_string_foreign_message = 72;
- map < string, NestedEnum> map_string_nested_enum = 73;
- map < string, ForeignEnum> map_string_foreign_enum = 74;
-
- oneof oneof_field {
- uint32 oneof_uint32 = 111;
- NestedMessage oneof_nested_message = 112;
- string oneof_string = 113;
- bytes oneof_bytes = 114;
- bool oneof_bool = 115;
- uint64 oneof_uint64 = 116;
- float oneof_float = 117;
- double oneof_double = 118;
- NestedEnum oneof_enum = 119;
- }
-
- // Well-known types
- google.protobuf.BoolValue optional_bool_wrapper = 201;
- google.protobuf.Int32Value optional_int32_wrapper = 202;
- google.protobuf.Int64Value optional_int64_wrapper = 203;
- google.protobuf.UInt32Value optional_uint32_wrapper = 204;
- google.protobuf.UInt64Value optional_uint64_wrapper = 205;
- google.protobuf.FloatValue optional_float_wrapper = 206;
- google.protobuf.DoubleValue optional_double_wrapper = 207;
- google.protobuf.StringValue optional_string_wrapper = 208;
- google.protobuf.BytesValue optional_bytes_wrapper = 209;
-
- repeated google.protobuf.BoolValue repeated_bool_wrapper = 211;
- repeated google.protobuf.Int32Value repeated_int32_wrapper = 212;
- repeated google.protobuf.Int64Value repeated_int64_wrapper = 213;
- repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 214;
- repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 215;
- repeated google.protobuf.FloatValue repeated_float_wrapper = 216;
- repeated google.protobuf.DoubleValue repeated_double_wrapper = 217;
- repeated google.protobuf.StringValue repeated_string_wrapper = 218;
- repeated google.protobuf.BytesValue repeated_bytes_wrapper = 219;
-
- google.protobuf.Duration optional_duration = 301;
- google.protobuf.Timestamp optional_timestamp = 302;
- google.protobuf.FieldMask optional_field_mask = 303;
- google.protobuf.Struct optional_struct = 304;
- google.protobuf.Any optional_any = 305;
- google.protobuf.Value optional_value = 306;
-
- repeated google.protobuf.Duration repeated_duration = 311;
- repeated google.protobuf.Timestamp repeated_timestamp = 312;
- repeated google.protobuf.FieldMask repeated_fieldmask = 313;
- repeated google.protobuf.Struct repeated_struct = 324;
- repeated google.protobuf.Any repeated_any = 315;
- repeated google.protobuf.Value repeated_value = 316;
-
- // Test field-name-to-JSON-name convention.
- // (protobuf says names can be any valid C/C++ identifier.)
- int32 fieldname1 = 401;
- int32 field_name2 = 402;
- int32 _field_name3 = 403;
- int32 field__name4_ = 404;
- int32 field0name5 = 405;
- int32 field_0_name6 = 406;
- int32 fieldName7 = 407;
- int32 FieldName8 = 408;
- int32 field_Name9 = 409;
- int32 Field_Name10 = 410;
- int32 FIELD_NAME11 = 411;
- int32 FIELD_name12 = 412;
- int32 __field_name13 = 413;
- int32 __Field_name14 = 414;
- int32 field__name15 = 415;
- int32 field__Name16 = 416;
- int32 field_name17__ = 417;
- int32 Field_name18__ = 418;
-}
-
-message ForeignMessage {
- int32 c = 1;
-}
-
-enum ForeignEnum {
- FOREIGN_FOO = 0;
- FOREIGN_BAR = 1;
- FOREIGN_BAZ = 2;
-}
diff --git a/conformance/conformance_cpp.cc b/conformance/conformance_cpp.cc
index 1a265493..b865cd93 100644
--- a/conformance/conformance_cpp.cc
+++ b/conformance/conformance_cpp.cc
@@ -33,12 +33,12 @@
#include <unistd.h>
#include "conformance.pb.h"
+#include <google/protobuf/test_messages_proto3.pb.h>
#include <google/protobuf/util/json_util.h>
#include <google/protobuf/util/type_resolver_util.h>
using conformance::ConformanceRequest;
using conformance::ConformanceResponse;
-using conformance::TestAllTypes;
using google::protobuf::Descriptor;
using google::protobuf::DescriptorPool;
using google::protobuf::internal::scoped_ptr;
@@ -47,6 +47,7 @@ using google::protobuf::util::JsonToBinaryString;
using google::protobuf::util::NewTypeResolverForDescriptorPool;
using google::protobuf::util::Status;
using google::protobuf::util::TypeResolver;
+using protobuf_test_messages::proto3::TestAllTypes;
using std::string;
static const char kTypeUrlPrefix[] = "type.googleapis.com";
diff --git a/conformance/conformance_objc.m b/conformance/conformance_objc.m
index 1124bfeb..ef037f84 100644
--- a/conformance/conformance_objc.m
+++ b/conformance/conformance_objc.m
@@ -31,6 +31,7 @@
#import <Foundation/Foundation.h>
#import "Conformance.pbobjc.h"
+#import "google/protobuf/TestMessagesProto3.pbobjc.h"
static void Die(NSString *format, ...) __dead2;
diff --git a/conformance/conformance_python.py b/conformance/conformance_python.py
index 2f4a7812..7ace9b16 100755
--- a/conformance/conformance_python.py
+++ b/conformance/conformance_python.py
@@ -38,8 +38,9 @@ See conformance.proto for more information.
import struct
import sys
import os
-from google.protobuf import message
from google.protobuf import json_format
+from google.protobuf import message
+from google.protobuf import test_messages_proto3_pb2
import conformance_pb2
sys.stdout = os.fdopen(sys.stdout.fileno(), 'wb', 0)
@@ -52,9 +53,9 @@ class ProtocolError(Exception):
pass
def do_test(request):
- test_message = conformance_pb2.TestAllTypes()
+ test_message = test_messages_proto3_pb2.TestAllTypes()
response = conformance_pb2.ConformanceResponse()
- test_message = conformance_pb2.TestAllTypes()
+ test_message = test_messages_proto3_pb2.TestAllTypes()
try:
if request.WhichOneof('payload') == 'protobuf_payload':
diff --git a/conformance/conformance_ruby.rb b/conformance/conformance_ruby.rb
index aa572144..b7b7cf1c 100755
--- a/conformance/conformance_ruby.rb
+++ b/conformance/conformance_ruby.rb
@@ -31,20 +31,21 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
require 'conformance_pb'
+require 'google/protobuf/test_messages_proto3_pb'
$test_count = 0
$verbose = false
def do_test(request)
- test_message = Conformance::TestAllTypes.new
+ test_message = ProtobufTestMessages::Proto3::TestAllTypes.new
response = Conformance::ConformanceResponse.new
begin
case request.payload
when :protobuf_payload
begin
- test_message =
- Conformance::TestAllTypes.decode(request.protobuf_payload)
+ test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode(
+ request.protobuf_payload)
rescue Google::Protobuf::ParseError => err
response.parse_error = err.message.encode('utf-8')
return response
@@ -52,7 +53,8 @@ def do_test(request)
when :json_payload
begin
- test_message = Conformance::TestAllTypes.decode_json(request.json_payload)
+ test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode_json(
+ request.json_payload)
rescue Google::Protobuf::ParseError => err
response.parse_error = err.message.encode('utf-8')
return response
diff --git a/conformance/conformance_test.cc b/conformance/conformance_test.cc
index e709ac8d..dd266d15 100644
--- a/conformance/conformance_test.cc
+++ b/conformance/conformance_test.cc
@@ -34,11 +34,13 @@
#include "conformance.pb.h"
#include "conformance_test.h"
+#include <google/protobuf/test_messages_proto3.pb.h>
+
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/stringprintf.h>
#include <google/protobuf/text_format.h>
-#include <google/protobuf/util/json_util.h>
#include <google/protobuf/util/field_comparator.h>
+#include <google/protobuf/util/json_util.h>
#include <google/protobuf/util/message_differencer.h>
#include <google/protobuf/util/type_resolver_util.h>
#include <google/protobuf/wire_format_lite.h>
@@ -47,7 +49,6 @@
using conformance::ConformanceRequest;
using conformance::ConformanceResponse;
-using conformance::TestAllTypes;
using conformance::WireFormat;
using google::protobuf::Descriptor;
using google::protobuf::FieldDescriptor;
@@ -58,6 +59,7 @@ using google::protobuf::util::JsonToBinaryString;
using google::protobuf::util::MessageDifferencer;
using google::protobuf::util::NewTypeResolverForDescriptorPool;
using google::protobuf::util::Status;
+using protobuf_test_messages::proto3::TestAllTypes;
using std::string;
namespace {
@@ -130,8 +132,8 @@ string fixed32(void *data) { return string(static_cast<char*>(data), 4); }
string fixed64(void *data) { return string(static_cast<char*>(data), 8); }
string delim(const string& buf) { return cat(varint(buf.size()), buf); }
-string uint32(uint32_t u32) { return fixed32(&u32); }
-string uint64(uint64_t u64) { return fixed64(&u64); }
+string u32(uint32_t u32) { return fixed32(&u32); }
+string u64(uint64_t u64) { return fixed64(&u64); }
string flt(float f) { return fixed32(&f); }
string dbl(double d) { return fixed64(&d); }
string zz32(int32_t x) { return varint(WireFormatLite::ZigZagEncode32(x)); }
@@ -147,16 +149,17 @@ string submsg(uint32_t fn, const string& buf) {
#define UNKNOWN_FIELD 666
-uint32_t GetFieldNumberForType(FieldDescriptor::Type type, bool repeated) {
+const FieldDescriptor* GetFieldForType(FieldDescriptor::Type type,
+ bool repeated) {
const Descriptor* d = TestAllTypes().GetDescriptor();
for (int i = 0; i < d->field_count(); i++) {
const FieldDescriptor* f = d->field(i);
if (f->type() == type && f->is_repeated() == repeated) {
- return f->number();
+ return f;
}
}
GOOGLE_LOG(FATAL) << "Couldn't find field with type " << (int)type;
- return 0;
+ return nullptr;
}
string UpperCase(string str) {
@@ -423,14 +426,22 @@ void ConformanceTestSuite::RunValidJsonTestWithProtobufInput(
}
void ConformanceTestSuite::RunValidProtobufTest(
+ const string& test_name, ConformanceLevel level,
+ const string& input_protobuf, const string& equivalent_text_format) {
+ RunValidInputTest(
+ ConformanceLevelToString(level) + ".ProtobufInput." + test_name +
+ ".ProtobufOutput", level, input_protobuf, conformance::PROTOBUF,
+ equivalent_text_format, conformance::PROTOBUF);
+ RunValidInputTest(
+ ConformanceLevelToString(level) + ".ProtobufInput." + test_name +
+ ".JsonOutput", level, input_protobuf, conformance::PROTOBUF,
+ equivalent_text_format, conformance::JSON);
+}
+
+void ConformanceTestSuite::RunValidProtobufTestWithMessage(
const string& test_name, ConformanceLevel level, const TestAllTypes& input,
const string& equivalent_text_format) {
- RunValidInputTest("ProtobufInput." + test_name + ".ProtobufOutput", level,
- input.SerializeAsString(), conformance::PROTOBUF,
- equivalent_text_format, conformance::PROTOBUF);
- RunValidInputTest("ProtobufInput." + test_name + ".JsonOutput", level,
- input.SerializeAsString(), conformance::PROTOBUF,
- equivalent_text_format, conformance::JSON);
+ RunValidProtobufTest(test_name, level, input.SerializeAsString(), equivalent_text_format);
}
// According to proto3 JSON specification, JSON serializers follow more strict
@@ -537,8 +548,8 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) {
string("abc") // 32BIT
};
- uint32_t fieldnum = GetFieldNumberForType(type, false);
- uint32_t rep_fieldnum = GetFieldNumberForType(type, true);
+ const FieldDescriptor* field = GetFieldForType(type, false);
+ const FieldDescriptor* rep_field = GetFieldForType(type, true);
WireFormatLite::WireType wire_type = WireFormatLite::WireTypeForFieldType(
static_cast<WireFormatLite::FieldType>(type));
const string& incomplete = incompletes[wire_type];
@@ -546,11 +557,11 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) {
UpperCase(string(".") + FieldDescriptor::TypeName(type));
ExpectParseFailureForProto(
- tag(fieldnum, wire_type),
+ tag(field->number(), wire_type),
"PrematureEofBeforeKnownNonRepeatedValue" + type_name, REQUIRED);
ExpectParseFailureForProto(
- tag(rep_fieldnum, wire_type),
+ tag(rep_field->number(), wire_type),
"PrematureEofBeforeKnownRepeatedValue" + type_name, REQUIRED);
ExpectParseFailureForProto(
@@ -558,11 +569,11 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) {
"PrematureEofBeforeUnknownValue" + type_name, REQUIRED);
ExpectParseFailureForProto(
- cat( tag(fieldnum, wire_type), incomplete ),
+ cat( tag(field->number(), wire_type), incomplete ),
"PrematureEofInsideKnownNonRepeatedValue" + type_name, REQUIRED);
ExpectParseFailureForProto(
- cat( tag(rep_fieldnum, wire_type), incomplete ),
+ cat( tag(rep_field->number(), wire_type), incomplete ),
"PrematureEofInsideKnownRepeatedValue" + type_name, REQUIRED);
ExpectParseFailureForProto(
@@ -571,12 +582,12 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) {
if (wire_type == WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
ExpectParseFailureForProto(
- cat( tag(fieldnum, wire_type), varint(1) ),
+ cat( tag(field->number(), wire_type), varint(1) ),
"PrematureEofInDelimitedDataForKnownNonRepeatedValue" + type_name,
REQUIRED);
ExpectParseFailureForProto(
- cat( tag(rep_fieldnum, wire_type), varint(1) ),
+ cat( tag(rep_field->number(), wire_type), varint(1) ),
"PrematureEofInDelimitedDataForKnownRepeatedValue" + type_name,
REQUIRED);
@@ -591,7 +602,7 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) {
cat( tag(WireFormatLite::TYPE_INT32, WireFormatLite::WIRETYPE_VARINT),
incompletes[WireFormatLite::WIRETYPE_VARINT] );
ExpectHardParseFailureForProto(
- cat( tag(fieldnum, WireFormatLite::WIRETYPE_LENGTH_DELIMITED),
+ cat( tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED),
varint(incomplete_submsg.size()),
incomplete_submsg ),
"PrematureEofInSubmessageValue" + type_name, REQUIRED);
@@ -601,19 +612,50 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) {
// Packed region ends in the middle of a value.
ExpectHardParseFailureForProto(
- cat( tag(rep_fieldnum, WireFormatLite::WIRETYPE_LENGTH_DELIMITED),
- varint(incomplete.size()),
- incomplete ),
+ cat(tag(rep_field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED),
+ varint(incomplete.size()), incomplete),
"PrematureEofInPackedFieldValue" + type_name, REQUIRED);
// EOF in the middle of packed region.
ExpectParseFailureForProto(
- cat( tag(rep_fieldnum, WireFormatLite::WIRETYPE_LENGTH_DELIMITED),
- varint(1) ),
+ cat(tag(rep_field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED),
+ varint(1)),
"PrematureEofInPackedField" + type_name, REQUIRED);
}
}
+void ConformanceTestSuite::TestValidDataForType(
+ FieldDescriptor::Type type,
+ std::vector<std::pair<std::string, std::string>> values) {
+ const string type_name =
+ UpperCase(string(".") + FieldDescriptor::TypeName(type));
+ WireFormatLite::WireType wire_type = WireFormatLite::WireTypeForFieldType(
+ static_cast<WireFormatLite::FieldType>(type));
+ const FieldDescriptor* field = GetFieldForType(type, false);
+ const FieldDescriptor* rep_field = GetFieldForType(type, true);
+
+ RunValidProtobufTest("ValidDataScalar" + type_name, REQUIRED,
+ cat(tag(field->number(), wire_type), values[0].first),
+ field->name() + ": " + values[0].second);
+
+ string proto;
+ string text = field->name() + ": " + values.back().second;
+ for (size_t i = 0; i < values.size(); i++) {
+ proto += cat(tag(field->number(), wire_type), values[i].first);
+ }
+ RunValidProtobufTest("RepeatedScalarSelectsLast" + type_name, REQUIRED,
+ proto, text);
+
+ proto.clear();
+ text.clear();
+
+ for (size_t i = 0; i < values.size(); i++) {
+ proto += cat(tag(rep_field->number(), wire_type), values[i].first);
+ text += rep_field->name() + ": " + values[i].second + " ";
+ }
+ RunValidProtobufTest("ValidDataRepeated" + type_name, REQUIRED, proto, text);
+}
+
void ConformanceTestSuite::SetFailureList(const string& filename,
const vector<string>& failure_list) {
failure_list_filename_ = filename;
@@ -673,6 +715,86 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
TestPrematureEOFForType(static_cast<FieldDescriptor::Type>(i));
}
+ int64 kInt64Min = -9223372036854775808ULL;
+ int64 kInt64Max = 9223372036854775807ULL;
+ uint64 kUint64Max = 18446744073709551615ULL;
+ int32 kInt32Max = 2147483647;
+ int32 kInt32Min = -2147483648;
+ uint32 kUint32Max = 4294967295UL;
+
+ TestValidDataForType(FieldDescriptor::TYPE_DOUBLE, {
+ {dbl(0.1), "0.1"},
+ {dbl(1.7976931348623157e+308), "1.7976931348623157e+308"},
+ {dbl(2.22507385850720138309e-308), "2.22507385850720138309e-308"}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_FLOAT, {
+ {flt(0.1), "0.1"},
+ {flt(3.402823e+38), "3.402823e+38"}, // 3.40282347e+38
+ {flt(1.17549435e-38f), "1.17549435e-38"}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_INT64, {
+ {varint(12345), "12345"},
+ {varint(kInt64Max), std::to_string(kInt64Max)},
+ {varint(kInt64Min), std::to_string(kInt64Min)}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_UINT64, {
+ {varint(12345), "12345"},
+ {varint(kUint64Max), std::to_string(kUint64Max)},
+ {varint(0), "0"}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_INT32, {
+ {varint(12345), "12345"},
+ {varint(kInt32Max), std::to_string(kInt32Max)},
+ {varint(kInt32Min), std::to_string(kInt32Min)},
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_UINT32, {
+ {varint(12345), "12345"},
+ {varint(kUint32Max), std::to_string(kUint32Max)}, // UINT32_MAX
+ {varint(0), "0"}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_FIXED64, {
+ {u64(12345), "12345"},
+ {u64(kUint64Max), std::to_string(kUint64Max)},
+ {u64(0), "0"}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_FIXED32, {
+ {u32(12345), "12345"},
+ {u32(kUint32Max), std::to_string(kUint32Max)}, // UINT32_MAX
+ {u32(0), "0"}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_SFIXED64, {
+ {u64(12345), "12345"},
+ {u64(kInt64Max), std::to_string(kInt64Max)},
+ {u64(kInt64Min), std::to_string(kInt64Min)}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_SFIXED32, {
+ {u32(12345), "12345"},
+ {u32(kInt32Max), std::to_string(kInt32Max)},
+ {u32(kInt32Min), std::to_string(kInt32Min)}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_BOOL, {
+ {varint(1), "true"},
+ {varint(0), "false"},
+ {varint(12345678), "true"}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_SINT32, {
+ {zz32(12345), "12345"},
+ {zz32(kInt32Max), std::to_string(kInt32Max)},
+ {zz32(kInt32Min), std::to_string(kInt32Min)}
+ });
+ TestValidDataForType(FieldDescriptor::TYPE_SINT64, {
+ {zz64(12345), "12345"},
+ {zz64(kInt64Max), std::to_string(kInt64Max)},
+ {zz64(kInt64Min), std::to_string(kInt64Min)}
+ });
+
+ // TODO(haberman):
+ // TestValidDataForType(FieldDescriptor::TYPE_STRING
+ // TestValidDataForType(FieldDescriptor::TYPE_GROUP
+ // TestValidDataForType(FieldDescriptor::TYPE_MESSAGE
+ // TestValidDataForType(FieldDescriptor::TYPE_BYTES
+ // TestValidDataForType(FieldDescriptor::TYPE_ENUM
+
RunValidJsonTest("HelloWorld", REQUIRED,
"{\"optionalString\":\"Hello, World!\"}",
"optional_string: 'Hello, World!'");
@@ -1372,31 +1494,31 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
{
TestAllTypes message;
message.set_oneof_uint32(0);
- RunValidProtobufTest(
+ RunValidProtobufTestWithMessage(
"OneofZeroUint32", RECOMMENDED, message, "oneof_uint32: 0");
message.mutable_oneof_nested_message()->set_a(0);
- RunValidProtobufTest(
+ RunValidProtobufTestWithMessage(
"OneofZeroMessage", RECOMMENDED, message, "oneof_nested_message: {}");
message.set_oneof_string("");
- RunValidProtobufTest(
+ RunValidProtobufTestWithMessage(
"OneofZeroString", RECOMMENDED, message, "oneof_string: \"\"");
message.set_oneof_bytes("");
- RunValidProtobufTest(
+ RunValidProtobufTestWithMessage(
"OneofZeroBytes", RECOMMENDED, message, "oneof_bytes: \"\"");
message.set_oneof_bool(false);
- RunValidProtobufTest(
+ RunValidProtobufTestWithMessage(
"OneofZeroBool", RECOMMENDED, message, "oneof_bool: false");
message.set_oneof_uint64(0);
- RunValidProtobufTest(
+ RunValidProtobufTestWithMessage(
"OneofZeroUint64", RECOMMENDED, message, "oneof_uint64: 0");
message.set_oneof_float(0.0f);
- RunValidProtobufTest(
+ RunValidProtobufTestWithMessage(
"OneofZeroFloat", RECOMMENDED, message, "oneof_float: 0");
message.set_oneof_double(0.0);
- RunValidProtobufTest(
+ RunValidProtobufTestWithMessage(
"OneofZeroDouble", RECOMMENDED, message, "oneof_double: 0");
message.set_oneof_enum(TestAllTypes::FOO);
- RunValidProtobufTest(
+ RunValidProtobufTestWithMessage(
"OneofZeroEnum", RECOMMENDED, message, "oneof_enum: FOO");
}
RunValidJsonTest(
@@ -2040,13 +2162,13 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
"Any", REQUIRED,
R"({
"optionalAny": {
- "@type": "type.googleapis.com/conformance.TestAllTypes",
+ "@type": "type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes",
"optionalInt32": 12345
}
})",
R"(
optional_any: {
- [type.googleapis.com/conformance.TestAllTypes] {
+ [type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes] {
optional_int32: 12345
}
}
@@ -2057,7 +2179,7 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
"optionalAny": {
"@type": "type.googleapis.com/google.protobuf.Any",
"value": {
- "@type": "type.googleapis.com/conformance.TestAllTypes",
+ "@type": "type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes",
"optionalInt32": 12345
}
}
@@ -2065,7 +2187,7 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
R"(
optional_any: {
[type.googleapis.com/google.protobuf.Any] {
- [type.googleapis.com/conformance.TestAllTypes] {
+ [type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes] {
optional_int32: 12345
}
}
@@ -2077,12 +2199,12 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
R"({
"optionalAny": {
"optionalInt32": 12345,
- "@type": "type.googleapis.com/conformance.TestAllTypes"
+ "@type": "type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes"
}
})",
R"(
optional_any: {
- [type.googleapis.com/conformance.TestAllTypes] {
+ [type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes] {
optional_int32: 12345
}
}
diff --git a/conformance/conformance_test.h b/conformance/conformance_test.h
index 08f16b8f..5f05a25b 100644
--- a/conformance/conformance_test.h
+++ b/conformance/conformance_test.h
@@ -49,9 +49,14 @@
namespace conformance {
class ConformanceRequest;
class ConformanceResponse;
-class TestAllTypes;
} // namespace conformance
+namespace protobuf_test_messages {
+namespace proto3 {
+class TestAllTypes;
+} // namespace proto3
+} // namespace protobuf_test_messages
+
namespace google {
namespace protobuf {
@@ -165,14 +170,18 @@ class ConformanceTestSuite {
ConformanceLevel level,
const string& input_json,
const string& equivalent_text_format);
- void RunValidJsonTestWithProtobufInput(const string& test_name,
- ConformanceLevel level,
- const conformance::TestAllTypes& input,
- const string& equivalent_text_format);
- void RunValidProtobufTest(const string& test_name,
- ConformanceLevel level,
- const conformance::TestAllTypes& input,
+ void RunValidJsonTestWithProtobufInput(
+ const string& test_name,
+ ConformanceLevel level,
+ const protobuf_test_messages::proto3::TestAllTypes& input,
+ const string& equivalent_text_format);
+ void RunValidProtobufTest(const string& test_name, ConformanceLevel level,
+ const string& input_protobuf,
const string& equivalent_text_format);
+ void RunValidProtobufTestWithMessage(
+ const string& test_name, ConformanceLevel level,
+ const protobuf_test_messages::proto3::TestAllTypes& input,
+ const string& equivalent_text_format);
typedef std::function<bool(const Json::Value&)> Validator;
void RunValidJsonTestWithValidator(const string& test_name,
@@ -192,6 +201,9 @@ class ConformanceTestSuite {
const std::string& test_name,
ConformanceLevel level);
void TestPrematureEOFForType(google::protobuf::FieldDescriptor::Type type);
+ void TestValidDataForType(
+ google::protobuf::FieldDescriptor::Type,
+ std::vector<std::pair<std::string, std::string>> values);
bool CheckSetEmpty(const set<string>& set_to_check,
const std::string& write_to_file, const std::string& msg);
ConformanceTestRunner* runner_;
diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh
index d979aa52..7cbcf436 100755
--- a/csharp/generate_protos.sh
+++ b/csharp/generate_protos.sh
@@ -54,6 +54,11 @@ $PROTOC -Icsharp/protos --csharp_out=csharp/src/Google.Protobuf.Test \
--csharp_opt=base_namespace=UnitTest.Issues \
csharp/protos/unittest_issues.proto
+# Don't specify a base namespace at all; we just want to make sure the
+# results end up in TestProtos.
+$PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf.Test/TestProtos \
+ src/google/protobuf/test_messages_proto3.proto
+
# AddressBook sample protos
$PROTOC -Iexamples --csharp_out=csharp/src/AddressBook \
examples/addressbook.proto
diff --git a/csharp/src/AddressBook/Addressbook.cs b/csharp/src/AddressBook/Addressbook.cs
index 8e691ad4..75ed071b 100644
--- a/csharp/src/AddressBook/Addressbook.cs
+++ b/csharp/src/AddressBook/Addressbook.cs
@@ -43,7 +43,7 @@ namespace Google.Protobuf.Examples.AddressBook {
}
#region Messages
/// <summary>
- /// [START messages]
+ /// [START messages]
/// </summary>
public sealed partial class Person : pb::IMessage<Person> {
private static readonly pb::MessageParser<Person> _parser = new pb::MessageParser<Person>(() => new Person());
@@ -95,7 +95,7 @@ namespace Google.Protobuf.Examples.AddressBook {
public const int IdFieldNumber = 2;
private int id_;
/// <summary>
- /// Unique ID number for this person.
+ /// Unique ID number for this person.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Id {
@@ -400,7 +400,7 @@ namespace Google.Protobuf.Examples.AddressBook {
}
/// <summary>
- /// Our address book file is just one of these.
+ /// Our address book file is just one of these.
/// </summary>
public sealed partial class AddressBook : pb::IMessage<AddressBook> {
private static readonly pb::MessageParser<AddressBook> _parser = new pb::MessageParser<AddressBook>(() => new AddressBook());
diff --git a/csharp/src/Google.Protobuf.Conformance/Conformance.cs b/csharp/src/Google.Protobuf.Conformance/Conformance.cs
index 431ac4fb..1a835aef 100644
--- a/csharp/src/Google.Protobuf.Conformance/Conformance.cs
+++ b/csharp/src/Google.Protobuf.Conformance/Conformance.cs
@@ -22,182 +22,22 @@ namespace Conformance {
static ConformanceReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "ChFjb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2UaGWdvb2dsZS9wcm90",
- "b2J1Zi9hbnkucHJvdG8aHmdvb2dsZS9wcm90b2J1Zi9kdXJhdGlvbi5wcm90",
- "bxogZ29vZ2xlL3Byb3RvYnVmL2ZpZWxkX21hc2sucHJvdG8aHGdvb2dsZS9w",
- "cm90b2J1Zi9zdHJ1Y3QucHJvdG8aH2dvb2dsZS9wcm90b2J1Zi90aW1lc3Rh",
- "bXAucHJvdG8aHmdvb2dsZS9wcm90b2J1Zi93cmFwcGVycy5wcm90byKNAQoS",
- "Q29uZm9ybWFuY2VSZXF1ZXN0EhoKEHByb3RvYnVmX3BheWxvYWQYASABKAxI",
- "ABIWCgxqc29uX3BheWxvYWQYAiABKAlIABI4ChdyZXF1ZXN0ZWRfb3V0cHV0",
- "X2Zvcm1hdBgDIAEoDjIXLmNvbmZvcm1hbmNlLldpcmVGb3JtYXRCCQoHcGF5",
- "bG9hZCKxAQoTQ29uZm9ybWFuY2VSZXNwb25zZRIVCgtwYXJzZV9lcnJvchgB",
- "IAEoCUgAEhkKD3NlcmlhbGl6ZV9lcnJvchgGIAEoCUgAEhcKDXJ1bnRpbWVf",
- "ZXJyb3IYAiABKAlIABIaChBwcm90b2J1Zl9wYXlsb2FkGAMgASgMSAASFgoM",
- "anNvbl9wYXlsb2FkGAQgASgJSAASEQoHc2tpcHBlZBgFIAEoCUgAQggKBnJl",
- "c3VsdCKCNQoMVGVzdEFsbFR5cGVzEhYKDm9wdGlvbmFsX2ludDMyGAEgASgF",
- "EhYKDm9wdGlvbmFsX2ludDY0GAIgASgDEhcKD29wdGlvbmFsX3VpbnQzMhgD",
- "IAEoDRIXCg9vcHRpb25hbF91aW50NjQYBCABKAQSFwoPb3B0aW9uYWxfc2lu",
- "dDMyGAUgASgREhcKD29wdGlvbmFsX3NpbnQ2NBgGIAEoEhIYChBvcHRpb25h",
- "bF9maXhlZDMyGAcgASgHEhgKEG9wdGlvbmFsX2ZpeGVkNjQYCCABKAYSGQoR",
- "b3B0aW9uYWxfc2ZpeGVkMzIYCSABKA8SGQoRb3B0aW9uYWxfc2ZpeGVkNjQY",
- "CiABKBASFgoOb3B0aW9uYWxfZmxvYXQYCyABKAISFwoPb3B0aW9uYWxfZG91",
- "YmxlGAwgASgBEhUKDW9wdGlvbmFsX2Jvb2wYDSABKAgSFwoPb3B0aW9uYWxf",
- "c3RyaW5nGA4gASgJEhYKDm9wdGlvbmFsX2J5dGVzGA8gASgMEkgKF29wdGlv",
- "bmFsX25lc3RlZF9tZXNzYWdlGBIgASgLMicuY29uZm9ybWFuY2UuVGVzdEFs",
- "bFR5cGVzLk5lc3RlZE1lc3NhZ2USPQoYb3B0aW9uYWxfZm9yZWlnbl9tZXNz",
- "YWdlGBMgASgLMhsuY29uZm9ybWFuY2UuRm9yZWlnbk1lc3NhZ2USQgoUb3B0",
- "aW9uYWxfbmVzdGVkX2VudW0YFSABKA4yJC5jb25mb3JtYW5jZS5UZXN0QWxs",
- "VHlwZXMuTmVzdGVkRW51bRI3ChVvcHRpb25hbF9mb3JlaWduX2VudW0YFiAB",
- "KA4yGC5jb25mb3JtYW5jZS5Gb3JlaWduRW51bRIhChVvcHRpb25hbF9zdHJp",
- "bmdfcGllY2UYGCABKAlCAggCEhkKDW9wdGlvbmFsX2NvcmQYGSABKAlCAggB",
- "EjQKEXJlY3Vyc2l2ZV9tZXNzYWdlGBsgASgLMhkuY29uZm9ybWFuY2UuVGVz",
- "dEFsbFR5cGVzEhYKDnJlcGVhdGVkX2ludDMyGB8gAygFEhYKDnJlcGVhdGVk",
- "X2ludDY0GCAgAygDEhcKD3JlcGVhdGVkX3VpbnQzMhghIAMoDRIXCg9yZXBl",
- "YXRlZF91aW50NjQYIiADKAQSFwoPcmVwZWF0ZWRfc2ludDMyGCMgAygREhcK",
- "D3JlcGVhdGVkX3NpbnQ2NBgkIAMoEhIYChByZXBlYXRlZF9maXhlZDMyGCUg",
- "AygHEhgKEHJlcGVhdGVkX2ZpeGVkNjQYJiADKAYSGQoRcmVwZWF0ZWRfc2Zp",
- "eGVkMzIYJyADKA8SGQoRcmVwZWF0ZWRfc2ZpeGVkNjQYKCADKBASFgoOcmVw",
- "ZWF0ZWRfZmxvYXQYKSADKAISFwoPcmVwZWF0ZWRfZG91YmxlGCogAygBEhUK",
- "DXJlcGVhdGVkX2Jvb2wYKyADKAgSFwoPcmVwZWF0ZWRfc3RyaW5nGCwgAygJ",
- "EhYKDnJlcGVhdGVkX2J5dGVzGC0gAygMEkgKF3JlcGVhdGVkX25lc3RlZF9t",
- "ZXNzYWdlGDAgAygLMicuY29uZm9ybWFuY2UuVGVzdEFsbFR5cGVzLk5lc3Rl",
- "ZE1lc3NhZ2USPQoYcmVwZWF0ZWRfZm9yZWlnbl9tZXNzYWdlGDEgAygLMhsu",
- "Y29uZm9ybWFuY2UuRm9yZWlnbk1lc3NhZ2USQgoUcmVwZWF0ZWRfbmVzdGVk",
- "X2VudW0YMyADKA4yJC5jb25mb3JtYW5jZS5UZXN0QWxsVHlwZXMuTmVzdGVk",
- "RW51bRI3ChVyZXBlYXRlZF9mb3JlaWduX2VudW0YNCADKA4yGC5jb25mb3Jt",
- "YW5jZS5Gb3JlaWduRW51bRIhChVyZXBlYXRlZF9zdHJpbmdfcGllY2UYNiAD",
- "KAlCAggCEhkKDXJlcGVhdGVkX2NvcmQYNyADKAlCAggBEkUKD21hcF9pbnQz",
- "Ml9pbnQzMhg4IAMoCzIsLmNvbmZvcm1hbmNlLlRlc3RBbGxUeXBlcy5NYXBJ",
- "bnQzMkludDMyRW50cnkSRQoPbWFwX2ludDY0X2ludDY0GDkgAygLMiwuY29u",
- "Zm9ybWFuY2UuVGVzdEFsbFR5cGVzLk1hcEludDY0SW50NjRFbnRyeRJJChFt",
- "YXBfdWludDMyX3VpbnQzMhg6IAMoCzIuLmNvbmZvcm1hbmNlLlRlc3RBbGxU",
- "eXBlcy5NYXBVaW50MzJVaW50MzJFbnRyeRJJChFtYXBfdWludDY0X3VpbnQ2",
- "NBg7IAMoCzIuLmNvbmZvcm1hbmNlLlRlc3RBbGxUeXBlcy5NYXBVaW50NjRV",
- "aW50NjRFbnRyeRJJChFtYXBfc2ludDMyX3NpbnQzMhg8IAMoCzIuLmNvbmZv",
- "cm1hbmNlLlRlc3RBbGxUeXBlcy5NYXBTaW50MzJTaW50MzJFbnRyeRJJChFt",
- "YXBfc2ludDY0X3NpbnQ2NBg9IAMoCzIuLmNvbmZvcm1hbmNlLlRlc3RBbGxU",
- "eXBlcy5NYXBTaW50NjRTaW50NjRFbnRyeRJNChNtYXBfZml4ZWQzMl9maXhl",
- "ZDMyGD4gAygLMjAuY29uZm9ybWFuY2UuVGVzdEFsbFR5cGVzLk1hcEZpeGVk",
- "MzJGaXhlZDMyRW50cnkSTQoTbWFwX2ZpeGVkNjRfZml4ZWQ2NBg/IAMoCzIw",
- "LmNvbmZvcm1hbmNlLlRlc3RBbGxUeXBlcy5NYXBGaXhlZDY0Rml4ZWQ2NEVu",
- "dHJ5ElEKFW1hcF9zZml4ZWQzMl9zZml4ZWQzMhhAIAMoCzIyLmNvbmZvcm1h",
- "bmNlLlRlc3RBbGxUeXBlcy5NYXBTZml4ZWQzMlNmaXhlZDMyRW50cnkSUQoV",
- "bWFwX3NmaXhlZDY0X3NmaXhlZDY0GEEgAygLMjIuY29uZm9ybWFuY2UuVGVz",
- "dEFsbFR5cGVzLk1hcFNmaXhlZDY0U2ZpeGVkNjRFbnRyeRJFCg9tYXBfaW50",
- "MzJfZmxvYXQYQiADKAsyLC5jb25mb3JtYW5jZS5UZXN0QWxsVHlwZXMuTWFw",
- "SW50MzJGbG9hdEVudHJ5EkcKEG1hcF9pbnQzMl9kb3VibGUYQyADKAsyLS5j",
- "b25mb3JtYW5jZS5UZXN0QWxsVHlwZXMuTWFwSW50MzJEb3VibGVFbnRyeRJB",
- "Cg1tYXBfYm9vbF9ib29sGEQgAygLMiouY29uZm9ybWFuY2UuVGVzdEFsbFR5",
- "cGVzLk1hcEJvb2xCb29sRW50cnkSSQoRbWFwX3N0cmluZ19zdHJpbmcYRSAD",
- "KAsyLi5jb25mb3JtYW5jZS5UZXN0QWxsVHlwZXMuTWFwU3RyaW5nU3RyaW5n",
- "RW50cnkSRwoQbWFwX3N0cmluZ19ieXRlcxhGIAMoCzItLmNvbmZvcm1hbmNl",
- "LlRlc3RBbGxUeXBlcy5NYXBTdHJpbmdCeXRlc0VudHJ5ElgKGW1hcF9zdHJp",
- "bmdfbmVzdGVkX21lc3NhZ2UYRyADKAsyNS5jb25mb3JtYW5jZS5UZXN0QWxs",
- "VHlwZXMuTWFwU3RyaW5nTmVzdGVkTWVzc2FnZUVudHJ5EloKGm1hcF9zdHJp",
- "bmdfZm9yZWlnbl9tZXNzYWdlGEggAygLMjYuY29uZm9ybWFuY2UuVGVzdEFs",
- "bFR5cGVzLk1hcFN0cmluZ0ZvcmVpZ25NZXNzYWdlRW50cnkSUgoWbWFwX3N0",
- "cmluZ19uZXN0ZWRfZW51bRhJIAMoCzIyLmNvbmZvcm1hbmNlLlRlc3RBbGxU",
- "eXBlcy5NYXBTdHJpbmdOZXN0ZWRFbnVtRW50cnkSVAoXbWFwX3N0cmluZ19m",
- "b3JlaWduX2VudW0YSiADKAsyMy5jb25mb3JtYW5jZS5UZXN0QWxsVHlwZXMu",
- "TWFwU3RyaW5nRm9yZWlnbkVudW1FbnRyeRIWCgxvbmVvZl91aW50MzIYbyAB",
- "KA1IABJHChRvbmVvZl9uZXN0ZWRfbWVzc2FnZRhwIAEoCzInLmNvbmZvcm1h",
- "bmNlLlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlSAASFgoMb25lb2Zfc3Ry",
- "aW5nGHEgASgJSAASFQoLb25lb2ZfYnl0ZXMYciABKAxIABIUCgpvbmVvZl9i",
- "b29sGHMgASgISAASFgoMb25lb2ZfdWludDY0GHQgASgESAASFQoLb25lb2Zf",
- "ZmxvYXQYdSABKAJIABIWCgxvbmVvZl9kb3VibGUYdiABKAFIABI6CgpvbmVv",
- "Zl9lbnVtGHcgASgOMiQuY29uZm9ybWFuY2UuVGVzdEFsbFR5cGVzLk5lc3Rl",
- "ZEVudW1IABI6ChVvcHRpb25hbF9ib29sX3dyYXBwZXIYyQEgASgLMhouZ29v",
- "Z2xlLnByb3RvYnVmLkJvb2xWYWx1ZRI8ChZvcHRpb25hbF9pbnQzMl93cmFw",
- "cGVyGMoBIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlEjwKFm9w",
- "dGlvbmFsX2ludDY0X3dyYXBwZXIYywEgASgLMhsuZ29vZ2xlLnByb3RvYnVm",
- "LkludDY0VmFsdWUSPgoXb3B0aW9uYWxfdWludDMyX3dyYXBwZXIYzAEgASgL",
- "MhwuZ29vZ2xlLnByb3RvYnVmLlVJbnQzMlZhbHVlEj4KF29wdGlvbmFsX3Vp",
- "bnQ2NF93cmFwcGVyGM0BIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5VSW50NjRW",
- "YWx1ZRI8ChZvcHRpb25hbF9mbG9hdF93cmFwcGVyGM4BIAEoCzIbLmdvb2ds",
- "ZS5wcm90b2J1Zi5GbG9hdFZhbHVlEj4KF29wdGlvbmFsX2RvdWJsZV93cmFw",
- "cGVyGM8BIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5Eb3VibGVWYWx1ZRI+Chdv",
- "cHRpb25hbF9zdHJpbmdfd3JhcHBlchjQASABKAsyHC5nb29nbGUucHJvdG9i",
- "dWYuU3RyaW5nVmFsdWUSPAoWb3B0aW9uYWxfYnl0ZXNfd3JhcHBlchjRASAB",
- "KAsyGy5nb29nbGUucHJvdG9idWYuQnl0ZXNWYWx1ZRI6ChVyZXBlYXRlZF9i",
- "b29sX3dyYXBwZXIY0wEgAygLMhouZ29vZ2xlLnByb3RvYnVmLkJvb2xWYWx1",
- "ZRI8ChZyZXBlYXRlZF9pbnQzMl93cmFwcGVyGNQBIAMoCzIbLmdvb2dsZS5w",
- "cm90b2J1Zi5JbnQzMlZhbHVlEjwKFnJlcGVhdGVkX2ludDY0X3dyYXBwZXIY",
- "1QEgAygLMhsuZ29vZ2xlLnByb3RvYnVmLkludDY0VmFsdWUSPgoXcmVwZWF0",
- "ZWRfdWludDMyX3dyYXBwZXIY1gEgAygLMhwuZ29vZ2xlLnByb3RvYnVmLlVJ",
- "bnQzMlZhbHVlEj4KF3JlcGVhdGVkX3VpbnQ2NF93cmFwcGVyGNcBIAMoCzIc",
- "Lmdvb2dsZS5wcm90b2J1Zi5VSW50NjRWYWx1ZRI8ChZyZXBlYXRlZF9mbG9h",
- "dF93cmFwcGVyGNgBIAMoCzIbLmdvb2dsZS5wcm90b2J1Zi5GbG9hdFZhbHVl",
- "Ej4KF3JlcGVhdGVkX2RvdWJsZV93cmFwcGVyGNkBIAMoCzIcLmdvb2dsZS5w",
- "cm90b2J1Zi5Eb3VibGVWYWx1ZRI+ChdyZXBlYXRlZF9zdHJpbmdfd3JhcHBl",
- "chjaASADKAsyHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUSPAoWcmVw",
- "ZWF0ZWRfYnl0ZXNfd3JhcHBlchjbASADKAsyGy5nb29nbGUucHJvdG9idWYu",
- "Qnl0ZXNWYWx1ZRI1ChFvcHRpb25hbF9kdXJhdGlvbhitAiABKAsyGS5nb29n",
- "bGUucHJvdG9idWYuRHVyYXRpb24SNwoSb3B0aW9uYWxfdGltZXN0YW1wGK4C",
- "IAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASOAoTb3B0aW9uYWxf",
- "ZmllbGRfbWFzaxivAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNr",
- "EjEKD29wdGlvbmFsX3N0cnVjdBiwAiABKAsyFy5nb29nbGUucHJvdG9idWYu",
- "U3RydWN0EisKDG9wdGlvbmFsX2FueRixAiABKAsyFC5nb29nbGUucHJvdG9i",
- "dWYuQW55Ei8KDm9wdGlvbmFsX3ZhbHVlGLICIAEoCzIWLmdvb2dsZS5wcm90",
- "b2J1Zi5WYWx1ZRI1ChFyZXBlYXRlZF9kdXJhdGlvbhi3AiADKAsyGS5nb29n",
- "bGUucHJvdG9idWYuRHVyYXRpb24SNwoScmVwZWF0ZWRfdGltZXN0YW1wGLgC",
- "IAMoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASNwoScmVwZWF0ZWRf",
- "ZmllbGRtYXNrGLkCIAMoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2sS",
- "MQoPcmVwZWF0ZWRfc3RydWN0GMQCIAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5T",
- "dHJ1Y3QSKwoMcmVwZWF0ZWRfYW55GLsCIAMoCzIULmdvb2dsZS5wcm90b2J1",
- "Zi5BbnkSLwoOcmVwZWF0ZWRfdmFsdWUYvAIgAygLMhYuZ29vZ2xlLnByb3Rv",
- "YnVmLlZhbHVlEhMKCmZpZWxkbmFtZTEYkQMgASgFEhQKC2ZpZWxkX25hbWUy",
- "GJIDIAEoBRIVCgxfZmllbGRfbmFtZTMYkwMgASgFEhYKDWZpZWxkX19uYW1l",
- "NF8YlAMgASgFEhQKC2ZpZWxkMG5hbWU1GJUDIAEoBRIWCg1maWVsZF8wX25h",
- "bWU2GJYDIAEoBRITCgpmaWVsZE5hbWU3GJcDIAEoBRITCgpGaWVsZE5hbWU4",
- "GJgDIAEoBRIUCgtmaWVsZF9OYW1lORiZAyABKAUSFQoMRmllbGRfTmFtZTEw",
- "GJoDIAEoBRIVCgxGSUVMRF9OQU1FMTEYmwMgASgFEhUKDEZJRUxEX25hbWUx",
- "MhicAyABKAUSFwoOX19maWVsZF9uYW1lMTMYnQMgASgFEhcKDl9fRmllbGRf",
- "bmFtZTE0GJ4DIAEoBRIWCg1maWVsZF9fbmFtZTE1GJ8DIAEoBRIWCg1maWVs",
- "ZF9fTmFtZTE2GKADIAEoBRIXCg5maWVsZF9uYW1lMTdfXxihAyABKAUSFwoO",
- "RmllbGRfbmFtZTE4X18YogMgASgFGkoKDU5lc3RlZE1lc3NhZ2USCQoBYRgB",
- "IAEoBRIuCgtjb3JlY3Vyc2l2ZRgCIAEoCzIZLmNvbmZvcm1hbmNlLlRlc3RB",
- "bGxUeXBlcxo0ChJNYXBJbnQzMkludDMyRW50cnkSCwoDa2V5GAEgASgFEg0K",
- "BXZhbHVlGAIgASgFOgI4ARo0ChJNYXBJbnQ2NEludDY0RW50cnkSCwoDa2V5",
- "GAEgASgDEg0KBXZhbHVlGAIgASgDOgI4ARo2ChRNYXBVaW50MzJVaW50MzJF",
- "bnRyeRILCgNrZXkYASABKA0SDQoFdmFsdWUYAiABKA06AjgBGjYKFE1hcFVp",
- "bnQ2NFVpbnQ2NEVudHJ5EgsKA2tleRgBIAEoBBINCgV2YWx1ZRgCIAEoBDoC",
- "OAEaNgoUTWFwU2ludDMyU2ludDMyRW50cnkSCwoDa2V5GAEgASgREg0KBXZh",
- "bHVlGAIgASgROgI4ARo2ChRNYXBTaW50NjRTaW50NjRFbnRyeRILCgNrZXkY",
- "ASABKBISDQoFdmFsdWUYAiABKBI6AjgBGjgKFk1hcEZpeGVkMzJGaXhlZDMy",
- "RW50cnkSCwoDa2V5GAEgASgHEg0KBXZhbHVlGAIgASgHOgI4ARo4ChZNYXBG",
- "aXhlZDY0Rml4ZWQ2NEVudHJ5EgsKA2tleRgBIAEoBhINCgV2YWx1ZRgCIAEo",
- "BjoCOAEaOgoYTWFwU2ZpeGVkMzJTZml4ZWQzMkVudHJ5EgsKA2tleRgBIAEo",
- "DxINCgV2YWx1ZRgCIAEoDzoCOAEaOgoYTWFwU2ZpeGVkNjRTZml4ZWQ2NEVu",
- "dHJ5EgsKA2tleRgBIAEoEBINCgV2YWx1ZRgCIAEoEDoCOAEaNAoSTWFwSW50",
- "MzJGbG9hdEVudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1ZRgCIAEoAjoCOAEa",
- "NQoTTWFwSW50MzJEb3VibGVFbnRyeRILCgNrZXkYASABKAUSDQoFdmFsdWUY",
- "AiABKAE6AjgBGjIKEE1hcEJvb2xCb29sRW50cnkSCwoDa2V5GAEgASgIEg0K",
- "BXZhbHVlGAIgASgIOgI4ARo2ChRNYXBTdHJpbmdTdHJpbmdFbnRyeRILCgNr",
- "ZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBGjUKE01hcFN0cmluZ0J5dGVz",
- "RW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgMOgI4ARpmChtNYXBT",
- "dHJpbmdOZXN0ZWRNZXNzYWdlRW50cnkSCwoDa2V5GAEgASgJEjYKBXZhbHVl",
- "GAIgASgLMicuY29uZm9ybWFuY2UuVGVzdEFsbFR5cGVzLk5lc3RlZE1lc3Nh",
- "Z2U6AjgBGlsKHE1hcFN0cmluZ0ZvcmVpZ25NZXNzYWdlRW50cnkSCwoDa2V5",
- "GAEgASgJEioKBXZhbHVlGAIgASgLMhsuY29uZm9ybWFuY2UuRm9yZWlnbk1l",
- "c3NhZ2U6AjgBGmAKGE1hcFN0cmluZ05lc3RlZEVudW1FbnRyeRILCgNrZXkY",
- "ASABKAkSMwoFdmFsdWUYAiABKA4yJC5jb25mb3JtYW5jZS5UZXN0QWxsVHlw",
- "ZXMuTmVzdGVkRW51bToCOAEaVQoZTWFwU3RyaW5nRm9yZWlnbkVudW1FbnRy",
- "eRILCgNrZXkYASABKAkSJwoFdmFsdWUYAiABKA4yGC5jb25mb3JtYW5jZS5G",
- "b3JlaWduRW51bToCOAEiOQoKTmVzdGVkRW51bRIHCgNGT08QABIHCgNCQVIQ",
- "ARIHCgNCQVoQAhIQCgNORUcQ////////////AUINCgtvbmVvZl9maWVsZCIb",
- "Cg5Gb3JlaWduTWVzc2FnZRIJCgFjGAEgASgFKjUKCldpcmVGb3JtYXQSDwoL",
- "VU5TUEVDSUZJRUQQABIMCghQUk9UT0JVRhABEggKBEpTT04QAipACgtGb3Jl",
- "aWduRW51bRIPCgtGT1JFSUdOX0ZPTxAAEg8KC0ZPUkVJR05fQkFSEAESDwoL",
- "Rk9SRUlHTl9CQVoQAkIhCh9jb20uZ29vZ2xlLnByb3RvYnVmLmNvbmZvcm1h",
- "bmNlYgZwcm90bzM="));
+ "ChFjb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2UijQEKEkNvbmZvcm1h",
+ "bmNlUmVxdWVzdBIaChBwcm90b2J1Zl9wYXlsb2FkGAEgASgMSAASFgoManNv",
+ "bl9wYXlsb2FkGAIgASgJSAASOAoXcmVxdWVzdGVkX291dHB1dF9mb3JtYXQY",
+ "AyABKA4yFy5jb25mb3JtYW5jZS5XaXJlRm9ybWF0QgkKB3BheWxvYWQisQEK",
+ "E0NvbmZvcm1hbmNlUmVzcG9uc2USFQoLcGFyc2VfZXJyb3IYASABKAlIABIZ",
+ "Cg9zZXJpYWxpemVfZXJyb3IYBiABKAlIABIXCg1ydW50aW1lX2Vycm9yGAIg",
+ "ASgJSAASGgoQcHJvdG9idWZfcGF5bG9hZBgDIAEoDEgAEhYKDGpzb25fcGF5",
+ "bG9hZBgEIAEoCUgAEhEKB3NraXBwZWQYBSABKAlIAEIICgZyZXN1bHQqNQoK",
+ "V2lyZUZvcm1hdBIPCgtVTlNQRUNJRklFRBAAEgwKCFBST1RPQlVGEAESCAoE",
+ "SlNPThACQiEKH2NvbS5nb29nbGUucHJvdG9idWYuY29uZm9ybWFuY2ViBnBy",
+ "b3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, },
- new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Conformance.WireFormat), typeof(global::Conformance.ForeignEnum), }, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Conformance.WireFormat), }, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceRequest), global::Conformance.ConformanceRequest.Parser, new[]{ "ProtobufPayload", "JsonPayload", "RequestedOutputFormat" }, new[]{ "Payload" }, null, null),
- new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceResponse), global::Conformance.ConformanceResponse.Parser, new[]{ "ParseError", "SerializeError", "RuntimeError", "ProtobufPayload", "JsonPayload", "Skipped" }, new[]{ "Result" }, null, null),
- new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.TestAllTypes), global::Conformance.TestAllTypes.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes", "OneofBool", "OneofUint64", "OneofFloat", "OneofDouble", "OneofEnum", "OptionalBoolWrapper", "OptionalInt32Wrapper", "OptionalInt64Wrapper", "OptionalUint32Wrapper", "OptionalUint64Wrapper", "OptionalFloatWrapper", "OptionalDoubleWrapper", "OptionalStringWrapper", "OptionalBytesWrapper", "RepeatedBoolWrapper", "RepeatedInt32Wrapper", "RepeatedInt64Wrapper", "RepeatedUint32Wrapper", "RepeatedUint64Wrapper", "RepeatedFloatWrapper", "RepeatedDoubleWrapper", "RepeatedStringWrapper", "RepeatedBytesWrapper", "OptionalDuration", "OptionalTimestamp", "OptionalFieldMask", "OptionalStruct", "OptionalAny", "OptionalValue", "RepeatedDuration", "RepeatedTimestamp", "RepeatedFieldmask", "RepeatedStruct", "RepeatedAny", "RepeatedValue", "Fieldname1", "FieldName2", "FieldName3", "FieldName4", "Field0Name5", "Field0Name6", "FieldName7", "FieldName8", "FieldName9", "FieldName10", "FIELDNAME11", "FIELDName12", "FieldName13", "FieldName14", "FieldName15", "FieldName16", "FieldName17", "FieldName18" }, new[]{ "OneofField" }, new[]{ typeof(global::Conformance.TestAllTypes.Types.NestedEnum) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.TestAllTypes.Types.NestedMessage), global::Conformance.TestAllTypes.Types.NestedMessage.Parser, new[]{ "A", "Corecursive" }, null, null, null),
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }),
- new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ForeignMessage), global::Conformance.ForeignMessage.Parser, new[]{ "C" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceResponse), global::Conformance.ConformanceResponse.Parser, new[]{ "ParseError", "SerializeError", "RuntimeError", "ProtobufPayload", "JsonPayload", "Skipped" }, new[]{ "Result" }, null, null)
}));
}
#endregion
@@ -210,21 +50,15 @@ namespace Conformance {
[pbr::OriginalName("JSON")] Json = 2,
}
- public enum ForeignEnum {
- [pbr::OriginalName("FOREIGN_FOO")] ForeignFoo = 0,
- [pbr::OriginalName("FOREIGN_BAR")] ForeignBar = 1,
- [pbr::OriginalName("FOREIGN_BAZ")] ForeignBaz = 2,
- }
-
#endregion
#region Messages
/// <summary>
- /// Represents a single test case's input. The testee should:
+ /// Represents a single test case's input. The testee should:
///
- /// 1. parse this proto (which should always succeed)
- /// 2. parse the protobuf or JSON payload in "payload" (which may fail)
- /// 3. if the parse succeeded, serialize the message in the requested format.
+ /// 1. parse this proto (which should always succeed)
+ /// 2. parse the protobuf or JSON payload in "payload" (which may fail)
+ /// 3. if the parse succeeded, serialize the message in the requested format.
/// </summary>
public sealed partial class ConformanceRequest : pb::IMessage<ConformanceRequest> {
private static readonly pb::MessageParser<ConformanceRequest> _parser = new pb::MessageParser<ConformanceRequest>(() => new ConformanceRequest());
@@ -293,7 +127,7 @@ namespace Conformance {
public const int RequestedOutputFormatFieldNumber = 3;
private global::Conformance.WireFormat requestedOutputFormat_ = 0;
/// <summary>
- /// Which format should the testee serialize its message to?
+ /// Which format should the testee serialize its message to?
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Conformance.WireFormat RequestedOutputFormat {
@@ -434,7 +268,7 @@ namespace Conformance {
}
/// <summary>
- /// Represents a single test case's output.
+ /// Represents a single test case's output.
/// </summary>
public sealed partial class ConformanceResponse : pb::IMessage<ConformanceResponse> {
private static readonly pb::MessageParser<ConformanceResponse> _parser = new pb::MessageParser<ConformanceResponse>(() => new ConformanceResponse());
@@ -491,11 +325,11 @@ namespace Conformance {
/// <summary>Field number for the "parse_error" field.</summary>
public const int ParseErrorFieldNumber = 1;
/// <summary>
- /// This string should be set to indicate parsing failed. The string can
- /// provide more information about the parse error if it is available.
+ /// This string should be set to indicate parsing failed. The string can
+ /// provide more information about the parse error if it is available.
///
- /// Setting this string does not necessarily mean the testee failed the
- /// test. Some of the test cases are intentionally invalid input.
+ /// Setting this string does not necessarily mean the testee failed the
+ /// test. Some of the test cases are intentionally invalid input.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string ParseError {
@@ -509,9 +343,9 @@ namespace Conformance {
/// <summary>Field number for the "serialize_error" field.</summary>
public const int SerializeErrorFieldNumber = 6;
/// <summary>
- /// If the input was successfully parsed but errors occurred when
- /// serializing it to the requested output format, set the error message in
- /// this field.
+ /// If the input was successfully parsed but errors occurred when
+ /// serializing it to the requested output format, set the error message in
+ /// this field.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string SerializeError {
@@ -525,9 +359,9 @@ namespace Conformance {
/// <summary>Field number for the "runtime_error" field.</summary>
public const int RuntimeErrorFieldNumber = 2;
/// <summary>
- /// This should be set if some other error occurred. This will always
- /// indicate that the test failed. The string can provide more information
- /// about the failure.
+ /// This should be set if some other error occurred. This will always
+ /// indicate that the test failed. The string can provide more information
+ /// about the failure.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string RuntimeError {
@@ -541,8 +375,8 @@ namespace Conformance {
/// <summary>Field number for the "protobuf_payload" field.</summary>
public const int ProtobufPayloadFieldNumber = 3;
/// <summary>
- /// If the input was successfully parsed and the requested output was
- /// protobuf, serialize it to protobuf and set it in this field.
+ /// If the input was successfully parsed and the requested output was
+ /// protobuf, serialize it to protobuf and set it in this field.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pb::ByteString ProtobufPayload {
@@ -556,8 +390,8 @@ namespace Conformance {
/// <summary>Field number for the "json_payload" field.</summary>
public const int JsonPayloadFieldNumber = 4;
/// <summary>
- /// If the input was successfully parsed and the requested output was JSON,
- /// serialize to JSON and set it in this field.
+ /// If the input was successfully parsed and the requested output was JSON,
+ /// serialize to JSON and set it in this field.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string JsonPayload {
@@ -571,8 +405,8 @@ namespace Conformance {
/// <summary>Field number for the "skipped" field.</summary>
public const int SkippedFieldNumber = 5;
/// <summary>
- /// For when the testee skipped the test, likely because a certain feature
- /// wasn't supported, like JSON input/output.
+ /// For when the testee skipped the test, likely because a certain feature
+ /// wasn't supported, like JSON input/output.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Skipped {
@@ -765,3464 +599,6 @@ namespace Conformance {
}
- /// <summary>
- /// This proto includes every type of field in both singular and repeated
- /// forms.
- /// </summary>
- public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes> {
- private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::MessageParser<TestAllTypes>(() => new TestAllTypes());
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<TestAllTypes> Parser { get { return _parser; } }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[2]; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public TestAllTypes() {
- OnConstruction();
- }
-
- partial void OnConstruction();
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public TestAllTypes(TestAllTypes other) : this() {
- optionalInt32_ = other.optionalInt32_;
- optionalInt64_ = other.optionalInt64_;
- optionalUint32_ = other.optionalUint32_;
- optionalUint64_ = other.optionalUint64_;
- optionalSint32_ = other.optionalSint32_;
- optionalSint64_ = other.optionalSint64_;
- optionalFixed32_ = other.optionalFixed32_;
- optionalFixed64_ = other.optionalFixed64_;
- optionalSfixed32_ = other.optionalSfixed32_;
- optionalSfixed64_ = other.optionalSfixed64_;
- optionalFloat_ = other.optionalFloat_;
- optionalDouble_ = other.optionalDouble_;
- optionalBool_ = other.optionalBool_;
- optionalString_ = other.optionalString_;
- optionalBytes_ = other.optionalBytes_;
- OptionalNestedMessage = other.optionalNestedMessage_ != null ? other.OptionalNestedMessage.Clone() : null;
- OptionalForeignMessage = other.optionalForeignMessage_ != null ? other.OptionalForeignMessage.Clone() : null;
- optionalNestedEnum_ = other.optionalNestedEnum_;
- optionalForeignEnum_ = other.optionalForeignEnum_;
- optionalStringPiece_ = other.optionalStringPiece_;
- optionalCord_ = other.optionalCord_;
- RecursiveMessage = other.recursiveMessage_ != null ? other.RecursiveMessage.Clone() : null;
- repeatedInt32_ = other.repeatedInt32_.Clone();
- repeatedInt64_ = other.repeatedInt64_.Clone();
- repeatedUint32_ = other.repeatedUint32_.Clone();
- repeatedUint64_ = other.repeatedUint64_.Clone();
- repeatedSint32_ = other.repeatedSint32_.Clone();
- repeatedSint64_ = other.repeatedSint64_.Clone();
- repeatedFixed32_ = other.repeatedFixed32_.Clone();
- repeatedFixed64_ = other.repeatedFixed64_.Clone();
- repeatedSfixed32_ = other.repeatedSfixed32_.Clone();
- repeatedSfixed64_ = other.repeatedSfixed64_.Clone();
- repeatedFloat_ = other.repeatedFloat_.Clone();
- repeatedDouble_ = other.repeatedDouble_.Clone();
- repeatedBool_ = other.repeatedBool_.Clone();
- repeatedString_ = other.repeatedString_.Clone();
- repeatedBytes_ = other.repeatedBytes_.Clone();
- repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone();
- repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone();
- repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone();
- repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone();
- repeatedStringPiece_ = other.repeatedStringPiece_.Clone();
- repeatedCord_ = other.repeatedCord_.Clone();
- mapInt32Int32_ = other.mapInt32Int32_.Clone();
- mapInt64Int64_ = other.mapInt64Int64_.Clone();
- mapUint32Uint32_ = other.mapUint32Uint32_.Clone();
- mapUint64Uint64_ = other.mapUint64Uint64_.Clone();
- mapSint32Sint32_ = other.mapSint32Sint32_.Clone();
- mapSint64Sint64_ = other.mapSint64Sint64_.Clone();
- mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone();
- mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone();
- mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone();
- mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone();
- mapInt32Float_ = other.mapInt32Float_.Clone();
- mapInt32Double_ = other.mapInt32Double_.Clone();
- mapBoolBool_ = other.mapBoolBool_.Clone();
- mapStringString_ = other.mapStringString_.Clone();
- mapStringBytes_ = other.mapStringBytes_.Clone();
- mapStringNestedMessage_ = other.mapStringNestedMessage_.Clone();
- mapStringForeignMessage_ = other.mapStringForeignMessage_.Clone();
- mapStringNestedEnum_ = other.mapStringNestedEnum_.Clone();
- mapStringForeignEnum_ = other.mapStringForeignEnum_.Clone();
- OptionalBoolWrapper = other.OptionalBoolWrapper;
- OptionalInt32Wrapper = other.OptionalInt32Wrapper;
- OptionalInt64Wrapper = other.OptionalInt64Wrapper;
- OptionalUint32Wrapper = other.OptionalUint32Wrapper;
- OptionalUint64Wrapper = other.OptionalUint64Wrapper;
- OptionalFloatWrapper = other.OptionalFloatWrapper;
- OptionalDoubleWrapper = other.OptionalDoubleWrapper;
- OptionalStringWrapper = other.OptionalStringWrapper;
- OptionalBytesWrapper = other.OptionalBytesWrapper;
- repeatedBoolWrapper_ = other.repeatedBoolWrapper_.Clone();
- repeatedInt32Wrapper_ = other.repeatedInt32Wrapper_.Clone();
- repeatedInt64Wrapper_ = other.repeatedInt64Wrapper_.Clone();
- repeatedUint32Wrapper_ = other.repeatedUint32Wrapper_.Clone();
- repeatedUint64Wrapper_ = other.repeatedUint64Wrapper_.Clone();
- repeatedFloatWrapper_ = other.repeatedFloatWrapper_.Clone();
- repeatedDoubleWrapper_ = other.repeatedDoubleWrapper_.Clone();
- repeatedStringWrapper_ = other.repeatedStringWrapper_.Clone();
- repeatedBytesWrapper_ = other.repeatedBytesWrapper_.Clone();
- OptionalDuration = other.optionalDuration_ != null ? other.OptionalDuration.Clone() : null;
- OptionalTimestamp = other.optionalTimestamp_ != null ? other.OptionalTimestamp.Clone() : null;
- OptionalFieldMask = other.optionalFieldMask_ != null ? other.OptionalFieldMask.Clone() : null;
- OptionalStruct = other.optionalStruct_ != null ? other.OptionalStruct.Clone() : null;
- OptionalAny = other.optionalAny_ != null ? other.OptionalAny.Clone() : null;
- OptionalValue = other.optionalValue_ != null ? other.OptionalValue.Clone() : null;
- repeatedDuration_ = other.repeatedDuration_.Clone();
- repeatedTimestamp_ = other.repeatedTimestamp_.Clone();
- repeatedFieldmask_ = other.repeatedFieldmask_.Clone();
- repeatedStruct_ = other.repeatedStruct_.Clone();
- repeatedAny_ = other.repeatedAny_.Clone();
- repeatedValue_ = other.repeatedValue_.Clone();
- fieldname1_ = other.fieldname1_;
- fieldName2_ = other.fieldName2_;
- FieldName3_ = other.FieldName3_;
- fieldName4_ = other.fieldName4_;
- field0Name5_ = other.field0Name5_;
- field0Name6_ = other.field0Name6_;
- fieldName7_ = other.fieldName7_;
- fieldName8_ = other.fieldName8_;
- fieldName9_ = other.fieldName9_;
- fieldName10_ = other.fieldName10_;
- fIELDNAME11_ = other.fIELDNAME11_;
- fIELDName12_ = other.fIELDName12_;
- FieldName13_ = other.FieldName13_;
- FieldName14_ = other.FieldName14_;
- fieldName15_ = other.fieldName15_;
- fieldName16_ = other.fieldName16_;
- fieldName17_ = other.fieldName17_;
- fieldName18_ = other.fieldName18_;
- switch (other.OneofFieldCase) {
- case OneofFieldOneofCase.OneofUint32:
- OneofUint32 = other.OneofUint32;
- break;
- case OneofFieldOneofCase.OneofNestedMessage:
- OneofNestedMessage = other.OneofNestedMessage.Clone();
- break;
- case OneofFieldOneofCase.OneofString:
- OneofString = other.OneofString;
- break;
- case OneofFieldOneofCase.OneofBytes:
- OneofBytes = other.OneofBytes;
- break;
- case OneofFieldOneofCase.OneofBool:
- OneofBool = other.OneofBool;
- break;
- case OneofFieldOneofCase.OneofUint64:
- OneofUint64 = other.OneofUint64;
- break;
- case OneofFieldOneofCase.OneofFloat:
- OneofFloat = other.OneofFloat;
- break;
- case OneofFieldOneofCase.OneofDouble:
- OneofDouble = other.OneofDouble;
- break;
- case OneofFieldOneofCase.OneofEnum:
- OneofEnum = other.OneofEnum;
- break;
- }
-
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public TestAllTypes Clone() {
- return new TestAllTypes(this);
- }
-
- /// <summary>Field number for the "optional_int32" field.</summary>
- public const int OptionalInt32FieldNumber = 1;
- private int optionalInt32_;
- /// <summary>
- /// Singular
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int OptionalInt32 {
- get { return optionalInt32_; }
- set {
- optionalInt32_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_int64" field.</summary>
- public const int OptionalInt64FieldNumber = 2;
- private long optionalInt64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public long OptionalInt64 {
- get { return optionalInt64_; }
- set {
- optionalInt64_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_uint32" field.</summary>
- public const int OptionalUint32FieldNumber = 3;
- private uint optionalUint32_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint OptionalUint32 {
- get { return optionalUint32_; }
- set {
- optionalUint32_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_uint64" field.</summary>
- public const int OptionalUint64FieldNumber = 4;
- private ulong optionalUint64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public ulong OptionalUint64 {
- get { return optionalUint64_; }
- set {
- optionalUint64_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_sint32" field.</summary>
- public const int OptionalSint32FieldNumber = 5;
- private int optionalSint32_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int OptionalSint32 {
- get { return optionalSint32_; }
- set {
- optionalSint32_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_sint64" field.</summary>
- public const int OptionalSint64FieldNumber = 6;
- private long optionalSint64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public long OptionalSint64 {
- get { return optionalSint64_; }
- set {
- optionalSint64_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_fixed32" field.</summary>
- public const int OptionalFixed32FieldNumber = 7;
- private uint optionalFixed32_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint OptionalFixed32 {
- get { return optionalFixed32_; }
- set {
- optionalFixed32_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_fixed64" field.</summary>
- public const int OptionalFixed64FieldNumber = 8;
- private ulong optionalFixed64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public ulong OptionalFixed64 {
- get { return optionalFixed64_; }
- set {
- optionalFixed64_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_sfixed32" field.</summary>
- public const int OptionalSfixed32FieldNumber = 9;
- private int optionalSfixed32_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int OptionalSfixed32 {
- get { return optionalSfixed32_; }
- set {
- optionalSfixed32_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_sfixed64" field.</summary>
- public const int OptionalSfixed64FieldNumber = 10;
- private long optionalSfixed64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public long OptionalSfixed64 {
- get { return optionalSfixed64_; }
- set {
- optionalSfixed64_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_float" field.</summary>
- public const int OptionalFloatFieldNumber = 11;
- private float optionalFloat_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public float OptionalFloat {
- get { return optionalFloat_; }
- set {
- optionalFloat_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_double" field.</summary>
- public const int OptionalDoubleFieldNumber = 12;
- private double optionalDouble_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double OptionalDouble {
- get { return optionalDouble_; }
- set {
- optionalDouble_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_bool" field.</summary>
- public const int OptionalBoolFieldNumber = 13;
- private bool optionalBool_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool OptionalBool {
- get { return optionalBool_; }
- set {
- optionalBool_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_string" field.</summary>
- public const int OptionalStringFieldNumber = 14;
- private string optionalString_ = "";
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public string OptionalString {
- get { return optionalString_; }
- set {
- optionalString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- }
- }
-
- /// <summary>Field number for the "optional_bytes" field.</summary>
- public const int OptionalBytesFieldNumber = 15;
- private pb::ByteString optionalBytes_ = pb::ByteString.Empty;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pb::ByteString OptionalBytes {
- get { return optionalBytes_; }
- set {
- optionalBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- }
- }
-
- /// <summary>Field number for the "optional_nested_message" field.</summary>
- public const int OptionalNestedMessageFieldNumber = 18;
- private global::Conformance.TestAllTypes.Types.NestedMessage optionalNestedMessage_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Conformance.TestAllTypes.Types.NestedMessage OptionalNestedMessage {
- get { return optionalNestedMessage_; }
- set {
- optionalNestedMessage_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_foreign_message" field.</summary>
- public const int OptionalForeignMessageFieldNumber = 19;
- private global::Conformance.ForeignMessage optionalForeignMessage_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Conformance.ForeignMessage OptionalForeignMessage {
- get { return optionalForeignMessage_; }
- set {
- optionalForeignMessage_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_nested_enum" field.</summary>
- public const int OptionalNestedEnumFieldNumber = 21;
- private global::Conformance.TestAllTypes.Types.NestedEnum optionalNestedEnum_ = 0;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Conformance.TestAllTypes.Types.NestedEnum OptionalNestedEnum {
- get { return optionalNestedEnum_; }
- set {
- optionalNestedEnum_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_foreign_enum" field.</summary>
- public const int OptionalForeignEnumFieldNumber = 22;
- private global::Conformance.ForeignEnum optionalForeignEnum_ = 0;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Conformance.ForeignEnum OptionalForeignEnum {
- get { return optionalForeignEnum_; }
- set {
- optionalForeignEnum_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_string_piece" field.</summary>
- public const int OptionalStringPieceFieldNumber = 24;
- private string optionalStringPiece_ = "";
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public string OptionalStringPiece {
- get { return optionalStringPiece_; }
- set {
- optionalStringPiece_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- }
- }
-
- /// <summary>Field number for the "optional_cord" field.</summary>
- public const int OptionalCordFieldNumber = 25;
- private string optionalCord_ = "";
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public string OptionalCord {
- get { return optionalCord_; }
- set {
- optionalCord_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- }
- }
-
- /// <summary>Field number for the "recursive_message" field.</summary>
- public const int RecursiveMessageFieldNumber = 27;
- private global::Conformance.TestAllTypes recursiveMessage_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Conformance.TestAllTypes RecursiveMessage {
- get { return recursiveMessage_; }
- set {
- recursiveMessage_ = value;
- }
- }
-
- /// <summary>Field number for the "repeated_int32" field.</summary>
- public const int RepeatedInt32FieldNumber = 31;
- private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
- = pb::FieldCodec.ForInt32(250);
- private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
- /// <summary>
- /// Repeated
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<int> RepeatedInt32 {
- get { return repeatedInt32_; }
- }
-
- /// <summary>Field number for the "repeated_int64" field.</summary>
- public const int RepeatedInt64FieldNumber = 32;
- private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
- = pb::FieldCodec.ForInt64(258);
- private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<long> RepeatedInt64 {
- get { return repeatedInt64_; }
- }
-
- /// <summary>Field number for the "repeated_uint32" field.</summary>
- public const int RepeatedUint32FieldNumber = 33;
- private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
- = pb::FieldCodec.ForUInt32(266);
- private readonly pbc::RepeatedField<uint> repeatedUint32_ = new pbc::RepeatedField<uint>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<uint> RepeatedUint32 {
- get { return repeatedUint32_; }
- }
-
- /// <summary>Field number for the "repeated_uint64" field.</summary>
- public const int RepeatedUint64FieldNumber = 34;
- private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
- = pb::FieldCodec.ForUInt64(274);
- private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<ulong> RepeatedUint64 {
- get { return repeatedUint64_; }
- }
-
- /// <summary>Field number for the "repeated_sint32" field.</summary>
- public const int RepeatedSint32FieldNumber = 35;
- private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
- = pb::FieldCodec.ForSInt32(282);
- private readonly pbc::RepeatedField<int> repeatedSint32_ = new pbc::RepeatedField<int>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<int> RepeatedSint32 {
- get { return repeatedSint32_; }
- }
-
- /// <summary>Field number for the "repeated_sint64" field.</summary>
- public const int RepeatedSint64FieldNumber = 36;
- private static readonly pb::FieldCodec<long> _repeated_repeatedSint64_codec
- = pb::FieldCodec.ForSInt64(290);
- private readonly pbc::RepeatedField<long> repeatedSint64_ = new pbc::RepeatedField<long>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<long> RepeatedSint64 {
- get { return repeatedSint64_; }
- }
-
- /// <summary>Field number for the "repeated_fixed32" field.</summary>
- public const int RepeatedFixed32FieldNumber = 37;
- private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
- = pb::FieldCodec.ForFixed32(298);
- private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<uint> RepeatedFixed32 {
- get { return repeatedFixed32_; }
- }
-
- /// <summary>Field number for the "repeated_fixed64" field.</summary>
- public const int RepeatedFixed64FieldNumber = 38;
- private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
- = pb::FieldCodec.ForFixed64(306);
- private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<ulong> RepeatedFixed64 {
- get { return repeatedFixed64_; }
- }
-
- /// <summary>Field number for the "repeated_sfixed32" field.</summary>
- public const int RepeatedSfixed32FieldNumber = 39;
- private static readonly pb::FieldCodec<int> _repeated_repeatedSfixed32_codec
- = pb::FieldCodec.ForSFixed32(314);
- private readonly pbc::RepeatedField<int> repeatedSfixed32_ = new pbc::RepeatedField<int>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<int> RepeatedSfixed32 {
- get { return repeatedSfixed32_; }
- }
-
- /// <summary>Field number for the "repeated_sfixed64" field.</summary>
- public const int RepeatedSfixed64FieldNumber = 40;
- private static readonly pb::FieldCodec<long> _repeated_repeatedSfixed64_codec
- = pb::FieldCodec.ForSFixed64(322);
- private readonly pbc::RepeatedField<long> repeatedSfixed64_ = new pbc::RepeatedField<long>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<long> RepeatedSfixed64 {
- get { return repeatedSfixed64_; }
- }
-
- /// <summary>Field number for the "repeated_float" field.</summary>
- public const int RepeatedFloatFieldNumber = 41;
- private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
- = pb::FieldCodec.ForFloat(330);
- private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<float> RepeatedFloat {
- get { return repeatedFloat_; }
- }
-
- /// <summary>Field number for the "repeated_double" field.</summary>
- public const int RepeatedDoubleFieldNumber = 42;
- private static readonly pb::FieldCodec<double> _repeated_repeatedDouble_codec
- = pb::FieldCodec.ForDouble(338);
- private readonly pbc::RepeatedField<double> repeatedDouble_ = new pbc::RepeatedField<double>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<double> RepeatedDouble {
- get { return repeatedDouble_; }
- }
-
- /// <summary>Field number for the "repeated_bool" field.</summary>
- public const int RepeatedBoolFieldNumber = 43;
- private static readonly pb::FieldCodec<bool> _repeated_repeatedBool_codec
- = pb::FieldCodec.ForBool(346);
- private readonly pbc::RepeatedField<bool> repeatedBool_ = new pbc::RepeatedField<bool>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<bool> RepeatedBool {
- get { return repeatedBool_; }
- }
-
- /// <summary>Field number for the "repeated_string" field.</summary>
- public const int RepeatedStringFieldNumber = 44;
- private static readonly pb::FieldCodec<string> _repeated_repeatedString_codec
- = pb::FieldCodec.ForString(354);
- private readonly pbc::RepeatedField<string> repeatedString_ = new pbc::RepeatedField<string>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<string> RepeatedString {
- get { return repeatedString_; }
- }
-
- /// <summary>Field number for the "repeated_bytes" field.</summary>
- public const int RepeatedBytesFieldNumber = 45;
- private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytes_codec
- = pb::FieldCodec.ForBytes(362);
- private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc::RepeatedField<pb::ByteString>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<pb::ByteString> RepeatedBytes {
- get { return repeatedBytes_; }
- }
-
- /// <summary>Field number for the "repeated_nested_message" field.</summary>
- public const int RepeatedNestedMessageFieldNumber = 48;
- private static readonly pb::FieldCodec<global::Conformance.TestAllTypes.Types.NestedMessage> _repeated_repeatedNestedMessage_codec
- = pb::FieldCodec.ForMessage(386, global::Conformance.TestAllTypes.Types.NestedMessage.Parser);
- private readonly pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedMessage>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedMessage> RepeatedNestedMessage {
- get { return repeatedNestedMessage_; }
- }
-
- /// <summary>Field number for the "repeated_foreign_message" field.</summary>
- public const int RepeatedForeignMessageFieldNumber = 49;
- private static readonly pb::FieldCodec<global::Conformance.ForeignMessage> _repeated_repeatedForeignMessage_codec
- = pb::FieldCodec.ForMessage(394, global::Conformance.ForeignMessage.Parser);
- private readonly pbc::RepeatedField<global::Conformance.ForeignMessage> repeatedForeignMessage_ = new pbc::RepeatedField<global::Conformance.ForeignMessage>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Conformance.ForeignMessage> RepeatedForeignMessage {
- get { return repeatedForeignMessage_; }
- }
-
- /// <summary>Field number for the "repeated_nested_enum" field.</summary>
- public const int RepeatedNestedEnumFieldNumber = 51;
- private static readonly pb::FieldCodec<global::Conformance.TestAllTypes.Types.NestedEnum> _repeated_repeatedNestedEnum_codec
- = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::Conformance.TestAllTypes.Types.NestedEnum) x);
- private readonly pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedEnum>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedEnum> RepeatedNestedEnum {
- get { return repeatedNestedEnum_; }
- }
-
- /// <summary>Field number for the "repeated_foreign_enum" field.</summary>
- public const int RepeatedForeignEnumFieldNumber = 52;
- private static readonly pb::FieldCodec<global::Conformance.ForeignEnum> _repeated_repeatedForeignEnum_codec
- = pb::FieldCodec.ForEnum(418, x => (int) x, x => (global::Conformance.ForeignEnum) x);
- private readonly pbc::RepeatedField<global::Conformance.ForeignEnum> repeatedForeignEnum_ = new pbc::RepeatedField<global::Conformance.ForeignEnum>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Conformance.ForeignEnum> RepeatedForeignEnum {
- get { return repeatedForeignEnum_; }
- }
-
- /// <summary>Field number for the "repeated_string_piece" field.</summary>
- public const int RepeatedStringPieceFieldNumber = 54;
- private static readonly pb::FieldCodec<string> _repeated_repeatedStringPiece_codec
- = pb::FieldCodec.ForString(434);
- private readonly pbc::RepeatedField<string> repeatedStringPiece_ = new pbc::RepeatedField<string>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<string> RepeatedStringPiece {
- get { return repeatedStringPiece_; }
- }
-
- /// <summary>Field number for the "repeated_cord" field.</summary>
- public const int RepeatedCordFieldNumber = 55;
- private static readonly pb::FieldCodec<string> _repeated_repeatedCord_codec
- = pb::FieldCodec.ForString(442);
- private readonly pbc::RepeatedField<string> repeatedCord_ = new pbc::RepeatedField<string>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<string> RepeatedCord {
- get { return repeatedCord_; }
- }
-
- /// <summary>Field number for the "map_int32_int32" field.</summary>
- public const int MapInt32Int32FieldNumber = 56;
- private static readonly pbc::MapField<int, int>.Codec _map_mapInt32Int32_codec
- = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 450);
- private readonly pbc::MapField<int, int> mapInt32Int32_ = new pbc::MapField<int, int>();
- /// <summary>
- /// Map
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<int, int> MapInt32Int32 {
- get { return mapInt32Int32_; }
- }
-
- /// <summary>Field number for the "map_int64_int64" field.</summary>
- public const int MapInt64Int64FieldNumber = 57;
- private static readonly pbc::MapField<long, long>.Codec _map_mapInt64Int64_codec
- = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForInt64(8), pb::FieldCodec.ForInt64(16), 458);
- private readonly pbc::MapField<long, long> mapInt64Int64_ = new pbc::MapField<long, long>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<long, long> MapInt64Int64 {
- get { return mapInt64Int64_; }
- }
-
- /// <summary>Field number for the "map_uint32_uint32" field.</summary>
- public const int MapUint32Uint32FieldNumber = 58;
- private static readonly pbc::MapField<uint, uint>.Codec _map_mapUint32Uint32_codec
- = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8), pb::FieldCodec.ForUInt32(16), 466);
- private readonly pbc::MapField<uint, uint> mapUint32Uint32_ = new pbc::MapField<uint, uint>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<uint, uint> MapUint32Uint32 {
- get { return mapUint32Uint32_; }
- }
-
- /// <summary>Field number for the "map_uint64_uint64" field.</summary>
- public const int MapUint64Uint64FieldNumber = 59;
- private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapUint64Uint64_codec
- = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForUInt64(8), pb::FieldCodec.ForUInt64(16), 474);
- private readonly pbc::MapField<ulong, ulong> mapUint64Uint64_ = new pbc::MapField<ulong, ulong>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<ulong, ulong> MapUint64Uint64 {
- get { return mapUint64Uint64_; }
- }
-
- /// <summary>Field number for the "map_sint32_sint32" field.</summary>
- public const int MapSint32Sint32FieldNumber = 60;
- private static readonly pbc::MapField<int, int>.Codec _map_mapSint32Sint32_codec
- = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSInt32(8), pb::FieldCodec.ForSInt32(16), 482);
- private readonly pbc::MapField<int, int> mapSint32Sint32_ = new pbc::MapField<int, int>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<int, int> MapSint32Sint32 {
- get { return mapSint32Sint32_; }
- }
-
- /// <summary>Field number for the "map_sint64_sint64" field.</summary>
- public const int MapSint64Sint64FieldNumber = 61;
- private static readonly pbc::MapField<long, long>.Codec _map_mapSint64Sint64_codec
- = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSInt64(8), pb::FieldCodec.ForSInt64(16), 490);
- private readonly pbc::MapField<long, long> mapSint64Sint64_ = new pbc::MapField<long, long>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<long, long> MapSint64Sint64 {
- get { return mapSint64Sint64_; }
- }
-
- /// <summary>Field number for the "map_fixed32_fixed32" field.</summary>
- public const int MapFixed32Fixed32FieldNumber = 62;
- private static readonly pbc::MapField<uint, uint>.Codec _map_mapFixed32Fixed32_codec
- = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForFixed32(13), pb::FieldCodec.ForFixed32(21), 498);
- private readonly pbc::MapField<uint, uint> mapFixed32Fixed32_ = new pbc::MapField<uint, uint>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<uint, uint> MapFixed32Fixed32 {
- get { return mapFixed32Fixed32_; }
- }
-
- /// <summary>Field number for the "map_fixed64_fixed64" field.</summary>
- public const int MapFixed64Fixed64FieldNumber = 63;
- private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapFixed64Fixed64_codec
- = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForFixed64(9), pb::FieldCodec.ForFixed64(17), 506);
- private readonly pbc::MapField<ulong, ulong> mapFixed64Fixed64_ = new pbc::MapField<ulong, ulong>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<ulong, ulong> MapFixed64Fixed64 {
- get { return mapFixed64Fixed64_; }
- }
-
- /// <summary>Field number for the "map_sfixed32_sfixed32" field.</summary>
- public const int MapSfixed32Sfixed32FieldNumber = 64;
- private static readonly pbc::MapField<int, int>.Codec _map_mapSfixed32Sfixed32_codec
- = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSFixed32(13), pb::FieldCodec.ForSFixed32(21), 514);
- private readonly pbc::MapField<int, int> mapSfixed32Sfixed32_ = new pbc::MapField<int, int>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<int, int> MapSfixed32Sfixed32 {
- get { return mapSfixed32Sfixed32_; }
- }
-
- /// <summary>Field number for the "map_sfixed64_sfixed64" field.</summary>
- public const int MapSfixed64Sfixed64FieldNumber = 65;
- private static readonly pbc::MapField<long, long>.Codec _map_mapSfixed64Sfixed64_codec
- = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSFixed64(9), pb::FieldCodec.ForSFixed64(17), 522);
- private readonly pbc::MapField<long, long> mapSfixed64Sfixed64_ = new pbc::MapField<long, long>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<long, long> MapSfixed64Sfixed64 {
- get { return mapSfixed64Sfixed64_; }
- }
-
- /// <summary>Field number for the "map_int32_float" field.</summary>
- public const int MapInt32FloatFieldNumber = 66;
- private static readonly pbc::MapField<int, float>.Codec _map_mapInt32Float_codec
- = new pbc::MapField<int, float>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForFloat(21), 530);
- private readonly pbc::MapField<int, float> mapInt32Float_ = new pbc::MapField<int, float>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<int, float> MapInt32Float {
- get { return mapInt32Float_; }
- }
-
- /// <summary>Field number for the "map_int32_double" field.</summary>
- public const int MapInt32DoubleFieldNumber = 67;
- private static readonly pbc::MapField<int, double>.Codec _map_mapInt32Double_codec
- = new pbc::MapField<int, double>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForDouble(17), 538);
- private readonly pbc::MapField<int, double> mapInt32Double_ = new pbc::MapField<int, double>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<int, double> MapInt32Double {
- get { return mapInt32Double_; }
- }
-
- /// <summary>Field number for the "map_bool_bool" field.</summary>
- public const int MapBoolBoolFieldNumber = 68;
- private static readonly pbc::MapField<bool, bool>.Codec _map_mapBoolBool_codec
- = new pbc::MapField<bool, bool>.Codec(pb::FieldCodec.ForBool(8), pb::FieldCodec.ForBool(16), 546);
- private readonly pbc::MapField<bool, bool> mapBoolBool_ = new pbc::MapField<bool, bool>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<bool, bool> MapBoolBool {
- get { return mapBoolBool_; }
- }
-
- /// <summary>Field number for the "map_string_string" field.</summary>
- public const int MapStringStringFieldNumber = 69;
- private static readonly pbc::MapField<string, string>.Codec _map_mapStringString_codec
- = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 554);
- private readonly pbc::MapField<string, string> mapStringString_ = new pbc::MapField<string, string>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<string, string> MapStringString {
- get { return mapStringString_; }
- }
-
- /// <summary>Field number for the "map_string_bytes" field.</summary>
- public const int MapStringBytesFieldNumber = 70;
- private static readonly pbc::MapField<string, pb::ByteString>.Codec _map_mapStringBytes_codec
- = new pbc::MapField<string, pb::ByteString>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForBytes(18), 562);
- private readonly pbc::MapField<string, pb::ByteString> mapStringBytes_ = new pbc::MapField<string, pb::ByteString>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<string, pb::ByteString> MapStringBytes {
- get { return mapStringBytes_; }
- }
-
- /// <summary>Field number for the "map_string_nested_message" field.</summary>
- public const int MapStringNestedMessageFieldNumber = 71;
- private static readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage>.Codec _map_mapStringNestedMessage_codec
- = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Conformance.TestAllTypes.Types.NestedMessage.Parser), 570);
- private readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage> mapStringNestedMessage_ = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage> MapStringNestedMessage {
- get { return mapStringNestedMessage_; }
- }
-
- /// <summary>Field number for the "map_string_foreign_message" field.</summary>
- public const int MapStringForeignMessageFieldNumber = 72;
- private static readonly pbc::MapField<string, global::Conformance.ForeignMessage>.Codec _map_mapStringForeignMessage_codec
- = new pbc::MapField<string, global::Conformance.ForeignMessage>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Conformance.ForeignMessage.Parser), 578);
- private readonly pbc::MapField<string, global::Conformance.ForeignMessage> mapStringForeignMessage_ = new pbc::MapField<string, global::Conformance.ForeignMessage>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<string, global::Conformance.ForeignMessage> MapStringForeignMessage {
- get { return mapStringForeignMessage_; }
- }
-
- /// <summary>Field number for the "map_string_nested_enum" field.</summary>
- public const int MapStringNestedEnumFieldNumber = 73;
- private static readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum>.Codec _map_mapStringNestedEnum_codec
- = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Conformance.TestAllTypes.Types.NestedEnum) x), 586);
- private readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum> mapStringNestedEnum_ = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum> MapStringNestedEnum {
- get { return mapStringNestedEnum_; }
- }
-
- /// <summary>Field number for the "map_string_foreign_enum" field.</summary>
- public const int MapStringForeignEnumFieldNumber = 74;
- private static readonly pbc::MapField<string, global::Conformance.ForeignEnum>.Codec _map_mapStringForeignEnum_codec
- = new pbc::MapField<string, global::Conformance.ForeignEnum>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Conformance.ForeignEnum) x), 594);
- private readonly pbc::MapField<string, global::Conformance.ForeignEnum> mapStringForeignEnum_ = new pbc::MapField<string, global::Conformance.ForeignEnum>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::MapField<string, global::Conformance.ForeignEnum> MapStringForeignEnum {
- get { return mapStringForeignEnum_; }
- }
-
- /// <summary>Field number for the "oneof_uint32" field.</summary>
- public const int OneofUint32FieldNumber = 111;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint OneofUint32 {
- get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32 ? (uint) oneofField_ : 0; }
- set {
- oneofField_ = value;
- oneofFieldCase_ = OneofFieldOneofCase.OneofUint32;
- }
- }
-
- /// <summary>Field number for the "oneof_nested_message" field.</summary>
- public const int OneofNestedMessageFieldNumber = 112;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Conformance.TestAllTypes.Types.NestedMessage OneofNestedMessage {
- get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::Conformance.TestAllTypes.Types.NestedMessage) oneofField_ : null; }
- set {
- oneofField_ = value;
- oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage;
- }
- }
-
- /// <summary>Field number for the "oneof_string" field.</summary>
- public const int OneofStringFieldNumber = 113;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public string OneofString {
- get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string) oneofField_ : ""; }
- set {
- oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- oneofFieldCase_ = OneofFieldOneofCase.OneofString;
- }
- }
-
- /// <summary>Field number for the "oneof_bytes" field.</summary>
- public const int OneofBytesFieldNumber = 114;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pb::ByteString OneofBytes {
- get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; }
- set {
- oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- oneofFieldCase_ = OneofFieldOneofCase.OneofBytes;
- }
- }
-
- /// <summary>Field number for the "oneof_bool" field.</summary>
- public const int OneofBoolFieldNumber = 115;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool OneofBool {
- get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBool ? (bool) oneofField_ : false; }
- set {
- oneofField_ = value;
- oneofFieldCase_ = OneofFieldOneofCase.OneofBool;
- }
- }
-
- /// <summary>Field number for the "oneof_uint64" field.</summary>
- public const int OneofUint64FieldNumber = 116;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public ulong OneofUint64 {
- get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint64 ? (ulong) oneofField_ : 0UL; }
- set {
- oneofField_ = value;
- oneofFieldCase_ = OneofFieldOneofCase.OneofUint64;
- }
- }
-
- /// <summary>Field number for the "oneof_float" field.</summary>
- public const int OneofFloatFieldNumber = 117;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public float OneofFloat {
- get { return oneofFieldCase_ == OneofFieldOneofCase.OneofFloat ? (float) oneofField_ : 0F; }
- set {
- oneofField_ = value;
- oneofFieldCase_ = OneofFieldOneofCase.OneofFloat;
- }
- }
-
- /// <summary>Field number for the "oneof_double" field.</summary>
- public const int OneofDoubleFieldNumber = 118;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double OneofDouble {
- get { return oneofFieldCase_ == OneofFieldOneofCase.OneofDouble ? (double) oneofField_ : 0D; }
- set {
- oneofField_ = value;
- oneofFieldCase_ = OneofFieldOneofCase.OneofDouble;
- }
- }
-
- /// <summary>Field number for the "oneof_enum" field.</summary>
- public const int OneofEnumFieldNumber = 119;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Conformance.TestAllTypes.Types.NestedEnum OneofEnum {
- get { return oneofFieldCase_ == OneofFieldOneofCase.OneofEnum ? (global::Conformance.TestAllTypes.Types.NestedEnum) oneofField_ : 0; }
- set {
- oneofField_ = value;
- oneofFieldCase_ = OneofFieldOneofCase.OneofEnum;
- }
- }
-
- /// <summary>Field number for the "optional_bool_wrapper" field.</summary>
- public const int OptionalBoolWrapperFieldNumber = 201;
- private static readonly pb::FieldCodec<bool?> _single_optionalBoolWrapper_codec = pb::FieldCodec.ForStructWrapper<bool>(1610);
- private bool? optionalBoolWrapper_;
- /// <summary>
- /// Well-known types
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool? OptionalBoolWrapper {
- get { return optionalBoolWrapper_; }
- set {
- optionalBoolWrapper_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_int32_wrapper" field.</summary>
- public const int OptionalInt32WrapperFieldNumber = 202;
- private static readonly pb::FieldCodec<int?> _single_optionalInt32Wrapper_codec = pb::FieldCodec.ForStructWrapper<int>(1618);
- private int? optionalInt32Wrapper_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int? OptionalInt32Wrapper {
- get { return optionalInt32Wrapper_; }
- set {
- optionalInt32Wrapper_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_int64_wrapper" field.</summary>
- public const int OptionalInt64WrapperFieldNumber = 203;
- private static readonly pb::FieldCodec<long?> _single_optionalInt64Wrapper_codec = pb::FieldCodec.ForStructWrapper<long>(1626);
- private long? optionalInt64Wrapper_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public long? OptionalInt64Wrapper {
- get { return optionalInt64Wrapper_; }
- set {
- optionalInt64Wrapper_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_uint32_wrapper" field.</summary>
- public const int OptionalUint32WrapperFieldNumber = 204;
- private static readonly pb::FieldCodec<uint?> _single_optionalUint32Wrapper_codec = pb::FieldCodec.ForStructWrapper<uint>(1634);
- private uint? optionalUint32Wrapper_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint? OptionalUint32Wrapper {
- get { return optionalUint32Wrapper_; }
- set {
- optionalUint32Wrapper_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_uint64_wrapper" field.</summary>
- public const int OptionalUint64WrapperFieldNumber = 205;
- private static readonly pb::FieldCodec<ulong?> _single_optionalUint64Wrapper_codec = pb::FieldCodec.ForStructWrapper<ulong>(1642);
- private ulong? optionalUint64Wrapper_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public ulong? OptionalUint64Wrapper {
- get { return optionalUint64Wrapper_; }
- set {
- optionalUint64Wrapper_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_float_wrapper" field.</summary>
- public const int OptionalFloatWrapperFieldNumber = 206;
- private static readonly pb::FieldCodec<float?> _single_optionalFloatWrapper_codec = pb::FieldCodec.ForStructWrapper<float>(1650);
- private float? optionalFloatWrapper_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public float? OptionalFloatWrapper {
- get { return optionalFloatWrapper_; }
- set {
- optionalFloatWrapper_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_double_wrapper" field.</summary>
- public const int OptionalDoubleWrapperFieldNumber = 207;
- private static readonly pb::FieldCodec<double?> _single_optionalDoubleWrapper_codec = pb::FieldCodec.ForStructWrapper<double>(1658);
- private double? optionalDoubleWrapper_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double? OptionalDoubleWrapper {
- get { return optionalDoubleWrapper_; }
- set {
- optionalDoubleWrapper_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_string_wrapper" field.</summary>
- public const int OptionalStringWrapperFieldNumber = 208;
- private static readonly pb::FieldCodec<string> _single_optionalStringWrapper_codec = pb::FieldCodec.ForClassWrapper<string>(1666);
- private string optionalStringWrapper_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public string OptionalStringWrapper {
- get { return optionalStringWrapper_; }
- set {
- optionalStringWrapper_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_bytes_wrapper" field.</summary>
- public const int OptionalBytesWrapperFieldNumber = 209;
- private static readonly pb::FieldCodec<pb::ByteString> _single_optionalBytesWrapper_codec = pb::FieldCodec.ForClassWrapper<pb::ByteString>(1674);
- private pb::ByteString optionalBytesWrapper_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pb::ByteString OptionalBytesWrapper {
- get { return optionalBytesWrapper_; }
- set {
- optionalBytesWrapper_ = value;
- }
- }
-
- /// <summary>Field number for the "repeated_bool_wrapper" field.</summary>
- public const int RepeatedBoolWrapperFieldNumber = 211;
- private static readonly pb::FieldCodec<bool?> _repeated_repeatedBoolWrapper_codec
- = pb::FieldCodec.ForStructWrapper<bool>(1690);
- private readonly pbc::RepeatedField<bool?> repeatedBoolWrapper_ = new pbc::RepeatedField<bool?>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<bool?> RepeatedBoolWrapper {
- get { return repeatedBoolWrapper_; }
- }
-
- /// <summary>Field number for the "repeated_int32_wrapper" field.</summary>
- public const int RepeatedInt32WrapperFieldNumber = 212;
- private static readonly pb::FieldCodec<int?> _repeated_repeatedInt32Wrapper_codec
- = pb::FieldCodec.ForStructWrapper<int>(1698);
- private readonly pbc::RepeatedField<int?> repeatedInt32Wrapper_ = new pbc::RepeatedField<int?>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<int?> RepeatedInt32Wrapper {
- get { return repeatedInt32Wrapper_; }
- }
-
- /// <summary>Field number for the "repeated_int64_wrapper" field.</summary>
- public const int RepeatedInt64WrapperFieldNumber = 213;
- private static readonly pb::FieldCodec<long?> _repeated_repeatedInt64Wrapper_codec
- = pb::FieldCodec.ForStructWrapper<long>(1706);
- private readonly pbc::RepeatedField<long?> repeatedInt64Wrapper_ = new pbc::RepeatedField<long?>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<long?> RepeatedInt64Wrapper {
- get { return repeatedInt64Wrapper_; }
- }
-
- /// <summary>Field number for the "repeated_uint32_wrapper" field.</summary>
- public const int RepeatedUint32WrapperFieldNumber = 214;
- private static readonly pb::FieldCodec<uint?> _repeated_repeatedUint32Wrapper_codec
- = pb::FieldCodec.ForStructWrapper<uint>(1714);
- private readonly pbc::RepeatedField<uint?> repeatedUint32Wrapper_ = new pbc::RepeatedField<uint?>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<uint?> RepeatedUint32Wrapper {
- get { return repeatedUint32Wrapper_; }
- }
-
- /// <summary>Field number for the "repeated_uint64_wrapper" field.</summary>
- public const int RepeatedUint64WrapperFieldNumber = 215;
- private static readonly pb::FieldCodec<ulong?> _repeated_repeatedUint64Wrapper_codec
- = pb::FieldCodec.ForStructWrapper<ulong>(1722);
- private readonly pbc::RepeatedField<ulong?> repeatedUint64Wrapper_ = new pbc::RepeatedField<ulong?>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<ulong?> RepeatedUint64Wrapper {
- get { return repeatedUint64Wrapper_; }
- }
-
- /// <summary>Field number for the "repeated_float_wrapper" field.</summary>
- public const int RepeatedFloatWrapperFieldNumber = 216;
- private static readonly pb::FieldCodec<float?> _repeated_repeatedFloatWrapper_codec
- = pb::FieldCodec.ForStructWrapper<float>(1730);
- private readonly pbc::RepeatedField<float?> repeatedFloatWrapper_ = new pbc::RepeatedField<float?>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<float?> RepeatedFloatWrapper {
- get { return repeatedFloatWrapper_; }
- }
-
- /// <summary>Field number for the "repeated_double_wrapper" field.</summary>
- public const int RepeatedDoubleWrapperFieldNumber = 217;
- private static readonly pb::FieldCodec<double?> _repeated_repeatedDoubleWrapper_codec
- = pb::FieldCodec.ForStructWrapper<double>(1738);
- private readonly pbc::RepeatedField<double?> repeatedDoubleWrapper_ = new pbc::RepeatedField<double?>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<double?> RepeatedDoubleWrapper {
- get { return repeatedDoubleWrapper_; }
- }
-
- /// <summary>Field number for the "repeated_string_wrapper" field.</summary>
- public const int RepeatedStringWrapperFieldNumber = 218;
- private static readonly pb::FieldCodec<string> _repeated_repeatedStringWrapper_codec
- = pb::FieldCodec.ForClassWrapper<string>(1746);
- private readonly pbc::RepeatedField<string> repeatedStringWrapper_ = new pbc::RepeatedField<string>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<string> RepeatedStringWrapper {
- get { return repeatedStringWrapper_; }
- }
-
- /// <summary>Field number for the "repeated_bytes_wrapper" field.</summary>
- public const int RepeatedBytesWrapperFieldNumber = 219;
- private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytesWrapper_codec
- = pb::FieldCodec.ForClassWrapper<pb::ByteString>(1754);
- private readonly pbc::RepeatedField<pb::ByteString> repeatedBytesWrapper_ = new pbc::RepeatedField<pb::ByteString>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<pb::ByteString> RepeatedBytesWrapper {
- get { return repeatedBytesWrapper_; }
- }
-
- /// <summary>Field number for the "optional_duration" field.</summary>
- public const int OptionalDurationFieldNumber = 301;
- private global::Google.Protobuf.WellKnownTypes.Duration optionalDuration_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Google.Protobuf.WellKnownTypes.Duration OptionalDuration {
- get { return optionalDuration_; }
- set {
- optionalDuration_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_timestamp" field.</summary>
- public const int OptionalTimestampFieldNumber = 302;
- private global::Google.Protobuf.WellKnownTypes.Timestamp optionalTimestamp_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Google.Protobuf.WellKnownTypes.Timestamp OptionalTimestamp {
- get { return optionalTimestamp_; }
- set {
- optionalTimestamp_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_field_mask" field.</summary>
- public const int OptionalFieldMaskFieldNumber = 303;
- private global::Google.Protobuf.WellKnownTypes.FieldMask optionalFieldMask_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Google.Protobuf.WellKnownTypes.FieldMask OptionalFieldMask {
- get { return optionalFieldMask_; }
- set {
- optionalFieldMask_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_struct" field.</summary>
- public const int OptionalStructFieldNumber = 304;
- private global::Google.Protobuf.WellKnownTypes.Struct optionalStruct_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Google.Protobuf.WellKnownTypes.Struct OptionalStruct {
- get { return optionalStruct_; }
- set {
- optionalStruct_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_any" field.</summary>
- public const int OptionalAnyFieldNumber = 305;
- private global::Google.Protobuf.WellKnownTypes.Any optionalAny_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Google.Protobuf.WellKnownTypes.Any OptionalAny {
- get { return optionalAny_; }
- set {
- optionalAny_ = value;
- }
- }
-
- /// <summary>Field number for the "optional_value" field.</summary>
- public const int OptionalValueFieldNumber = 306;
- private global::Google.Protobuf.WellKnownTypes.Value optionalValue_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Google.Protobuf.WellKnownTypes.Value OptionalValue {
- get { return optionalValue_; }
- set {
- optionalValue_ = value;
- }
- }
-
- /// <summary>Field number for the "repeated_duration" field.</summary>
- public const int RepeatedDurationFieldNumber = 311;
- private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Duration> _repeated_repeatedDuration_codec
- = pb::FieldCodec.ForMessage(2490, global::Google.Protobuf.WellKnownTypes.Duration.Parser);
- private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration> repeatedDuration_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration> RepeatedDuration {
- get { return repeatedDuration_; }
- }
-
- /// <summary>Field number for the "repeated_timestamp" field.</summary>
- public const int RepeatedTimestampFieldNumber = 312;
- private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Timestamp> _repeated_repeatedTimestamp_codec
- = pb::FieldCodec.ForMessage(2498, global::Google.Protobuf.WellKnownTypes.Timestamp.Parser);
- private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp> repeatedTimestamp_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp> RepeatedTimestamp {
- get { return repeatedTimestamp_; }
- }
-
- /// <summary>Field number for the "repeated_fieldmask" field.</summary>
- public const int RepeatedFieldmaskFieldNumber = 313;
- private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.FieldMask> _repeated_repeatedFieldmask_codec
- = pb::FieldCodec.ForMessage(2506, global::Google.Protobuf.WellKnownTypes.FieldMask.Parser);
- private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask> repeatedFieldmask_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask> RepeatedFieldmask {
- get { return repeatedFieldmask_; }
- }
-
- /// <summary>Field number for the "repeated_struct" field.</summary>
- public const int RepeatedStructFieldNumber = 324;
- private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Struct> _repeated_repeatedStruct_codec
- = pb::FieldCodec.ForMessage(2594, global::Google.Protobuf.WellKnownTypes.Struct.Parser);
- private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct> repeatedStruct_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct> RepeatedStruct {
- get { return repeatedStruct_; }
- }
-
- /// <summary>Field number for the "repeated_any" field.</summary>
- public const int RepeatedAnyFieldNumber = 315;
- private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Any> _repeated_repeatedAny_codec
- = pb::FieldCodec.ForMessage(2522, global::Google.Protobuf.WellKnownTypes.Any.Parser);
- private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any> repeatedAny_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any> RepeatedAny {
- get { return repeatedAny_; }
- }
-
- /// <summary>Field number for the "repeated_value" field.</summary>
- public const int RepeatedValueFieldNumber = 316;
- private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Value> _repeated_repeatedValue_codec
- = pb::FieldCodec.ForMessage(2530, global::Google.Protobuf.WellKnownTypes.Value.Parser);
- private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> repeatedValue_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> RepeatedValue {
- get { return repeatedValue_; }
- }
-
- /// <summary>Field number for the "fieldname1" field.</summary>
- public const int Fieldname1FieldNumber = 401;
- private int fieldname1_;
- /// <summary>
- /// Test field-name-to-JSON-name convention.
- /// (protobuf says names can be any valid C/C++ identifier.)
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Fieldname1 {
- get { return fieldname1_; }
- set {
- fieldname1_ = value;
- }
- }
-
- /// <summary>Field number for the "field_name2" field.</summary>
- public const int FieldName2FieldNumber = 402;
- private int fieldName2_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName2 {
- get { return fieldName2_; }
- set {
- fieldName2_ = value;
- }
- }
-
- /// <summary>Field number for the "_field_name3" field.</summary>
- public const int FieldName3FieldNumber = 403;
- private int FieldName3_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName3 {
- get { return FieldName3_; }
- set {
- FieldName3_ = value;
- }
- }
-
- /// <summary>Field number for the "field__name4_" field.</summary>
- public const int FieldName4FieldNumber = 404;
- private int fieldName4_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName4 {
- get { return fieldName4_; }
- set {
- fieldName4_ = value;
- }
- }
-
- /// <summary>Field number for the "field0name5" field.</summary>
- public const int Field0Name5FieldNumber = 405;
- private int field0Name5_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Field0Name5 {
- get { return field0Name5_; }
- set {
- field0Name5_ = value;
- }
- }
-
- /// <summary>Field number for the "field_0_name6" field.</summary>
- public const int Field0Name6FieldNumber = 406;
- private int field0Name6_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Field0Name6 {
- get { return field0Name6_; }
- set {
- field0Name6_ = value;
- }
- }
-
- /// <summary>Field number for the "fieldName7" field.</summary>
- public const int FieldName7FieldNumber = 407;
- private int fieldName7_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName7 {
- get { return fieldName7_; }
- set {
- fieldName7_ = value;
- }
- }
-
- /// <summary>Field number for the "FieldName8" field.</summary>
- public const int FieldName8FieldNumber = 408;
- private int fieldName8_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName8 {
- get { return fieldName8_; }
- set {
- fieldName8_ = value;
- }
- }
-
- /// <summary>Field number for the "field_Name9" field.</summary>
- public const int FieldName9FieldNumber = 409;
- private int fieldName9_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName9 {
- get { return fieldName9_; }
- set {
- fieldName9_ = value;
- }
- }
-
- /// <summary>Field number for the "Field_Name10" field.</summary>
- public const int FieldName10FieldNumber = 410;
- private int fieldName10_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName10 {
- get { return fieldName10_; }
- set {
- fieldName10_ = value;
- }
- }
-
- /// <summary>Field number for the "FIELD_NAME11" field.</summary>
- public const int FIELDNAME11FieldNumber = 411;
- private int fIELDNAME11_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FIELDNAME11 {
- get { return fIELDNAME11_; }
- set {
- fIELDNAME11_ = value;
- }
- }
-
- /// <summary>Field number for the "FIELD_name12" field.</summary>
- public const int FIELDName12FieldNumber = 412;
- private int fIELDName12_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FIELDName12 {
- get { return fIELDName12_; }
- set {
- fIELDName12_ = value;
- }
- }
-
- /// <summary>Field number for the "__field_name13" field.</summary>
- public const int FieldName13FieldNumber = 413;
- private int FieldName13_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName13 {
- get { return FieldName13_; }
- set {
- FieldName13_ = value;
- }
- }
-
- /// <summary>Field number for the "__Field_name14" field.</summary>
- public const int FieldName14FieldNumber = 414;
- private int FieldName14_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName14 {
- get { return FieldName14_; }
- set {
- FieldName14_ = value;
- }
- }
-
- /// <summary>Field number for the "field__name15" field.</summary>
- public const int FieldName15FieldNumber = 415;
- private int fieldName15_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName15 {
- get { return fieldName15_; }
- set {
- fieldName15_ = value;
- }
- }
-
- /// <summary>Field number for the "field__Name16" field.</summary>
- public const int FieldName16FieldNumber = 416;
- private int fieldName16_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName16 {
- get { return fieldName16_; }
- set {
- fieldName16_ = value;
- }
- }
-
- /// <summary>Field number for the "field_name17__" field.</summary>
- public const int FieldName17FieldNumber = 417;
- private int fieldName17_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName17 {
- get { return fieldName17_; }
- set {
- fieldName17_ = value;
- }
- }
-
- /// <summary>Field number for the "Field_name18__" field.</summary>
- public const int FieldName18FieldNumber = 418;
- private int fieldName18_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int FieldName18 {
- get { return fieldName18_; }
- set {
- fieldName18_ = value;
- }
- }
-
- private object oneofField_;
- /// <summary>Enum of possible cases for the "oneof_field" oneof.</summary>
- public enum OneofFieldOneofCase {
- None = 0,
- OneofUint32 = 111,
- OneofNestedMessage = 112,
- OneofString = 113,
- OneofBytes = 114,
- OneofBool = 115,
- OneofUint64 = 116,
- OneofFloat = 117,
- OneofDouble = 118,
- OneofEnum = 119,
- }
- private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public OneofFieldOneofCase OneofFieldCase {
- get { return oneofFieldCase_; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOneofField() {
- oneofFieldCase_ = OneofFieldOneofCase.None;
- oneofField_ = null;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as TestAllTypes);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(TestAllTypes other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (OptionalInt32 != other.OptionalInt32) return false;
- if (OptionalInt64 != other.OptionalInt64) return false;
- if (OptionalUint32 != other.OptionalUint32) return false;
- if (OptionalUint64 != other.OptionalUint64) return false;
- if (OptionalSint32 != other.OptionalSint32) return false;
- if (OptionalSint64 != other.OptionalSint64) return false;
- if (OptionalFixed32 != other.OptionalFixed32) return false;
- if (OptionalFixed64 != other.OptionalFixed64) return false;
- if (OptionalSfixed32 != other.OptionalSfixed32) return false;
- if (OptionalSfixed64 != other.OptionalSfixed64) return false;
- if (OptionalFloat != other.OptionalFloat) return false;
- if (OptionalDouble != other.OptionalDouble) return false;
- if (OptionalBool != other.OptionalBool) return false;
- if (OptionalString != other.OptionalString) return false;
- if (OptionalBytes != other.OptionalBytes) return false;
- if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false;
- if (!object.Equals(OptionalForeignMessage, other.OptionalForeignMessage)) return false;
- if (OptionalNestedEnum != other.OptionalNestedEnum) return false;
- if (OptionalForeignEnum != other.OptionalForeignEnum) return false;
- if (OptionalStringPiece != other.OptionalStringPiece) return false;
- if (OptionalCord != other.OptionalCord) return false;
- if (!object.Equals(RecursiveMessage, other.RecursiveMessage)) return false;
- if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
- if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
- if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false;
- if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
- if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false;
- if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false;
- if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
- if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
- if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false;
- if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false;
- if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
- if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false;
- if(!repeatedBool_.Equals(other.repeatedBool_)) return false;
- if(!repeatedString_.Equals(other.repeatedString_)) return false;
- if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false;
- if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false;
- if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false;
- if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false;
- if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false;
- if(!repeatedStringPiece_.Equals(other.repeatedStringPiece_)) return false;
- if(!repeatedCord_.Equals(other.repeatedCord_)) return false;
- if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false;
- if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false;
- if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false;
- if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false;
- if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false;
- if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false;
- if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false;
- if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false;
- if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false;
- if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false;
- if (!MapInt32Float.Equals(other.MapInt32Float)) return false;
- if (!MapInt32Double.Equals(other.MapInt32Double)) return false;
- if (!MapBoolBool.Equals(other.MapBoolBool)) return false;
- if (!MapStringString.Equals(other.MapStringString)) return false;
- if (!MapStringBytes.Equals(other.MapStringBytes)) return false;
- if (!MapStringNestedMessage.Equals(other.MapStringNestedMessage)) return false;
- if (!MapStringForeignMessage.Equals(other.MapStringForeignMessage)) return false;
- if (!MapStringNestedEnum.Equals(other.MapStringNestedEnum)) return false;
- if (!MapStringForeignEnum.Equals(other.MapStringForeignEnum)) return false;
- if (OneofUint32 != other.OneofUint32) return false;
- if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false;
- if (OneofString != other.OneofString) return false;
- if (OneofBytes != other.OneofBytes) return false;
- if (OneofBool != other.OneofBool) return false;
- if (OneofUint64 != other.OneofUint64) return false;
- if (OneofFloat != other.OneofFloat) return false;
- if (OneofDouble != other.OneofDouble) return false;
- if (OneofEnum != other.OneofEnum) return false;
- if (OptionalBoolWrapper != other.OptionalBoolWrapper) return false;
- if (OptionalInt32Wrapper != other.OptionalInt32Wrapper) return false;
- if (OptionalInt64Wrapper != other.OptionalInt64Wrapper) return false;
- if (OptionalUint32Wrapper != other.OptionalUint32Wrapper) return false;
- if (OptionalUint64Wrapper != other.OptionalUint64Wrapper) return false;
- if (OptionalFloatWrapper != other.OptionalFloatWrapper) return false;
- if (OptionalDoubleWrapper != other.OptionalDoubleWrapper) return false;
- if (OptionalStringWrapper != other.OptionalStringWrapper) return false;
- if (OptionalBytesWrapper != other.OptionalBytesWrapper) return false;
- if(!repeatedBoolWrapper_.Equals(other.repeatedBoolWrapper_)) return false;
- if(!repeatedInt32Wrapper_.Equals(other.repeatedInt32Wrapper_)) return false;
- if(!repeatedInt64Wrapper_.Equals(other.repeatedInt64Wrapper_)) return false;
- if(!repeatedUint32Wrapper_.Equals(other.repeatedUint32Wrapper_)) return false;
- if(!repeatedUint64Wrapper_.Equals(other.repeatedUint64Wrapper_)) return false;
- if(!repeatedFloatWrapper_.Equals(other.repeatedFloatWrapper_)) return false;
- if(!repeatedDoubleWrapper_.Equals(other.repeatedDoubleWrapper_)) return false;
- if(!repeatedStringWrapper_.Equals(other.repeatedStringWrapper_)) return false;
- if(!repeatedBytesWrapper_.Equals(other.repeatedBytesWrapper_)) return false;
- if (!object.Equals(OptionalDuration, other.OptionalDuration)) return false;
- if (!object.Equals(OptionalTimestamp, other.OptionalTimestamp)) return false;
- if (!object.Equals(OptionalFieldMask, other.OptionalFieldMask)) return false;
- if (!object.Equals(OptionalStruct, other.OptionalStruct)) return false;
- if (!object.Equals(OptionalAny, other.OptionalAny)) return false;
- if (!object.Equals(OptionalValue, other.OptionalValue)) return false;
- if(!repeatedDuration_.Equals(other.repeatedDuration_)) return false;
- if(!repeatedTimestamp_.Equals(other.repeatedTimestamp_)) return false;
- if(!repeatedFieldmask_.Equals(other.repeatedFieldmask_)) return false;
- if(!repeatedStruct_.Equals(other.repeatedStruct_)) return false;
- if(!repeatedAny_.Equals(other.repeatedAny_)) return false;
- if(!repeatedValue_.Equals(other.repeatedValue_)) return false;
- if (Fieldname1 != other.Fieldname1) return false;
- if (FieldName2 != other.FieldName2) return false;
- if (FieldName3 != other.FieldName3) return false;
- if (FieldName4 != other.FieldName4) return false;
- if (Field0Name5 != other.Field0Name5) return false;
- if (Field0Name6 != other.Field0Name6) return false;
- if (FieldName7 != other.FieldName7) return false;
- if (FieldName8 != other.FieldName8) return false;
- if (FieldName9 != other.FieldName9) return false;
- if (FieldName10 != other.FieldName10) return false;
- if (FIELDNAME11 != other.FIELDNAME11) return false;
- if (FIELDName12 != other.FIELDName12) return false;
- if (FieldName13 != other.FieldName13) return false;
- if (FieldName14 != other.FieldName14) return false;
- if (FieldName15 != other.FieldName15) return false;
- if (FieldName16 != other.FieldName16) return false;
- if (FieldName17 != other.FieldName17) return false;
- if (FieldName18 != other.FieldName18) return false;
- if (OneofFieldCase != other.OneofFieldCase) return false;
- return true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (OptionalInt32 != 0) hash ^= OptionalInt32.GetHashCode();
- if (OptionalInt64 != 0L) hash ^= OptionalInt64.GetHashCode();
- if (OptionalUint32 != 0) hash ^= OptionalUint32.GetHashCode();
- if (OptionalUint64 != 0UL) hash ^= OptionalUint64.GetHashCode();
- if (OptionalSint32 != 0) hash ^= OptionalSint32.GetHashCode();
- if (OptionalSint64 != 0L) hash ^= OptionalSint64.GetHashCode();
- if (OptionalFixed32 != 0) hash ^= OptionalFixed32.GetHashCode();
- if (OptionalFixed64 != 0UL) hash ^= OptionalFixed64.GetHashCode();
- if (OptionalSfixed32 != 0) hash ^= OptionalSfixed32.GetHashCode();
- if (OptionalSfixed64 != 0L) hash ^= OptionalSfixed64.GetHashCode();
- if (OptionalFloat != 0F) hash ^= OptionalFloat.GetHashCode();
- if (OptionalDouble != 0D) hash ^= OptionalDouble.GetHashCode();
- if (OptionalBool != false) hash ^= OptionalBool.GetHashCode();
- if (OptionalString.Length != 0) hash ^= OptionalString.GetHashCode();
- if (OptionalBytes.Length != 0) hash ^= OptionalBytes.GetHashCode();
- if (optionalNestedMessage_ != null) hash ^= OptionalNestedMessage.GetHashCode();
- if (optionalForeignMessage_ != null) hash ^= OptionalForeignMessage.GetHashCode();
- if (OptionalNestedEnum != 0) hash ^= OptionalNestedEnum.GetHashCode();
- if (OptionalForeignEnum != 0) hash ^= OptionalForeignEnum.GetHashCode();
- if (OptionalStringPiece.Length != 0) hash ^= OptionalStringPiece.GetHashCode();
- if (OptionalCord.Length != 0) hash ^= OptionalCord.GetHashCode();
- if (recursiveMessage_ != null) hash ^= RecursiveMessage.GetHashCode();
- hash ^= repeatedInt32_.GetHashCode();
- hash ^= repeatedInt64_.GetHashCode();
- hash ^= repeatedUint32_.GetHashCode();
- hash ^= repeatedUint64_.GetHashCode();
- hash ^= repeatedSint32_.GetHashCode();
- hash ^= repeatedSint64_.GetHashCode();
- hash ^= repeatedFixed32_.GetHashCode();
- hash ^= repeatedFixed64_.GetHashCode();
- hash ^= repeatedSfixed32_.GetHashCode();
- hash ^= repeatedSfixed64_.GetHashCode();
- hash ^= repeatedFloat_.GetHashCode();
- hash ^= repeatedDouble_.GetHashCode();
- hash ^= repeatedBool_.GetHashCode();
- hash ^= repeatedString_.GetHashCode();
- hash ^= repeatedBytes_.GetHashCode();
- hash ^= repeatedNestedMessage_.GetHashCode();
- hash ^= repeatedForeignMessage_.GetHashCode();
- hash ^= repeatedNestedEnum_.GetHashCode();
- hash ^= repeatedForeignEnum_.GetHashCode();
- hash ^= repeatedStringPiece_.GetHashCode();
- hash ^= repeatedCord_.GetHashCode();
- hash ^= MapInt32Int32.GetHashCode();
- hash ^= MapInt64Int64.GetHashCode();
- hash ^= MapUint32Uint32.GetHashCode();
- hash ^= MapUint64Uint64.GetHashCode();
- hash ^= MapSint32Sint32.GetHashCode();
- hash ^= MapSint64Sint64.GetHashCode();
- hash ^= MapFixed32Fixed32.GetHashCode();
- hash ^= MapFixed64Fixed64.GetHashCode();
- hash ^= MapSfixed32Sfixed32.GetHashCode();
- hash ^= MapSfixed64Sfixed64.GetHashCode();
- hash ^= MapInt32Float.GetHashCode();
- hash ^= MapInt32Double.GetHashCode();
- hash ^= MapBoolBool.GetHashCode();
- hash ^= MapStringString.GetHashCode();
- hash ^= MapStringBytes.GetHashCode();
- hash ^= MapStringNestedMessage.GetHashCode();
- hash ^= MapStringForeignMessage.GetHashCode();
- hash ^= MapStringNestedEnum.GetHashCode();
- hash ^= MapStringForeignEnum.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) hash ^= OneofUint32.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofString.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofBool) hash ^= OneofBool.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint64) hash ^= OneofUint64.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofFloat) hash ^= OneofFloat.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofDouble) hash ^= OneofDouble.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofEnum) hash ^= OneofEnum.GetHashCode();
- if (optionalBoolWrapper_ != null) hash ^= OptionalBoolWrapper.GetHashCode();
- if (optionalInt32Wrapper_ != null) hash ^= OptionalInt32Wrapper.GetHashCode();
- if (optionalInt64Wrapper_ != null) hash ^= OptionalInt64Wrapper.GetHashCode();
- if (optionalUint32Wrapper_ != null) hash ^= OptionalUint32Wrapper.GetHashCode();
- if (optionalUint64Wrapper_ != null) hash ^= OptionalUint64Wrapper.GetHashCode();
- if (optionalFloatWrapper_ != null) hash ^= OptionalFloatWrapper.GetHashCode();
- if (optionalDoubleWrapper_ != null) hash ^= OptionalDoubleWrapper.GetHashCode();
- if (optionalStringWrapper_ != null) hash ^= OptionalStringWrapper.GetHashCode();
- if (optionalBytesWrapper_ != null) hash ^= OptionalBytesWrapper.GetHashCode();
- hash ^= repeatedBoolWrapper_.GetHashCode();
- hash ^= repeatedInt32Wrapper_.GetHashCode();
- hash ^= repeatedInt64Wrapper_.GetHashCode();
- hash ^= repeatedUint32Wrapper_.GetHashCode();
- hash ^= repeatedUint64Wrapper_.GetHashCode();
- hash ^= repeatedFloatWrapper_.GetHashCode();
- hash ^= repeatedDoubleWrapper_.GetHashCode();
- hash ^= repeatedStringWrapper_.GetHashCode();
- hash ^= repeatedBytesWrapper_.GetHashCode();
- if (optionalDuration_ != null) hash ^= OptionalDuration.GetHashCode();
- if (optionalTimestamp_ != null) hash ^= OptionalTimestamp.GetHashCode();
- if (optionalFieldMask_ != null) hash ^= OptionalFieldMask.GetHashCode();
- if (optionalStruct_ != null) hash ^= OptionalStruct.GetHashCode();
- if (optionalAny_ != null) hash ^= OptionalAny.GetHashCode();
- if (optionalValue_ != null) hash ^= OptionalValue.GetHashCode();
- hash ^= repeatedDuration_.GetHashCode();
- hash ^= repeatedTimestamp_.GetHashCode();
- hash ^= repeatedFieldmask_.GetHashCode();
- hash ^= repeatedStruct_.GetHashCode();
- hash ^= repeatedAny_.GetHashCode();
- hash ^= repeatedValue_.GetHashCode();
- if (Fieldname1 != 0) hash ^= Fieldname1.GetHashCode();
- if (FieldName2 != 0) hash ^= FieldName2.GetHashCode();
- if (FieldName3 != 0) hash ^= FieldName3.GetHashCode();
- if (FieldName4 != 0) hash ^= FieldName4.GetHashCode();
- if (Field0Name5 != 0) hash ^= Field0Name5.GetHashCode();
- if (Field0Name6 != 0) hash ^= Field0Name6.GetHashCode();
- if (FieldName7 != 0) hash ^= FieldName7.GetHashCode();
- if (FieldName8 != 0) hash ^= FieldName8.GetHashCode();
- if (FieldName9 != 0) hash ^= FieldName9.GetHashCode();
- if (FieldName10 != 0) hash ^= FieldName10.GetHashCode();
- if (FIELDNAME11 != 0) hash ^= FIELDNAME11.GetHashCode();
- if (FIELDName12 != 0) hash ^= FIELDName12.GetHashCode();
- if (FieldName13 != 0) hash ^= FieldName13.GetHashCode();
- if (FieldName14 != 0) hash ^= FieldName14.GetHashCode();
- if (FieldName15 != 0) hash ^= FieldName15.GetHashCode();
- if (FieldName16 != 0) hash ^= FieldName16.GetHashCode();
- if (FieldName17 != 0) hash ^= FieldName17.GetHashCode();
- if (FieldName18 != 0) hash ^= FieldName18.GetHashCode();
- hash ^= (int) oneofFieldCase_;
- return hash;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void WriteTo(pb::CodedOutputStream output) {
- if (OptionalInt32 != 0) {
- output.WriteRawTag(8);
- output.WriteInt32(OptionalInt32);
- }
- if (OptionalInt64 != 0L) {
- output.WriteRawTag(16);
- output.WriteInt64(OptionalInt64);
- }
- if (OptionalUint32 != 0) {
- output.WriteRawTag(24);
- output.WriteUInt32(OptionalUint32);
- }
- if (OptionalUint64 != 0UL) {
- output.WriteRawTag(32);
- output.WriteUInt64(OptionalUint64);
- }
- if (OptionalSint32 != 0) {
- output.WriteRawTag(40);
- output.WriteSInt32(OptionalSint32);
- }
- if (OptionalSint64 != 0L) {
- output.WriteRawTag(48);
- output.WriteSInt64(OptionalSint64);
- }
- if (OptionalFixed32 != 0) {
- output.WriteRawTag(61);
- output.WriteFixed32(OptionalFixed32);
- }
- if (OptionalFixed64 != 0UL) {
- output.WriteRawTag(65);
- output.WriteFixed64(OptionalFixed64);
- }
- if (OptionalSfixed32 != 0) {
- output.WriteRawTag(77);
- output.WriteSFixed32(OptionalSfixed32);
- }
- if (OptionalSfixed64 != 0L) {
- output.WriteRawTag(81);
- output.WriteSFixed64(OptionalSfixed64);
- }
- if (OptionalFloat != 0F) {
- output.WriteRawTag(93);
- output.WriteFloat(OptionalFloat);
- }
- if (OptionalDouble != 0D) {
- output.WriteRawTag(97);
- output.WriteDouble(OptionalDouble);
- }
- if (OptionalBool != false) {
- output.WriteRawTag(104);
- output.WriteBool(OptionalBool);
- }
- if (OptionalString.Length != 0) {
- output.WriteRawTag(114);
- output.WriteString(OptionalString);
- }
- if (OptionalBytes.Length != 0) {
- output.WriteRawTag(122);
- output.WriteBytes(OptionalBytes);
- }
- if (optionalNestedMessage_ != null) {
- output.WriteRawTag(146, 1);
- output.WriteMessage(OptionalNestedMessage);
- }
- if (optionalForeignMessage_ != null) {
- output.WriteRawTag(154, 1);
- output.WriteMessage(OptionalForeignMessage);
- }
- if (OptionalNestedEnum != 0) {
- output.WriteRawTag(168, 1);
- output.WriteEnum((int) OptionalNestedEnum);
- }
- if (OptionalForeignEnum != 0) {
- output.WriteRawTag(176, 1);
- output.WriteEnum((int) OptionalForeignEnum);
- }
- if (OptionalStringPiece.Length != 0) {
- output.WriteRawTag(194, 1);
- output.WriteString(OptionalStringPiece);
- }
- if (OptionalCord.Length != 0) {
- output.WriteRawTag(202, 1);
- output.WriteString(OptionalCord);
- }
- if (recursiveMessage_ != null) {
- output.WriteRawTag(218, 1);
- output.WriteMessage(RecursiveMessage);
- }
- repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
- repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
- repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec);
- repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
- repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec);
- repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec);
- repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
- repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
- repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec);
- repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec);
- repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
- repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec);
- repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec);
- repeatedString_.WriteTo(output, _repeated_repeatedString_codec);
- repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec);
- repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec);
- repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec);
- repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec);
- repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec);
- repeatedStringPiece_.WriteTo(output, _repeated_repeatedStringPiece_codec);
- repeatedCord_.WriteTo(output, _repeated_repeatedCord_codec);
- mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec);
- mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec);
- mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec);
- mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec);
- mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec);
- mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec);
- mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec);
- mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec);
- mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec);
- mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec);
- mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec);
- mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec);
- mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec);
- mapStringString_.WriteTo(output, _map_mapStringString_codec);
- mapStringBytes_.WriteTo(output, _map_mapStringBytes_codec);
- mapStringNestedMessage_.WriteTo(output, _map_mapStringNestedMessage_codec);
- mapStringForeignMessage_.WriteTo(output, _map_mapStringForeignMessage_codec);
- mapStringNestedEnum_.WriteTo(output, _map_mapStringNestedEnum_codec);
- mapStringForeignEnum_.WriteTo(output, _map_mapStringForeignEnum_codec);
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
- output.WriteRawTag(248, 6);
- output.WriteUInt32(OneofUint32);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
- output.WriteRawTag(130, 7);
- output.WriteMessage(OneofNestedMessage);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
- output.WriteRawTag(138, 7);
- output.WriteString(OneofString);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
- output.WriteRawTag(146, 7);
- output.WriteBytes(OneofBytes);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofBool) {
- output.WriteRawTag(152, 7);
- output.WriteBool(OneofBool);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint64) {
- output.WriteRawTag(160, 7);
- output.WriteUInt64(OneofUint64);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofFloat) {
- output.WriteRawTag(173, 7);
- output.WriteFloat(OneofFloat);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofDouble) {
- output.WriteRawTag(177, 7);
- output.WriteDouble(OneofDouble);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofEnum) {
- output.WriteRawTag(184, 7);
- output.WriteEnum((int) OneofEnum);
- }
- if (optionalBoolWrapper_ != null) {
- _single_optionalBoolWrapper_codec.WriteTagAndValue(output, OptionalBoolWrapper);
- }
- if (optionalInt32Wrapper_ != null) {
- _single_optionalInt32Wrapper_codec.WriteTagAndValue(output, OptionalInt32Wrapper);
- }
- if (optionalInt64Wrapper_ != null) {
- _single_optionalInt64Wrapper_codec.WriteTagAndValue(output, OptionalInt64Wrapper);
- }
- if (optionalUint32Wrapper_ != null) {
- _single_optionalUint32Wrapper_codec.WriteTagAndValue(output, OptionalUint32Wrapper);
- }
- if (optionalUint64Wrapper_ != null) {
- _single_optionalUint64Wrapper_codec.WriteTagAndValue(output, OptionalUint64Wrapper);
- }
- if (optionalFloatWrapper_ != null) {
- _single_optionalFloatWrapper_codec.WriteTagAndValue(output, OptionalFloatWrapper);
- }
- if (optionalDoubleWrapper_ != null) {
- _single_optionalDoubleWrapper_codec.WriteTagAndValue(output, OptionalDoubleWrapper);
- }
- if (optionalStringWrapper_ != null) {
- _single_optionalStringWrapper_codec.WriteTagAndValue(output, OptionalStringWrapper);
- }
- if (optionalBytesWrapper_ != null) {
- _single_optionalBytesWrapper_codec.WriteTagAndValue(output, OptionalBytesWrapper);
- }
- repeatedBoolWrapper_.WriteTo(output, _repeated_repeatedBoolWrapper_codec);
- repeatedInt32Wrapper_.WriteTo(output, _repeated_repeatedInt32Wrapper_codec);
- repeatedInt64Wrapper_.WriteTo(output, _repeated_repeatedInt64Wrapper_codec);
- repeatedUint32Wrapper_.WriteTo(output, _repeated_repeatedUint32Wrapper_codec);
- repeatedUint64Wrapper_.WriteTo(output, _repeated_repeatedUint64Wrapper_codec);
- repeatedFloatWrapper_.WriteTo(output, _repeated_repeatedFloatWrapper_codec);
- repeatedDoubleWrapper_.WriteTo(output, _repeated_repeatedDoubleWrapper_codec);
- repeatedStringWrapper_.WriteTo(output, _repeated_repeatedStringWrapper_codec);
- repeatedBytesWrapper_.WriteTo(output, _repeated_repeatedBytesWrapper_codec);
- if (optionalDuration_ != null) {
- output.WriteRawTag(234, 18);
- output.WriteMessage(OptionalDuration);
- }
- if (optionalTimestamp_ != null) {
- output.WriteRawTag(242, 18);
- output.WriteMessage(OptionalTimestamp);
- }
- if (optionalFieldMask_ != null) {
- output.WriteRawTag(250, 18);
- output.WriteMessage(OptionalFieldMask);
- }
- if (optionalStruct_ != null) {
- output.WriteRawTag(130, 19);
- output.WriteMessage(OptionalStruct);
- }
- if (optionalAny_ != null) {
- output.WriteRawTag(138, 19);
- output.WriteMessage(OptionalAny);
- }
- if (optionalValue_ != null) {
- output.WriteRawTag(146, 19);
- output.WriteMessage(OptionalValue);
- }
- repeatedDuration_.WriteTo(output, _repeated_repeatedDuration_codec);
- repeatedTimestamp_.WriteTo(output, _repeated_repeatedTimestamp_codec);
- repeatedFieldmask_.WriteTo(output, _repeated_repeatedFieldmask_codec);
- repeatedAny_.WriteTo(output, _repeated_repeatedAny_codec);
- repeatedValue_.WriteTo(output, _repeated_repeatedValue_codec);
- repeatedStruct_.WriteTo(output, _repeated_repeatedStruct_codec);
- if (Fieldname1 != 0) {
- output.WriteRawTag(136, 25);
- output.WriteInt32(Fieldname1);
- }
- if (FieldName2 != 0) {
- output.WriteRawTag(144, 25);
- output.WriteInt32(FieldName2);
- }
- if (FieldName3 != 0) {
- output.WriteRawTag(152, 25);
- output.WriteInt32(FieldName3);
- }
- if (FieldName4 != 0) {
- output.WriteRawTag(160, 25);
- output.WriteInt32(FieldName4);
- }
- if (Field0Name5 != 0) {
- output.WriteRawTag(168, 25);
- output.WriteInt32(Field0Name5);
- }
- if (Field0Name6 != 0) {
- output.WriteRawTag(176, 25);
- output.WriteInt32(Field0Name6);
- }
- if (FieldName7 != 0) {
- output.WriteRawTag(184, 25);
- output.WriteInt32(FieldName7);
- }
- if (FieldName8 != 0) {
- output.WriteRawTag(192, 25);
- output.WriteInt32(FieldName8);
- }
- if (FieldName9 != 0) {
- output.WriteRawTag(200, 25);
- output.WriteInt32(FieldName9);
- }
- if (FieldName10 != 0) {
- output.WriteRawTag(208, 25);
- output.WriteInt32(FieldName10);
- }
- if (FIELDNAME11 != 0) {
- output.WriteRawTag(216, 25);
- output.WriteInt32(FIELDNAME11);
- }
- if (FIELDName12 != 0) {
- output.WriteRawTag(224, 25);
- output.WriteInt32(FIELDName12);
- }
- if (FieldName13 != 0) {
- output.WriteRawTag(232, 25);
- output.WriteInt32(FieldName13);
- }
- if (FieldName14 != 0) {
- output.WriteRawTag(240, 25);
- output.WriteInt32(FieldName14);
- }
- if (FieldName15 != 0) {
- output.WriteRawTag(248, 25);
- output.WriteInt32(FieldName15);
- }
- if (FieldName16 != 0) {
- output.WriteRawTag(128, 26);
- output.WriteInt32(FieldName16);
- }
- if (FieldName17 != 0) {
- output.WriteRawTag(136, 26);
- output.WriteInt32(FieldName17);
- }
- if (FieldName18 != 0) {
- output.WriteRawTag(144, 26);
- output.WriteInt32(FieldName18);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (OptionalInt32 != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
- }
- if (OptionalInt64 != 0L) {
- size += 1 + pb::CodedOutputStream.ComputeInt64Size(OptionalInt64);
- }
- if (OptionalUint32 != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(OptionalUint32);
- }
- if (OptionalUint64 != 0UL) {
- size += 1 + pb::CodedOutputStream.ComputeUInt64Size(OptionalUint64);
- }
- if (OptionalSint32 != 0) {
- size += 1 + pb::CodedOutputStream.ComputeSInt32Size(OptionalSint32);
- }
- if (OptionalSint64 != 0L) {
- size += 1 + pb::CodedOutputStream.ComputeSInt64Size(OptionalSint64);
- }
- if (OptionalFixed32 != 0) {
- size += 1 + 4;
- }
- if (OptionalFixed64 != 0UL) {
- size += 1 + 8;
- }
- if (OptionalSfixed32 != 0) {
- size += 1 + 4;
- }
- if (OptionalSfixed64 != 0L) {
- size += 1 + 8;
- }
- if (OptionalFloat != 0F) {
- size += 1 + 4;
- }
- if (OptionalDouble != 0D) {
- size += 1 + 8;
- }
- if (OptionalBool != false) {
- size += 1 + 1;
- }
- if (OptionalString.Length != 0) {
- size += 1 + pb::CodedOutputStream.ComputeStringSize(OptionalString);
- }
- if (OptionalBytes.Length != 0) {
- size += 1 + pb::CodedOutputStream.ComputeBytesSize(OptionalBytes);
- }
- if (optionalNestedMessage_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage);
- }
- if (optionalForeignMessage_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalForeignMessage);
- }
- if (OptionalNestedEnum != 0) {
- size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalNestedEnum);
- }
- if (OptionalForeignEnum != 0) {
- size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalForeignEnum);
- }
- if (OptionalStringPiece.Length != 0) {
- size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalStringPiece);
- }
- if (OptionalCord.Length != 0) {
- size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalCord);
- }
- if (recursiveMessage_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(RecursiveMessage);
- }
- size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
- size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
- size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec);
- size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
- size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec);
- size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec);
- size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
- size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
- size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec);
- size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec);
- size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
- size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec);
- size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec);
- size += repeatedString_.CalculateSize(_repeated_repeatedString_codec);
- size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec);
- size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec);
- size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec);
- size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec);
- size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec);
- size += repeatedStringPiece_.CalculateSize(_repeated_repeatedStringPiece_codec);
- size += repeatedCord_.CalculateSize(_repeated_repeatedCord_codec);
- size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec);
- size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec);
- size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec);
- size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec);
- size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec);
- size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec);
- size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec);
- size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec);
- size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec);
- size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec);
- size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec);
- size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec);
- size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec);
- size += mapStringString_.CalculateSize(_map_mapStringString_codec);
- size += mapStringBytes_.CalculateSize(_map_mapStringBytes_codec);
- size += mapStringNestedMessage_.CalculateSize(_map_mapStringNestedMessage_codec);
- size += mapStringForeignMessage_.CalculateSize(_map_mapStringForeignMessage_codec);
- size += mapStringNestedEnum_.CalculateSize(_map_mapStringNestedEnum_codec);
- size += mapStringForeignEnum_.CalculateSize(_map_mapStringForeignEnum_codec);
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
- size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
- size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
- size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofBool) {
- size += 2 + 1;
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint64) {
- size += 2 + pb::CodedOutputStream.ComputeUInt64Size(OneofUint64);
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofFloat) {
- size += 2 + 4;
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofDouble) {
- size += 2 + 8;
- }
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofEnum) {
- size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OneofEnum);
- }
- if (optionalBoolWrapper_ != null) {
- size += _single_optionalBoolWrapper_codec.CalculateSizeWithTag(OptionalBoolWrapper);
- }
- if (optionalInt32Wrapper_ != null) {
- size += _single_optionalInt32Wrapper_codec.CalculateSizeWithTag(OptionalInt32Wrapper);
- }
- if (optionalInt64Wrapper_ != null) {
- size += _single_optionalInt64Wrapper_codec.CalculateSizeWithTag(OptionalInt64Wrapper);
- }
- if (optionalUint32Wrapper_ != null) {
- size += _single_optionalUint32Wrapper_codec.CalculateSizeWithTag(OptionalUint32Wrapper);
- }
- if (optionalUint64Wrapper_ != null) {
- size += _single_optionalUint64Wrapper_codec.CalculateSizeWithTag(OptionalUint64Wrapper);
- }
- if (optionalFloatWrapper_ != null) {
- size += _single_optionalFloatWrapper_codec.CalculateSizeWithTag(OptionalFloatWrapper);
- }
- if (optionalDoubleWrapper_ != null) {
- size += _single_optionalDoubleWrapper_codec.CalculateSizeWithTag(OptionalDoubleWrapper);
- }
- if (optionalStringWrapper_ != null) {
- size += _single_optionalStringWrapper_codec.CalculateSizeWithTag(OptionalStringWrapper);
- }
- if (optionalBytesWrapper_ != null) {
- size += _single_optionalBytesWrapper_codec.CalculateSizeWithTag(OptionalBytesWrapper);
- }
- size += repeatedBoolWrapper_.CalculateSize(_repeated_repeatedBoolWrapper_codec);
- size += repeatedInt32Wrapper_.CalculateSize(_repeated_repeatedInt32Wrapper_codec);
- size += repeatedInt64Wrapper_.CalculateSize(_repeated_repeatedInt64Wrapper_codec);
- size += repeatedUint32Wrapper_.CalculateSize(_repeated_repeatedUint32Wrapper_codec);
- size += repeatedUint64Wrapper_.CalculateSize(_repeated_repeatedUint64Wrapper_codec);
- size += repeatedFloatWrapper_.CalculateSize(_repeated_repeatedFloatWrapper_codec);
- size += repeatedDoubleWrapper_.CalculateSize(_repeated_repeatedDoubleWrapper_codec);
- size += repeatedStringWrapper_.CalculateSize(_repeated_repeatedStringWrapper_codec);
- size += repeatedBytesWrapper_.CalculateSize(_repeated_repeatedBytesWrapper_codec);
- if (optionalDuration_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalDuration);
- }
- if (optionalTimestamp_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalTimestamp);
- }
- if (optionalFieldMask_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalFieldMask);
- }
- if (optionalStruct_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalStruct);
- }
- if (optionalAny_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalAny);
- }
- if (optionalValue_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalValue);
- }
- size += repeatedDuration_.CalculateSize(_repeated_repeatedDuration_codec);
- size += repeatedTimestamp_.CalculateSize(_repeated_repeatedTimestamp_codec);
- size += repeatedFieldmask_.CalculateSize(_repeated_repeatedFieldmask_codec);
- size += repeatedStruct_.CalculateSize(_repeated_repeatedStruct_codec);
- size += repeatedAny_.CalculateSize(_repeated_repeatedAny_codec);
- size += repeatedValue_.CalculateSize(_repeated_repeatedValue_codec);
- if (Fieldname1 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(Fieldname1);
- }
- if (FieldName2 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName2);
- }
- if (FieldName3 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName3);
- }
- if (FieldName4 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName4);
- }
- if (Field0Name5 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(Field0Name5);
- }
- if (Field0Name6 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(Field0Name6);
- }
- if (FieldName7 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName7);
- }
- if (FieldName8 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName8);
- }
- if (FieldName9 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName9);
- }
- if (FieldName10 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName10);
- }
- if (FIELDNAME11 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FIELDNAME11);
- }
- if (FIELDName12 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FIELDName12);
- }
- if (FieldName13 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName13);
- }
- if (FieldName14 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName14);
- }
- if (FieldName15 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName15);
- }
- if (FieldName16 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName16);
- }
- if (FieldName17 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName17);
- }
- if (FieldName18 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName18);
- }
- return size;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(TestAllTypes other) {
- if (other == null) {
- return;
- }
- if (other.OptionalInt32 != 0) {
- OptionalInt32 = other.OptionalInt32;
- }
- if (other.OptionalInt64 != 0L) {
- OptionalInt64 = other.OptionalInt64;
- }
- if (other.OptionalUint32 != 0) {
- OptionalUint32 = other.OptionalUint32;
- }
- if (other.OptionalUint64 != 0UL) {
- OptionalUint64 = other.OptionalUint64;
- }
- if (other.OptionalSint32 != 0) {
- OptionalSint32 = other.OptionalSint32;
- }
- if (other.OptionalSint64 != 0L) {
- OptionalSint64 = other.OptionalSint64;
- }
- if (other.OptionalFixed32 != 0) {
- OptionalFixed32 = other.OptionalFixed32;
- }
- if (other.OptionalFixed64 != 0UL) {
- OptionalFixed64 = other.OptionalFixed64;
- }
- if (other.OptionalSfixed32 != 0) {
- OptionalSfixed32 = other.OptionalSfixed32;
- }
- if (other.OptionalSfixed64 != 0L) {
- OptionalSfixed64 = other.OptionalSfixed64;
- }
- if (other.OptionalFloat != 0F) {
- OptionalFloat = other.OptionalFloat;
- }
- if (other.OptionalDouble != 0D) {
- OptionalDouble = other.OptionalDouble;
- }
- if (other.OptionalBool != false) {
- OptionalBool = other.OptionalBool;
- }
- if (other.OptionalString.Length != 0) {
- OptionalString = other.OptionalString;
- }
- if (other.OptionalBytes.Length != 0) {
- OptionalBytes = other.OptionalBytes;
- }
- if (other.optionalNestedMessage_ != null) {
- if (optionalNestedMessage_ == null) {
- optionalNestedMessage_ = new global::Conformance.TestAllTypes.Types.NestedMessage();
- }
- OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage);
- }
- if (other.optionalForeignMessage_ != null) {
- if (optionalForeignMessage_ == null) {
- optionalForeignMessage_ = new global::Conformance.ForeignMessage();
- }
- OptionalForeignMessage.MergeFrom(other.OptionalForeignMessage);
- }
- if (other.OptionalNestedEnum != 0) {
- OptionalNestedEnum = other.OptionalNestedEnum;
- }
- if (other.OptionalForeignEnum != 0) {
- OptionalForeignEnum = other.OptionalForeignEnum;
- }
- if (other.OptionalStringPiece.Length != 0) {
- OptionalStringPiece = other.OptionalStringPiece;
- }
- if (other.OptionalCord.Length != 0) {
- OptionalCord = other.OptionalCord;
- }
- if (other.recursiveMessage_ != null) {
- if (recursiveMessage_ == null) {
- recursiveMessage_ = new global::Conformance.TestAllTypes();
- }
- RecursiveMessage.MergeFrom(other.RecursiveMessage);
- }
- repeatedInt32_.Add(other.repeatedInt32_);
- repeatedInt64_.Add(other.repeatedInt64_);
- repeatedUint32_.Add(other.repeatedUint32_);
- repeatedUint64_.Add(other.repeatedUint64_);
- repeatedSint32_.Add(other.repeatedSint32_);
- repeatedSint64_.Add(other.repeatedSint64_);
- repeatedFixed32_.Add(other.repeatedFixed32_);
- repeatedFixed64_.Add(other.repeatedFixed64_);
- repeatedSfixed32_.Add(other.repeatedSfixed32_);
- repeatedSfixed64_.Add(other.repeatedSfixed64_);
- repeatedFloat_.Add(other.repeatedFloat_);
- repeatedDouble_.Add(other.repeatedDouble_);
- repeatedBool_.Add(other.repeatedBool_);
- repeatedString_.Add(other.repeatedString_);
- repeatedBytes_.Add(other.repeatedBytes_);
- repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
- repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
- repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
- repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
- repeatedStringPiece_.Add(other.repeatedStringPiece_);
- repeatedCord_.Add(other.repeatedCord_);
- mapInt32Int32_.Add(other.mapInt32Int32_);
- mapInt64Int64_.Add(other.mapInt64Int64_);
- mapUint32Uint32_.Add(other.mapUint32Uint32_);
- mapUint64Uint64_.Add(other.mapUint64Uint64_);
- mapSint32Sint32_.Add(other.mapSint32Sint32_);
- mapSint64Sint64_.Add(other.mapSint64Sint64_);
- mapFixed32Fixed32_.Add(other.mapFixed32Fixed32_);
- mapFixed64Fixed64_.Add(other.mapFixed64Fixed64_);
- mapSfixed32Sfixed32_.Add(other.mapSfixed32Sfixed32_);
- mapSfixed64Sfixed64_.Add(other.mapSfixed64Sfixed64_);
- mapInt32Float_.Add(other.mapInt32Float_);
- mapInt32Double_.Add(other.mapInt32Double_);
- mapBoolBool_.Add(other.mapBoolBool_);
- mapStringString_.Add(other.mapStringString_);
- mapStringBytes_.Add(other.mapStringBytes_);
- mapStringNestedMessage_.Add(other.mapStringNestedMessage_);
- mapStringForeignMessage_.Add(other.mapStringForeignMessage_);
- mapStringNestedEnum_.Add(other.mapStringNestedEnum_);
- mapStringForeignEnum_.Add(other.mapStringForeignEnum_);
- if (other.optionalBoolWrapper_ != null) {
- if (optionalBoolWrapper_ == null || other.OptionalBoolWrapper != false) {
- OptionalBoolWrapper = other.OptionalBoolWrapper;
- }
- }
- if (other.optionalInt32Wrapper_ != null) {
- if (optionalInt32Wrapper_ == null || other.OptionalInt32Wrapper != 0) {
- OptionalInt32Wrapper = other.OptionalInt32Wrapper;
- }
- }
- if (other.optionalInt64Wrapper_ != null) {
- if (optionalInt64Wrapper_ == null || other.OptionalInt64Wrapper != 0L) {
- OptionalInt64Wrapper = other.OptionalInt64Wrapper;
- }
- }
- if (other.optionalUint32Wrapper_ != null) {
- if (optionalUint32Wrapper_ == null || other.OptionalUint32Wrapper != 0) {
- OptionalUint32Wrapper = other.OptionalUint32Wrapper;
- }
- }
- if (other.optionalUint64Wrapper_ != null) {
- if (optionalUint64Wrapper_ == null || other.OptionalUint64Wrapper != 0UL) {
- OptionalUint64Wrapper = other.OptionalUint64Wrapper;
- }
- }
- if (other.optionalFloatWrapper_ != null) {
- if (optionalFloatWrapper_ == null || other.OptionalFloatWrapper != 0F) {
- OptionalFloatWrapper = other.OptionalFloatWrapper;
- }
- }
- if (other.optionalDoubleWrapper_ != null) {
- if (optionalDoubleWrapper_ == null || other.OptionalDoubleWrapper != 0D) {
- OptionalDoubleWrapper = other.OptionalDoubleWrapper;
- }
- }
- if (other.optionalStringWrapper_ != null) {
- if (optionalStringWrapper_ == null || other.OptionalStringWrapper != "") {
- OptionalStringWrapper = other.OptionalStringWrapper;
- }
- }
- if (other.optionalBytesWrapper_ != null) {
- if (optionalBytesWrapper_ == null || other.OptionalBytesWrapper != pb::ByteString.Empty) {
- OptionalBytesWrapper = other.OptionalBytesWrapper;
- }
- }
- repeatedBoolWrapper_.Add(other.repeatedBoolWrapper_);
- repeatedInt32Wrapper_.Add(other.repeatedInt32Wrapper_);
- repeatedInt64Wrapper_.Add(other.repeatedInt64Wrapper_);
- repeatedUint32Wrapper_.Add(other.repeatedUint32Wrapper_);
- repeatedUint64Wrapper_.Add(other.repeatedUint64Wrapper_);
- repeatedFloatWrapper_.Add(other.repeatedFloatWrapper_);
- repeatedDoubleWrapper_.Add(other.repeatedDoubleWrapper_);
- repeatedStringWrapper_.Add(other.repeatedStringWrapper_);
- repeatedBytesWrapper_.Add(other.repeatedBytesWrapper_);
- if (other.optionalDuration_ != null) {
- if (optionalDuration_ == null) {
- optionalDuration_ = new global::Google.Protobuf.WellKnownTypes.Duration();
- }
- OptionalDuration.MergeFrom(other.OptionalDuration);
- }
- if (other.optionalTimestamp_ != null) {
- if (optionalTimestamp_ == null) {
- optionalTimestamp_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
- }
- OptionalTimestamp.MergeFrom(other.OptionalTimestamp);
- }
- if (other.optionalFieldMask_ != null) {
- if (optionalFieldMask_ == null) {
- optionalFieldMask_ = new global::Google.Protobuf.WellKnownTypes.FieldMask();
- }
- OptionalFieldMask.MergeFrom(other.OptionalFieldMask);
- }
- if (other.optionalStruct_ != null) {
- if (optionalStruct_ == null) {
- optionalStruct_ = new global::Google.Protobuf.WellKnownTypes.Struct();
- }
- OptionalStruct.MergeFrom(other.OptionalStruct);
- }
- if (other.optionalAny_ != null) {
- if (optionalAny_ == null) {
- optionalAny_ = new global::Google.Protobuf.WellKnownTypes.Any();
- }
- OptionalAny.MergeFrom(other.OptionalAny);
- }
- if (other.optionalValue_ != null) {
- if (optionalValue_ == null) {
- optionalValue_ = new global::Google.Protobuf.WellKnownTypes.Value();
- }
- OptionalValue.MergeFrom(other.OptionalValue);
- }
- repeatedDuration_.Add(other.repeatedDuration_);
- repeatedTimestamp_.Add(other.repeatedTimestamp_);
- repeatedFieldmask_.Add(other.repeatedFieldmask_);
- repeatedStruct_.Add(other.repeatedStruct_);
- repeatedAny_.Add(other.repeatedAny_);
- repeatedValue_.Add(other.repeatedValue_);
- if (other.Fieldname1 != 0) {
- Fieldname1 = other.Fieldname1;
- }
- if (other.FieldName2 != 0) {
- FieldName2 = other.FieldName2;
- }
- if (other.FieldName3 != 0) {
- FieldName3 = other.FieldName3;
- }
- if (other.FieldName4 != 0) {
- FieldName4 = other.FieldName4;
- }
- if (other.Field0Name5 != 0) {
- Field0Name5 = other.Field0Name5;
- }
- if (other.Field0Name6 != 0) {
- Field0Name6 = other.Field0Name6;
- }
- if (other.FieldName7 != 0) {
- FieldName7 = other.FieldName7;
- }
- if (other.FieldName8 != 0) {
- FieldName8 = other.FieldName8;
- }
- if (other.FieldName9 != 0) {
- FieldName9 = other.FieldName9;
- }
- if (other.FieldName10 != 0) {
- FieldName10 = other.FieldName10;
- }
- if (other.FIELDNAME11 != 0) {
- FIELDNAME11 = other.FIELDNAME11;
- }
- if (other.FIELDName12 != 0) {
- FIELDName12 = other.FIELDName12;
- }
- if (other.FieldName13 != 0) {
- FieldName13 = other.FieldName13;
- }
- if (other.FieldName14 != 0) {
- FieldName14 = other.FieldName14;
- }
- if (other.FieldName15 != 0) {
- FieldName15 = other.FieldName15;
- }
- if (other.FieldName16 != 0) {
- FieldName16 = other.FieldName16;
- }
- if (other.FieldName17 != 0) {
- FieldName17 = other.FieldName17;
- }
- if (other.FieldName18 != 0) {
- FieldName18 = other.FieldName18;
- }
- switch (other.OneofFieldCase) {
- case OneofFieldOneofCase.OneofUint32:
- OneofUint32 = other.OneofUint32;
- break;
- case OneofFieldOneofCase.OneofNestedMessage:
- OneofNestedMessage = other.OneofNestedMessage;
- break;
- case OneofFieldOneofCase.OneofString:
- OneofString = other.OneofString;
- break;
- case OneofFieldOneofCase.OneofBytes:
- OneofBytes = other.OneofBytes;
- break;
- case OneofFieldOneofCase.OneofBool:
- OneofBool = other.OneofBool;
- break;
- case OneofFieldOneofCase.OneofUint64:
- OneofUint64 = other.OneofUint64;
- break;
- case OneofFieldOneofCase.OneofFloat:
- OneofFloat = other.OneofFloat;
- break;
- case OneofFieldOneofCase.OneofDouble:
- OneofDouble = other.OneofDouble;
- break;
- case OneofFieldOneofCase.OneofEnum:
- OneofEnum = other.OneofEnum;
- break;
- }
-
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(pb::CodedInputStream input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- input.SkipLastField();
- break;
- case 8: {
- OptionalInt32 = input.ReadInt32();
- break;
- }
- case 16: {
- OptionalInt64 = input.ReadInt64();
- break;
- }
- case 24: {
- OptionalUint32 = input.ReadUInt32();
- break;
- }
- case 32: {
- OptionalUint64 = input.ReadUInt64();
- break;
- }
- case 40: {
- OptionalSint32 = input.ReadSInt32();
- break;
- }
- case 48: {
- OptionalSint64 = input.ReadSInt64();
- break;
- }
- case 61: {
- OptionalFixed32 = input.ReadFixed32();
- break;
- }
- case 65: {
- OptionalFixed64 = input.ReadFixed64();
- break;
- }
- case 77: {
- OptionalSfixed32 = input.ReadSFixed32();
- break;
- }
- case 81: {
- OptionalSfixed64 = input.ReadSFixed64();
- break;
- }
- case 93: {
- OptionalFloat = input.ReadFloat();
- break;
- }
- case 97: {
- OptionalDouble = input.ReadDouble();
- break;
- }
- case 104: {
- OptionalBool = input.ReadBool();
- break;
- }
- case 114: {
- OptionalString = input.ReadString();
- break;
- }
- case 122: {
- OptionalBytes = input.ReadBytes();
- break;
- }
- case 146: {
- if (optionalNestedMessage_ == null) {
- optionalNestedMessage_ = new global::Conformance.TestAllTypes.Types.NestedMessage();
- }
- input.ReadMessage(optionalNestedMessage_);
- break;
- }
- case 154: {
- if (optionalForeignMessage_ == null) {
- optionalForeignMessage_ = new global::Conformance.ForeignMessage();
- }
- input.ReadMessage(optionalForeignMessage_);
- break;
- }
- case 168: {
- optionalNestedEnum_ = (global::Conformance.TestAllTypes.Types.NestedEnum) input.ReadEnum();
- break;
- }
- case 176: {
- optionalForeignEnum_ = (global::Conformance.ForeignEnum) input.ReadEnum();
- break;
- }
- case 194: {
- OptionalStringPiece = input.ReadString();
- break;
- }
- case 202: {
- OptionalCord = input.ReadString();
- break;
- }
- case 218: {
- if (recursiveMessage_ == null) {
- recursiveMessage_ = new global::Conformance.TestAllTypes();
- }
- input.ReadMessage(recursiveMessage_);
- break;
- }
- case 250:
- case 248: {
- repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
- break;
- }
- case 258:
- case 256: {
- repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
- break;
- }
- case 266:
- case 264: {
- repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec);
- break;
- }
- case 274:
- case 272: {
- repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
- break;
- }
- case 282:
- case 280: {
- repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec);
- break;
- }
- case 290:
- case 288: {
- repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec);
- break;
- }
- case 298:
- case 301: {
- repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
- break;
- }
- case 306:
- case 305: {
- repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
- break;
- }
- case 314:
- case 317: {
- repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_codec);
- break;
- }
- case 322:
- case 321: {
- repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_codec);
- break;
- }
- case 330:
- case 333: {
- repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
- break;
- }
- case 338:
- case 337: {
- repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec);
- break;
- }
- case 346:
- case 344: {
- repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec);
- break;
- }
- case 354: {
- repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec);
- break;
- }
- case 362: {
- repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec);
- break;
- }
- case 386: {
- repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec);
- break;
- }
- case 394: {
- repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec);
- break;
- }
- case 410:
- case 408: {
- repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEnum_codec);
- break;
- }
- case 418:
- case 416: {
- repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec);
- break;
- }
- case 434: {
- repeatedStringPiece_.AddEntriesFrom(input, _repeated_repeatedStringPiece_codec);
- break;
- }
- case 442: {
- repeatedCord_.AddEntriesFrom(input, _repeated_repeatedCord_codec);
- break;
- }
- case 450: {
- mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
- break;
- }
- case 458: {
- mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec);
- break;
- }
- case 466: {
- mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec);
- break;
- }
- case 474: {
- mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec);
- break;
- }
- case 482: {
- mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec);
- break;
- }
- case 490: {
- mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec);
- break;
- }
- case 498: {
- mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec);
- break;
- }
- case 506: {
- mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec);
- break;
- }
- case 514: {
- mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec);
- break;
- }
- case 522: {
- mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec);
- break;
- }
- case 530: {
- mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec);
- break;
- }
- case 538: {
- mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec);
- break;
- }
- case 546: {
- mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec);
- break;
- }
- case 554: {
- mapStringString_.AddEntriesFrom(input, _map_mapStringString_codec);
- break;
- }
- case 562: {
- mapStringBytes_.AddEntriesFrom(input, _map_mapStringBytes_codec);
- break;
- }
- case 570: {
- mapStringNestedMessage_.AddEntriesFrom(input, _map_mapStringNestedMessage_codec);
- break;
- }
- case 578: {
- mapStringForeignMessage_.AddEntriesFrom(input, _map_mapStringForeignMessage_codec);
- break;
- }
- case 586: {
- mapStringNestedEnum_.AddEntriesFrom(input, _map_mapStringNestedEnum_codec);
- break;
- }
- case 594: {
- mapStringForeignEnum_.AddEntriesFrom(input, _map_mapStringForeignEnum_codec);
- break;
- }
- case 888: {
- OneofUint32 = input.ReadUInt32();
- break;
- }
- case 898: {
- global::Conformance.TestAllTypes.Types.NestedMessage subBuilder = new global::Conformance.TestAllTypes.Types.NestedMessage();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
- subBuilder.MergeFrom(OneofNestedMessage);
- }
- input.ReadMessage(subBuilder);
- OneofNestedMessage = subBuilder;
- break;
- }
- case 906: {
- OneofString = input.ReadString();
- break;
- }
- case 914: {
- OneofBytes = input.ReadBytes();
- break;
- }
- case 920: {
- OneofBool = input.ReadBool();
- break;
- }
- case 928: {
- OneofUint64 = input.ReadUInt64();
- break;
- }
- case 941: {
- OneofFloat = input.ReadFloat();
- break;
- }
- case 945: {
- OneofDouble = input.ReadDouble();
- break;
- }
- case 952: {
- oneofField_ = input.ReadEnum();
- oneofFieldCase_ = OneofFieldOneofCase.OneofEnum;
- break;
- }
- case 1610: {
- bool? value = _single_optionalBoolWrapper_codec.Read(input);
- if (optionalBoolWrapper_ == null || value != false) {
- OptionalBoolWrapper = value;
- }
- break;
- }
- case 1618: {
- int? value = _single_optionalInt32Wrapper_codec.Read(input);
- if (optionalInt32Wrapper_ == null || value != 0) {
- OptionalInt32Wrapper = value;
- }
- break;
- }
- case 1626: {
- long? value = _single_optionalInt64Wrapper_codec.Read(input);
- if (optionalInt64Wrapper_ == null || value != 0L) {
- OptionalInt64Wrapper = value;
- }
- break;
- }
- case 1634: {
- uint? value = _single_optionalUint32Wrapper_codec.Read(input);
- if (optionalUint32Wrapper_ == null || value != 0) {
- OptionalUint32Wrapper = value;
- }
- break;
- }
- case 1642: {
- ulong? value = _single_optionalUint64Wrapper_codec.Read(input);
- if (optionalUint64Wrapper_ == null || value != 0UL) {
- OptionalUint64Wrapper = value;
- }
- break;
- }
- case 1650: {
- float? value = _single_optionalFloatWrapper_codec.Read(input);
- if (optionalFloatWrapper_ == null || value != 0F) {
- OptionalFloatWrapper = value;
- }
- break;
- }
- case 1658: {
- double? value = _single_optionalDoubleWrapper_codec.Read(input);
- if (optionalDoubleWrapper_ == null || value != 0D) {
- OptionalDoubleWrapper = value;
- }
- break;
- }
- case 1666: {
- string value = _single_optionalStringWrapper_codec.Read(input);
- if (optionalStringWrapper_ == null || value != "") {
- OptionalStringWrapper = value;
- }
- break;
- }
- case 1674: {
- pb::ByteString value = _single_optionalBytesWrapper_codec.Read(input);
- if (optionalBytesWrapper_ == null || value != pb::ByteString.Empty) {
- OptionalBytesWrapper = value;
- }
- break;
- }
- case 1690: {
- repeatedBoolWrapper_.AddEntriesFrom(input, _repeated_repeatedBoolWrapper_codec);
- break;
- }
- case 1698: {
- repeatedInt32Wrapper_.AddEntriesFrom(input, _repeated_repeatedInt32Wrapper_codec);
- break;
- }
- case 1706: {
- repeatedInt64Wrapper_.AddEntriesFrom(input, _repeated_repeatedInt64Wrapper_codec);
- break;
- }
- case 1714: {
- repeatedUint32Wrapper_.AddEntriesFrom(input, _repeated_repeatedUint32Wrapper_codec);
- break;
- }
- case 1722: {
- repeatedUint64Wrapper_.AddEntriesFrom(input, _repeated_repeatedUint64Wrapper_codec);
- break;
- }
- case 1730: {
- repeatedFloatWrapper_.AddEntriesFrom(input, _repeated_repeatedFloatWrapper_codec);
- break;
- }
- case 1738: {
- repeatedDoubleWrapper_.AddEntriesFrom(input, _repeated_repeatedDoubleWrapper_codec);
- break;
- }
- case 1746: {
- repeatedStringWrapper_.AddEntriesFrom(input, _repeated_repeatedStringWrapper_codec);
- break;
- }
- case 1754: {
- repeatedBytesWrapper_.AddEntriesFrom(input, _repeated_repeatedBytesWrapper_codec);
- break;
- }
- case 2410: {
- if (optionalDuration_ == null) {
- optionalDuration_ = new global::Google.Protobuf.WellKnownTypes.Duration();
- }
- input.ReadMessage(optionalDuration_);
- break;
- }
- case 2418: {
- if (optionalTimestamp_ == null) {
- optionalTimestamp_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
- }
- input.ReadMessage(optionalTimestamp_);
- break;
- }
- case 2426: {
- if (optionalFieldMask_ == null) {
- optionalFieldMask_ = new global::Google.Protobuf.WellKnownTypes.FieldMask();
- }
- input.ReadMessage(optionalFieldMask_);
- break;
- }
- case 2434: {
- if (optionalStruct_ == null) {
- optionalStruct_ = new global::Google.Protobuf.WellKnownTypes.Struct();
- }
- input.ReadMessage(optionalStruct_);
- break;
- }
- case 2442: {
- if (optionalAny_ == null) {
- optionalAny_ = new global::Google.Protobuf.WellKnownTypes.Any();
- }
- input.ReadMessage(optionalAny_);
- break;
- }
- case 2450: {
- if (optionalValue_ == null) {
- optionalValue_ = new global::Google.Protobuf.WellKnownTypes.Value();
- }
- input.ReadMessage(optionalValue_);
- break;
- }
- case 2490: {
- repeatedDuration_.AddEntriesFrom(input, _repeated_repeatedDuration_codec);
- break;
- }
- case 2498: {
- repeatedTimestamp_.AddEntriesFrom(input, _repeated_repeatedTimestamp_codec);
- break;
- }
- case 2506: {
- repeatedFieldmask_.AddEntriesFrom(input, _repeated_repeatedFieldmask_codec);
- break;
- }
- case 2522: {
- repeatedAny_.AddEntriesFrom(input, _repeated_repeatedAny_codec);
- break;
- }
- case 2530: {
- repeatedValue_.AddEntriesFrom(input, _repeated_repeatedValue_codec);
- break;
- }
- case 2594: {
- repeatedStruct_.AddEntriesFrom(input, _repeated_repeatedStruct_codec);
- break;
- }
- case 3208: {
- Fieldname1 = input.ReadInt32();
- break;
- }
- case 3216: {
- FieldName2 = input.ReadInt32();
- break;
- }
- case 3224: {
- FieldName3 = input.ReadInt32();
- break;
- }
- case 3232: {
- FieldName4 = input.ReadInt32();
- break;
- }
- case 3240: {
- Field0Name5 = input.ReadInt32();
- break;
- }
- case 3248: {
- Field0Name6 = input.ReadInt32();
- break;
- }
- case 3256: {
- FieldName7 = input.ReadInt32();
- break;
- }
- case 3264: {
- FieldName8 = input.ReadInt32();
- break;
- }
- case 3272: {
- FieldName9 = input.ReadInt32();
- break;
- }
- case 3280: {
- FieldName10 = input.ReadInt32();
- break;
- }
- case 3288: {
- FIELDNAME11 = input.ReadInt32();
- break;
- }
- case 3296: {
- FIELDName12 = input.ReadInt32();
- break;
- }
- case 3304: {
- FieldName13 = input.ReadInt32();
- break;
- }
- case 3312: {
- FieldName14 = input.ReadInt32();
- break;
- }
- case 3320: {
- FieldName15 = input.ReadInt32();
- break;
- }
- case 3328: {
- FieldName16 = input.ReadInt32();
- break;
- }
- case 3336: {
- FieldName17 = input.ReadInt32();
- break;
- }
- case 3344: {
- FieldName18 = input.ReadInt32();
- break;
- }
- }
- }
- }
-
- #region Nested types
- /// <summary>Container for nested types declared in the TestAllTypes message type.</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static partial class Types {
- public enum NestedEnum {
- [pbr::OriginalName("FOO")] Foo = 0,
- [pbr::OriginalName("BAR")] Bar = 1,
- [pbr::OriginalName("BAZ")] Baz = 2,
- /// <summary>
- /// Intentionally negative.
- /// </summary>
- [pbr::OriginalName("NEG")] Neg = -1,
- }
-
- public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
- private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::Conformance.TestAllTypes.Descriptor.NestedTypes[0]; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public NestedMessage() {
- OnConstruction();
- }
-
- partial void OnConstruction();
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public NestedMessage(NestedMessage other) : this() {
- a_ = other.a_;
- Corecursive = other.corecursive_ != null ? other.Corecursive.Clone() : null;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public NestedMessage Clone() {
- return new NestedMessage(this);
- }
-
- /// <summary>Field number for the "a" field.</summary>
- public const int AFieldNumber = 1;
- private int a_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int A {
- get { return a_; }
- set {
- a_ = value;
- }
- }
-
- /// <summary>Field number for the "corecursive" field.</summary>
- public const int CorecursiveFieldNumber = 2;
- private global::Conformance.TestAllTypes corecursive_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Conformance.TestAllTypes Corecursive {
- get { return corecursive_; }
- set {
- corecursive_ = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as NestedMessage);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(NestedMessage other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (A != other.A) return false;
- if (!object.Equals(Corecursive, other.Corecursive)) return false;
- return true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (A != 0) hash ^= A.GetHashCode();
- if (corecursive_ != null) hash ^= Corecursive.GetHashCode();
- return hash;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void WriteTo(pb::CodedOutputStream output) {
- if (A != 0) {
- output.WriteRawTag(8);
- output.WriteInt32(A);
- }
- if (corecursive_ != null) {
- output.WriteRawTag(18);
- output.WriteMessage(Corecursive);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (A != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
- }
- if (corecursive_ != null) {
- size += 1 + pb::CodedOutputStream.ComputeMessageSize(Corecursive);
- }
- return size;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(NestedMessage other) {
- if (other == null) {
- return;
- }
- if (other.A != 0) {
- A = other.A;
- }
- if (other.corecursive_ != null) {
- if (corecursive_ == null) {
- corecursive_ = new global::Conformance.TestAllTypes();
- }
- Corecursive.MergeFrom(other.Corecursive);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(pb::CodedInputStream input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- input.SkipLastField();
- break;
- case 8: {
- A = input.ReadInt32();
- break;
- }
- case 18: {
- if (corecursive_ == null) {
- corecursive_ = new global::Conformance.TestAllTypes();
- }
- input.ReadMessage(corecursive_);
- break;
- }
- }
- }
- }
-
- }
-
- }
- #endregion
-
- }
-
- public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage> {
- private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::MessageParser<ForeignMessage>(() => new ForeignMessage());
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<ForeignMessage> Parser { get { return _parser; } }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[3]; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public ForeignMessage() {
- OnConstruction();
- }
-
- partial void OnConstruction();
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public ForeignMessage(ForeignMessage other) : this() {
- c_ = other.c_;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public ForeignMessage Clone() {
- return new ForeignMessage(this);
- }
-
- /// <summary>Field number for the "c" field.</summary>
- public const int CFieldNumber = 1;
- private int c_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int C {
- get { return c_; }
- set {
- c_ = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as ForeignMessage);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(ForeignMessage other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (C != other.C) return false;
- return true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (C != 0) hash ^= C.GetHashCode();
- return hash;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void WriteTo(pb::CodedOutputStream output) {
- if (C != 0) {
- output.WriteRawTag(8);
- output.WriteInt32(C);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (C != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(C);
- }
- return size;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(ForeignMessage other) {
- if (other == null) {
- return;
- }
- if (other.C != 0) {
- C = other.C;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(pb::CodedInputStream input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- input.SkipLastField();
- break;
- case 8: {
- C = input.ReadInt32();
- break;
- }
- }
- }
- }
-
- }
-
#endregion
}
diff --git a/csharp/src/Google.Protobuf.Conformance/Program.cs b/csharp/src/Google.Protobuf.Conformance/Program.cs
index 19827c48..00ee64f8 100644
--- a/csharp/src/Google.Protobuf.Conformance/Program.cs
+++ b/csharp/src/Google.Protobuf.Conformance/Program.cs
@@ -48,7 +48,7 @@ namespace Google.Protobuf.Conformance
// This way we get the binary streams instead of readers/writers.
var input = new BinaryReader(Console.OpenStandardInput());
var output = new BinaryWriter(Console.OpenStandardOutput());
- var typeRegistry = TypeRegistry.FromMessages(TestAllTypes.Descriptor);
+ var typeRegistry = TypeRegistry.FromMessages(ProtobufTestMessages.Proto3.TestAllTypes.Descriptor);
int count = 0;
while (RunTest(input, output, typeRegistry))
@@ -81,17 +81,17 @@ namespace Google.Protobuf.Conformance
private static ConformanceResponse PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry)
{
- TestAllTypes message;
+ ProtobufTestMessages.Proto3.TestAllTypes message;
try
{
switch (request.PayloadCase)
{
case ConformanceRequest.PayloadOneofCase.JsonPayload:
var parser = new JsonParser(new JsonParser.Settings(20, typeRegistry));
- message = parser.Parse<TestAllTypes>(request.JsonPayload);
+ message = parser.Parse<ProtobufTestMessages.Proto3.TestAllTypes>(request.JsonPayload);
break;
case ConformanceRequest.PayloadOneofCase.ProtobufPayload:
- message = TestAllTypes.Parser.ParseFrom(request.ProtobufPayload);
+ message = ProtobufTestMessages.Proto3.TestAllTypes.Parser.ParseFrom(request.ProtobufPayload);
break;
default:
throw new Exception("Unsupported request payload: " + request.PayloadCase);
diff --git a/csharp/src/Google.Protobuf.Conformance/project.json b/csharp/src/Google.Protobuf.Conformance/project.json
index 84b23c45..4cf05231 100644
--- a/csharp/src/Google.Protobuf.Conformance/project.json
+++ b/csharp/src/Google.Protobuf.Conformance/project.json
@@ -4,10 +4,12 @@
"emitEntryPoint": true
},
"dependencies": {
- "Google.Protobuf": { "target": "project" }
+ "Google.Protobuf": { "target": "project" },
+ "Google.Protobuf.Test": { "target": "project" }
},
"frameworks": {
"netcoreapp1.0": {
+ "imports": [ "dnxcore50", "netcoreapp1.0", "portable-net45+win8" ],
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
diff --git a/csharp/src/Google.Protobuf.Test/ByteStringTest.cs b/csharp/src/Google.Protobuf.Test/ByteStringTest.cs
index 685e130a..ff2444a3 100644
--- a/csharp/src/Google.Protobuf.Test/ByteStringTest.cs
+++ b/csharp/src/Google.Protobuf.Test/ByteStringTest.cs
@@ -167,5 +167,18 @@ namespace Google.Protobuf
// Optimization which also fixes issue 61.
Assert.AreSame(ByteString.Empty, ByteString.FromBase64(""));
}
+
+ [Test]
+ public void GetHashCode_Regression()
+ {
+ // We used to have an awful hash algorithm where only the last four
+ // bytes were relevant. This is a regression test for
+ // https://github.com/google/protobuf/issues/2511
+
+ ByteString b1 = ByteString.CopyFrom(100, 1, 2, 3, 4);
+ ByteString b2 = ByteString.CopyFrom(200, 1, 2, 3, 4);
+ Assert.AreNotEqual(b1.GetHashCode(), b2.GetHashCode());
+ }
+
}
} \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.xproj b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.xproj
index a9a1cc04..6370441e 100644
--- a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.xproj
+++ b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.xproj
@@ -11,9 +11,11 @@
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>
-
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
+ <ItemGroup>
+ <Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
+ </ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs
index 0a299fd7..9c0518a3 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs
@@ -172,7 +172,7 @@ namespace Google.Protobuf.TestProtos {
#region Messages
/// <summary>
- /// Tests maps.
+ /// Tests maps.
/// </summary>
public sealed partial class TestMap : pb::IMessage<TestMap> {
private static readonly pb::MessageParser<TestMap> _parser = new pb::MessageParser<TestMap>(() => new TestMap());
@@ -836,7 +836,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Two map fields share the same entry default instance.
+ /// Two map fields share the same entry default instance.
/// </summary>
public sealed partial class TestSameTypeMap : pb::IMessage<TestSameTypeMap> {
private static readonly pb::MessageParser<TestSameTypeMap> _parser = new pb::MessageParser<TestSameTypeMap>(() => new TestSameTypeMap());
@@ -1357,8 +1357,8 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Previously, message containing enum called Type cannot be used as value of
- /// map field.
+ /// Previously, message containing enum called Type cannot be used as value of
+ /// map field.
/// </summary>
public sealed partial class MessageContainingEnumCalledType : pb::IMessage<MessageContainingEnumCalledType> {
private static readonly pb::MessageParser<MessageContainingEnumCalledType> _parser = new pb::MessageParser<MessageContainingEnumCalledType>(() => new MessageContainingEnumCalledType());
@@ -1481,7 +1481,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Previously, message cannot contain map field called "entry".
+ /// Previously, message cannot contain map field called "entry".
/// </summary>
public sealed partial class MessageContainingMapCalledEntry : pb::IMessage<MessageContainingMapCalledEntry> {
private static readonly pb::MessageParser<MessageContainingMapCalledEntry> _parser = new pb::MessageParser<MessageContainingMapCalledEntry>(() => new MessageContainingMapCalledEntry());
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs
new file mode 100644
index 00000000..fbeb512a
--- /dev/null
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs
@@ -0,0 +1,3688 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/test_messages_proto3.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace ProtobufTestMessages.Proto3 {
+
+ /// <summary>Holder for reflection information generated from google/protobuf/test_messages_proto3.proto</summary>
+ public static partial class TestMessagesProto3Reflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for google/protobuf/test_messages_proto3.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static TestMessagesProto3Reflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Cipnb29nbGUvcHJvdG9idWYvdGVzdF9tZXNzYWdlc19wcm90bzMucHJvdG8S",
+ "HXByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zGhlnb29nbGUvcHJvdG9i",
+ "dWYvYW55LnByb3RvGh5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8a",
+ "IGdvb2dsZS9wcm90b2J1Zi9maWVsZF9tYXNrLnByb3RvGhxnb29nbGUvcHJv",
+ "dG9idWYvc3RydWN0LnByb3RvGh9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1w",
+ "LnByb3RvGh5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8i+DkKDFRl",
+ "c3RBbGxUeXBlcxIWCg5vcHRpb25hbF9pbnQzMhgBIAEoBRIWCg5vcHRpb25h",
+ "bF9pbnQ2NBgCIAEoAxIXCg9vcHRpb25hbF91aW50MzIYAyABKA0SFwoPb3B0",
+ "aW9uYWxfdWludDY0GAQgASgEEhcKD29wdGlvbmFsX3NpbnQzMhgFIAEoERIX",
+ "Cg9vcHRpb25hbF9zaW50NjQYBiABKBISGAoQb3B0aW9uYWxfZml4ZWQzMhgH",
+ "IAEoBxIYChBvcHRpb25hbF9maXhlZDY0GAggASgGEhkKEW9wdGlvbmFsX3Nm",
+ "aXhlZDMyGAkgASgPEhkKEW9wdGlvbmFsX3NmaXhlZDY0GAogASgQEhYKDm9w",
+ "dGlvbmFsX2Zsb2F0GAsgASgCEhcKD29wdGlvbmFsX2RvdWJsZRgMIAEoARIV",
+ "Cg1vcHRpb25hbF9ib29sGA0gASgIEhcKD29wdGlvbmFsX3N0cmluZxgOIAEo",
+ "CRIWCg5vcHRpb25hbF9ieXRlcxgPIAEoDBJaChdvcHRpb25hbF9uZXN0ZWRf",
+ "bWVzc2FnZRgSIAEoCzI5LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8z",
+ "LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlEk8KGG9wdGlvbmFsX2ZvcmVp",
+ "Z25fbWVzc2FnZRgTIAEoCzItLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJv",
+ "dG8zLkZvcmVpZ25NZXNzYWdlElQKFG9wdGlvbmFsX25lc3RlZF9lbnVtGBUg",
+ "ASgOMjYucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5",
+ "cGVzLk5lc3RlZEVudW0SSQoVb3B0aW9uYWxfZm9yZWlnbl9lbnVtGBYgASgO",
+ "MioucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuRm9yZWlnbkVudW0S",
+ "IQoVb3B0aW9uYWxfc3RyaW5nX3BpZWNlGBggASgJQgIIAhIZCg1vcHRpb25h",
+ "bF9jb3JkGBkgASgJQgIIARJGChFyZWN1cnNpdmVfbWVzc2FnZRgbIAEoCzIr",
+ "LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcxIW",
+ "Cg5yZXBlYXRlZF9pbnQzMhgfIAMoBRIWCg5yZXBlYXRlZF9pbnQ2NBggIAMo",
+ "AxIXCg9yZXBlYXRlZF91aW50MzIYISADKA0SFwoPcmVwZWF0ZWRfdWludDY0",
+ "GCIgAygEEhcKD3JlcGVhdGVkX3NpbnQzMhgjIAMoERIXCg9yZXBlYXRlZF9z",
+ "aW50NjQYJCADKBISGAoQcmVwZWF0ZWRfZml4ZWQzMhglIAMoBxIYChByZXBl",
+ "YXRlZF9maXhlZDY0GCYgAygGEhkKEXJlcGVhdGVkX3NmaXhlZDMyGCcgAygP",
+ "EhkKEXJlcGVhdGVkX3NmaXhlZDY0GCggAygQEhYKDnJlcGVhdGVkX2Zsb2F0",
+ "GCkgAygCEhcKD3JlcGVhdGVkX2RvdWJsZRgqIAMoARIVCg1yZXBlYXRlZF9i",
+ "b29sGCsgAygIEhcKD3JlcGVhdGVkX3N0cmluZxgsIAMoCRIWCg5yZXBlYXRl",
+ "ZF9ieXRlcxgtIAMoDBJaChdyZXBlYXRlZF9uZXN0ZWRfbWVzc2FnZRgwIAMo",
+ "CzI5LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBl",
+ "cy5OZXN0ZWRNZXNzYWdlEk8KGHJlcGVhdGVkX2ZvcmVpZ25fbWVzc2FnZRgx",
+ "IAMoCzItLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLkZvcmVpZ25N",
+ "ZXNzYWdlElQKFHJlcGVhdGVkX25lc3RlZF9lbnVtGDMgAygOMjYucHJvdG9i",
+ "dWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk5lc3RlZEVu",
+ "dW0SSQoVcmVwZWF0ZWRfZm9yZWlnbl9lbnVtGDQgAygOMioucHJvdG9idWZf",
+ "dGVzdF9tZXNzYWdlcy5wcm90bzMuRm9yZWlnbkVudW0SIQoVcmVwZWF0ZWRf",
+ "c3RyaW5nX3BpZWNlGDYgAygJQgIIAhIZCg1yZXBlYXRlZF9jb3JkGDcgAygJ",
+ "QgIIARJXCg9tYXBfaW50MzJfaW50MzIYOCADKAsyPi5wcm90b2J1Zl90ZXN0",
+ "X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwSW50MzJJbnQzMkVu",
+ "dHJ5ElcKD21hcF9pbnQ2NF9pbnQ2NBg5IAMoCzI+LnByb3RvYnVmX3Rlc3Rf",
+ "bWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcy5NYXBJbnQ2NEludDY0RW50",
+ "cnkSWwoRbWFwX3VpbnQzMl91aW50MzIYOiADKAsyQC5wcm90b2J1Zl90ZXN0",
+ "X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwVWludDMyVWludDMy",
+ "RW50cnkSWwoRbWFwX3VpbnQ2NF91aW50NjQYOyADKAsyQC5wcm90b2J1Zl90",
+ "ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwVWludDY0VWlu",
+ "dDY0RW50cnkSWwoRbWFwX3NpbnQzMl9zaW50MzIYPCADKAsyQC5wcm90b2J1",
+ "Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwU2ludDMy",
+ "U2ludDMyRW50cnkSWwoRbWFwX3NpbnQ2NF9zaW50NjQYPSADKAsyQC5wcm90",
+ "b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwU2lu",
+ "dDY0U2ludDY0RW50cnkSXwoTbWFwX2ZpeGVkMzJfZml4ZWQzMhg+IAMoCzJC",
+ "LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcy5N",
+ "YXBGaXhlZDMyRml4ZWQzMkVudHJ5El8KE21hcF9maXhlZDY0X2ZpeGVkNjQY",
+ "PyADKAsyQi5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxs",
+ "VHlwZXMuTWFwRml4ZWQ2NEZpeGVkNjRFbnRyeRJjChVtYXBfc2ZpeGVkMzJf",
+ "c2ZpeGVkMzIYQCADKAsyRC5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3Rv",
+ "My5UZXN0QWxsVHlwZXMuTWFwU2ZpeGVkMzJTZml4ZWQzMkVudHJ5EmMKFW1h",
+ "cF9zZml4ZWQ2NF9zZml4ZWQ2NBhBIAMoCzJELnByb3RvYnVmX3Rlc3RfbWVz",
+ "c2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcy5NYXBTZml4ZWQ2NFNmaXhlZDY0",
+ "RW50cnkSVwoPbWFwX2ludDMyX2Zsb2F0GEIgAygLMj4ucHJvdG9idWZfdGVz",
+ "dF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk1hcEludDMyRmxvYXRF",
+ "bnRyeRJZChBtYXBfaW50MzJfZG91YmxlGEMgAygLMj8ucHJvdG9idWZfdGVz",
+ "dF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk1hcEludDMyRG91Ymxl",
+ "RW50cnkSUwoNbWFwX2Jvb2xfYm9vbBhEIAMoCzI8LnByb3RvYnVmX3Rlc3Rf",
+ "bWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcy5NYXBCb29sQm9vbEVudHJ5",
+ "ElsKEW1hcF9zdHJpbmdfc3RyaW5nGEUgAygLMkAucHJvdG9idWZfdGVzdF9t",
+ "ZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk1hcFN0cmluZ1N0cmluZ0Vu",
+ "dHJ5ElkKEG1hcF9zdHJpbmdfYnl0ZXMYRiADKAsyPy5wcm90b2J1Zl90ZXN0",
+ "X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwU3RyaW5nQnl0ZXNF",
+ "bnRyeRJqChltYXBfc3RyaW5nX25lc3RlZF9tZXNzYWdlGEcgAygLMkcucHJv",
+ "dG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk1hcFN0",
+ "cmluZ05lc3RlZE1lc3NhZ2VFbnRyeRJsChptYXBfc3RyaW5nX2ZvcmVpZ25f",
+ "bWVzc2FnZRhIIAMoCzJILnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8z",
+ "LlRlc3RBbGxUeXBlcy5NYXBTdHJpbmdGb3JlaWduTWVzc2FnZUVudHJ5EmQK",
+ "Fm1hcF9zdHJpbmdfbmVzdGVkX2VudW0YSSADKAsyRC5wcm90b2J1Zl90ZXN0",
+ "X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwU3RyaW5nTmVzdGVk",
+ "RW51bUVudHJ5EmYKF21hcF9zdHJpbmdfZm9yZWlnbl9lbnVtGEogAygLMkUu",
+ "cHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk1h",
+ "cFN0cmluZ0ZvcmVpZ25FbnVtRW50cnkSFgoMb25lb2ZfdWludDMyGG8gASgN",
+ "SAASWQoUb25lb2ZfbmVzdGVkX21lc3NhZ2UYcCABKAsyOS5wcm90b2J1Zl90",
+ "ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2Fn",
+ "ZUgAEhYKDG9uZW9mX3N0cmluZxhxIAEoCUgAEhUKC29uZW9mX2J5dGVzGHIg",
+ "ASgMSAASFAoKb25lb2ZfYm9vbBhzIAEoCEgAEhYKDG9uZW9mX3VpbnQ2NBh0",
+ "IAEoBEgAEhUKC29uZW9mX2Zsb2F0GHUgASgCSAASFgoMb25lb2ZfZG91Ymxl",
+ "GHYgASgBSAASTAoKb25lb2ZfZW51bRh3IAEoDjI2LnByb3RvYnVmX3Rlc3Rf",
+ "bWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcy5OZXN0ZWRFbnVtSAASOgoV",
+ "b3B0aW9uYWxfYm9vbF93cmFwcGVyGMkBIAEoCzIaLmdvb2dsZS5wcm90b2J1",
+ "Zi5Cb29sVmFsdWUSPAoWb3B0aW9uYWxfaW50MzJfd3JhcHBlchjKASABKAsy",
+ "Gy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRI8ChZvcHRpb25hbF9pbnQ2",
+ "NF93cmFwcGVyGMsBIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5JbnQ2NFZhbHVl",
+ "Ej4KF29wdGlvbmFsX3VpbnQzMl93cmFwcGVyGMwBIAEoCzIcLmdvb2dsZS5w",
+ "cm90b2J1Zi5VSW50MzJWYWx1ZRI+ChdvcHRpb25hbF91aW50NjRfd3JhcHBl",
+ "chjNASABKAsyHC5nb29nbGUucHJvdG9idWYuVUludDY0VmFsdWUSPAoWb3B0",
+ "aW9uYWxfZmxvYXRfd3JhcHBlchjOASABKAsyGy5nb29nbGUucHJvdG9idWYu",
+ "RmxvYXRWYWx1ZRI+ChdvcHRpb25hbF9kb3VibGVfd3JhcHBlchjPASABKAsy",
+ "HC5nb29nbGUucHJvdG9idWYuRG91YmxlVmFsdWUSPgoXb3B0aW9uYWxfc3Ry",
+ "aW5nX3dyYXBwZXIY0AEgASgLMhwuZ29vZ2xlLnByb3RvYnVmLlN0cmluZ1Zh",
+ "bHVlEjwKFm9wdGlvbmFsX2J5dGVzX3dyYXBwZXIY0QEgASgLMhsuZ29vZ2xl",
+ "LnByb3RvYnVmLkJ5dGVzVmFsdWUSOgoVcmVwZWF0ZWRfYm9vbF93cmFwcGVy",
+ "GNMBIAMoCzIaLmdvb2dsZS5wcm90b2J1Zi5Cb29sVmFsdWUSPAoWcmVwZWF0",
+ "ZWRfaW50MzJfd3JhcHBlchjUASADKAsyGy5nb29nbGUucHJvdG9idWYuSW50",
+ "MzJWYWx1ZRI8ChZyZXBlYXRlZF9pbnQ2NF93cmFwcGVyGNUBIAMoCzIbLmdv",
+ "b2dsZS5wcm90b2J1Zi5JbnQ2NFZhbHVlEj4KF3JlcGVhdGVkX3VpbnQzMl93",
+ "cmFwcGVyGNYBIAMoCzIcLmdvb2dsZS5wcm90b2J1Zi5VSW50MzJWYWx1ZRI+",
+ "ChdyZXBlYXRlZF91aW50NjRfd3JhcHBlchjXASADKAsyHC5nb29nbGUucHJv",
+ "dG9idWYuVUludDY0VmFsdWUSPAoWcmVwZWF0ZWRfZmxvYXRfd3JhcHBlchjY",
+ "ASADKAsyGy5nb29nbGUucHJvdG9idWYuRmxvYXRWYWx1ZRI+ChdyZXBlYXRl",
+ "ZF9kb3VibGVfd3JhcHBlchjZASADKAsyHC5nb29nbGUucHJvdG9idWYuRG91",
+ "YmxlVmFsdWUSPgoXcmVwZWF0ZWRfc3RyaW5nX3dyYXBwZXIY2gEgAygLMhwu",
+ "Z29vZ2xlLnByb3RvYnVmLlN0cmluZ1ZhbHVlEjwKFnJlcGVhdGVkX2J5dGVz",
+ "X3dyYXBwZXIY2wEgAygLMhsuZ29vZ2xlLnByb3RvYnVmLkJ5dGVzVmFsdWUS",
+ "NQoRb3B0aW9uYWxfZHVyYXRpb24YrQIgASgLMhkuZ29vZ2xlLnByb3RvYnVm",
+ "LkR1cmF0aW9uEjcKEm9wdGlvbmFsX3RpbWVzdGFtcBiuAiABKAsyGi5nb29n",
+ "bGUucHJvdG9idWYuVGltZXN0YW1wEjgKE29wdGlvbmFsX2ZpZWxkX21hc2sY",
+ "rwIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzaxIxCg9vcHRpb25h",
+ "bF9zdHJ1Y3QYsAIgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIrCgxv",
+ "cHRpb25hbF9hbnkYsQIgASgLMhQuZ29vZ2xlLnByb3RvYnVmLkFueRIvCg5v",
+ "cHRpb25hbF92YWx1ZRiyAiABKAsyFi5nb29nbGUucHJvdG9idWYuVmFsdWUS",
+ "NQoRcmVwZWF0ZWRfZHVyYXRpb24YtwIgAygLMhkuZ29vZ2xlLnByb3RvYnVm",
+ "LkR1cmF0aW9uEjcKEnJlcGVhdGVkX3RpbWVzdGFtcBi4AiADKAsyGi5nb29n",
+ "bGUucHJvdG9idWYuVGltZXN0YW1wEjcKEnJlcGVhdGVkX2ZpZWxkbWFzaxi5",
+ "AiADKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrEjEKD3JlcGVhdGVk",
+ "X3N0cnVjdBjEAiADKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0EisKDHJl",
+ "cGVhdGVkX2FueRi7AiADKAsyFC5nb29nbGUucHJvdG9idWYuQW55Ei8KDnJl",
+ "cGVhdGVkX3ZhbHVlGLwCIAMoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZRIT",
+ "CgpmaWVsZG5hbWUxGJEDIAEoBRIUCgtmaWVsZF9uYW1lMhiSAyABKAUSFQoM",
+ "X2ZpZWxkX25hbWUzGJMDIAEoBRIWCg1maWVsZF9fbmFtZTRfGJQDIAEoBRIU",
+ "CgtmaWVsZDBuYW1lNRiVAyABKAUSFgoNZmllbGRfMF9uYW1lNhiWAyABKAUS",
+ "EwoKZmllbGROYW1lNxiXAyABKAUSEwoKRmllbGROYW1lOBiYAyABKAUSFAoL",
+ "ZmllbGRfTmFtZTkYmQMgASgFEhUKDEZpZWxkX05hbWUxMBiaAyABKAUSFQoM",
+ "RklFTERfTkFNRTExGJsDIAEoBRIVCgxGSUVMRF9uYW1lMTIYnAMgASgFEhcK",
+ "Dl9fZmllbGRfbmFtZTEzGJ0DIAEoBRIXCg5fX0ZpZWxkX25hbWUxNBieAyAB",
+ "KAUSFgoNZmllbGRfX25hbWUxNRifAyABKAUSFgoNZmllbGRfX05hbWUxNhig",
+ "AyABKAUSFwoOZmllbGRfbmFtZTE3X18YoQMgASgFEhcKDkZpZWxkX25hbWUx",
+ "OF9fGKIDIAEoBRpcCg1OZXN0ZWRNZXNzYWdlEgkKAWEYASABKAUSQAoLY29y",
+ "ZWN1cnNpdmUYAiABKAsyKy5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3Rv",
+ "My5UZXN0QWxsVHlwZXMaNAoSTWFwSW50MzJJbnQzMkVudHJ5EgsKA2tleRgB",
+ "IAEoBRINCgV2YWx1ZRgCIAEoBToCOAEaNAoSTWFwSW50NjRJbnQ2NEVudHJ5",
+ "EgsKA2tleRgBIAEoAxINCgV2YWx1ZRgCIAEoAzoCOAEaNgoUTWFwVWludDMy",
+ "VWludDMyRW50cnkSCwoDa2V5GAEgASgNEg0KBXZhbHVlGAIgASgNOgI4ARo2",
+ "ChRNYXBVaW50NjRVaW50NjRFbnRyeRILCgNrZXkYASABKAQSDQoFdmFsdWUY",
+ "AiABKAQ6AjgBGjYKFE1hcFNpbnQzMlNpbnQzMkVudHJ5EgsKA2tleRgBIAEo",
+ "ERINCgV2YWx1ZRgCIAEoEToCOAEaNgoUTWFwU2ludDY0U2ludDY0RW50cnkS",
+ "CwoDa2V5GAEgASgSEg0KBXZhbHVlGAIgASgSOgI4ARo4ChZNYXBGaXhlZDMy",
+ "Rml4ZWQzMkVudHJ5EgsKA2tleRgBIAEoBxINCgV2YWx1ZRgCIAEoBzoCOAEa",
+ "OAoWTWFwRml4ZWQ2NEZpeGVkNjRFbnRyeRILCgNrZXkYASABKAYSDQoFdmFs",
+ "dWUYAiABKAY6AjgBGjoKGE1hcFNmaXhlZDMyU2ZpeGVkMzJFbnRyeRILCgNr",
+ "ZXkYASABKA8SDQoFdmFsdWUYAiABKA86AjgBGjoKGE1hcFNmaXhlZDY0U2Zp",
+ "eGVkNjRFbnRyeRILCgNrZXkYASABKBASDQoFdmFsdWUYAiABKBA6AjgBGjQK",
+ "Ek1hcEludDMyRmxvYXRFbnRyeRILCgNrZXkYASABKAUSDQoFdmFsdWUYAiAB",
+ "KAI6AjgBGjUKE01hcEludDMyRG91YmxlRW50cnkSCwoDa2V5GAEgASgFEg0K",
+ "BXZhbHVlGAIgASgBOgI4ARoyChBNYXBCb29sQm9vbEVudHJ5EgsKA2tleRgB",
+ "IAEoCBINCgV2YWx1ZRgCIAEoCDoCOAEaNgoUTWFwU3RyaW5nU3RyaW5nRW50",
+ "cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ARo1ChNNYXBTdHJp",
+ "bmdCeXRlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoDDoCOAEa",
+ "eAobTWFwU3RyaW5nTmVzdGVkTWVzc2FnZUVudHJ5EgsKA2tleRgBIAEoCRJI",
+ "CgV2YWx1ZRgCIAEoCzI5LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8z",
+ "LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlOgI4ARptChxNYXBTdHJpbmdG",
+ "b3JlaWduTWVzc2FnZUVudHJ5EgsKA2tleRgBIAEoCRI8CgV2YWx1ZRgCIAEo",
+ "CzItLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLkZvcmVpZ25NZXNz",
+ "YWdlOgI4ARpyChhNYXBTdHJpbmdOZXN0ZWRFbnVtRW50cnkSCwoDa2V5GAEg",
+ "ASgJEkUKBXZhbHVlGAIgASgOMjYucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5w",
+ "cm90bzMuVGVzdEFsbFR5cGVzLk5lc3RlZEVudW06AjgBGmcKGU1hcFN0cmlu",
+ "Z0ZvcmVpZ25FbnVtRW50cnkSCwoDa2V5GAEgASgJEjkKBXZhbHVlGAIgASgO",
+ "MioucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuRm9yZWlnbkVudW06",
+ "AjgBIjkKCk5lc3RlZEVudW0SBwoDRk9PEAASBwoDQkFSEAESBwoDQkFaEAIS",
+ "EAoDTkVHEP///////////wFCDQoLb25lb2ZfZmllbGQiGwoORm9yZWlnbk1l",
+ "c3NhZ2USCQoBYxgBIAEoBSpACgtGb3JlaWduRW51bRIPCgtGT1JFSUdOX0ZP",
+ "TxAAEg8KC0ZPUkVJR05fQkFSEAESDwoLRk9SRUlHTl9CQVoQAkIvCihjb20u",
+ "Z29vZ2xlLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zSAH4AQFiBnBy",
+ "b3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ProtobufTestMessages.Proto3.ForeignEnum), }, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.TestAllTypes), global::ProtobufTestMessages.Proto3.TestAllTypes.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes", "OneofBool", "OneofUint64", "OneofFloat", "OneofDouble", "OneofEnum", "OptionalBoolWrapper", "OptionalInt32Wrapper", "OptionalInt64Wrapper", "OptionalUint32Wrapper", "OptionalUint64Wrapper", "OptionalFloatWrapper", "OptionalDoubleWrapper", "OptionalStringWrapper", "OptionalBytesWrapper", "RepeatedBoolWrapper", "RepeatedInt32Wrapper", "RepeatedInt64Wrapper", "RepeatedUint32Wrapper", "RepeatedUint64Wrapper", "RepeatedFloatWrapper", "RepeatedDoubleWrapper", "RepeatedStringWrapper", "RepeatedBytesWrapper", "OptionalDuration", "OptionalTimestamp", "OptionalFieldMask", "OptionalStruct", "OptionalAny", "OptionalValue", "RepeatedDuration", "RepeatedTimestamp", "RepeatedFieldmask", "RepeatedStruct", "RepeatedAny", "RepeatedValue", "Fieldname1", "FieldName2", "FieldName3", "FieldName4", "Field0Name5", "Field0Name6", "FieldName7", "FieldName8", "FieldName9", "FieldName10", "FIELDNAME11", "FIELDName12", "FieldName13", "FieldName14", "FieldName15", "FieldName16", "FieldName17", "FieldName18" }, new[]{ "OneofField" }, new[]{ typeof(global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage), global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage.Parser, new[]{ "A", "Corecursive" }, null, null, null),
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }),
+ new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.ForeignMessage), global::ProtobufTestMessages.Proto3.ForeignMessage.Parser, new[]{ "C" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum ForeignEnum {
+ [pbr::OriginalName("FOREIGN_FOO")] ForeignFoo = 0,
+ [pbr::OriginalName("FOREIGN_BAR")] ForeignBar = 1,
+ [pbr::OriginalName("FOREIGN_BAZ")] ForeignBaz = 2,
+ }
+
+ #endregion
+
+ #region Messages
+ /// <summary>
+ /// This proto includes every type of field in both singular and repeated
+ /// forms.
+ ///
+ /// Also, crucially, all messages and enums in this file are eventually
+ /// submessages of this message. So for example, a fuzz test of TestAllTypes
+ /// could trigger bugs that occur in any message type in this file. We verify
+ /// this stays true in a unit test.
+ /// </summary>
+ public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes> {
+ private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::MessageParser<TestAllTypes>(() => new TestAllTypes());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestAllTypes> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::ProtobufTestMessages.Proto3.TestMessagesProto3Reflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestAllTypes() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestAllTypes(TestAllTypes other) : this() {
+ optionalInt32_ = other.optionalInt32_;
+ optionalInt64_ = other.optionalInt64_;
+ optionalUint32_ = other.optionalUint32_;
+ optionalUint64_ = other.optionalUint64_;
+ optionalSint32_ = other.optionalSint32_;
+ optionalSint64_ = other.optionalSint64_;
+ optionalFixed32_ = other.optionalFixed32_;
+ optionalFixed64_ = other.optionalFixed64_;
+ optionalSfixed32_ = other.optionalSfixed32_;
+ optionalSfixed64_ = other.optionalSfixed64_;
+ optionalFloat_ = other.optionalFloat_;
+ optionalDouble_ = other.optionalDouble_;
+ optionalBool_ = other.optionalBool_;
+ optionalString_ = other.optionalString_;
+ optionalBytes_ = other.optionalBytes_;
+ OptionalNestedMessage = other.optionalNestedMessage_ != null ? other.OptionalNestedMessage.Clone() : null;
+ OptionalForeignMessage = other.optionalForeignMessage_ != null ? other.OptionalForeignMessage.Clone() : null;
+ optionalNestedEnum_ = other.optionalNestedEnum_;
+ optionalForeignEnum_ = other.optionalForeignEnum_;
+ optionalStringPiece_ = other.optionalStringPiece_;
+ optionalCord_ = other.optionalCord_;
+ RecursiveMessage = other.recursiveMessage_ != null ? other.RecursiveMessage.Clone() : null;
+ repeatedInt32_ = other.repeatedInt32_.Clone();
+ repeatedInt64_ = other.repeatedInt64_.Clone();
+ repeatedUint32_ = other.repeatedUint32_.Clone();
+ repeatedUint64_ = other.repeatedUint64_.Clone();
+ repeatedSint32_ = other.repeatedSint32_.Clone();
+ repeatedSint64_ = other.repeatedSint64_.Clone();
+ repeatedFixed32_ = other.repeatedFixed32_.Clone();
+ repeatedFixed64_ = other.repeatedFixed64_.Clone();
+ repeatedSfixed32_ = other.repeatedSfixed32_.Clone();
+ repeatedSfixed64_ = other.repeatedSfixed64_.Clone();
+ repeatedFloat_ = other.repeatedFloat_.Clone();
+ repeatedDouble_ = other.repeatedDouble_.Clone();
+ repeatedBool_ = other.repeatedBool_.Clone();
+ repeatedString_ = other.repeatedString_.Clone();
+ repeatedBytes_ = other.repeatedBytes_.Clone();
+ repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone();
+ repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone();
+ repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone();
+ repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone();
+ repeatedStringPiece_ = other.repeatedStringPiece_.Clone();
+ repeatedCord_ = other.repeatedCord_.Clone();
+ mapInt32Int32_ = other.mapInt32Int32_.Clone();
+ mapInt64Int64_ = other.mapInt64Int64_.Clone();
+ mapUint32Uint32_ = other.mapUint32Uint32_.Clone();
+ mapUint64Uint64_ = other.mapUint64Uint64_.Clone();
+ mapSint32Sint32_ = other.mapSint32Sint32_.Clone();
+ mapSint64Sint64_ = other.mapSint64Sint64_.Clone();
+ mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone();
+ mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone();
+ mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone();
+ mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone();
+ mapInt32Float_ = other.mapInt32Float_.Clone();
+ mapInt32Double_ = other.mapInt32Double_.Clone();
+ mapBoolBool_ = other.mapBoolBool_.Clone();
+ mapStringString_ = other.mapStringString_.Clone();
+ mapStringBytes_ = other.mapStringBytes_.Clone();
+ mapStringNestedMessage_ = other.mapStringNestedMessage_.Clone();
+ mapStringForeignMessage_ = other.mapStringForeignMessage_.Clone();
+ mapStringNestedEnum_ = other.mapStringNestedEnum_.Clone();
+ mapStringForeignEnum_ = other.mapStringForeignEnum_.Clone();
+ OptionalBoolWrapper = other.OptionalBoolWrapper;
+ OptionalInt32Wrapper = other.OptionalInt32Wrapper;
+ OptionalInt64Wrapper = other.OptionalInt64Wrapper;
+ OptionalUint32Wrapper = other.OptionalUint32Wrapper;
+ OptionalUint64Wrapper = other.OptionalUint64Wrapper;
+ OptionalFloatWrapper = other.OptionalFloatWrapper;
+ OptionalDoubleWrapper = other.OptionalDoubleWrapper;
+ OptionalStringWrapper = other.OptionalStringWrapper;
+ OptionalBytesWrapper = other.OptionalBytesWrapper;
+ repeatedBoolWrapper_ = other.repeatedBoolWrapper_.Clone();
+ repeatedInt32Wrapper_ = other.repeatedInt32Wrapper_.Clone();
+ repeatedInt64Wrapper_ = other.repeatedInt64Wrapper_.Clone();
+ repeatedUint32Wrapper_ = other.repeatedUint32Wrapper_.Clone();
+ repeatedUint64Wrapper_ = other.repeatedUint64Wrapper_.Clone();
+ repeatedFloatWrapper_ = other.repeatedFloatWrapper_.Clone();
+ repeatedDoubleWrapper_ = other.repeatedDoubleWrapper_.Clone();
+ repeatedStringWrapper_ = other.repeatedStringWrapper_.Clone();
+ repeatedBytesWrapper_ = other.repeatedBytesWrapper_.Clone();
+ OptionalDuration = other.optionalDuration_ != null ? other.OptionalDuration.Clone() : null;
+ OptionalTimestamp = other.optionalTimestamp_ != null ? other.OptionalTimestamp.Clone() : null;
+ OptionalFieldMask = other.optionalFieldMask_ != null ? other.OptionalFieldMask.Clone() : null;
+ OptionalStruct = other.optionalStruct_ != null ? other.OptionalStruct.Clone() : null;
+ OptionalAny = other.optionalAny_ != null ? other.OptionalAny.Clone() : null;
+ OptionalValue = other.optionalValue_ != null ? other.OptionalValue.Clone() : null;
+ repeatedDuration_ = other.repeatedDuration_.Clone();
+ repeatedTimestamp_ = other.repeatedTimestamp_.Clone();
+ repeatedFieldmask_ = other.repeatedFieldmask_.Clone();
+ repeatedStruct_ = other.repeatedStruct_.Clone();
+ repeatedAny_ = other.repeatedAny_.Clone();
+ repeatedValue_ = other.repeatedValue_.Clone();
+ fieldname1_ = other.fieldname1_;
+ fieldName2_ = other.fieldName2_;
+ FieldName3_ = other.FieldName3_;
+ fieldName4_ = other.fieldName4_;
+ field0Name5_ = other.field0Name5_;
+ field0Name6_ = other.field0Name6_;
+ fieldName7_ = other.fieldName7_;
+ fieldName8_ = other.fieldName8_;
+ fieldName9_ = other.fieldName9_;
+ fieldName10_ = other.fieldName10_;
+ fIELDNAME11_ = other.fIELDNAME11_;
+ fIELDName12_ = other.fIELDName12_;
+ FieldName13_ = other.FieldName13_;
+ FieldName14_ = other.FieldName14_;
+ fieldName15_ = other.fieldName15_;
+ fieldName16_ = other.fieldName16_;
+ fieldName17_ = other.fieldName17_;
+ fieldName18_ = other.fieldName18_;
+ switch (other.OneofFieldCase) {
+ case OneofFieldOneofCase.OneofUint32:
+ OneofUint32 = other.OneofUint32;
+ break;
+ case OneofFieldOneofCase.OneofNestedMessage:
+ OneofNestedMessage = other.OneofNestedMessage.Clone();
+ break;
+ case OneofFieldOneofCase.OneofString:
+ OneofString = other.OneofString;
+ break;
+ case OneofFieldOneofCase.OneofBytes:
+ OneofBytes = other.OneofBytes;
+ break;
+ case OneofFieldOneofCase.OneofBool:
+ OneofBool = other.OneofBool;
+ break;
+ case OneofFieldOneofCase.OneofUint64:
+ OneofUint64 = other.OneofUint64;
+ break;
+ case OneofFieldOneofCase.OneofFloat:
+ OneofFloat = other.OneofFloat;
+ break;
+ case OneofFieldOneofCase.OneofDouble:
+ OneofDouble = other.OneofDouble;
+ break;
+ case OneofFieldOneofCase.OneofEnum:
+ OneofEnum = other.OneofEnum;
+ break;
+ }
+
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestAllTypes Clone() {
+ return new TestAllTypes(this);
+ }
+
+ /// <summary>Field number for the "optional_int32" field.</summary>
+ public const int OptionalInt32FieldNumber = 1;
+ private int optionalInt32_;
+ /// <summary>
+ /// Singular
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OptionalInt32 {
+ get { return optionalInt32_; }
+ set {
+ optionalInt32_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_int64" field.</summary>
+ public const int OptionalInt64FieldNumber = 2;
+ private long optionalInt64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long OptionalInt64 {
+ get { return optionalInt64_; }
+ set {
+ optionalInt64_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_uint32" field.</summary>
+ public const int OptionalUint32FieldNumber = 3;
+ private uint optionalUint32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint OptionalUint32 {
+ get { return optionalUint32_; }
+ set {
+ optionalUint32_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_uint64" field.</summary>
+ public const int OptionalUint64FieldNumber = 4;
+ private ulong optionalUint64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ulong OptionalUint64 {
+ get { return optionalUint64_; }
+ set {
+ optionalUint64_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_sint32" field.</summary>
+ public const int OptionalSint32FieldNumber = 5;
+ private int optionalSint32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OptionalSint32 {
+ get { return optionalSint32_; }
+ set {
+ optionalSint32_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_sint64" field.</summary>
+ public const int OptionalSint64FieldNumber = 6;
+ private long optionalSint64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long OptionalSint64 {
+ get { return optionalSint64_; }
+ set {
+ optionalSint64_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_fixed32" field.</summary>
+ public const int OptionalFixed32FieldNumber = 7;
+ private uint optionalFixed32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint OptionalFixed32 {
+ get { return optionalFixed32_; }
+ set {
+ optionalFixed32_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_fixed64" field.</summary>
+ public const int OptionalFixed64FieldNumber = 8;
+ private ulong optionalFixed64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ulong OptionalFixed64 {
+ get { return optionalFixed64_; }
+ set {
+ optionalFixed64_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_sfixed32" field.</summary>
+ public const int OptionalSfixed32FieldNumber = 9;
+ private int optionalSfixed32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OptionalSfixed32 {
+ get { return optionalSfixed32_; }
+ set {
+ optionalSfixed32_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_sfixed64" field.</summary>
+ public const int OptionalSfixed64FieldNumber = 10;
+ private long optionalSfixed64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long OptionalSfixed64 {
+ get { return optionalSfixed64_; }
+ set {
+ optionalSfixed64_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_float" field.</summary>
+ public const int OptionalFloatFieldNumber = 11;
+ private float optionalFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float OptionalFloat {
+ get { return optionalFloat_; }
+ set {
+ optionalFloat_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_double" field.</summary>
+ public const int OptionalDoubleFieldNumber = 12;
+ private double optionalDouble_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double OptionalDouble {
+ get { return optionalDouble_; }
+ set {
+ optionalDouble_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_bool" field.</summary>
+ public const int OptionalBoolFieldNumber = 13;
+ private bool optionalBool_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool OptionalBool {
+ get { return optionalBool_; }
+ set {
+ optionalBool_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_string" field.</summary>
+ public const int OptionalStringFieldNumber = 14;
+ private string optionalString_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OptionalString {
+ get { return optionalString_; }
+ set {
+ optionalString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "optional_bytes" field.</summary>
+ public const int OptionalBytesFieldNumber = 15;
+ private pb::ByteString optionalBytes_ = pb::ByteString.Empty;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString OptionalBytes {
+ get { return optionalBytes_; }
+ set {
+ optionalBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "optional_nested_message" field.</summary>
+ public const int OptionalNestedMessageFieldNumber = 18;
+ private global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage optionalNestedMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage OptionalNestedMessage {
+ get { return optionalNestedMessage_; }
+ set {
+ optionalNestedMessage_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_foreign_message" field.</summary>
+ public const int OptionalForeignMessageFieldNumber = 19;
+ private global::ProtobufTestMessages.Proto3.ForeignMessage optionalForeignMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::ProtobufTestMessages.Proto3.ForeignMessage OptionalForeignMessage {
+ get { return optionalForeignMessage_; }
+ set {
+ optionalForeignMessage_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_nested_enum" field.</summary>
+ public const int OptionalNestedEnumFieldNumber = 21;
+ private global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum optionalNestedEnum_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum OptionalNestedEnum {
+ get { return optionalNestedEnum_; }
+ set {
+ optionalNestedEnum_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_foreign_enum" field.</summary>
+ public const int OptionalForeignEnumFieldNumber = 22;
+ private global::ProtobufTestMessages.Proto3.ForeignEnum optionalForeignEnum_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::ProtobufTestMessages.Proto3.ForeignEnum OptionalForeignEnum {
+ get { return optionalForeignEnum_; }
+ set {
+ optionalForeignEnum_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_string_piece" field.</summary>
+ public const int OptionalStringPieceFieldNumber = 24;
+ private string optionalStringPiece_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OptionalStringPiece {
+ get { return optionalStringPiece_; }
+ set {
+ optionalStringPiece_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "optional_cord" field.</summary>
+ public const int OptionalCordFieldNumber = 25;
+ private string optionalCord_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OptionalCord {
+ get { return optionalCord_; }
+ set {
+ optionalCord_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "recursive_message" field.</summary>
+ public const int RecursiveMessageFieldNumber = 27;
+ private global::ProtobufTestMessages.Proto3.TestAllTypes recursiveMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::ProtobufTestMessages.Proto3.TestAllTypes RecursiveMessage {
+ get { return recursiveMessage_; }
+ set {
+ recursiveMessage_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "repeated_int32" field.</summary>
+ public const int RepeatedInt32FieldNumber = 31;
+ private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
+ = pb::FieldCodec.ForInt32(250);
+ private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
+ /// <summary>
+ /// Repeated
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> RepeatedInt32 {
+ get { return repeatedInt32_; }
+ }
+
+ /// <summary>Field number for the "repeated_int64" field.</summary>
+ public const int RepeatedInt64FieldNumber = 32;
+ private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
+ = pb::FieldCodec.ForInt64(258);
+ private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> RepeatedInt64 {
+ get { return repeatedInt64_; }
+ }
+
+ /// <summary>Field number for the "repeated_uint32" field.</summary>
+ public const int RepeatedUint32FieldNumber = 33;
+ private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
+ = pb::FieldCodec.ForUInt32(266);
+ private readonly pbc::RepeatedField<uint> repeatedUint32_ = new pbc::RepeatedField<uint>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<uint> RepeatedUint32 {
+ get { return repeatedUint32_; }
+ }
+
+ /// <summary>Field number for the "repeated_uint64" field.</summary>
+ public const int RepeatedUint64FieldNumber = 34;
+ private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
+ = pb::FieldCodec.ForUInt64(274);
+ private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong> RepeatedUint64 {
+ get { return repeatedUint64_; }
+ }
+
+ /// <summary>Field number for the "repeated_sint32" field.</summary>
+ public const int RepeatedSint32FieldNumber = 35;
+ private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
+ = pb::FieldCodec.ForSInt32(282);
+ private readonly pbc::RepeatedField<int> repeatedSint32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> RepeatedSint32 {
+ get { return repeatedSint32_; }
+ }
+
+ /// <summary>Field number for the "repeated_sint64" field.</summary>
+ public const int RepeatedSint64FieldNumber = 36;
+ private static readonly pb::FieldCodec<long> _repeated_repeatedSint64_codec
+ = pb::FieldCodec.ForSInt64(290);
+ private readonly pbc::RepeatedField<long> repeatedSint64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> RepeatedSint64 {
+ get { return repeatedSint64_; }
+ }
+
+ /// <summary>Field number for the "repeated_fixed32" field.</summary>
+ public const int RepeatedFixed32FieldNumber = 37;
+ private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
+ = pb::FieldCodec.ForFixed32(298);
+ private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<uint> RepeatedFixed32 {
+ get { return repeatedFixed32_; }
+ }
+
+ /// <summary>Field number for the "repeated_fixed64" field.</summary>
+ public const int RepeatedFixed64FieldNumber = 38;
+ private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
+ = pb::FieldCodec.ForFixed64(306);
+ private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong> RepeatedFixed64 {
+ get { return repeatedFixed64_; }
+ }
+
+ /// <summary>Field number for the "repeated_sfixed32" field.</summary>
+ public const int RepeatedSfixed32FieldNumber = 39;
+ private static readonly pb::FieldCodec<int> _repeated_repeatedSfixed32_codec
+ = pb::FieldCodec.ForSFixed32(314);
+ private readonly pbc::RepeatedField<int> repeatedSfixed32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> RepeatedSfixed32 {
+ get { return repeatedSfixed32_; }
+ }
+
+ /// <summary>Field number for the "repeated_sfixed64" field.</summary>
+ public const int RepeatedSfixed64FieldNumber = 40;
+ private static readonly pb::FieldCodec<long> _repeated_repeatedSfixed64_codec
+ = pb::FieldCodec.ForSFixed64(322);
+ private readonly pbc::RepeatedField<long> repeatedSfixed64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> RepeatedSfixed64 {
+ get { return repeatedSfixed64_; }
+ }
+
+ /// <summary>Field number for the "repeated_float" field.</summary>
+ public const int RepeatedFloatFieldNumber = 41;
+ private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
+ = pb::FieldCodec.ForFloat(330);
+ private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<float> RepeatedFloat {
+ get { return repeatedFloat_; }
+ }
+
+ /// <summary>Field number for the "repeated_double" field.</summary>
+ public const int RepeatedDoubleFieldNumber = 42;
+ private static readonly pb::FieldCodec<double> _repeated_repeatedDouble_codec
+ = pb::FieldCodec.ForDouble(338);
+ private readonly pbc::RepeatedField<double> repeatedDouble_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> RepeatedDouble {
+ get { return repeatedDouble_; }
+ }
+
+ /// <summary>Field number for the "repeated_bool" field.</summary>
+ public const int RepeatedBoolFieldNumber = 43;
+ private static readonly pb::FieldCodec<bool> _repeated_repeatedBool_codec
+ = pb::FieldCodec.ForBool(346);
+ private readonly pbc::RepeatedField<bool> repeatedBool_ = new pbc::RepeatedField<bool>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<bool> RepeatedBool {
+ get { return repeatedBool_; }
+ }
+
+ /// <summary>Field number for the "repeated_string" field.</summary>
+ public const int RepeatedStringFieldNumber = 44;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedString_codec
+ = pb::FieldCodec.ForString(354);
+ private readonly pbc::RepeatedField<string> repeatedString_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedString {
+ get { return repeatedString_; }
+ }
+
+ /// <summary>Field number for the "repeated_bytes" field.</summary>
+ public const int RepeatedBytesFieldNumber = 45;
+ private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytes_codec
+ = pb::FieldCodec.ForBytes(362);
+ private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc::RepeatedField<pb::ByteString>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<pb::ByteString> RepeatedBytes {
+ get { return repeatedBytes_; }
+ }
+
+ /// <summary>Field number for the "repeated_nested_message" field.</summary>
+ public const int RepeatedNestedMessageFieldNumber = 48;
+ private static readonly pb::FieldCodec<global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage> _repeated_repeatedNestedMessage_codec
+ = pb::FieldCodec.ForMessage(386, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage.Parser);
+ private readonly pbc::RepeatedField<global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::RepeatedField<global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage> RepeatedNestedMessage {
+ get { return repeatedNestedMessage_; }
+ }
+
+ /// <summary>Field number for the "repeated_foreign_message" field.</summary>
+ public const int RepeatedForeignMessageFieldNumber = 49;
+ private static readonly pb::FieldCodec<global::ProtobufTestMessages.Proto3.ForeignMessage> _repeated_repeatedForeignMessage_codec
+ = pb::FieldCodec.ForMessage(394, global::ProtobufTestMessages.Proto3.ForeignMessage.Parser);
+ private readonly pbc::RepeatedField<global::ProtobufTestMessages.Proto3.ForeignMessage> repeatedForeignMessage_ = new pbc::RepeatedField<global::ProtobufTestMessages.Proto3.ForeignMessage>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::ProtobufTestMessages.Proto3.ForeignMessage> RepeatedForeignMessage {
+ get { return repeatedForeignMessage_; }
+ }
+
+ /// <summary>Field number for the "repeated_nested_enum" field.</summary>
+ public const int RepeatedNestedEnumFieldNumber = 51;
+ private static readonly pb::FieldCodec<global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum> _repeated_repeatedNestedEnum_codec
+ = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum) x);
+ private readonly pbc::RepeatedField<global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::RepeatedField<global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum> RepeatedNestedEnum {
+ get { return repeatedNestedEnum_; }
+ }
+
+ /// <summary>Field number for the "repeated_foreign_enum" field.</summary>
+ public const int RepeatedForeignEnumFieldNumber = 52;
+ private static readonly pb::FieldCodec<global::ProtobufTestMessages.Proto3.ForeignEnum> _repeated_repeatedForeignEnum_codec
+ = pb::FieldCodec.ForEnum(418, x => (int) x, x => (global::ProtobufTestMessages.Proto3.ForeignEnum) x);
+ private readonly pbc::RepeatedField<global::ProtobufTestMessages.Proto3.ForeignEnum> repeatedForeignEnum_ = new pbc::RepeatedField<global::ProtobufTestMessages.Proto3.ForeignEnum>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::ProtobufTestMessages.Proto3.ForeignEnum> RepeatedForeignEnum {
+ get { return repeatedForeignEnum_; }
+ }
+
+ /// <summary>Field number for the "repeated_string_piece" field.</summary>
+ public const int RepeatedStringPieceFieldNumber = 54;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedStringPiece_codec
+ = pb::FieldCodec.ForString(434);
+ private readonly pbc::RepeatedField<string> repeatedStringPiece_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedStringPiece {
+ get { return repeatedStringPiece_; }
+ }
+
+ /// <summary>Field number for the "repeated_cord" field.</summary>
+ public const int RepeatedCordFieldNumber = 55;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedCord_codec
+ = pb::FieldCodec.ForString(442);
+ private readonly pbc::RepeatedField<string> repeatedCord_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedCord {
+ get { return repeatedCord_; }
+ }
+
+ /// <summary>Field number for the "map_int32_int32" field.</summary>
+ public const int MapInt32Int32FieldNumber = 56;
+ private static readonly pbc::MapField<int, int>.Codec _map_mapInt32Int32_codec
+ = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 450);
+ private readonly pbc::MapField<int, int> mapInt32Int32_ = new pbc::MapField<int, int>();
+ /// <summary>
+ /// Map
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<int, int> MapInt32Int32 {
+ get { return mapInt32Int32_; }
+ }
+
+ /// <summary>Field number for the "map_int64_int64" field.</summary>
+ public const int MapInt64Int64FieldNumber = 57;
+ private static readonly pbc::MapField<long, long>.Codec _map_mapInt64Int64_codec
+ = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForInt64(8), pb::FieldCodec.ForInt64(16), 458);
+ private readonly pbc::MapField<long, long> mapInt64Int64_ = new pbc::MapField<long, long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<long, long> MapInt64Int64 {
+ get { return mapInt64Int64_; }
+ }
+
+ /// <summary>Field number for the "map_uint32_uint32" field.</summary>
+ public const int MapUint32Uint32FieldNumber = 58;
+ private static readonly pbc::MapField<uint, uint>.Codec _map_mapUint32Uint32_codec
+ = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8), pb::FieldCodec.ForUInt32(16), 466);
+ private readonly pbc::MapField<uint, uint> mapUint32Uint32_ = new pbc::MapField<uint, uint>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<uint, uint> MapUint32Uint32 {
+ get { return mapUint32Uint32_; }
+ }
+
+ /// <summary>Field number for the "map_uint64_uint64" field.</summary>
+ public const int MapUint64Uint64FieldNumber = 59;
+ private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapUint64Uint64_codec
+ = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForUInt64(8), pb::FieldCodec.ForUInt64(16), 474);
+ private readonly pbc::MapField<ulong, ulong> mapUint64Uint64_ = new pbc::MapField<ulong, ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<ulong, ulong> MapUint64Uint64 {
+ get { return mapUint64Uint64_; }
+ }
+
+ /// <summary>Field number for the "map_sint32_sint32" field.</summary>
+ public const int MapSint32Sint32FieldNumber = 60;
+ private static readonly pbc::MapField<int, int>.Codec _map_mapSint32Sint32_codec
+ = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSInt32(8), pb::FieldCodec.ForSInt32(16), 482);
+ private readonly pbc::MapField<int, int> mapSint32Sint32_ = new pbc::MapField<int, int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<int, int> MapSint32Sint32 {
+ get { return mapSint32Sint32_; }
+ }
+
+ /// <summary>Field number for the "map_sint64_sint64" field.</summary>
+ public const int MapSint64Sint64FieldNumber = 61;
+ private static readonly pbc::MapField<long, long>.Codec _map_mapSint64Sint64_codec
+ = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSInt64(8), pb::FieldCodec.ForSInt64(16), 490);
+ private readonly pbc::MapField<long, long> mapSint64Sint64_ = new pbc::MapField<long, long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<long, long> MapSint64Sint64 {
+ get { return mapSint64Sint64_; }
+ }
+
+ /// <summary>Field number for the "map_fixed32_fixed32" field.</summary>
+ public const int MapFixed32Fixed32FieldNumber = 62;
+ private static readonly pbc::MapField<uint, uint>.Codec _map_mapFixed32Fixed32_codec
+ = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForFixed32(13), pb::FieldCodec.ForFixed32(21), 498);
+ private readonly pbc::MapField<uint, uint> mapFixed32Fixed32_ = new pbc::MapField<uint, uint>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<uint, uint> MapFixed32Fixed32 {
+ get { return mapFixed32Fixed32_; }
+ }
+
+ /// <summary>Field number for the "map_fixed64_fixed64" field.</summary>
+ public const int MapFixed64Fixed64FieldNumber = 63;
+ private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapFixed64Fixed64_codec
+ = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForFixed64(9), pb::FieldCodec.ForFixed64(17), 506);
+ private readonly pbc::MapField<ulong, ulong> mapFixed64Fixed64_ = new pbc::MapField<ulong, ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<ulong, ulong> MapFixed64Fixed64 {
+ get { return mapFixed64Fixed64_; }
+ }
+
+ /// <summary>Field number for the "map_sfixed32_sfixed32" field.</summary>
+ public const int MapSfixed32Sfixed32FieldNumber = 64;
+ private static readonly pbc::MapField<int, int>.Codec _map_mapSfixed32Sfixed32_codec
+ = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSFixed32(13), pb::FieldCodec.ForSFixed32(21), 514);
+ private readonly pbc::MapField<int, int> mapSfixed32Sfixed32_ = new pbc::MapField<int, int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<int, int> MapSfixed32Sfixed32 {
+ get { return mapSfixed32Sfixed32_; }
+ }
+
+ /// <summary>Field number for the "map_sfixed64_sfixed64" field.</summary>
+ public const int MapSfixed64Sfixed64FieldNumber = 65;
+ private static readonly pbc::MapField<long, long>.Codec _map_mapSfixed64Sfixed64_codec
+ = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSFixed64(9), pb::FieldCodec.ForSFixed64(17), 522);
+ private readonly pbc::MapField<long, long> mapSfixed64Sfixed64_ = new pbc::MapField<long, long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<long, long> MapSfixed64Sfixed64 {
+ get { return mapSfixed64Sfixed64_; }
+ }
+
+ /// <summary>Field number for the "map_int32_float" field.</summary>
+ public const int MapInt32FloatFieldNumber = 66;
+ private static readonly pbc::MapField<int, float>.Codec _map_mapInt32Float_codec
+ = new pbc::MapField<int, float>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForFloat(21), 530);
+ private readonly pbc::MapField<int, float> mapInt32Float_ = new pbc::MapField<int, float>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<int, float> MapInt32Float {
+ get { return mapInt32Float_; }
+ }
+
+ /// <summary>Field number for the "map_int32_double" field.</summary>
+ public const int MapInt32DoubleFieldNumber = 67;
+ private static readonly pbc::MapField<int, double>.Codec _map_mapInt32Double_codec
+ = new pbc::MapField<int, double>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForDouble(17), 538);
+ private readonly pbc::MapField<int, double> mapInt32Double_ = new pbc::MapField<int, double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<int, double> MapInt32Double {
+ get { return mapInt32Double_; }
+ }
+
+ /// <summary>Field number for the "map_bool_bool" field.</summary>
+ public const int MapBoolBoolFieldNumber = 68;
+ private static readonly pbc::MapField<bool, bool>.Codec _map_mapBoolBool_codec
+ = new pbc::MapField<bool, bool>.Codec(pb::FieldCodec.ForBool(8), pb::FieldCodec.ForBool(16), 546);
+ private readonly pbc::MapField<bool, bool> mapBoolBool_ = new pbc::MapField<bool, bool>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<bool, bool> MapBoolBool {
+ get { return mapBoolBool_; }
+ }
+
+ /// <summary>Field number for the "map_string_string" field.</summary>
+ public const int MapStringStringFieldNumber = 69;
+ private static readonly pbc::MapField<string, string>.Codec _map_mapStringString_codec
+ = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 554);
+ private readonly pbc::MapField<string, string> mapStringString_ = new pbc::MapField<string, string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<string, string> MapStringString {
+ get { return mapStringString_; }
+ }
+
+ /// <summary>Field number for the "map_string_bytes" field.</summary>
+ public const int MapStringBytesFieldNumber = 70;
+ private static readonly pbc::MapField<string, pb::ByteString>.Codec _map_mapStringBytes_codec
+ = new pbc::MapField<string, pb::ByteString>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForBytes(18), 562);
+ private readonly pbc::MapField<string, pb::ByteString> mapStringBytes_ = new pbc::MapField<string, pb::ByteString>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<string, pb::ByteString> MapStringBytes {
+ get { return mapStringBytes_; }
+ }
+
+ /// <summary>Field number for the "map_string_nested_message" field.</summary>
+ public const int MapStringNestedMessageFieldNumber = 71;
+ private static readonly pbc::MapField<string, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage>.Codec _map_mapStringNestedMessage_codec
+ = new pbc::MapField<string, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage.Parser), 570);
+ private readonly pbc::MapField<string, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage> mapStringNestedMessage_ = new pbc::MapField<string, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<string, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage> MapStringNestedMessage {
+ get { return mapStringNestedMessage_; }
+ }
+
+ /// <summary>Field number for the "map_string_foreign_message" field.</summary>
+ public const int MapStringForeignMessageFieldNumber = 72;
+ private static readonly pbc::MapField<string, global::ProtobufTestMessages.Proto3.ForeignMessage>.Codec _map_mapStringForeignMessage_codec
+ = new pbc::MapField<string, global::ProtobufTestMessages.Proto3.ForeignMessage>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::ProtobufTestMessages.Proto3.ForeignMessage.Parser), 578);
+ private readonly pbc::MapField<string, global::ProtobufTestMessages.Proto3.ForeignMessage> mapStringForeignMessage_ = new pbc::MapField<string, global::ProtobufTestMessages.Proto3.ForeignMessage>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<string, global::ProtobufTestMessages.Proto3.ForeignMessage> MapStringForeignMessage {
+ get { return mapStringForeignMessage_; }
+ }
+
+ /// <summary>Field number for the "map_string_nested_enum" field.</summary>
+ public const int MapStringNestedEnumFieldNumber = 73;
+ private static readonly pbc::MapField<string, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum>.Codec _map_mapStringNestedEnum_codec
+ = new pbc::MapField<string, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum) x), 586);
+ private readonly pbc::MapField<string, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum> mapStringNestedEnum_ = new pbc::MapField<string, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<string, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum> MapStringNestedEnum {
+ get { return mapStringNestedEnum_; }
+ }
+
+ /// <summary>Field number for the "map_string_foreign_enum" field.</summary>
+ public const int MapStringForeignEnumFieldNumber = 74;
+ private static readonly pbc::MapField<string, global::ProtobufTestMessages.Proto3.ForeignEnum>.Codec _map_mapStringForeignEnum_codec
+ = new pbc::MapField<string, global::ProtobufTestMessages.Proto3.ForeignEnum>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::ProtobufTestMessages.Proto3.ForeignEnum) x), 594);
+ private readonly pbc::MapField<string, global::ProtobufTestMessages.Proto3.ForeignEnum> mapStringForeignEnum_ = new pbc::MapField<string, global::ProtobufTestMessages.Proto3.ForeignEnum>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<string, global::ProtobufTestMessages.Proto3.ForeignEnum> MapStringForeignEnum {
+ get { return mapStringForeignEnum_; }
+ }
+
+ /// <summary>Field number for the "oneof_uint32" field.</summary>
+ public const int OneofUint32FieldNumber = 111;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint OneofUint32 {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32 ? (uint) oneofField_ : 0; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = OneofFieldOneofCase.OneofUint32;
+ }
+ }
+
+ /// <summary>Field number for the "oneof_nested_message" field.</summary>
+ public const int OneofNestedMessageFieldNumber = 112;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage OneofNestedMessage {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage) oneofField_ : null; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage;
+ }
+ }
+
+ /// <summary>Field number for the "oneof_string" field.</summary>
+ public const int OneofStringFieldNumber = 113;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OneofString {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string) oneofField_ : ""; }
+ set {
+ oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ oneofFieldCase_ = OneofFieldOneofCase.OneofString;
+ }
+ }
+
+ /// <summary>Field number for the "oneof_bytes" field.</summary>
+ public const int OneofBytesFieldNumber = 114;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString OneofBytes {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; }
+ set {
+ oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ oneofFieldCase_ = OneofFieldOneofCase.OneofBytes;
+ }
+ }
+
+ /// <summary>Field number for the "oneof_bool" field.</summary>
+ public const int OneofBoolFieldNumber = 115;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool OneofBool {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBool ? (bool) oneofField_ : false; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = OneofFieldOneofCase.OneofBool;
+ }
+ }
+
+ /// <summary>Field number for the "oneof_uint64" field.</summary>
+ public const int OneofUint64FieldNumber = 116;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ulong OneofUint64 {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint64 ? (ulong) oneofField_ : 0UL; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = OneofFieldOneofCase.OneofUint64;
+ }
+ }
+
+ /// <summary>Field number for the "oneof_float" field.</summary>
+ public const int OneofFloatFieldNumber = 117;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float OneofFloat {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofFloat ? (float) oneofField_ : 0F; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = OneofFieldOneofCase.OneofFloat;
+ }
+ }
+
+ /// <summary>Field number for the "oneof_double" field.</summary>
+ public const int OneofDoubleFieldNumber = 118;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double OneofDouble {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofDouble ? (double) oneofField_ : 0D; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = OneofFieldOneofCase.OneofDouble;
+ }
+ }
+
+ /// <summary>Field number for the "oneof_enum" field.</summary>
+ public const int OneofEnumFieldNumber = 119;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum OneofEnum {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofEnum ? (global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum) oneofField_ : 0; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = OneofFieldOneofCase.OneofEnum;
+ }
+ }
+
+ /// <summary>Field number for the "optional_bool_wrapper" field.</summary>
+ public const int OptionalBoolWrapperFieldNumber = 201;
+ private static readonly pb::FieldCodec<bool?> _single_optionalBoolWrapper_codec = pb::FieldCodec.ForStructWrapper<bool>(1610);
+ private bool? optionalBoolWrapper_;
+ /// <summary>
+ /// Well-known types
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool? OptionalBoolWrapper {
+ get { return optionalBoolWrapper_; }
+ set {
+ optionalBoolWrapper_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_int32_wrapper" field.</summary>
+ public const int OptionalInt32WrapperFieldNumber = 202;
+ private static readonly pb::FieldCodec<int?> _single_optionalInt32Wrapper_codec = pb::FieldCodec.ForStructWrapper<int>(1618);
+ private int? optionalInt32Wrapper_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int? OptionalInt32Wrapper {
+ get { return optionalInt32Wrapper_; }
+ set {
+ optionalInt32Wrapper_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_int64_wrapper" field.</summary>
+ public const int OptionalInt64WrapperFieldNumber = 203;
+ private static readonly pb::FieldCodec<long?> _single_optionalInt64Wrapper_codec = pb::FieldCodec.ForStructWrapper<long>(1626);
+ private long? optionalInt64Wrapper_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long? OptionalInt64Wrapper {
+ get { return optionalInt64Wrapper_; }
+ set {
+ optionalInt64Wrapper_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_uint32_wrapper" field.</summary>
+ public const int OptionalUint32WrapperFieldNumber = 204;
+ private static readonly pb::FieldCodec<uint?> _single_optionalUint32Wrapper_codec = pb::FieldCodec.ForStructWrapper<uint>(1634);
+ private uint? optionalUint32Wrapper_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint? OptionalUint32Wrapper {
+ get { return optionalUint32Wrapper_; }
+ set {
+ optionalUint32Wrapper_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_uint64_wrapper" field.</summary>
+ public const int OptionalUint64WrapperFieldNumber = 205;
+ private static readonly pb::FieldCodec<ulong?> _single_optionalUint64Wrapper_codec = pb::FieldCodec.ForStructWrapper<ulong>(1642);
+ private ulong? optionalUint64Wrapper_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ulong? OptionalUint64Wrapper {
+ get { return optionalUint64Wrapper_; }
+ set {
+ optionalUint64Wrapper_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_float_wrapper" field.</summary>
+ public const int OptionalFloatWrapperFieldNumber = 206;
+ private static readonly pb::FieldCodec<float?> _single_optionalFloatWrapper_codec = pb::FieldCodec.ForStructWrapper<float>(1650);
+ private float? optionalFloatWrapper_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float? OptionalFloatWrapper {
+ get { return optionalFloatWrapper_; }
+ set {
+ optionalFloatWrapper_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_double_wrapper" field.</summary>
+ public const int OptionalDoubleWrapperFieldNumber = 207;
+ private static readonly pb::FieldCodec<double?> _single_optionalDoubleWrapper_codec = pb::FieldCodec.ForStructWrapper<double>(1658);
+ private double? optionalDoubleWrapper_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double? OptionalDoubleWrapper {
+ get { return optionalDoubleWrapper_; }
+ set {
+ optionalDoubleWrapper_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_string_wrapper" field.</summary>
+ public const int OptionalStringWrapperFieldNumber = 208;
+ private static readonly pb::FieldCodec<string> _single_optionalStringWrapper_codec = pb::FieldCodec.ForClassWrapper<string>(1666);
+ private string optionalStringWrapper_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OptionalStringWrapper {
+ get { return optionalStringWrapper_; }
+ set {
+ optionalStringWrapper_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_bytes_wrapper" field.</summary>
+ public const int OptionalBytesWrapperFieldNumber = 209;
+ private static readonly pb::FieldCodec<pb::ByteString> _single_optionalBytesWrapper_codec = pb::FieldCodec.ForClassWrapper<pb::ByteString>(1674);
+ private pb::ByteString optionalBytesWrapper_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString OptionalBytesWrapper {
+ get { return optionalBytesWrapper_; }
+ set {
+ optionalBytesWrapper_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "repeated_bool_wrapper" field.</summary>
+ public const int RepeatedBoolWrapperFieldNumber = 211;
+ private static readonly pb::FieldCodec<bool?> _repeated_repeatedBoolWrapper_codec
+ = pb::FieldCodec.ForStructWrapper<bool>(1690);
+ private readonly pbc::RepeatedField<bool?> repeatedBoolWrapper_ = new pbc::RepeatedField<bool?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<bool?> RepeatedBoolWrapper {
+ get { return repeatedBoolWrapper_; }
+ }
+
+ /// <summary>Field number for the "repeated_int32_wrapper" field.</summary>
+ public const int RepeatedInt32WrapperFieldNumber = 212;
+ private static readonly pb::FieldCodec<int?> _repeated_repeatedInt32Wrapper_codec
+ = pb::FieldCodec.ForStructWrapper<int>(1698);
+ private readonly pbc::RepeatedField<int?> repeatedInt32Wrapper_ = new pbc::RepeatedField<int?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int?> RepeatedInt32Wrapper {
+ get { return repeatedInt32Wrapper_; }
+ }
+
+ /// <summary>Field number for the "repeated_int64_wrapper" field.</summary>
+ public const int RepeatedInt64WrapperFieldNumber = 213;
+ private static readonly pb::FieldCodec<long?> _repeated_repeatedInt64Wrapper_codec
+ = pb::FieldCodec.ForStructWrapper<long>(1706);
+ private readonly pbc::RepeatedField<long?> repeatedInt64Wrapper_ = new pbc::RepeatedField<long?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long?> RepeatedInt64Wrapper {
+ get { return repeatedInt64Wrapper_; }
+ }
+
+ /// <summary>Field number for the "repeated_uint32_wrapper" field.</summary>
+ public const int RepeatedUint32WrapperFieldNumber = 214;
+ private static readonly pb::FieldCodec<uint?> _repeated_repeatedUint32Wrapper_codec
+ = pb::FieldCodec.ForStructWrapper<uint>(1714);
+ private readonly pbc::RepeatedField<uint?> repeatedUint32Wrapper_ = new pbc::RepeatedField<uint?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<uint?> RepeatedUint32Wrapper {
+ get { return repeatedUint32Wrapper_; }
+ }
+
+ /// <summary>Field number for the "repeated_uint64_wrapper" field.</summary>
+ public const int RepeatedUint64WrapperFieldNumber = 215;
+ private static readonly pb::FieldCodec<ulong?> _repeated_repeatedUint64Wrapper_codec
+ = pb::FieldCodec.ForStructWrapper<ulong>(1722);
+ private readonly pbc::RepeatedField<ulong?> repeatedUint64Wrapper_ = new pbc::RepeatedField<ulong?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong?> RepeatedUint64Wrapper {
+ get { return repeatedUint64Wrapper_; }
+ }
+
+ /// <summary>Field number for the "repeated_float_wrapper" field.</summary>
+ public const int RepeatedFloatWrapperFieldNumber = 216;
+ private static readonly pb::FieldCodec<float?> _repeated_repeatedFloatWrapper_codec
+ = pb::FieldCodec.ForStructWrapper<float>(1730);
+ private readonly pbc::RepeatedField<float?> repeatedFloatWrapper_ = new pbc::RepeatedField<float?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<float?> RepeatedFloatWrapper {
+ get { return repeatedFloatWrapper_; }
+ }
+
+ /// <summary>Field number for the "repeated_double_wrapper" field.</summary>
+ public const int RepeatedDoubleWrapperFieldNumber = 217;
+ private static readonly pb::FieldCodec<double?> _repeated_repeatedDoubleWrapper_codec
+ = pb::FieldCodec.ForStructWrapper<double>(1738);
+ private readonly pbc::RepeatedField<double?> repeatedDoubleWrapper_ = new pbc::RepeatedField<double?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double?> RepeatedDoubleWrapper {
+ get { return repeatedDoubleWrapper_; }
+ }
+
+ /// <summary>Field number for the "repeated_string_wrapper" field.</summary>
+ public const int RepeatedStringWrapperFieldNumber = 218;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedStringWrapper_codec
+ = pb::FieldCodec.ForClassWrapper<string>(1746);
+ private readonly pbc::RepeatedField<string> repeatedStringWrapper_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedStringWrapper {
+ get { return repeatedStringWrapper_; }
+ }
+
+ /// <summary>Field number for the "repeated_bytes_wrapper" field.</summary>
+ public const int RepeatedBytesWrapperFieldNumber = 219;
+ private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytesWrapper_codec
+ = pb::FieldCodec.ForClassWrapper<pb::ByteString>(1754);
+ private readonly pbc::RepeatedField<pb::ByteString> repeatedBytesWrapper_ = new pbc::RepeatedField<pb::ByteString>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<pb::ByteString> RepeatedBytesWrapper {
+ get { return repeatedBytesWrapper_; }
+ }
+
+ /// <summary>Field number for the "optional_duration" field.</summary>
+ public const int OptionalDurationFieldNumber = 301;
+ private global::Google.Protobuf.WellKnownTypes.Duration optionalDuration_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.WellKnownTypes.Duration OptionalDuration {
+ get { return optionalDuration_; }
+ set {
+ optionalDuration_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_timestamp" field.</summary>
+ public const int OptionalTimestampFieldNumber = 302;
+ private global::Google.Protobuf.WellKnownTypes.Timestamp optionalTimestamp_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.WellKnownTypes.Timestamp OptionalTimestamp {
+ get { return optionalTimestamp_; }
+ set {
+ optionalTimestamp_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_field_mask" field.</summary>
+ public const int OptionalFieldMaskFieldNumber = 303;
+ private global::Google.Protobuf.WellKnownTypes.FieldMask optionalFieldMask_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.WellKnownTypes.FieldMask OptionalFieldMask {
+ get { return optionalFieldMask_; }
+ set {
+ optionalFieldMask_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_struct" field.</summary>
+ public const int OptionalStructFieldNumber = 304;
+ private global::Google.Protobuf.WellKnownTypes.Struct optionalStruct_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.WellKnownTypes.Struct OptionalStruct {
+ get { return optionalStruct_; }
+ set {
+ optionalStruct_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_any" field.</summary>
+ public const int OptionalAnyFieldNumber = 305;
+ private global::Google.Protobuf.WellKnownTypes.Any optionalAny_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.WellKnownTypes.Any OptionalAny {
+ get { return optionalAny_; }
+ set {
+ optionalAny_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "optional_value" field.</summary>
+ public const int OptionalValueFieldNumber = 306;
+ private global::Google.Protobuf.WellKnownTypes.Value optionalValue_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.WellKnownTypes.Value OptionalValue {
+ get { return optionalValue_; }
+ set {
+ optionalValue_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "repeated_duration" field.</summary>
+ public const int RepeatedDurationFieldNumber = 311;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Duration> _repeated_repeatedDuration_codec
+ = pb::FieldCodec.ForMessage(2490, global::Google.Protobuf.WellKnownTypes.Duration.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration> repeatedDuration_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration> RepeatedDuration {
+ get { return repeatedDuration_; }
+ }
+
+ /// <summary>Field number for the "repeated_timestamp" field.</summary>
+ public const int RepeatedTimestampFieldNumber = 312;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Timestamp> _repeated_repeatedTimestamp_codec
+ = pb::FieldCodec.ForMessage(2498, global::Google.Protobuf.WellKnownTypes.Timestamp.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp> repeatedTimestamp_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp> RepeatedTimestamp {
+ get { return repeatedTimestamp_; }
+ }
+
+ /// <summary>Field number for the "repeated_fieldmask" field.</summary>
+ public const int RepeatedFieldmaskFieldNumber = 313;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.FieldMask> _repeated_repeatedFieldmask_codec
+ = pb::FieldCodec.ForMessage(2506, global::Google.Protobuf.WellKnownTypes.FieldMask.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask> repeatedFieldmask_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask> RepeatedFieldmask {
+ get { return repeatedFieldmask_; }
+ }
+
+ /// <summary>Field number for the "repeated_struct" field.</summary>
+ public const int RepeatedStructFieldNumber = 324;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Struct> _repeated_repeatedStruct_codec
+ = pb::FieldCodec.ForMessage(2594, global::Google.Protobuf.WellKnownTypes.Struct.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct> repeatedStruct_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct> RepeatedStruct {
+ get { return repeatedStruct_; }
+ }
+
+ /// <summary>Field number for the "repeated_any" field.</summary>
+ public const int RepeatedAnyFieldNumber = 315;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Any> _repeated_repeatedAny_codec
+ = pb::FieldCodec.ForMessage(2522, global::Google.Protobuf.WellKnownTypes.Any.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any> repeatedAny_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any> RepeatedAny {
+ get { return repeatedAny_; }
+ }
+
+ /// <summary>Field number for the "repeated_value" field.</summary>
+ public const int RepeatedValueFieldNumber = 316;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Value> _repeated_repeatedValue_codec
+ = pb::FieldCodec.ForMessage(2530, global::Google.Protobuf.WellKnownTypes.Value.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> repeatedValue_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> RepeatedValue {
+ get { return repeatedValue_; }
+ }
+
+ /// <summary>Field number for the "fieldname1" field.</summary>
+ public const int Fieldname1FieldNumber = 401;
+ private int fieldname1_;
+ /// <summary>
+ /// Test field-name-to-JSON-name convention.
+ /// (protobuf says names can be any valid C/C++ identifier.)
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Fieldname1 {
+ get { return fieldname1_; }
+ set {
+ fieldname1_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "field_name2" field.</summary>
+ public const int FieldName2FieldNumber = 402;
+ private int fieldName2_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName2 {
+ get { return fieldName2_; }
+ set {
+ fieldName2_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "_field_name3" field.</summary>
+ public const int FieldName3FieldNumber = 403;
+ private int FieldName3_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName3 {
+ get { return FieldName3_; }
+ set {
+ FieldName3_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "field__name4_" field.</summary>
+ public const int FieldName4FieldNumber = 404;
+ private int fieldName4_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName4 {
+ get { return fieldName4_; }
+ set {
+ fieldName4_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "field0name5" field.</summary>
+ public const int Field0Name5FieldNumber = 405;
+ private int field0Name5_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field0Name5 {
+ get { return field0Name5_; }
+ set {
+ field0Name5_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "field_0_name6" field.</summary>
+ public const int Field0Name6FieldNumber = 406;
+ private int field0Name6_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field0Name6 {
+ get { return field0Name6_; }
+ set {
+ field0Name6_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "fieldName7" field.</summary>
+ public const int FieldName7FieldNumber = 407;
+ private int fieldName7_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName7 {
+ get { return fieldName7_; }
+ set {
+ fieldName7_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "FieldName8" field.</summary>
+ public const int FieldName8FieldNumber = 408;
+ private int fieldName8_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName8 {
+ get { return fieldName8_; }
+ set {
+ fieldName8_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "field_Name9" field.</summary>
+ public const int FieldName9FieldNumber = 409;
+ private int fieldName9_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName9 {
+ get { return fieldName9_; }
+ set {
+ fieldName9_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Field_Name10" field.</summary>
+ public const int FieldName10FieldNumber = 410;
+ private int fieldName10_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName10 {
+ get { return fieldName10_; }
+ set {
+ fieldName10_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "FIELD_NAME11" field.</summary>
+ public const int FIELDNAME11FieldNumber = 411;
+ private int fIELDNAME11_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FIELDNAME11 {
+ get { return fIELDNAME11_; }
+ set {
+ fIELDNAME11_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "FIELD_name12" field.</summary>
+ public const int FIELDName12FieldNumber = 412;
+ private int fIELDName12_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FIELDName12 {
+ get { return fIELDName12_; }
+ set {
+ fIELDName12_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "__field_name13" field.</summary>
+ public const int FieldName13FieldNumber = 413;
+ private int FieldName13_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName13 {
+ get { return FieldName13_; }
+ set {
+ FieldName13_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "__Field_name14" field.</summary>
+ public const int FieldName14FieldNumber = 414;
+ private int FieldName14_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName14 {
+ get { return FieldName14_; }
+ set {
+ FieldName14_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "field__name15" field.</summary>
+ public const int FieldName15FieldNumber = 415;
+ private int fieldName15_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName15 {
+ get { return fieldName15_; }
+ set {
+ fieldName15_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "field__Name16" field.</summary>
+ public const int FieldName16FieldNumber = 416;
+ private int fieldName16_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName16 {
+ get { return fieldName16_; }
+ set {
+ fieldName16_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "field_name17__" field.</summary>
+ public const int FieldName17FieldNumber = 417;
+ private int fieldName17_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName17 {
+ get { return fieldName17_; }
+ set {
+ fieldName17_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Field_name18__" field.</summary>
+ public const int FieldName18FieldNumber = 418;
+ private int fieldName18_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName18 {
+ get { return fieldName18_; }
+ set {
+ fieldName18_ = value;
+ }
+ }
+
+ private object oneofField_;
+ /// <summary>Enum of possible cases for the "oneof_field" oneof.</summary>
+ public enum OneofFieldOneofCase {
+ None = 0,
+ OneofUint32 = 111,
+ OneofNestedMessage = 112,
+ OneofString = 113,
+ OneofBytes = 114,
+ OneofBool = 115,
+ OneofUint64 = 116,
+ OneofFloat = 117,
+ OneofDouble = 118,
+ OneofEnum = 119,
+ }
+ private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OneofFieldOneofCase OneofFieldCase {
+ get { return oneofFieldCase_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofField() {
+ oneofFieldCase_ = OneofFieldOneofCase.None;
+ oneofField_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestAllTypes);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestAllTypes other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (OptionalInt32 != other.OptionalInt32) return false;
+ if (OptionalInt64 != other.OptionalInt64) return false;
+ if (OptionalUint32 != other.OptionalUint32) return false;
+ if (OptionalUint64 != other.OptionalUint64) return false;
+ if (OptionalSint32 != other.OptionalSint32) return false;
+ if (OptionalSint64 != other.OptionalSint64) return false;
+ if (OptionalFixed32 != other.OptionalFixed32) return false;
+ if (OptionalFixed64 != other.OptionalFixed64) return false;
+ if (OptionalSfixed32 != other.OptionalSfixed32) return false;
+ if (OptionalSfixed64 != other.OptionalSfixed64) return false;
+ if (OptionalFloat != other.OptionalFloat) return false;
+ if (OptionalDouble != other.OptionalDouble) return false;
+ if (OptionalBool != other.OptionalBool) return false;
+ if (OptionalString != other.OptionalString) return false;
+ if (OptionalBytes != other.OptionalBytes) return false;
+ if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false;
+ if (!object.Equals(OptionalForeignMessage, other.OptionalForeignMessage)) return false;
+ if (OptionalNestedEnum != other.OptionalNestedEnum) return false;
+ if (OptionalForeignEnum != other.OptionalForeignEnum) return false;
+ if (OptionalStringPiece != other.OptionalStringPiece) return false;
+ if (OptionalCord != other.OptionalCord) return false;
+ if (!object.Equals(RecursiveMessage, other.RecursiveMessage)) return false;
+ if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
+ if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
+ if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false;
+ if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
+ if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false;
+ if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false;
+ if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
+ if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
+ if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false;
+ if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false;
+ if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
+ if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false;
+ if(!repeatedBool_.Equals(other.repeatedBool_)) return false;
+ if(!repeatedString_.Equals(other.repeatedString_)) return false;
+ if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false;
+ if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false;
+ if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false;
+ if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false;
+ if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false;
+ if(!repeatedStringPiece_.Equals(other.repeatedStringPiece_)) return false;
+ if(!repeatedCord_.Equals(other.repeatedCord_)) return false;
+ if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false;
+ if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false;
+ if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false;
+ if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false;
+ if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false;
+ if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false;
+ if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false;
+ if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false;
+ if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false;
+ if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false;
+ if (!MapInt32Float.Equals(other.MapInt32Float)) return false;
+ if (!MapInt32Double.Equals(other.MapInt32Double)) return false;
+ if (!MapBoolBool.Equals(other.MapBoolBool)) return false;
+ if (!MapStringString.Equals(other.MapStringString)) return false;
+ if (!MapStringBytes.Equals(other.MapStringBytes)) return false;
+ if (!MapStringNestedMessage.Equals(other.MapStringNestedMessage)) return false;
+ if (!MapStringForeignMessage.Equals(other.MapStringForeignMessage)) return false;
+ if (!MapStringNestedEnum.Equals(other.MapStringNestedEnum)) return false;
+ if (!MapStringForeignEnum.Equals(other.MapStringForeignEnum)) return false;
+ if (OneofUint32 != other.OneofUint32) return false;
+ if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false;
+ if (OneofString != other.OneofString) return false;
+ if (OneofBytes != other.OneofBytes) return false;
+ if (OneofBool != other.OneofBool) return false;
+ if (OneofUint64 != other.OneofUint64) return false;
+ if (OneofFloat != other.OneofFloat) return false;
+ if (OneofDouble != other.OneofDouble) return false;
+ if (OneofEnum != other.OneofEnum) return false;
+ if (OptionalBoolWrapper != other.OptionalBoolWrapper) return false;
+ if (OptionalInt32Wrapper != other.OptionalInt32Wrapper) return false;
+ if (OptionalInt64Wrapper != other.OptionalInt64Wrapper) return false;
+ if (OptionalUint32Wrapper != other.OptionalUint32Wrapper) return false;
+ if (OptionalUint64Wrapper != other.OptionalUint64Wrapper) return false;
+ if (OptionalFloatWrapper != other.OptionalFloatWrapper) return false;
+ if (OptionalDoubleWrapper != other.OptionalDoubleWrapper) return false;
+ if (OptionalStringWrapper != other.OptionalStringWrapper) return false;
+ if (OptionalBytesWrapper != other.OptionalBytesWrapper) return false;
+ if(!repeatedBoolWrapper_.Equals(other.repeatedBoolWrapper_)) return false;
+ if(!repeatedInt32Wrapper_.Equals(other.repeatedInt32Wrapper_)) return false;
+ if(!repeatedInt64Wrapper_.Equals(other.repeatedInt64Wrapper_)) return false;
+ if(!repeatedUint32Wrapper_.Equals(other.repeatedUint32Wrapper_)) return false;
+ if(!repeatedUint64Wrapper_.Equals(other.repeatedUint64Wrapper_)) return false;
+ if(!repeatedFloatWrapper_.Equals(other.repeatedFloatWrapper_)) return false;
+ if(!repeatedDoubleWrapper_.Equals(other.repeatedDoubleWrapper_)) return false;
+ if(!repeatedStringWrapper_.Equals(other.repeatedStringWrapper_)) return false;
+ if(!repeatedBytesWrapper_.Equals(other.repeatedBytesWrapper_)) return false;
+ if (!object.Equals(OptionalDuration, other.OptionalDuration)) return false;
+ if (!object.Equals(OptionalTimestamp, other.OptionalTimestamp)) return false;
+ if (!object.Equals(OptionalFieldMask, other.OptionalFieldMask)) return false;
+ if (!object.Equals(OptionalStruct, other.OptionalStruct)) return false;
+ if (!object.Equals(OptionalAny, other.OptionalAny)) return false;
+ if (!object.Equals(OptionalValue, other.OptionalValue)) return false;
+ if(!repeatedDuration_.Equals(other.repeatedDuration_)) return false;
+ if(!repeatedTimestamp_.Equals(other.repeatedTimestamp_)) return false;
+ if(!repeatedFieldmask_.Equals(other.repeatedFieldmask_)) return false;
+ if(!repeatedStruct_.Equals(other.repeatedStruct_)) return false;
+ if(!repeatedAny_.Equals(other.repeatedAny_)) return false;
+ if(!repeatedValue_.Equals(other.repeatedValue_)) return false;
+ if (Fieldname1 != other.Fieldname1) return false;
+ if (FieldName2 != other.FieldName2) return false;
+ if (FieldName3 != other.FieldName3) return false;
+ if (FieldName4 != other.FieldName4) return false;
+ if (Field0Name5 != other.Field0Name5) return false;
+ if (Field0Name6 != other.Field0Name6) return false;
+ if (FieldName7 != other.FieldName7) return false;
+ if (FieldName8 != other.FieldName8) return false;
+ if (FieldName9 != other.FieldName9) return false;
+ if (FieldName10 != other.FieldName10) return false;
+ if (FIELDNAME11 != other.FIELDNAME11) return false;
+ if (FIELDName12 != other.FIELDName12) return false;
+ if (FieldName13 != other.FieldName13) return false;
+ if (FieldName14 != other.FieldName14) return false;
+ if (FieldName15 != other.FieldName15) return false;
+ if (FieldName16 != other.FieldName16) return false;
+ if (FieldName17 != other.FieldName17) return false;
+ if (FieldName18 != other.FieldName18) return false;
+ if (OneofFieldCase != other.OneofFieldCase) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (OptionalInt32 != 0) hash ^= OptionalInt32.GetHashCode();
+ if (OptionalInt64 != 0L) hash ^= OptionalInt64.GetHashCode();
+ if (OptionalUint32 != 0) hash ^= OptionalUint32.GetHashCode();
+ if (OptionalUint64 != 0UL) hash ^= OptionalUint64.GetHashCode();
+ if (OptionalSint32 != 0) hash ^= OptionalSint32.GetHashCode();
+ if (OptionalSint64 != 0L) hash ^= OptionalSint64.GetHashCode();
+ if (OptionalFixed32 != 0) hash ^= OptionalFixed32.GetHashCode();
+ if (OptionalFixed64 != 0UL) hash ^= OptionalFixed64.GetHashCode();
+ if (OptionalSfixed32 != 0) hash ^= OptionalSfixed32.GetHashCode();
+ if (OptionalSfixed64 != 0L) hash ^= OptionalSfixed64.GetHashCode();
+ if (OptionalFloat != 0F) hash ^= OptionalFloat.GetHashCode();
+ if (OptionalDouble != 0D) hash ^= OptionalDouble.GetHashCode();
+ if (OptionalBool != false) hash ^= OptionalBool.GetHashCode();
+ if (OptionalString.Length != 0) hash ^= OptionalString.GetHashCode();
+ if (OptionalBytes.Length != 0) hash ^= OptionalBytes.GetHashCode();
+ if (optionalNestedMessage_ != null) hash ^= OptionalNestedMessage.GetHashCode();
+ if (optionalForeignMessage_ != null) hash ^= OptionalForeignMessage.GetHashCode();
+ if (OptionalNestedEnum != 0) hash ^= OptionalNestedEnum.GetHashCode();
+ if (OptionalForeignEnum != 0) hash ^= OptionalForeignEnum.GetHashCode();
+ if (OptionalStringPiece.Length != 0) hash ^= OptionalStringPiece.GetHashCode();
+ if (OptionalCord.Length != 0) hash ^= OptionalCord.GetHashCode();
+ if (recursiveMessage_ != null) hash ^= RecursiveMessage.GetHashCode();
+ hash ^= repeatedInt32_.GetHashCode();
+ hash ^= repeatedInt64_.GetHashCode();
+ hash ^= repeatedUint32_.GetHashCode();
+ hash ^= repeatedUint64_.GetHashCode();
+ hash ^= repeatedSint32_.GetHashCode();
+ hash ^= repeatedSint64_.GetHashCode();
+ hash ^= repeatedFixed32_.GetHashCode();
+ hash ^= repeatedFixed64_.GetHashCode();
+ hash ^= repeatedSfixed32_.GetHashCode();
+ hash ^= repeatedSfixed64_.GetHashCode();
+ hash ^= repeatedFloat_.GetHashCode();
+ hash ^= repeatedDouble_.GetHashCode();
+ hash ^= repeatedBool_.GetHashCode();
+ hash ^= repeatedString_.GetHashCode();
+ hash ^= repeatedBytes_.GetHashCode();
+ hash ^= repeatedNestedMessage_.GetHashCode();
+ hash ^= repeatedForeignMessage_.GetHashCode();
+ hash ^= repeatedNestedEnum_.GetHashCode();
+ hash ^= repeatedForeignEnum_.GetHashCode();
+ hash ^= repeatedStringPiece_.GetHashCode();
+ hash ^= repeatedCord_.GetHashCode();
+ hash ^= MapInt32Int32.GetHashCode();
+ hash ^= MapInt64Int64.GetHashCode();
+ hash ^= MapUint32Uint32.GetHashCode();
+ hash ^= MapUint64Uint64.GetHashCode();
+ hash ^= MapSint32Sint32.GetHashCode();
+ hash ^= MapSint64Sint64.GetHashCode();
+ hash ^= MapFixed32Fixed32.GetHashCode();
+ hash ^= MapFixed64Fixed64.GetHashCode();
+ hash ^= MapSfixed32Sfixed32.GetHashCode();
+ hash ^= MapSfixed64Sfixed64.GetHashCode();
+ hash ^= MapInt32Float.GetHashCode();
+ hash ^= MapInt32Double.GetHashCode();
+ hash ^= MapBoolBool.GetHashCode();
+ hash ^= MapStringString.GetHashCode();
+ hash ^= MapStringBytes.GetHashCode();
+ hash ^= MapStringNestedMessage.GetHashCode();
+ hash ^= MapStringForeignMessage.GetHashCode();
+ hash ^= MapStringNestedEnum.GetHashCode();
+ hash ^= MapStringForeignEnum.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) hash ^= OneofUint32.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofString.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofBool) hash ^= OneofBool.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint64) hash ^= OneofUint64.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofFloat) hash ^= OneofFloat.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofDouble) hash ^= OneofDouble.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofEnum) hash ^= OneofEnum.GetHashCode();
+ if (optionalBoolWrapper_ != null) hash ^= OptionalBoolWrapper.GetHashCode();
+ if (optionalInt32Wrapper_ != null) hash ^= OptionalInt32Wrapper.GetHashCode();
+ if (optionalInt64Wrapper_ != null) hash ^= OptionalInt64Wrapper.GetHashCode();
+ if (optionalUint32Wrapper_ != null) hash ^= OptionalUint32Wrapper.GetHashCode();
+ if (optionalUint64Wrapper_ != null) hash ^= OptionalUint64Wrapper.GetHashCode();
+ if (optionalFloatWrapper_ != null) hash ^= OptionalFloatWrapper.GetHashCode();
+ if (optionalDoubleWrapper_ != null) hash ^= OptionalDoubleWrapper.GetHashCode();
+ if (optionalStringWrapper_ != null) hash ^= OptionalStringWrapper.GetHashCode();
+ if (optionalBytesWrapper_ != null) hash ^= OptionalBytesWrapper.GetHashCode();
+ hash ^= repeatedBoolWrapper_.GetHashCode();
+ hash ^= repeatedInt32Wrapper_.GetHashCode();
+ hash ^= repeatedInt64Wrapper_.GetHashCode();
+ hash ^= repeatedUint32Wrapper_.GetHashCode();
+ hash ^= repeatedUint64Wrapper_.GetHashCode();
+ hash ^= repeatedFloatWrapper_.GetHashCode();
+ hash ^= repeatedDoubleWrapper_.GetHashCode();
+ hash ^= repeatedStringWrapper_.GetHashCode();
+ hash ^= repeatedBytesWrapper_.GetHashCode();
+ if (optionalDuration_ != null) hash ^= OptionalDuration.GetHashCode();
+ if (optionalTimestamp_ != null) hash ^= OptionalTimestamp.GetHashCode();
+ if (optionalFieldMask_ != null) hash ^= OptionalFieldMask.GetHashCode();
+ if (optionalStruct_ != null) hash ^= OptionalStruct.GetHashCode();
+ if (optionalAny_ != null) hash ^= OptionalAny.GetHashCode();
+ if (optionalValue_ != null) hash ^= OptionalValue.GetHashCode();
+ hash ^= repeatedDuration_.GetHashCode();
+ hash ^= repeatedTimestamp_.GetHashCode();
+ hash ^= repeatedFieldmask_.GetHashCode();
+ hash ^= repeatedStruct_.GetHashCode();
+ hash ^= repeatedAny_.GetHashCode();
+ hash ^= repeatedValue_.GetHashCode();
+ if (Fieldname1 != 0) hash ^= Fieldname1.GetHashCode();
+ if (FieldName2 != 0) hash ^= FieldName2.GetHashCode();
+ if (FieldName3 != 0) hash ^= FieldName3.GetHashCode();
+ if (FieldName4 != 0) hash ^= FieldName4.GetHashCode();
+ if (Field0Name5 != 0) hash ^= Field0Name5.GetHashCode();
+ if (Field0Name6 != 0) hash ^= Field0Name6.GetHashCode();
+ if (FieldName7 != 0) hash ^= FieldName7.GetHashCode();
+ if (FieldName8 != 0) hash ^= FieldName8.GetHashCode();
+ if (FieldName9 != 0) hash ^= FieldName9.GetHashCode();
+ if (FieldName10 != 0) hash ^= FieldName10.GetHashCode();
+ if (FIELDNAME11 != 0) hash ^= FIELDNAME11.GetHashCode();
+ if (FIELDName12 != 0) hash ^= FIELDName12.GetHashCode();
+ if (FieldName13 != 0) hash ^= FieldName13.GetHashCode();
+ if (FieldName14 != 0) hash ^= FieldName14.GetHashCode();
+ if (FieldName15 != 0) hash ^= FieldName15.GetHashCode();
+ if (FieldName16 != 0) hash ^= FieldName16.GetHashCode();
+ if (FieldName17 != 0) hash ^= FieldName17.GetHashCode();
+ if (FieldName18 != 0) hash ^= FieldName18.GetHashCode();
+ hash ^= (int) oneofFieldCase_;
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (OptionalInt32 != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(OptionalInt32);
+ }
+ if (OptionalInt64 != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(OptionalInt64);
+ }
+ if (OptionalUint32 != 0) {
+ output.WriteRawTag(24);
+ output.WriteUInt32(OptionalUint32);
+ }
+ if (OptionalUint64 != 0UL) {
+ output.WriteRawTag(32);
+ output.WriteUInt64(OptionalUint64);
+ }
+ if (OptionalSint32 != 0) {
+ output.WriteRawTag(40);
+ output.WriteSInt32(OptionalSint32);
+ }
+ if (OptionalSint64 != 0L) {
+ output.WriteRawTag(48);
+ output.WriteSInt64(OptionalSint64);
+ }
+ if (OptionalFixed32 != 0) {
+ output.WriteRawTag(61);
+ output.WriteFixed32(OptionalFixed32);
+ }
+ if (OptionalFixed64 != 0UL) {
+ output.WriteRawTag(65);
+ output.WriteFixed64(OptionalFixed64);
+ }
+ if (OptionalSfixed32 != 0) {
+ output.WriteRawTag(77);
+ output.WriteSFixed32(OptionalSfixed32);
+ }
+ if (OptionalSfixed64 != 0L) {
+ output.WriteRawTag(81);
+ output.WriteSFixed64(OptionalSfixed64);
+ }
+ if (OptionalFloat != 0F) {
+ output.WriteRawTag(93);
+ output.WriteFloat(OptionalFloat);
+ }
+ if (OptionalDouble != 0D) {
+ output.WriteRawTag(97);
+ output.WriteDouble(OptionalDouble);
+ }
+ if (OptionalBool != false) {
+ output.WriteRawTag(104);
+ output.WriteBool(OptionalBool);
+ }
+ if (OptionalString.Length != 0) {
+ output.WriteRawTag(114);
+ output.WriteString(OptionalString);
+ }
+ if (OptionalBytes.Length != 0) {
+ output.WriteRawTag(122);
+ output.WriteBytes(OptionalBytes);
+ }
+ if (optionalNestedMessage_ != null) {
+ output.WriteRawTag(146, 1);
+ output.WriteMessage(OptionalNestedMessage);
+ }
+ if (optionalForeignMessage_ != null) {
+ output.WriteRawTag(154, 1);
+ output.WriteMessage(OptionalForeignMessage);
+ }
+ if (OptionalNestedEnum != 0) {
+ output.WriteRawTag(168, 1);
+ output.WriteEnum((int) OptionalNestedEnum);
+ }
+ if (OptionalForeignEnum != 0) {
+ output.WriteRawTag(176, 1);
+ output.WriteEnum((int) OptionalForeignEnum);
+ }
+ if (OptionalStringPiece.Length != 0) {
+ output.WriteRawTag(194, 1);
+ output.WriteString(OptionalStringPiece);
+ }
+ if (OptionalCord.Length != 0) {
+ output.WriteRawTag(202, 1);
+ output.WriteString(OptionalCord);
+ }
+ if (recursiveMessage_ != null) {
+ output.WriteRawTag(218, 1);
+ output.WriteMessage(RecursiveMessage);
+ }
+ repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
+ repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
+ repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec);
+ repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
+ repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec);
+ repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec);
+ repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
+ repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
+ repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec);
+ repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec);
+ repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
+ repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec);
+ repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec);
+ repeatedString_.WriteTo(output, _repeated_repeatedString_codec);
+ repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec);
+ repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec);
+ repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec);
+ repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec);
+ repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec);
+ repeatedStringPiece_.WriteTo(output, _repeated_repeatedStringPiece_codec);
+ repeatedCord_.WriteTo(output, _repeated_repeatedCord_codec);
+ mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec);
+ mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec);
+ mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec);
+ mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec);
+ mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec);
+ mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec);
+ mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec);
+ mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec);
+ mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec);
+ mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec);
+ mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec);
+ mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec);
+ mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec);
+ mapStringString_.WriteTo(output, _map_mapStringString_codec);
+ mapStringBytes_.WriteTo(output, _map_mapStringBytes_codec);
+ mapStringNestedMessage_.WriteTo(output, _map_mapStringNestedMessage_codec);
+ mapStringForeignMessage_.WriteTo(output, _map_mapStringForeignMessage_codec);
+ mapStringNestedEnum_.WriteTo(output, _map_mapStringNestedEnum_codec);
+ mapStringForeignEnum_.WriteTo(output, _map_mapStringForeignEnum_codec);
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
+ output.WriteRawTag(248, 6);
+ output.WriteUInt32(OneofUint32);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
+ output.WriteRawTag(130, 7);
+ output.WriteMessage(OneofNestedMessage);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
+ output.WriteRawTag(138, 7);
+ output.WriteString(OneofString);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
+ output.WriteRawTag(146, 7);
+ output.WriteBytes(OneofBytes);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofBool) {
+ output.WriteRawTag(152, 7);
+ output.WriteBool(OneofBool);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint64) {
+ output.WriteRawTag(160, 7);
+ output.WriteUInt64(OneofUint64);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofFloat) {
+ output.WriteRawTag(173, 7);
+ output.WriteFloat(OneofFloat);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofDouble) {
+ output.WriteRawTag(177, 7);
+ output.WriteDouble(OneofDouble);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofEnum) {
+ output.WriteRawTag(184, 7);
+ output.WriteEnum((int) OneofEnum);
+ }
+ if (optionalBoolWrapper_ != null) {
+ _single_optionalBoolWrapper_codec.WriteTagAndValue(output, OptionalBoolWrapper);
+ }
+ if (optionalInt32Wrapper_ != null) {
+ _single_optionalInt32Wrapper_codec.WriteTagAndValue(output, OptionalInt32Wrapper);
+ }
+ if (optionalInt64Wrapper_ != null) {
+ _single_optionalInt64Wrapper_codec.WriteTagAndValue(output, OptionalInt64Wrapper);
+ }
+ if (optionalUint32Wrapper_ != null) {
+ _single_optionalUint32Wrapper_codec.WriteTagAndValue(output, OptionalUint32Wrapper);
+ }
+ if (optionalUint64Wrapper_ != null) {
+ _single_optionalUint64Wrapper_codec.WriteTagAndValue(output, OptionalUint64Wrapper);
+ }
+ if (optionalFloatWrapper_ != null) {
+ _single_optionalFloatWrapper_codec.WriteTagAndValue(output, OptionalFloatWrapper);
+ }
+ if (optionalDoubleWrapper_ != null) {
+ _single_optionalDoubleWrapper_codec.WriteTagAndValue(output, OptionalDoubleWrapper);
+ }
+ if (optionalStringWrapper_ != null) {
+ _single_optionalStringWrapper_codec.WriteTagAndValue(output, OptionalStringWrapper);
+ }
+ if (optionalBytesWrapper_ != null) {
+ _single_optionalBytesWrapper_codec.WriteTagAndValue(output, OptionalBytesWrapper);
+ }
+ repeatedBoolWrapper_.WriteTo(output, _repeated_repeatedBoolWrapper_codec);
+ repeatedInt32Wrapper_.WriteTo(output, _repeated_repeatedInt32Wrapper_codec);
+ repeatedInt64Wrapper_.WriteTo(output, _repeated_repeatedInt64Wrapper_codec);
+ repeatedUint32Wrapper_.WriteTo(output, _repeated_repeatedUint32Wrapper_codec);
+ repeatedUint64Wrapper_.WriteTo(output, _repeated_repeatedUint64Wrapper_codec);
+ repeatedFloatWrapper_.WriteTo(output, _repeated_repeatedFloatWrapper_codec);
+ repeatedDoubleWrapper_.WriteTo(output, _repeated_repeatedDoubleWrapper_codec);
+ repeatedStringWrapper_.WriteTo(output, _repeated_repeatedStringWrapper_codec);
+ repeatedBytesWrapper_.WriteTo(output, _repeated_repeatedBytesWrapper_codec);
+ if (optionalDuration_ != null) {
+ output.WriteRawTag(234, 18);
+ output.WriteMessage(OptionalDuration);
+ }
+ if (optionalTimestamp_ != null) {
+ output.WriteRawTag(242, 18);
+ output.WriteMessage(OptionalTimestamp);
+ }
+ if (optionalFieldMask_ != null) {
+ output.WriteRawTag(250, 18);
+ output.WriteMessage(OptionalFieldMask);
+ }
+ if (optionalStruct_ != null) {
+ output.WriteRawTag(130, 19);
+ output.WriteMessage(OptionalStruct);
+ }
+ if (optionalAny_ != null) {
+ output.WriteRawTag(138, 19);
+ output.WriteMessage(OptionalAny);
+ }
+ if (optionalValue_ != null) {
+ output.WriteRawTag(146, 19);
+ output.WriteMessage(OptionalValue);
+ }
+ repeatedDuration_.WriteTo(output, _repeated_repeatedDuration_codec);
+ repeatedTimestamp_.WriteTo(output, _repeated_repeatedTimestamp_codec);
+ repeatedFieldmask_.WriteTo(output, _repeated_repeatedFieldmask_codec);
+ repeatedAny_.WriteTo(output, _repeated_repeatedAny_codec);
+ repeatedValue_.WriteTo(output, _repeated_repeatedValue_codec);
+ repeatedStruct_.WriteTo(output, _repeated_repeatedStruct_codec);
+ if (Fieldname1 != 0) {
+ output.WriteRawTag(136, 25);
+ output.WriteInt32(Fieldname1);
+ }
+ if (FieldName2 != 0) {
+ output.WriteRawTag(144, 25);
+ output.WriteInt32(FieldName2);
+ }
+ if (FieldName3 != 0) {
+ output.WriteRawTag(152, 25);
+ output.WriteInt32(FieldName3);
+ }
+ if (FieldName4 != 0) {
+ output.WriteRawTag(160, 25);
+ output.WriteInt32(FieldName4);
+ }
+ if (Field0Name5 != 0) {
+ output.WriteRawTag(168, 25);
+ output.WriteInt32(Field0Name5);
+ }
+ if (Field0Name6 != 0) {
+ output.WriteRawTag(176, 25);
+ output.WriteInt32(Field0Name6);
+ }
+ if (FieldName7 != 0) {
+ output.WriteRawTag(184, 25);
+ output.WriteInt32(FieldName7);
+ }
+ if (FieldName8 != 0) {
+ output.WriteRawTag(192, 25);
+ output.WriteInt32(FieldName8);
+ }
+ if (FieldName9 != 0) {
+ output.WriteRawTag(200, 25);
+ output.WriteInt32(FieldName9);
+ }
+ if (FieldName10 != 0) {
+ output.WriteRawTag(208, 25);
+ output.WriteInt32(FieldName10);
+ }
+ if (FIELDNAME11 != 0) {
+ output.WriteRawTag(216, 25);
+ output.WriteInt32(FIELDNAME11);
+ }
+ if (FIELDName12 != 0) {
+ output.WriteRawTag(224, 25);
+ output.WriteInt32(FIELDName12);
+ }
+ if (FieldName13 != 0) {
+ output.WriteRawTag(232, 25);
+ output.WriteInt32(FieldName13);
+ }
+ if (FieldName14 != 0) {
+ output.WriteRawTag(240, 25);
+ output.WriteInt32(FieldName14);
+ }
+ if (FieldName15 != 0) {
+ output.WriteRawTag(248, 25);
+ output.WriteInt32(FieldName15);
+ }
+ if (FieldName16 != 0) {
+ output.WriteRawTag(128, 26);
+ output.WriteInt32(FieldName16);
+ }
+ if (FieldName17 != 0) {
+ output.WriteRawTag(136, 26);
+ output.WriteInt32(FieldName17);
+ }
+ if (FieldName18 != 0) {
+ output.WriteRawTag(144, 26);
+ output.WriteInt32(FieldName18);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (OptionalInt32 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
+ }
+ if (OptionalInt64 != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(OptionalInt64);
+ }
+ if (OptionalUint32 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(OptionalUint32);
+ }
+ if (OptionalUint64 != 0UL) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt64Size(OptionalUint64);
+ }
+ if (OptionalSint32 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(OptionalSint32);
+ }
+ if (OptionalSint64 != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt64Size(OptionalSint64);
+ }
+ if (OptionalFixed32 != 0) {
+ size += 1 + 4;
+ }
+ if (OptionalFixed64 != 0UL) {
+ size += 1 + 8;
+ }
+ if (OptionalSfixed32 != 0) {
+ size += 1 + 4;
+ }
+ if (OptionalSfixed64 != 0L) {
+ size += 1 + 8;
+ }
+ if (OptionalFloat != 0F) {
+ size += 1 + 4;
+ }
+ if (OptionalDouble != 0D) {
+ size += 1 + 8;
+ }
+ if (OptionalBool != false) {
+ size += 1 + 1;
+ }
+ if (OptionalString.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(OptionalString);
+ }
+ if (OptionalBytes.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(OptionalBytes);
+ }
+ if (optionalNestedMessage_ != null) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage);
+ }
+ if (optionalForeignMessage_ != null) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalForeignMessage);
+ }
+ if (OptionalNestedEnum != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalNestedEnum);
+ }
+ if (OptionalForeignEnum != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalForeignEnum);
+ }
+ if (OptionalStringPiece.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalStringPiece);
+ }
+ if (OptionalCord.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalCord);
+ }
+ if (recursiveMessage_ != null) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(RecursiveMessage);
+ }
+ size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
+ size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
+ size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec);
+ size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
+ size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec);
+ size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec);
+ size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
+ size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
+ size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec);
+ size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec);
+ size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
+ size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec);
+ size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec);
+ size += repeatedString_.CalculateSize(_repeated_repeatedString_codec);
+ size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec);
+ size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec);
+ size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec);
+ size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec);
+ size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec);
+ size += repeatedStringPiece_.CalculateSize(_repeated_repeatedStringPiece_codec);
+ size += repeatedCord_.CalculateSize(_repeated_repeatedCord_codec);
+ size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec);
+ size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec);
+ size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec);
+ size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec);
+ size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec);
+ size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec);
+ size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec);
+ size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec);
+ size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec);
+ size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec);
+ size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec);
+ size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec);
+ size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec);
+ size += mapStringString_.CalculateSize(_map_mapStringString_codec);
+ size += mapStringBytes_.CalculateSize(_map_mapStringBytes_codec);
+ size += mapStringNestedMessage_.CalculateSize(_map_mapStringNestedMessage_codec);
+ size += mapStringForeignMessage_.CalculateSize(_map_mapStringForeignMessage_codec);
+ size += mapStringNestedEnum_.CalculateSize(_map_mapStringNestedEnum_codec);
+ size += mapStringForeignEnum_.CalculateSize(_map_mapStringForeignEnum_codec);
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
+ size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
+ size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofBool) {
+ size += 2 + 1;
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint64) {
+ size += 2 + pb::CodedOutputStream.ComputeUInt64Size(OneofUint64);
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofFloat) {
+ size += 2 + 4;
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofDouble) {
+ size += 2 + 8;
+ }
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofEnum) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OneofEnum);
+ }
+ if (optionalBoolWrapper_ != null) {
+ size += _single_optionalBoolWrapper_codec.CalculateSizeWithTag(OptionalBoolWrapper);
+ }
+ if (optionalInt32Wrapper_ != null) {
+ size += _single_optionalInt32Wrapper_codec.CalculateSizeWithTag(OptionalInt32Wrapper);
+ }
+ if (optionalInt64Wrapper_ != null) {
+ size += _single_optionalInt64Wrapper_codec.CalculateSizeWithTag(OptionalInt64Wrapper);
+ }
+ if (optionalUint32Wrapper_ != null) {
+ size += _single_optionalUint32Wrapper_codec.CalculateSizeWithTag(OptionalUint32Wrapper);
+ }
+ if (optionalUint64Wrapper_ != null) {
+ size += _single_optionalUint64Wrapper_codec.CalculateSizeWithTag(OptionalUint64Wrapper);
+ }
+ if (optionalFloatWrapper_ != null) {
+ size += _single_optionalFloatWrapper_codec.CalculateSizeWithTag(OptionalFloatWrapper);
+ }
+ if (optionalDoubleWrapper_ != null) {
+ size += _single_optionalDoubleWrapper_codec.CalculateSizeWithTag(OptionalDoubleWrapper);
+ }
+ if (optionalStringWrapper_ != null) {
+ size += _single_optionalStringWrapper_codec.CalculateSizeWithTag(OptionalStringWrapper);
+ }
+ if (optionalBytesWrapper_ != null) {
+ size += _single_optionalBytesWrapper_codec.CalculateSizeWithTag(OptionalBytesWrapper);
+ }
+ size += repeatedBoolWrapper_.CalculateSize(_repeated_repeatedBoolWrapper_codec);
+ size += repeatedInt32Wrapper_.CalculateSize(_repeated_repeatedInt32Wrapper_codec);
+ size += repeatedInt64Wrapper_.CalculateSize(_repeated_repeatedInt64Wrapper_codec);
+ size += repeatedUint32Wrapper_.CalculateSize(_repeated_repeatedUint32Wrapper_codec);
+ size += repeatedUint64Wrapper_.CalculateSize(_repeated_repeatedUint64Wrapper_codec);
+ size += repeatedFloatWrapper_.CalculateSize(_repeated_repeatedFloatWrapper_codec);
+ size += repeatedDoubleWrapper_.CalculateSize(_repeated_repeatedDoubleWrapper_codec);
+ size += repeatedStringWrapper_.CalculateSize(_repeated_repeatedStringWrapper_codec);
+ size += repeatedBytesWrapper_.CalculateSize(_repeated_repeatedBytesWrapper_codec);
+ if (optionalDuration_ != null) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalDuration);
+ }
+ if (optionalTimestamp_ != null) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalTimestamp);
+ }
+ if (optionalFieldMask_ != null) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalFieldMask);
+ }
+ if (optionalStruct_ != null) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalStruct);
+ }
+ if (optionalAny_ != null) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalAny);
+ }
+ if (optionalValue_ != null) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalValue);
+ }
+ size += repeatedDuration_.CalculateSize(_repeated_repeatedDuration_codec);
+ size += repeatedTimestamp_.CalculateSize(_repeated_repeatedTimestamp_codec);
+ size += repeatedFieldmask_.CalculateSize(_repeated_repeatedFieldmask_codec);
+ size += repeatedStruct_.CalculateSize(_repeated_repeatedStruct_codec);
+ size += repeatedAny_.CalculateSize(_repeated_repeatedAny_codec);
+ size += repeatedValue_.CalculateSize(_repeated_repeatedValue_codec);
+ if (Fieldname1 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Fieldname1);
+ }
+ if (FieldName2 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName2);
+ }
+ if (FieldName3 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName3);
+ }
+ if (FieldName4 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName4);
+ }
+ if (Field0Name5 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Field0Name5);
+ }
+ if (Field0Name6 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Field0Name6);
+ }
+ if (FieldName7 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName7);
+ }
+ if (FieldName8 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName8);
+ }
+ if (FieldName9 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName9);
+ }
+ if (FieldName10 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName10);
+ }
+ if (FIELDNAME11 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FIELDNAME11);
+ }
+ if (FIELDName12 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FIELDName12);
+ }
+ if (FieldName13 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName13);
+ }
+ if (FieldName14 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName14);
+ }
+ if (FieldName15 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName15);
+ }
+ if (FieldName16 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName16);
+ }
+ if (FieldName17 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName17);
+ }
+ if (FieldName18 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName18);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestAllTypes other) {
+ if (other == null) {
+ return;
+ }
+ if (other.OptionalInt32 != 0) {
+ OptionalInt32 = other.OptionalInt32;
+ }
+ if (other.OptionalInt64 != 0L) {
+ OptionalInt64 = other.OptionalInt64;
+ }
+ if (other.OptionalUint32 != 0) {
+ OptionalUint32 = other.OptionalUint32;
+ }
+ if (other.OptionalUint64 != 0UL) {
+ OptionalUint64 = other.OptionalUint64;
+ }
+ if (other.OptionalSint32 != 0) {
+ OptionalSint32 = other.OptionalSint32;
+ }
+ if (other.OptionalSint64 != 0L) {
+ OptionalSint64 = other.OptionalSint64;
+ }
+ if (other.OptionalFixed32 != 0) {
+ OptionalFixed32 = other.OptionalFixed32;
+ }
+ if (other.OptionalFixed64 != 0UL) {
+ OptionalFixed64 = other.OptionalFixed64;
+ }
+ if (other.OptionalSfixed32 != 0) {
+ OptionalSfixed32 = other.OptionalSfixed32;
+ }
+ if (other.OptionalSfixed64 != 0L) {
+ OptionalSfixed64 = other.OptionalSfixed64;
+ }
+ if (other.OptionalFloat != 0F) {
+ OptionalFloat = other.OptionalFloat;
+ }
+ if (other.OptionalDouble != 0D) {
+ OptionalDouble = other.OptionalDouble;
+ }
+ if (other.OptionalBool != false) {
+ OptionalBool = other.OptionalBool;
+ }
+ if (other.OptionalString.Length != 0) {
+ OptionalString = other.OptionalString;
+ }
+ if (other.OptionalBytes.Length != 0) {
+ OptionalBytes = other.OptionalBytes;
+ }
+ if (other.optionalNestedMessage_ != null) {
+ if (optionalNestedMessage_ == null) {
+ optionalNestedMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage();
+ }
+ OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage);
+ }
+ if (other.optionalForeignMessage_ != null) {
+ if (optionalForeignMessage_ == null) {
+ optionalForeignMessage_ = new global::ProtobufTestMessages.Proto3.ForeignMessage();
+ }
+ OptionalForeignMessage.MergeFrom(other.OptionalForeignMessage);
+ }
+ if (other.OptionalNestedEnum != 0) {
+ OptionalNestedEnum = other.OptionalNestedEnum;
+ }
+ if (other.OptionalForeignEnum != 0) {
+ OptionalForeignEnum = other.OptionalForeignEnum;
+ }
+ if (other.OptionalStringPiece.Length != 0) {
+ OptionalStringPiece = other.OptionalStringPiece;
+ }
+ if (other.OptionalCord.Length != 0) {
+ OptionalCord = other.OptionalCord;
+ }
+ if (other.recursiveMessage_ != null) {
+ if (recursiveMessage_ == null) {
+ recursiveMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypes();
+ }
+ RecursiveMessage.MergeFrom(other.RecursiveMessage);
+ }
+ repeatedInt32_.Add(other.repeatedInt32_);
+ repeatedInt64_.Add(other.repeatedInt64_);
+ repeatedUint32_.Add(other.repeatedUint32_);
+ repeatedUint64_.Add(other.repeatedUint64_);
+ repeatedSint32_.Add(other.repeatedSint32_);
+ repeatedSint64_.Add(other.repeatedSint64_);
+ repeatedFixed32_.Add(other.repeatedFixed32_);
+ repeatedFixed64_.Add(other.repeatedFixed64_);
+ repeatedSfixed32_.Add(other.repeatedSfixed32_);
+ repeatedSfixed64_.Add(other.repeatedSfixed64_);
+ repeatedFloat_.Add(other.repeatedFloat_);
+ repeatedDouble_.Add(other.repeatedDouble_);
+ repeatedBool_.Add(other.repeatedBool_);
+ repeatedString_.Add(other.repeatedString_);
+ repeatedBytes_.Add(other.repeatedBytes_);
+ repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
+ repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
+ repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
+ repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
+ repeatedStringPiece_.Add(other.repeatedStringPiece_);
+ repeatedCord_.Add(other.repeatedCord_);
+ mapInt32Int32_.Add(other.mapInt32Int32_);
+ mapInt64Int64_.Add(other.mapInt64Int64_);
+ mapUint32Uint32_.Add(other.mapUint32Uint32_);
+ mapUint64Uint64_.Add(other.mapUint64Uint64_);
+ mapSint32Sint32_.Add(other.mapSint32Sint32_);
+ mapSint64Sint64_.Add(other.mapSint64Sint64_);
+ mapFixed32Fixed32_.Add(other.mapFixed32Fixed32_);
+ mapFixed64Fixed64_.Add(other.mapFixed64Fixed64_);
+ mapSfixed32Sfixed32_.Add(other.mapSfixed32Sfixed32_);
+ mapSfixed64Sfixed64_.Add(other.mapSfixed64Sfixed64_);
+ mapInt32Float_.Add(other.mapInt32Float_);
+ mapInt32Double_.Add(other.mapInt32Double_);
+ mapBoolBool_.Add(other.mapBoolBool_);
+ mapStringString_.Add(other.mapStringString_);
+ mapStringBytes_.Add(other.mapStringBytes_);
+ mapStringNestedMessage_.Add(other.mapStringNestedMessage_);
+ mapStringForeignMessage_.Add(other.mapStringForeignMessage_);
+ mapStringNestedEnum_.Add(other.mapStringNestedEnum_);
+ mapStringForeignEnum_.Add(other.mapStringForeignEnum_);
+ if (other.optionalBoolWrapper_ != null) {
+ if (optionalBoolWrapper_ == null || other.OptionalBoolWrapper != false) {
+ OptionalBoolWrapper = other.OptionalBoolWrapper;
+ }
+ }
+ if (other.optionalInt32Wrapper_ != null) {
+ if (optionalInt32Wrapper_ == null || other.OptionalInt32Wrapper != 0) {
+ OptionalInt32Wrapper = other.OptionalInt32Wrapper;
+ }
+ }
+ if (other.optionalInt64Wrapper_ != null) {
+ if (optionalInt64Wrapper_ == null || other.OptionalInt64Wrapper != 0L) {
+ OptionalInt64Wrapper = other.OptionalInt64Wrapper;
+ }
+ }
+ if (other.optionalUint32Wrapper_ != null) {
+ if (optionalUint32Wrapper_ == null || other.OptionalUint32Wrapper != 0) {
+ OptionalUint32Wrapper = other.OptionalUint32Wrapper;
+ }
+ }
+ if (other.optionalUint64Wrapper_ != null) {
+ if (optionalUint64Wrapper_ == null || other.OptionalUint64Wrapper != 0UL) {
+ OptionalUint64Wrapper = other.OptionalUint64Wrapper;
+ }
+ }
+ if (other.optionalFloatWrapper_ != null) {
+ if (optionalFloatWrapper_ == null || other.OptionalFloatWrapper != 0F) {
+ OptionalFloatWrapper = other.OptionalFloatWrapper;
+ }
+ }
+ if (other.optionalDoubleWrapper_ != null) {
+ if (optionalDoubleWrapper_ == null || other.OptionalDoubleWrapper != 0D) {
+ OptionalDoubleWrapper = other.OptionalDoubleWrapper;
+ }
+ }
+ if (other.optionalStringWrapper_ != null) {
+ if (optionalStringWrapper_ == null || other.OptionalStringWrapper != "") {
+ OptionalStringWrapper = other.OptionalStringWrapper;
+ }
+ }
+ if (other.optionalBytesWrapper_ != null) {
+ if (optionalBytesWrapper_ == null || other.OptionalBytesWrapper != pb::ByteString.Empty) {
+ OptionalBytesWrapper = other.OptionalBytesWrapper;
+ }
+ }
+ repeatedBoolWrapper_.Add(other.repeatedBoolWrapper_);
+ repeatedInt32Wrapper_.Add(other.repeatedInt32Wrapper_);
+ repeatedInt64Wrapper_.Add(other.repeatedInt64Wrapper_);
+ repeatedUint32Wrapper_.Add(other.repeatedUint32Wrapper_);
+ repeatedUint64Wrapper_.Add(other.repeatedUint64Wrapper_);
+ repeatedFloatWrapper_.Add(other.repeatedFloatWrapper_);
+ repeatedDoubleWrapper_.Add(other.repeatedDoubleWrapper_);
+ repeatedStringWrapper_.Add(other.repeatedStringWrapper_);
+ repeatedBytesWrapper_.Add(other.repeatedBytesWrapper_);
+ if (other.optionalDuration_ != null) {
+ if (optionalDuration_ == null) {
+ optionalDuration_ = new global::Google.Protobuf.WellKnownTypes.Duration();
+ }
+ OptionalDuration.MergeFrom(other.OptionalDuration);
+ }
+ if (other.optionalTimestamp_ != null) {
+ if (optionalTimestamp_ == null) {
+ optionalTimestamp_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ OptionalTimestamp.MergeFrom(other.OptionalTimestamp);
+ }
+ if (other.optionalFieldMask_ != null) {
+ if (optionalFieldMask_ == null) {
+ optionalFieldMask_ = new global::Google.Protobuf.WellKnownTypes.FieldMask();
+ }
+ OptionalFieldMask.MergeFrom(other.OptionalFieldMask);
+ }
+ if (other.optionalStruct_ != null) {
+ if (optionalStruct_ == null) {
+ optionalStruct_ = new global::Google.Protobuf.WellKnownTypes.Struct();
+ }
+ OptionalStruct.MergeFrom(other.OptionalStruct);
+ }
+ if (other.optionalAny_ != null) {
+ if (optionalAny_ == null) {
+ optionalAny_ = new global::Google.Protobuf.WellKnownTypes.Any();
+ }
+ OptionalAny.MergeFrom(other.OptionalAny);
+ }
+ if (other.optionalValue_ != null) {
+ if (optionalValue_ == null) {
+ optionalValue_ = new global::Google.Protobuf.WellKnownTypes.Value();
+ }
+ OptionalValue.MergeFrom(other.OptionalValue);
+ }
+ repeatedDuration_.Add(other.repeatedDuration_);
+ repeatedTimestamp_.Add(other.repeatedTimestamp_);
+ repeatedFieldmask_.Add(other.repeatedFieldmask_);
+ repeatedStruct_.Add(other.repeatedStruct_);
+ repeatedAny_.Add(other.repeatedAny_);
+ repeatedValue_.Add(other.repeatedValue_);
+ if (other.Fieldname1 != 0) {
+ Fieldname1 = other.Fieldname1;
+ }
+ if (other.FieldName2 != 0) {
+ FieldName2 = other.FieldName2;
+ }
+ if (other.FieldName3 != 0) {
+ FieldName3 = other.FieldName3;
+ }
+ if (other.FieldName4 != 0) {
+ FieldName4 = other.FieldName4;
+ }
+ if (other.Field0Name5 != 0) {
+ Field0Name5 = other.Field0Name5;
+ }
+ if (other.Field0Name6 != 0) {
+ Field0Name6 = other.Field0Name6;
+ }
+ if (other.FieldName7 != 0) {
+ FieldName7 = other.FieldName7;
+ }
+ if (other.FieldName8 != 0) {
+ FieldName8 = other.FieldName8;
+ }
+ if (other.FieldName9 != 0) {
+ FieldName9 = other.FieldName9;
+ }
+ if (other.FieldName10 != 0) {
+ FieldName10 = other.FieldName10;
+ }
+ if (other.FIELDNAME11 != 0) {
+ FIELDNAME11 = other.FIELDNAME11;
+ }
+ if (other.FIELDName12 != 0) {
+ FIELDName12 = other.FIELDName12;
+ }
+ if (other.FieldName13 != 0) {
+ FieldName13 = other.FieldName13;
+ }
+ if (other.FieldName14 != 0) {
+ FieldName14 = other.FieldName14;
+ }
+ if (other.FieldName15 != 0) {
+ FieldName15 = other.FieldName15;
+ }
+ if (other.FieldName16 != 0) {
+ FieldName16 = other.FieldName16;
+ }
+ if (other.FieldName17 != 0) {
+ FieldName17 = other.FieldName17;
+ }
+ if (other.FieldName18 != 0) {
+ FieldName18 = other.FieldName18;
+ }
+ switch (other.OneofFieldCase) {
+ case OneofFieldOneofCase.OneofUint32:
+ OneofUint32 = other.OneofUint32;
+ break;
+ case OneofFieldOneofCase.OneofNestedMessage:
+ OneofNestedMessage = other.OneofNestedMessage;
+ break;
+ case OneofFieldOneofCase.OneofString:
+ OneofString = other.OneofString;
+ break;
+ case OneofFieldOneofCase.OneofBytes:
+ OneofBytes = other.OneofBytes;
+ break;
+ case OneofFieldOneofCase.OneofBool:
+ OneofBool = other.OneofBool;
+ break;
+ case OneofFieldOneofCase.OneofUint64:
+ OneofUint64 = other.OneofUint64;
+ break;
+ case OneofFieldOneofCase.OneofFloat:
+ OneofFloat = other.OneofFloat;
+ break;
+ case OneofFieldOneofCase.OneofDouble:
+ OneofDouble = other.OneofDouble;
+ break;
+ case OneofFieldOneofCase.OneofEnum:
+ OneofEnum = other.OneofEnum;
+ break;
+ }
+
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ OptionalInt32 = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ OptionalInt64 = input.ReadInt64();
+ break;
+ }
+ case 24: {
+ OptionalUint32 = input.ReadUInt32();
+ break;
+ }
+ case 32: {
+ OptionalUint64 = input.ReadUInt64();
+ break;
+ }
+ case 40: {
+ OptionalSint32 = input.ReadSInt32();
+ break;
+ }
+ case 48: {
+ OptionalSint64 = input.ReadSInt64();
+ break;
+ }
+ case 61: {
+ OptionalFixed32 = input.ReadFixed32();
+ break;
+ }
+ case 65: {
+ OptionalFixed64 = input.ReadFixed64();
+ break;
+ }
+ case 77: {
+ OptionalSfixed32 = input.ReadSFixed32();
+ break;
+ }
+ case 81: {
+ OptionalSfixed64 = input.ReadSFixed64();
+ break;
+ }
+ case 93: {
+ OptionalFloat = input.ReadFloat();
+ break;
+ }
+ case 97: {
+ OptionalDouble = input.ReadDouble();
+ break;
+ }
+ case 104: {
+ OptionalBool = input.ReadBool();
+ break;
+ }
+ case 114: {
+ OptionalString = input.ReadString();
+ break;
+ }
+ case 122: {
+ OptionalBytes = input.ReadBytes();
+ break;
+ }
+ case 146: {
+ if (optionalNestedMessage_ == null) {
+ optionalNestedMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage();
+ }
+ input.ReadMessage(optionalNestedMessage_);
+ break;
+ }
+ case 154: {
+ if (optionalForeignMessage_ == null) {
+ optionalForeignMessage_ = new global::ProtobufTestMessages.Proto3.ForeignMessage();
+ }
+ input.ReadMessage(optionalForeignMessage_);
+ break;
+ }
+ case 168: {
+ optionalNestedEnum_ = (global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum) input.ReadEnum();
+ break;
+ }
+ case 176: {
+ optionalForeignEnum_ = (global::ProtobufTestMessages.Proto3.ForeignEnum) input.ReadEnum();
+ break;
+ }
+ case 194: {
+ OptionalStringPiece = input.ReadString();
+ break;
+ }
+ case 202: {
+ OptionalCord = input.ReadString();
+ break;
+ }
+ case 218: {
+ if (recursiveMessage_ == null) {
+ recursiveMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypes();
+ }
+ input.ReadMessage(recursiveMessage_);
+ break;
+ }
+ case 250:
+ case 248: {
+ repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
+ break;
+ }
+ case 258:
+ case 256: {
+ repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
+ break;
+ }
+ case 266:
+ case 264: {
+ repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec);
+ break;
+ }
+ case 274:
+ case 272: {
+ repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
+ break;
+ }
+ case 282:
+ case 280: {
+ repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec);
+ break;
+ }
+ case 290:
+ case 288: {
+ repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec);
+ break;
+ }
+ case 298:
+ case 301: {
+ repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
+ break;
+ }
+ case 306:
+ case 305: {
+ repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
+ break;
+ }
+ case 314:
+ case 317: {
+ repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_codec);
+ break;
+ }
+ case 322:
+ case 321: {
+ repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_codec);
+ break;
+ }
+ case 330:
+ case 333: {
+ repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
+ break;
+ }
+ case 338:
+ case 337: {
+ repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec);
+ break;
+ }
+ case 346:
+ case 344: {
+ repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec);
+ break;
+ }
+ case 354: {
+ repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec);
+ break;
+ }
+ case 362: {
+ repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec);
+ break;
+ }
+ case 386: {
+ repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec);
+ break;
+ }
+ case 394: {
+ repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec);
+ break;
+ }
+ case 410:
+ case 408: {
+ repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEnum_codec);
+ break;
+ }
+ case 418:
+ case 416: {
+ repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec);
+ break;
+ }
+ case 434: {
+ repeatedStringPiece_.AddEntriesFrom(input, _repeated_repeatedStringPiece_codec);
+ break;
+ }
+ case 442: {
+ repeatedCord_.AddEntriesFrom(input, _repeated_repeatedCord_codec);
+ break;
+ }
+ case 450: {
+ mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
+ break;
+ }
+ case 458: {
+ mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec);
+ break;
+ }
+ case 466: {
+ mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec);
+ break;
+ }
+ case 474: {
+ mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec);
+ break;
+ }
+ case 482: {
+ mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec);
+ break;
+ }
+ case 490: {
+ mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec);
+ break;
+ }
+ case 498: {
+ mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec);
+ break;
+ }
+ case 506: {
+ mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec);
+ break;
+ }
+ case 514: {
+ mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec);
+ break;
+ }
+ case 522: {
+ mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec);
+ break;
+ }
+ case 530: {
+ mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec);
+ break;
+ }
+ case 538: {
+ mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec);
+ break;
+ }
+ case 546: {
+ mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec);
+ break;
+ }
+ case 554: {
+ mapStringString_.AddEntriesFrom(input, _map_mapStringString_codec);
+ break;
+ }
+ case 562: {
+ mapStringBytes_.AddEntriesFrom(input, _map_mapStringBytes_codec);
+ break;
+ }
+ case 570: {
+ mapStringNestedMessage_.AddEntriesFrom(input, _map_mapStringNestedMessage_codec);
+ break;
+ }
+ case 578: {
+ mapStringForeignMessage_.AddEntriesFrom(input, _map_mapStringForeignMessage_codec);
+ break;
+ }
+ case 586: {
+ mapStringNestedEnum_.AddEntriesFrom(input, _map_mapStringNestedEnum_codec);
+ break;
+ }
+ case 594: {
+ mapStringForeignEnum_.AddEntriesFrom(input, _map_mapStringForeignEnum_codec);
+ break;
+ }
+ case 888: {
+ OneofUint32 = input.ReadUInt32();
+ break;
+ }
+ case 898: {
+ global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage subBuilder = new global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
+ subBuilder.MergeFrom(OneofNestedMessage);
+ }
+ input.ReadMessage(subBuilder);
+ OneofNestedMessage = subBuilder;
+ break;
+ }
+ case 906: {
+ OneofString = input.ReadString();
+ break;
+ }
+ case 914: {
+ OneofBytes = input.ReadBytes();
+ break;
+ }
+ case 920: {
+ OneofBool = input.ReadBool();
+ break;
+ }
+ case 928: {
+ OneofUint64 = input.ReadUInt64();
+ break;
+ }
+ case 941: {
+ OneofFloat = input.ReadFloat();
+ break;
+ }
+ case 945: {
+ OneofDouble = input.ReadDouble();
+ break;
+ }
+ case 952: {
+ oneofField_ = input.ReadEnum();
+ oneofFieldCase_ = OneofFieldOneofCase.OneofEnum;
+ break;
+ }
+ case 1610: {
+ bool? value = _single_optionalBoolWrapper_codec.Read(input);
+ if (optionalBoolWrapper_ == null || value != false) {
+ OptionalBoolWrapper = value;
+ }
+ break;
+ }
+ case 1618: {
+ int? value = _single_optionalInt32Wrapper_codec.Read(input);
+ if (optionalInt32Wrapper_ == null || value != 0) {
+ OptionalInt32Wrapper = value;
+ }
+ break;
+ }
+ case 1626: {
+ long? value = _single_optionalInt64Wrapper_codec.Read(input);
+ if (optionalInt64Wrapper_ == null || value != 0L) {
+ OptionalInt64Wrapper = value;
+ }
+ break;
+ }
+ case 1634: {
+ uint? value = _single_optionalUint32Wrapper_codec.Read(input);
+ if (optionalUint32Wrapper_ == null || value != 0) {
+ OptionalUint32Wrapper = value;
+ }
+ break;
+ }
+ case 1642: {
+ ulong? value = _single_optionalUint64Wrapper_codec.Read(input);
+ if (optionalUint64Wrapper_ == null || value != 0UL) {
+ OptionalUint64Wrapper = value;
+ }
+ break;
+ }
+ case 1650: {
+ float? value = _single_optionalFloatWrapper_codec.Read(input);
+ if (optionalFloatWrapper_ == null || value != 0F) {
+ OptionalFloatWrapper = value;
+ }
+ break;
+ }
+ case 1658: {
+ double? value = _single_optionalDoubleWrapper_codec.Read(input);
+ if (optionalDoubleWrapper_ == null || value != 0D) {
+ OptionalDoubleWrapper = value;
+ }
+ break;
+ }
+ case 1666: {
+ string value = _single_optionalStringWrapper_codec.Read(input);
+ if (optionalStringWrapper_ == null || value != "") {
+ OptionalStringWrapper = value;
+ }
+ break;
+ }
+ case 1674: {
+ pb::ByteString value = _single_optionalBytesWrapper_codec.Read(input);
+ if (optionalBytesWrapper_ == null || value != pb::ByteString.Empty) {
+ OptionalBytesWrapper = value;
+ }
+ break;
+ }
+ case 1690: {
+ repeatedBoolWrapper_.AddEntriesFrom(input, _repeated_repeatedBoolWrapper_codec);
+ break;
+ }
+ case 1698: {
+ repeatedInt32Wrapper_.AddEntriesFrom(input, _repeated_repeatedInt32Wrapper_codec);
+ break;
+ }
+ case 1706: {
+ repeatedInt64Wrapper_.AddEntriesFrom(input, _repeated_repeatedInt64Wrapper_codec);
+ break;
+ }
+ case 1714: {
+ repeatedUint32Wrapper_.AddEntriesFrom(input, _repeated_repeatedUint32Wrapper_codec);
+ break;
+ }
+ case 1722: {
+ repeatedUint64Wrapper_.AddEntriesFrom(input, _repeated_repeatedUint64Wrapper_codec);
+ break;
+ }
+ case 1730: {
+ repeatedFloatWrapper_.AddEntriesFrom(input, _repeated_repeatedFloatWrapper_codec);
+ break;
+ }
+ case 1738: {
+ repeatedDoubleWrapper_.AddEntriesFrom(input, _repeated_repeatedDoubleWrapper_codec);
+ break;
+ }
+ case 1746: {
+ repeatedStringWrapper_.AddEntriesFrom(input, _repeated_repeatedStringWrapper_codec);
+ break;
+ }
+ case 1754: {
+ repeatedBytesWrapper_.AddEntriesFrom(input, _repeated_repeatedBytesWrapper_codec);
+ break;
+ }
+ case 2410: {
+ if (optionalDuration_ == null) {
+ optionalDuration_ = new global::Google.Protobuf.WellKnownTypes.Duration();
+ }
+ input.ReadMessage(optionalDuration_);
+ break;
+ }
+ case 2418: {
+ if (optionalTimestamp_ == null) {
+ optionalTimestamp_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ input.ReadMessage(optionalTimestamp_);
+ break;
+ }
+ case 2426: {
+ if (optionalFieldMask_ == null) {
+ optionalFieldMask_ = new global::Google.Protobuf.WellKnownTypes.FieldMask();
+ }
+ input.ReadMessage(optionalFieldMask_);
+ break;
+ }
+ case 2434: {
+ if (optionalStruct_ == null) {
+ optionalStruct_ = new global::Google.Protobuf.WellKnownTypes.Struct();
+ }
+ input.ReadMessage(optionalStruct_);
+ break;
+ }
+ case 2442: {
+ if (optionalAny_ == null) {
+ optionalAny_ = new global::Google.Protobuf.WellKnownTypes.Any();
+ }
+ input.ReadMessage(optionalAny_);
+ break;
+ }
+ case 2450: {
+ if (optionalValue_ == null) {
+ optionalValue_ = new global::Google.Protobuf.WellKnownTypes.Value();
+ }
+ input.ReadMessage(optionalValue_);
+ break;
+ }
+ case 2490: {
+ repeatedDuration_.AddEntriesFrom(input, _repeated_repeatedDuration_codec);
+ break;
+ }
+ case 2498: {
+ repeatedTimestamp_.AddEntriesFrom(input, _repeated_repeatedTimestamp_codec);
+ break;
+ }
+ case 2506: {
+ repeatedFieldmask_.AddEntriesFrom(input, _repeated_repeatedFieldmask_codec);
+ break;
+ }
+ case 2522: {
+ repeatedAny_.AddEntriesFrom(input, _repeated_repeatedAny_codec);
+ break;
+ }
+ case 2530: {
+ repeatedValue_.AddEntriesFrom(input, _repeated_repeatedValue_codec);
+ break;
+ }
+ case 2594: {
+ repeatedStruct_.AddEntriesFrom(input, _repeated_repeatedStruct_codec);
+ break;
+ }
+ case 3208: {
+ Fieldname1 = input.ReadInt32();
+ break;
+ }
+ case 3216: {
+ FieldName2 = input.ReadInt32();
+ break;
+ }
+ case 3224: {
+ FieldName3 = input.ReadInt32();
+ break;
+ }
+ case 3232: {
+ FieldName4 = input.ReadInt32();
+ break;
+ }
+ case 3240: {
+ Field0Name5 = input.ReadInt32();
+ break;
+ }
+ case 3248: {
+ Field0Name6 = input.ReadInt32();
+ break;
+ }
+ case 3256: {
+ FieldName7 = input.ReadInt32();
+ break;
+ }
+ case 3264: {
+ FieldName8 = input.ReadInt32();
+ break;
+ }
+ case 3272: {
+ FieldName9 = input.ReadInt32();
+ break;
+ }
+ case 3280: {
+ FieldName10 = input.ReadInt32();
+ break;
+ }
+ case 3288: {
+ FIELDNAME11 = input.ReadInt32();
+ break;
+ }
+ case 3296: {
+ FIELDName12 = input.ReadInt32();
+ break;
+ }
+ case 3304: {
+ FieldName13 = input.ReadInt32();
+ break;
+ }
+ case 3312: {
+ FieldName14 = input.ReadInt32();
+ break;
+ }
+ case 3320: {
+ FieldName15 = input.ReadInt32();
+ break;
+ }
+ case 3328: {
+ FieldName16 = input.ReadInt32();
+ break;
+ }
+ case 3336: {
+ FieldName17 = input.ReadInt32();
+ break;
+ }
+ case 3344: {
+ FieldName18 = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestAllTypes message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public enum NestedEnum {
+ [pbr::OriginalName("FOO")] Foo = 0,
+ [pbr::OriginalName("BAR")] Bar = 1,
+ [pbr::OriginalName("BAZ")] Baz = 2,
+ /// <summary>
+ /// Intentionally negative.
+ /// </summary>
+ [pbr::OriginalName("NEG")] Neg = -1,
+ }
+
+ public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
+ private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::ProtobufTestMessages.Proto3.TestAllTypes.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage(NestedMessage other) : this() {
+ a_ = other.a_;
+ Corecursive = other.corecursive_ != null ? other.Corecursive.Clone() : null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage Clone() {
+ return new NestedMessage(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 1;
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { return a_; }
+ set {
+ a_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "corecursive" field.</summary>
+ public const int CorecursiveFieldNumber = 2;
+ private global::ProtobufTestMessages.Proto3.TestAllTypes corecursive_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::ProtobufTestMessages.Proto3.TestAllTypes Corecursive {
+ get { return corecursive_; }
+ set {
+ corecursive_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as NestedMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(NestedMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ if (!object.Equals(Corecursive, other.Corecursive)) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (A != 0) hash ^= A.GetHashCode();
+ if (corecursive_ != null) hash ^= Corecursive.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (A != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(A);
+ }
+ if (corecursive_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(Corecursive);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (A != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (corecursive_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Corecursive);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(NestedMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.A != 0) {
+ A = other.A;
+ }
+ if (other.corecursive_ != null) {
+ if (corecursive_ == null) {
+ corecursive_ = new global::ProtobufTestMessages.Proto3.TestAllTypes();
+ }
+ Corecursive.MergeFrom(other.Corecursive);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ A = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ if (corecursive_ == null) {
+ corecursive_ = new global::ProtobufTestMessages.Proto3.TestAllTypes();
+ }
+ input.ReadMessage(corecursive_);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage> {
+ private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::MessageParser<ForeignMessage>(() => new ForeignMessage());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<ForeignMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::ProtobufTestMessages.Proto3.TestMessagesProto3Reflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ForeignMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ForeignMessage(ForeignMessage other) : this() {
+ c_ = other.c_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ForeignMessage Clone() {
+ return new ForeignMessage(this);
+ }
+
+ /// <summary>Field number for the "c" field.</summary>
+ public const int CFieldNumber = 1;
+ private int c_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int C {
+ get { return c_; }
+ set {
+ c_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ForeignMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ForeignMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (C != other.C) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (C != 0) hash ^= C.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (C != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(C);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (C != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(C);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ForeignMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.C != 0) {
+ C = other.C;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ C = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs
index f2db6b4e..7c0ba8a6 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs
@@ -79,8 +79,8 @@ namespace UnitTest.Issues.TestProtos {
#region Messages
/// <summary>
- /// Issue 307: when generating doubly-nested types, any references
- /// should be of the form A.Types.B.Types.C.
+ /// Issue 307: when generating doubly-nested types, any references
+ /// should be of the form A.Types.B.Types.C.
/// </summary>
public sealed partial class Issue307 : pb::IMessage<Issue307> {
private static readonly pb::MessageParser<Issue307> _parser = new pb::MessageParser<Issue307>(() => new Issue307());
@@ -859,7 +859,7 @@ namespace UnitTest.Issues.TestProtos {
}
/// <summary>
- /// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=45
+ /// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=45
/// </summary>
public sealed partial class ItemField : pb::IMessage<ItemField> {
private static readonly pb::MessageParser<ItemField> _parser = new pb::MessageParser<ItemField>(() => new ItemField());
@@ -1126,7 +1126,7 @@ namespace UnitTest.Issues.TestProtos {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static partial class Types {
/// <summary>
- /// Force a nested type called Types
+ /// Force a nested type called Types
/// </summary>
public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType> {
private static readonly pb::MessageParser<SomeNestedType> _parser = new pb::MessageParser<SomeNestedType>(() => new SomeNestedType());
@@ -1223,16 +1223,16 @@ namespace UnitTest.Issues.TestProtos {
}
/// <summary>
- /// These fields are deliberately not declared in numeric
- /// order, and the oneof fields aren't contiguous either.
- /// This allows for reasonably robust tests of JSON output
- /// ordering.
- /// TestFieldOrderings in unittest_proto3.proto is similar,
- /// but doesn't include oneofs.
- /// TODO: Consider adding oneofs to TestFieldOrderings, although
- /// that will require fixing other tests in multiple platforms.
- /// Alternatively, consider just adding this to
- /// unittest_proto3.proto if multiple platforms want it.
+ /// These fields are deliberately not declared in numeric
+ /// order, and the oneof fields aren't contiguous either.
+ /// This allows for reasonably robust tests of JSON output
+ /// ordering.
+ /// TestFieldOrderings in unittest_proto3.proto is similar,
+ /// but doesn't include oneofs.
+ /// TODO: Consider adding oneofs to TestFieldOrderings, although
+ /// that will require fixing other tests in multiple platforms.
+ /// Alternatively, consider just adding this to
+ /// unittest_proto3.proto if multiple platforms want it.
/// </summary>
public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonFieldOrdering> {
private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = new pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering());
@@ -1591,7 +1591,7 @@ namespace UnitTest.Issues.TestProtos {
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
- /// Message for testing the effects for of the json_name option
+ /// Message for testing the effects for of the json_name option
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
index 7e71f94d..d89bbbb0 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
@@ -199,7 +199,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Test an enum that has multiple values with the same number.
+ /// Test an enum that has multiple values with the same number.
/// </summary>
public enum TestEnumWithDupValue {
[pbr::OriginalName("TEST_ENUM_WITH_DUP_VALUE_UNSPECIFIED")] Unspecified = 0,
@@ -211,7 +211,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Test an enum with large, unordered values.
+ /// Test an enum with large, unordered values.
/// </summary>
public enum TestSparseEnum {
[pbr::OriginalName("TEST_SPARSE_ENUM_UNSPECIFIED")] Unspecified = 0,
@@ -221,8 +221,8 @@ namespace Google.Protobuf.TestProtos {
[pbr::OriginalName("SPARSE_D")] SparseD = -15,
[pbr::OriginalName("SPARSE_E")] SparseE = -53452,
/// <summary>
- /// In proto3, value 0 must be the first one specified
- /// SPARSE_F = 0;
+ /// In proto3, value 0 must be the first one specified
+ /// SPARSE_F = 0;
/// </summary>
[pbr::OriginalName("SPARSE_G")] SparseG = 2,
}
@@ -231,8 +231,8 @@ namespace Google.Protobuf.TestProtos {
#region Messages
/// <summary>
- /// This proto includes every type of field in both singular and repeated
- /// forms.
+ /// This proto includes every type of field in both singular and repeated
+ /// forms.
/// </summary>
public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes> {
private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::MessageParser<TestAllTypes>(() => new TestAllTypes());
@@ -328,7 +328,7 @@ namespace Google.Protobuf.TestProtos {
public const int SingleInt32FieldNumber = 1;
private int singleInt32_;
/// <summary>
- /// Singular
+ /// Singular
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int SingleInt32 {
@@ -562,7 +562,7 @@ namespace Google.Protobuf.TestProtos {
public const int SinglePublicImportMessageFieldNumber = 26;
private global::Google.Protobuf.TestProtos.PublicImportMessage singlePublicImportMessage_;
/// <summary>
- /// Defined in unittest_import_public.proto
+ /// Defined in unittest_import_public.proto
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.TestProtos.PublicImportMessage SinglePublicImportMessage {
@@ -578,7 +578,7 @@ namespace Google.Protobuf.TestProtos {
= pb::FieldCodec.ForInt32(250);
private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
/// <summary>
- /// Repeated
+ /// Repeated
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<int> RepeatedInt32 {
@@ -791,7 +791,7 @@ namespace Google.Protobuf.TestProtos {
= pb::FieldCodec.ForMessage(434, global::Google.Protobuf.TestProtos.PublicImportMessage.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage> repeatedPublicImportMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage>();
/// <summary>
- /// Defined in unittest_import_public.proto
+ /// Defined in unittest_import_public.proto
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage> RepeatedPublicImportMessage {
@@ -1593,7 +1593,7 @@ namespace Google.Protobuf.TestProtos {
[pbr::OriginalName("BAR")] Bar = 2,
[pbr::OriginalName("BAZ")] Baz = 3,
/// <summary>
- /// Intentionally negative.
+ /// Intentionally negative.
/// </summary>
[pbr::OriginalName("NEG")] Neg = -1,
}
@@ -1634,9 +1634,9 @@ namespace Google.Protobuf.TestProtos {
public const int BbFieldNumber = 1;
private int bb_;
/// <summary>
- /// The field name "b" fails to compile in proto1 because it conflicts with
- /// a local variable named "b" in one of the generated methods. Doh.
- /// This file needs to compile in proto1 to test backwards-compatibility.
+ /// The field name "b" fails to compile in proto1 because it conflicts with
+ /// a local variable named "b" in one of the generated methods. Doh.
+ /// This file needs to compile in proto1 to test backwards-compatibility.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Bb {
@@ -1726,7 +1726,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// This proto includes a recusively nested message.
+ /// This proto includes a recusively nested message.
/// </summary>
public sealed partial class NestedTestAllTypes : pb::IMessage<NestedTestAllTypes> {
private static readonly pb::MessageParser<NestedTestAllTypes> _parser = new pb::MessageParser<NestedTestAllTypes>(() => new NestedTestAllTypes());
@@ -2024,8 +2024,8 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Define these after TestAllTypes to make sure the compiler can handle
- /// that.
+ /// Define these after TestAllTypes to make sure the compiler can handle
+ /// that.
/// </summary>
public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage> {
private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::MessageParser<ForeignMessage>(() => new ForeignMessage());
@@ -2234,7 +2234,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Test that we can use NestedMessage from outside TestAllTypes.
+ /// Test that we can use NestedMessage from outside TestAllTypes.
/// </summary>
public sealed partial class TestForeignNested : pb::IMessage<TestForeignNested> {
private static readonly pb::MessageParser<TestForeignNested> _parser = new pb::MessageParser<TestForeignNested>(() => new TestForeignNested());
@@ -2360,7 +2360,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Test that really large tag numbers don't break anything.
+ /// Test that really large tag numbers don't break anything.
/// </summary>
public sealed partial class TestReallyLargeTagNumber : pb::IMessage<TestReallyLargeTagNumber> {
private static readonly pb::MessageParser<TestReallyLargeTagNumber> _parser = new pb::MessageParser<TestReallyLargeTagNumber>(() => new TestReallyLargeTagNumber());
@@ -2399,8 +2399,8 @@ namespace Google.Protobuf.TestProtos {
public const int AFieldNumber = 1;
private int a_;
/// <summary>
- /// The largest possible tag number is 2^28 - 1, since the wire format uses
- /// three bits to communicate wire type.
+ /// The largest possible tag number is 2^28 - 1, since the wire format uses
+ /// three bits to communicate wire type.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int A {
@@ -2663,7 +2663,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Test that mutual recursion works.
+ /// Test that mutual recursion works.
/// </summary>
public sealed partial class TestMutualRecursionA : pb::IMessage<TestMutualRecursionA> {
private static readonly pb::MessageParser<TestMutualRecursionA> _parser = new pb::MessageParser<TestMutualRecursionA>(() => new TestMutualRecursionA());
@@ -2940,8 +2940,8 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Test message with CamelCase field names. This violates Protocol Buffer
- /// standard style.
+ /// Test message with CamelCase field names. This violates Protocol Buffer
+ /// standard style.
/// </summary>
public sealed partial class TestCamelCaseFieldNames : pb::IMessage<TestCamelCaseFieldNames> {
private static readonly pb::MessageParser<TestCamelCaseFieldNames> _parser = new pb::MessageParser<TestCamelCaseFieldNames>(() => new TestCamelCaseFieldNames());
@@ -3233,8 +3233,8 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// We list fields out of order, to ensure that we're using field number and not
- /// field index to determine serialization order.
+ /// We list fields out of order, to ensure that we're using field number and not
+ /// field index to determine serialization order.
/// </summary>
public sealed partial class TestFieldOrderings : pb::IMessage<TestFieldOrderings> {
private static readonly pb::MessageParser<TestFieldOrderings> _parser = new pb::MessageParser<TestFieldOrderings>(() => new TestFieldOrderings());
@@ -3493,9 +3493,9 @@ namespace Google.Protobuf.TestProtos {
public const int BbFieldNumber = 1;
private int bb_;
/// <summary>
- /// The field name "b" fails to compile in proto1 because it conflicts with
- /// a local variable named "b" in one of the generated methods. Doh.
- /// This file needs to compile in proto1 to test backwards-compatibility.
+ /// The field name "b" fails to compile in proto1 because it conflicts with
+ /// a local variable named "b" in one of the generated methods. Doh.
+ /// This file needs to compile in proto1 to test backwards-compatibility.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Bb {
@@ -3718,7 +3718,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Test String and Bytes: string is for valid UTF-8 strings
+ /// Test String and Bytes: string is for valid UTF-8 strings
/// </summary>
public sealed partial class OneString : pb::IMessage<OneString> {
private static readonly pb::MessageParser<OneString> _parser = new pb::MessageParser<OneString>(() => new OneString());
@@ -4181,7 +4181,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Test int32, uint32, int64, uint64, and bool are all compatible
+ /// Test int32, uint32, int64, uint64, and bool are all compatible
/// </summary>
public sealed partial class Int32Message : pb::IMessage<Int32Message> {
private static readonly pb::MessageParser<Int32Message> _parser = new pb::MessageParser<Int32Message>(() => new Int32Message());
@@ -4769,7 +4769,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Test oneofs.
+ /// Test oneofs.
/// </summary>
public sealed partial class TestOneof : pb::IMessage<TestOneof> {
private static readonly pb::MessageParser<TestOneof> _parser = new pb::MessageParser<TestOneof>(() => new TestOneof());
@@ -5367,8 +5367,8 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// A message with the same fields as TestPackedTypes, but without packing. Used
- /// to test packed &lt;-> unpacked wire compatibility.
+ /// A message with the same fields as TestPackedTypes, but without packing. Used
+ /// to test packed &lt;-> unpacked wire compatibility.
/// </summary>
public sealed partial class TestUnpackedTypes : pb::IMessage<TestUnpackedTypes> {
private static readonly pb::MessageParser<TestUnpackedTypes> _parser = new pb::MessageParser<TestUnpackedTypes>(() => new TestUnpackedTypes());
@@ -5796,9 +5796,9 @@ namespace Google.Protobuf.TestProtos {
= pb::FieldCodec.ForFixed32(98);
private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
/// <summary>
- /// Parsing repeated fixed size values used to fail. This message needs to be
- /// used in order to get a tag of the right size; all of the repeated fields
- /// in TestAllTypes didn't trigger the check.
+ /// Parsing repeated fixed size values used to fail. This message needs to be
+ /// used in order to get a tag of the right size; all of the repeated fields
+ /// in TestAllTypes didn't trigger the check.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<uint> RepeatedFixed32 {
@@ -5811,7 +5811,7 @@ namespace Google.Protobuf.TestProtos {
= pb::FieldCodec.ForInt32(106);
private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
/// <summary>
- /// Check for a varint type, just for good measure.
+ /// Check for a varint type, just for good measure.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<int> RepeatedInt32 {
@@ -5824,7 +5824,7 @@ namespace Google.Protobuf.TestProtos {
= pb::FieldCodec.ForFixed64(16370);
private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
/// <summary>
- /// These have two-byte tags.
+ /// These have two-byte tags.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<ulong> RepeatedFixed64 {
@@ -5847,7 +5847,7 @@ namespace Google.Protobuf.TestProtos {
= pb::FieldCodec.ForFloat(2097138);
private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
/// <summary>
- /// Three byte tags.
+ /// Three byte tags.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<float> RepeatedFloat {
@@ -6018,7 +6018,7 @@ namespace Google.Protobuf.TestProtos {
public const int AFieldNumber = 1;
private string a_ = "";
/// <summary>
- /// */ &lt;- This should not close the generated doc comment
+ /// */ &lt;- This should not close the generated doc comment
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string A {
@@ -6103,7 +6103,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// Test that RPC services work.
+ /// Test that RPC services work.
/// </summary>
public sealed partial class FooRequest : pb::IMessage<FooRequest> {
private static readonly pb::MessageParser<FooRequest> _parser = new pb::MessageParser<FooRequest>(() => new FooRequest());
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
index 6e87fb5d..2c7f0e0e 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
@@ -173,9 +173,9 @@ namespace Google.Protobuf.TestProtos {
}
#region Messages
/// <summary>
- /// Test that we can include all well-known types.
- /// Each wrapper type is included separately, as languages
- /// map handle different wrappers in different ways.
+ /// Test that we can include all well-known types.
+ /// Each wrapper type is included separately, as languages
+ /// map handle different wrappers in different ways.
/// </summary>
public sealed partial class TestWellKnownTypes : pb::IMessage<TestWellKnownTypes> {
private static readonly pb::MessageParser<TestWellKnownTypes> _parser = new pb::MessageParser<TestWellKnownTypes>(() => new TestWellKnownTypes());
@@ -438,7 +438,7 @@ namespace Google.Protobuf.TestProtos {
public const int ValueFieldFieldNumber = 19;
private global::Google.Protobuf.WellKnownTypes.Value valueField_;
/// <summary>
- /// Part of struct, but useful to be able to test separately
+ /// Part of struct, but useful to be able to test separately
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Value ValueField {
@@ -907,7 +907,7 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// A repeated field for each well-known type.
+ /// A repeated field for each well-known type.
/// </summary>
public sealed partial class RepeatedWellKnownTypes : pb::IMessage<RepeatedWellKnownTypes> {
private static readonly pb::MessageParser<RepeatedWellKnownTypes> _parser = new pb::MessageParser<RepeatedWellKnownTypes>(() => new RepeatedWellKnownTypes());
@@ -1054,7 +1054,7 @@ namespace Google.Protobuf.TestProtos {
= pb::FieldCodec.ForStructWrapper<double>(82);
private readonly pbc::RepeatedField<double?> doubleField_ = new pbc::RepeatedField<double?>();
/// <summary>
- /// These don't actually make a lot of sense, but they're not prohibited...
+ /// These don't actually make a lot of sense, but they're not prohibited...
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<double?> DoubleField {
@@ -2079,9 +2079,9 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// A map field for each well-known type. We only
- /// need to worry about the value part of the map being the
- /// well-known types, as messages can't be map keys.
+ /// A map field for each well-known type. We only
+ /// need to worry about the value part of the map being the
+ /// well-known types, as messages can't be map keys.
/// </summary>
public sealed partial class MapWellKnownTypes : pb::IMessage<MapWellKnownTypes> {
private static readonly pb::MessageParser<MapWellKnownTypes> _parser = new pb::MessageParser<MapWellKnownTypes>(() => new MapWellKnownTypes());
diff --git a/csharp/src/Google.Protobuf/ByteString.cs b/csharp/src/Google.Protobuf/ByteString.cs
index dd7f22d6..5c652cc3 100644
--- a/csharp/src/Google.Protobuf/ByteString.cs
+++ b/csharp/src/Google.Protobuf/ByteString.cs
@@ -303,7 +303,7 @@ namespace Google.Protobuf
int ret = 23;
foreach (byte b in bytes)
{
- ret = (ret << 8) | b;
+ ret = (ret * 31) + b;
}
return ret;
}
diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
index decc0b06..d743e516 100644
--- a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
+++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
@@ -142,9 +142,10 @@ namespace Google.Protobuf.Reflection {
"CmFubm90YXRpb24YASADKAsyLS5nb29nbGUucHJvdG9idWYuR2VuZXJhdGVk",
"Q29kZUluZm8uQW5ub3RhdGlvbhpPCgpBbm5vdGF0aW9uEhAKBHBhdGgYASAD",
"KAVCAhABEhMKC3NvdXJjZV9maWxlGAIgASgJEg0KBWJlZ2luGAMgASgFEgsK",
- "A2VuZBgEIAEoBUJYChNjb20uZ29vZ2xlLnByb3RvYnVmQhBEZXNjcmlwdG9y",
- "UHJvdG9zSAFaCmRlc2NyaXB0b3KiAgNHUEKqAhpHb29nbGUuUHJvdG9idWYu",
- "UmVmbGVjdGlvbg=="));
+ "A2VuZBgEIAEoBUKMAQoTY29tLmdvb2dsZS5wcm90b2J1ZkIQRGVzY3JpcHRv",
+ "clByb3Rvc0gBWj5naXRodWIuY29tL2dvbGFuZy9wcm90b2J1Zi9wcm90b2Mt",
+ "Z2VuLWdvL2Rlc2NyaXB0b3I7ZGVzY3JpcHRvcqICA0dQQqoCGkdvb2dsZS5Q",
+ "cm90b2J1Zi5SZWZsZWN0aW9u"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
@@ -176,8 +177,8 @@ namespace Google.Protobuf.Reflection {
}
#region Messages
/// <summary>
- /// The protocol compiler can output a FileDescriptorSet containing the .proto
- /// files it parses.
+ /// The protocol compiler can output a FileDescriptorSet containing the .proto
+ /// files it parses.
/// </summary>
internal sealed partial class FileDescriptorSet : pb::IMessage<FileDescriptorSet> {
private static readonly pb::MessageParser<FileDescriptorSet> _parser = new pb::MessageParser<FileDescriptorSet>(() => new FileDescriptorSet());
@@ -289,7 +290,7 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// Describes a complete .proto file.
+ /// Describes a complete .proto file.
/// </summary>
internal sealed partial class FileDescriptorProto : pb::IMessage<FileDescriptorProto> {
private static readonly pb::MessageParser<FileDescriptorProto> _parser = new pb::MessageParser<FileDescriptorProto>(() => new FileDescriptorProto());
@@ -338,7 +339,7 @@ namespace Google.Protobuf.Reflection {
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
- /// file name, relative to root of source tree
+ /// file name, relative to root of source tree
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
@@ -352,7 +353,7 @@ namespace Google.Protobuf.Reflection {
public const int PackageFieldNumber = 2;
private string package_ = "";
/// <summary>
- /// e.g. "foo", "foo.bar", etc.
+ /// e.g. "foo", "foo.bar", etc.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Package {
@@ -368,7 +369,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForString(26);
private readonly pbc::RepeatedField<string> dependency_ = new pbc::RepeatedField<string>();
/// <summary>
- /// Names of files imported by this file.
+ /// Names of files imported by this file.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<string> Dependency {
@@ -381,7 +382,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForInt32(80);
private readonly pbc::RepeatedField<int> publicDependency_ = new pbc::RepeatedField<int>();
/// <summary>
- /// Indexes of the public imported files in the dependency list above.
+ /// Indexes of the public imported files in the dependency list above.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<int> PublicDependency {
@@ -394,8 +395,8 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForInt32(88);
private readonly pbc::RepeatedField<int> weakDependency_ = new pbc::RepeatedField<int>();
/// <summary>
- /// Indexes of the weak imported files in the dependency list.
- /// For Google-internal migration only. Do not use.
+ /// Indexes of the weak imported files in the dependency list.
+ /// For Google-internal migration only. Do not use.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<int> WeakDependency {
@@ -408,7 +409,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.DescriptorProto.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto> messageType_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto>();
/// <summary>
- /// All top-level definitions in this file.
+ /// All top-level definitions in this file.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto> MessageType {
@@ -460,10 +461,10 @@ namespace Google.Protobuf.Reflection {
public const int SourceCodeInfoFieldNumber = 9;
private global::Google.Protobuf.Reflection.SourceCodeInfo sourceCodeInfo_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.Reflection.SourceCodeInfo SourceCodeInfo {
@@ -477,8 +478,8 @@ namespace Google.Protobuf.Reflection {
public const int SyntaxFieldNumber = 12;
private string syntax_ = "";
/// <summary>
- /// The syntax of the proto file.
- /// The supported values are "proto2" and "proto3".
+ /// The syntax of the proto file.
+ /// The supported values are "proto2" and "proto3".
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Syntax {
@@ -704,7 +705,7 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// Describes a message type.
+ /// Describes a message type.
/// </summary>
internal sealed partial class DescriptorProto : pb::IMessage<DescriptorProto> {
private static readonly pb::MessageParser<DescriptorProto> _parser = new pb::MessageParser<DescriptorProto>(() => new DescriptorProto());
@@ -845,8 +846,8 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForString(82);
private readonly pbc::RepeatedField<string> reservedName_ = new pbc::RepeatedField<string>();
/// <summary>
- /// Reserved field names, which may not be used by fields in the same message.
- /// A given name may only be reserved once.
+ /// Reserved field names, which may not be used by fields in the same message.
+ /// A given name may only be reserved once.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<string> ReservedName {
@@ -1169,9 +1170,9 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
internal sealed partial class ReservedRange : pb::IMessage<ReservedRange> {
private static readonly pb::MessageParser<ReservedRange> _parser = new pb::MessageParser<ReservedRange>(() => new ReservedRange());
@@ -1210,7 +1211,7 @@ namespace Google.Protobuf.Reflection {
public const int StartFieldNumber = 1;
private int start_;
/// <summary>
- /// Inclusive.
+ /// Inclusive.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Start {
@@ -1224,7 +1225,7 @@ namespace Google.Protobuf.Reflection {
public const int EndFieldNumber = 2;
private int end_;
/// <summary>
- /// Exclusive.
+ /// Exclusive.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int End {
@@ -1330,7 +1331,7 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// Describes a field within a message.
+ /// Describes a field within a message.
/// </summary>
internal sealed partial class FieldDescriptorProto : pb::IMessage<FieldDescriptorProto> {
private static readonly pb::MessageParser<FieldDescriptorProto> _parser = new pb::MessageParser<FieldDescriptorProto>(() => new FieldDescriptorProto());
@@ -1410,8 +1411,8 @@ namespace Google.Protobuf.Reflection {
public const int TypeFieldNumber = 5;
private global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type type_ = 0;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type Type {
@@ -1425,11 +1426,11 @@ namespace Google.Protobuf.Reflection {
public const int TypeNameFieldNumber = 6;
private string typeName_ = "";
/// <summary>
- /// 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).
+ /// 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).
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string TypeName {
@@ -1443,8 +1444,8 @@ namespace Google.Protobuf.Reflection {
public const int ExtendeeFieldNumber = 2;
private string extendee_ = "";
/// <summary>
- /// For extensions, this is the name of the type being extended. It is
- /// resolved in the same manner as type_name.
+ /// For extensions, this is the name of the type being extended. It is
+ /// resolved in the same manner as type_name.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Extendee {
@@ -1458,11 +1459,11 @@ namespace Google.Protobuf.Reflection {
public const int DefaultValueFieldNumber = 7;
private string defaultValue_ = "";
/// <summary>
- /// 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.
- /// TODO(kenton): Base-64 encode?
+ /// 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.
+ /// TODO(kenton): Base-64 encode?
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string DefaultValue {
@@ -1476,8 +1477,8 @@ namespace Google.Protobuf.Reflection {
public const int OneofIndexFieldNumber = 9;
private int oneofIndex_;
/// <summary>
- /// If set, gives the index of a oneof in the containing type's oneof_decl
- /// list. This field is a member of that oneof.
+ /// If set, gives the index of a oneof in the containing type's oneof_decl
+ /// list. This field is a member of that oneof.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int OneofIndex {
@@ -1491,10 +1492,10 @@ namespace Google.Protobuf.Reflection {
public const int JsonNameFieldNumber = 10;
private string jsonName_ = "";
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string JsonName {
@@ -1743,20 +1744,20 @@ namespace Google.Protobuf.Reflection {
public static partial class Types {
internal enum Type {
/// <summary>
- /// 0 is reserved for errors.
- /// Order is weird for historical reasons.
+ /// 0 is reserved for errors.
+ /// Order is weird for historical reasons.
/// </summary>
[pbr::OriginalName("TYPE_DOUBLE")] Double = 1,
[pbr::OriginalName("TYPE_FLOAT")] Float = 2,
/// <summary>
- /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
- /// negative values are likely.
+ /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
+ /// negative values are likely.
/// </summary>
[pbr::OriginalName("TYPE_INT64")] Int64 = 3,
[pbr::OriginalName("TYPE_UINT64")] Uint64 = 4,
/// <summary>
- /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
- /// negative values are likely.
+ /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
+ /// negative values are likely.
/// </summary>
[pbr::OriginalName("TYPE_INT32")] Int32 = 5,
[pbr::OriginalName("TYPE_FIXED64")] Fixed64 = 6,
@@ -1764,15 +1765,15 @@ namespace Google.Protobuf.Reflection {
[pbr::OriginalName("TYPE_BOOL")] Bool = 8,
[pbr::OriginalName("TYPE_STRING")] String = 9,
/// <summary>
- /// Tag-delimited aggregate.
+ /// Tag-delimited aggregate.
/// </summary>
[pbr::OriginalName("TYPE_GROUP")] Group = 10,
/// <summary>
- /// Length-delimited aggregate.
+ /// Length-delimited aggregate.
/// </summary>
[pbr::OriginalName("TYPE_MESSAGE")] Message = 11,
/// <summary>
- /// New in version 2.
+ /// New in version 2.
/// </summary>
[pbr::OriginalName("TYPE_BYTES")] Bytes = 12,
[pbr::OriginalName("TYPE_UINT32")] Uint32 = 13,
@@ -1780,18 +1781,18 @@ namespace Google.Protobuf.Reflection {
[pbr::OriginalName("TYPE_SFIXED32")] Sfixed32 = 15,
[pbr::OriginalName("TYPE_SFIXED64")] Sfixed64 = 16,
/// <summary>
- /// Uses ZigZag encoding.
+ /// Uses ZigZag encoding.
/// </summary>
[pbr::OriginalName("TYPE_SINT32")] Sint32 = 17,
/// <summary>
- /// Uses ZigZag encoding.
+ /// Uses ZigZag encoding.
/// </summary>
[pbr::OriginalName("TYPE_SINT64")] Sint64 = 18,
}
internal enum Label {
/// <summary>
- /// 0 is reserved for errors
+ /// 0 is reserved for errors
/// </summary>
[pbr::OriginalName("LABEL_OPTIONAL")] Optional = 1,
[pbr::OriginalName("LABEL_REQUIRED")] Required = 2,
@@ -1804,7 +1805,7 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// Describes a oneof.
+ /// Describes a oneof.
/// </summary>
internal sealed partial class OneofDescriptorProto : pb::IMessage<OneofDescriptorProto> {
private static readonly pb::MessageParser<OneofDescriptorProto> _parser = new pb::MessageParser<OneofDescriptorProto>(() => new OneofDescriptorProto());
@@ -1958,7 +1959,7 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// Describes an enum type.
+ /// Describes an enum type.
/// </summary>
internal sealed partial class EnumDescriptorProto : pb::IMessage<EnumDescriptorProto> {
private static readonly pb::MessageParser<EnumDescriptorProto> _parser = new pb::MessageParser<EnumDescriptorProto>(() => new EnumDescriptorProto());
@@ -2132,7 +2133,7 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// Describes a value within an enum.
+ /// Describes a value within an enum.
/// </summary>
internal sealed partial class EnumValueDescriptorProto : pb::IMessage<EnumValueDescriptorProto> {
private static readonly pb::MessageParser<EnumValueDescriptorProto> _parser = new pb::MessageParser<EnumValueDescriptorProto>(() => new EnumValueDescriptorProto());
@@ -2314,7 +2315,7 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// Describes a service.
+ /// Describes a service.
/// </summary>
internal sealed partial class ServiceDescriptorProto : pb::IMessage<ServiceDescriptorProto> {
private static readonly pb::MessageParser<ServiceDescriptorProto> _parser = new pb::MessageParser<ServiceDescriptorProto>(() => new ServiceDescriptorProto());
@@ -2488,7 +2489,7 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// Describes a method of a service.
+ /// Describes a method of a service.
/// </summary>
internal sealed partial class MethodDescriptorProto : pb::IMessage<MethodDescriptorProto> {
private static readonly pb::MessageParser<MethodDescriptorProto> _parser = new pb::MessageParser<MethodDescriptorProto>(() => new MethodDescriptorProto());
@@ -2542,8 +2543,8 @@ namespace Google.Protobuf.Reflection {
public const int InputTypeFieldNumber = 2;
private string inputType_ = "";
/// <summary>
- /// Input and output type names. These are resolved in the same way as
- /// FieldDescriptorProto.type_name, but must refer to a message type.
+ /// Input and output type names. These are resolved in the same way as
+ /// FieldDescriptorProto.type_name, but must refer to a message type.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string InputType {
@@ -2579,7 +2580,7 @@ namespace Google.Protobuf.Reflection {
public const int ClientStreamingFieldNumber = 5;
private bool clientStreaming_;
/// <summary>
- /// Identifies if client streams multiple client messages
+ /// Identifies if client streams multiple client messages
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool ClientStreaming {
@@ -2593,7 +2594,7 @@ namespace Google.Protobuf.Reflection {
public const int ServerStreamingFieldNumber = 6;
private bool serverStreaming_;
/// <summary>
- /// Identifies if server streams multiple server messages
+ /// Identifies if server streams multiple server messages
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool ServerStreaming {
@@ -2814,10 +2815,10 @@ namespace Google.Protobuf.Reflection {
public const int JavaPackageFieldNumber = 1;
private string javaPackage_ = "";
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string JavaPackage {
@@ -2831,11 +2832,11 @@ namespace Google.Protobuf.Reflection {
public const int JavaOuterClassnameFieldNumber = 8;
private string javaOuterClassname_ = "";
/// <summary>
- /// If set, all the classes from the .proto file are wrapped in a single
- /// outer class with the given name. This applies to both Proto1
- /// (equivalent to the old "--one_java_file" option) and Proto2 (where
- /// a .proto always translates to a single class, but you may want to
- /// explicitly choose the class name).
+ /// If set, all the classes from the .proto file are wrapped in a single
+ /// outer class with the given name. This applies to both Proto1
+ /// (equivalent to the old "--one_java_file" option) and Proto2 (where
+ /// a .proto always translates to a single class, but you may want to
+ /// explicitly choose the class name).
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string JavaOuterClassname {
@@ -2849,12 +2850,12 @@ namespace Google.Protobuf.Reflection {
public const int JavaMultipleFilesFieldNumber = 10;
private bool javaMultipleFiles_;
/// <summary>
- /// If set true, 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 outer class
- /// named by java_outer_classname. However, the outer class will still be
- /// generated to contain the file's getDescriptor() method as well as any
- /// top-level extensions defined in the file.
+ /// If set true, 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 outer class
+ /// named by java_outer_classname. However, the outer class will still be
+ /// generated to contain the file's getDescriptor() method as well as any
+ /// top-level extensions defined in the file.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool JavaMultipleFiles {
@@ -2868,7 +2869,7 @@ namespace Google.Protobuf.Reflection {
public const int JavaGenerateEqualsAndHashFieldNumber = 20;
private bool javaGenerateEqualsAndHash_;
/// <summary>
- /// This option does nothing.
+ /// This option does nothing.
/// </summary>
[global::System.ObsoleteAttribute]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -2883,12 +2884,12 @@ namespace Google.Protobuf.Reflection {
public const int JavaStringCheckUtf8FieldNumber = 27;
private bool javaStringCheckUtf8_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool JavaStringCheckUtf8 {
@@ -2913,11 +2914,11 @@ namespace Google.Protobuf.Reflection {
public const int GoPackageFieldNumber = 11;
private string goPackage_ = "";
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string GoPackage {
@@ -2931,16 +2932,16 @@ namespace Google.Protobuf.Reflection {
public const int CcGenericServicesFieldNumber = 16;
private bool ccGenericServices_;
/// <summary>
- /// 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.
+ /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool CcGenericServices {
@@ -2976,10 +2977,10 @@ namespace Google.Protobuf.Reflection {
public const int DeprecatedFieldNumber = 23;
private bool deprecated_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Deprecated {
@@ -2993,8 +2994,8 @@ namespace Google.Protobuf.Reflection {
public const int CcEnableArenasFieldNumber = 31;
private bool ccEnableArenas_;
/// <summary>
- /// Enables the use of arenas for the proto messages in this file. This applies
- /// only to generated classes for C++.
+ /// Enables the use of arenas for the proto messages in this file. This applies
+ /// only to generated classes for C++.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool CcEnableArenas {
@@ -3008,8 +3009,8 @@ namespace Google.Protobuf.Reflection {
public const int ObjcClassPrefixFieldNumber = 36;
private string objcClassPrefix_ = "";
/// <summary>
- /// Sets the objective c class prefix which is prepended to all objective c
- /// generated classes from this .proto. There is no default.
+ /// Sets the objective c class prefix which is prepended to all objective c
+ /// generated classes from this .proto. There is no default.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string ObjcClassPrefix {
@@ -3023,7 +3024,7 @@ namespace Google.Protobuf.Reflection {
public const int CsharpNamespaceFieldNumber = 37;
private string csharpNamespace_ = "";
/// <summary>
- /// Namespace for generated classes; defaults to the package.
+ /// Namespace for generated classes; defaults to the package.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string CsharpNamespace {
@@ -3037,10 +3038,10 @@ namespace Google.Protobuf.Reflection {
public const int SwiftPrefixFieldNumber = 39;
private string swiftPrefix_ = "";
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string SwiftPrefix {
@@ -3056,7 +3057,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>();
/// <summary>
- /// The parser stores options it doesn't recognize here. See above.
+ /// The parser stores options it doesn't recognize here. See above.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption {
@@ -3373,19 +3374,19 @@ namespace Google.Protobuf.Reflection {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static partial class Types {
/// <summary>
- /// Generated classes can be optimized for speed or code size.
+ /// Generated classes can be optimized for speed or code size.
/// </summary>
internal enum OptimizeMode {
/// <summary>
- /// Generate complete code for parsing, serialization,
+ /// Generate complete code for parsing, serialization,
/// </summary>
[pbr::OriginalName("SPEED")] Speed = 1,
/// <summary>
- /// etc.
+ /// etc.
/// </summary>
[pbr::OriginalName("CODE_SIZE")] CodeSize = 2,
/// <summary>
- /// Generate code using MessageLite and the lite runtime.
+ /// Generate code using MessageLite and the lite runtime.
/// </summary>
[pbr::OriginalName("LITE_RUNTIME")] LiteRuntime = 3,
}
@@ -3435,24 +3436,24 @@ namespace Google.Protobuf.Reflection {
public const int MessageSetWireFormatFieldNumber = 1;
private bool messageSetWireFormat_;
/// <summary>
- /// 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.
+ /// 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.
+ /// 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.
+ /// 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.
+ /// Because this is an option, the above two restrictions are not enforced by
+ /// the protocol compiler.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool MessageSetWireFormat {
@@ -3466,9 +3467,9 @@ namespace Google.Protobuf.Reflection {
public const int NoStandardDescriptorAccessorFieldNumber = 2;
private bool noStandardDescriptorAccessor_;
/// <summary>
- /// 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".
+ /// 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".
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool NoStandardDescriptorAccessor {
@@ -3482,10 +3483,10 @@ namespace Google.Protobuf.Reflection {
public const int DeprecatedFieldNumber = 3;
private bool deprecated_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Deprecated {
@@ -3499,27 +3500,27 @@ namespace Google.Protobuf.Reflection {
public const int MapEntryFieldNumber = 7;
private bool mapEntry_;
/// <summary>
- /// Whether the message is an automatically generated map entry type for the
- /// maps field.
+ /// Whether the message is an automatically generated map entry type for the
+ /// maps field.
///
- /// For maps fields:
- /// map&lt;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;
+ /// For maps fields:
+ /// map&lt;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 implementions still need to work as
- /// if the field is a repeated message field.
+ /// 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 implementions 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool MapEntry {
@@ -3535,7 +3536,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>();
/// <summary>
- /// The parser stores options it doesn't recognize here. See above.
+ /// The parser stores options it doesn't recognize here. See above.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption {
@@ -3715,10 +3716,10 @@ namespace Google.Protobuf.Reflection {
public const int CtypeFieldNumber = 1;
private global::Google.Protobuf.Reflection.FieldOptions.Types.CType ctype_ = 0;
/// <summary>
- /// 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!
+ /// 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!
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.Reflection.FieldOptions.Types.CType Ctype {
@@ -3732,11 +3733,11 @@ namespace Google.Protobuf.Reflection {
public const int PackedFieldNumber = 2;
private bool packed_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Packed {
@@ -3750,15 +3751,15 @@ namespace Google.Protobuf.Reflection {
public const int JstypeFieldNumber = 6;
private global::Google.Protobuf.Reflection.FieldOptions.Types.JSType jstype_ = 0;
/// <summary>
- /// 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). By default these types are
- /// represented as JavaScript strings. This avoids loss of precision that can
- /// happen when a large value is converted to a floating point JavaScript
- /// numbers. Specifying JS_NUMBER for the jstype causes the generated
- /// JavaScript code to use the JavaScript "number" type instead of strings.
- /// This option is an enum to permit additional types to be added,
- /// e.g. goog.math.Integer.
+ /// 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). By default these types are
+ /// represented as JavaScript strings. This avoids loss of precision that can
+ /// happen when a large value is converted to a floating point JavaScript
+ /// numbers. Specifying JS_NUMBER for the jstype causes the generated
+ /// JavaScript code to use the JavaScript "number" type instead of strings.
+ /// This option is an enum to permit additional types to be added,
+ /// e.g. goog.math.Integer.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.Reflection.FieldOptions.Types.JSType Jstype {
@@ -3772,33 +3773,33 @@ namespace Google.Protobuf.Reflection {
public const int LazyFieldNumber = 5;
private bool lazy_;
/// <summary>
- /// 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.
+ /// 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 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.
+ /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Lazy {
@@ -3812,10 +3813,10 @@ namespace Google.Protobuf.Reflection {
public const int DeprecatedFieldNumber = 3;
private bool deprecated_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Deprecated {
@@ -3829,7 +3830,7 @@ namespace Google.Protobuf.Reflection {
public const int WeakFieldNumber = 10;
private bool weak_;
/// <summary>
- /// For Google-internal migration only. Do not use.
+ /// For Google-internal migration only. Do not use.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Weak {
@@ -3845,7 +3846,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>();
/// <summary>
- /// The parser stores options it doesn't recognize here. See above.
+ /// The parser stores options it doesn't recognize here. See above.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption {
@@ -4019,7 +4020,7 @@ namespace Google.Protobuf.Reflection {
public static partial class Types {
internal enum CType {
/// <summary>
- /// Default mode.
+ /// Default mode.
/// </summary>
[pbr::OriginalName("STRING")] String = 0,
[pbr::OriginalName("CORD")] Cord = 1,
@@ -4028,15 +4029,15 @@ namespace Google.Protobuf.Reflection {
internal enum JSType {
/// <summary>
- /// Use the default type.
+ /// Use the default type.
/// </summary>
[pbr::OriginalName("JS_NORMAL")] JsNormal = 0,
/// <summary>
- /// Use JavaScript strings.
+ /// Use JavaScript strings.
/// </summary>
[pbr::OriginalName("JS_STRING")] JsString = 1,
/// <summary>
- /// Use JavaScript numbers.
+ /// Use JavaScript numbers.
/// </summary>
[pbr::OriginalName("JS_NUMBER")] JsNumber = 2,
}
@@ -4084,7 +4085,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>();
/// <summary>
- /// The parser stores options it doesn't recognize here. See above.
+ /// The parser stores options it doesn't recognize here. See above.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption {
@@ -4196,8 +4197,8 @@ namespace Google.Protobuf.Reflection {
public const int AllowAliasFieldNumber = 2;
private bool allowAlias_;
/// <summary>
- /// Set this option to true to allow mapping different tag names to the same
- /// value.
+ /// Set this option to true to allow mapping different tag names to the same
+ /// value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool AllowAlias {
@@ -4211,10 +4212,10 @@ namespace Google.Protobuf.Reflection {
public const int DeprecatedFieldNumber = 3;
private bool deprecated_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Deprecated {
@@ -4230,7 +4231,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>();
/// <summary>
- /// The parser stores options it doesn't recognize here. See above.
+ /// The parser stores options it doesn't recognize here. See above.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption {
@@ -4373,10 +4374,10 @@ namespace Google.Protobuf.Reflection {
public const int DeprecatedFieldNumber = 1;
private bool deprecated_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Deprecated {
@@ -4392,7 +4393,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>();
/// <summary>
- /// The parser stores options it doesn't recognize here. See above.
+ /// The parser stores options it doesn't recognize here. See above.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption {
@@ -4519,10 +4520,10 @@ namespace Google.Protobuf.Reflection {
public const int DeprecatedFieldNumber = 33;
private bool deprecated_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Deprecated {
@@ -4538,7 +4539,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>();
/// <summary>
- /// The parser stores options it doesn't recognize here. See above.
+ /// The parser stores options it doesn't recognize here. See above.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption {
@@ -4666,10 +4667,10 @@ namespace Google.Protobuf.Reflection {
public const int DeprecatedFieldNumber = 33;
private bool deprecated_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Deprecated {
@@ -4696,7 +4697,7 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>();
/// <summary>
- /// The parser stores options it doesn't recognize here. See above.
+ /// The parser stores options it doesn't recognize here. See above.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption {
@@ -4805,18 +4806,18 @@ namespace Google.Protobuf.Reflection {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static partial class Types {
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
internal enum IdempotencyLevel {
[pbr::OriginalName("IDEMPOTENCY_UNKNOWN")] IdempotencyUnknown = 0,
/// <summary>
- /// implies idempotent
+ /// implies idempotent
/// </summary>
[pbr::OriginalName("NO_SIDE_EFFECTS")] NoSideEffects = 1,
/// <summary>
- /// idempotent, but may have side effects
+ /// idempotent, but may have side effects
/// </summary>
[pbr::OriginalName("IDEMPOTENT")] Idempotent = 2,
}
@@ -4827,12 +4828,12 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
internal sealed partial class UninterpretedOption : pb::IMessage<UninterpretedOption> {
private static readonly pb::MessageParser<UninterpretedOption> _parser = new pb::MessageParser<UninterpretedOption>(() => new UninterpretedOption());
@@ -4886,8 +4887,8 @@ namespace Google.Protobuf.Reflection {
public const int IdentifierValueFieldNumber = 3;
private string identifierValue_ = "";
/// <summary>
- /// The value of the uninterpreted option, in whatever type the tokenizer
- /// identified it as during parsing. Exactly one of these should be set.
+ /// The value of the uninterpreted option, in whatever type the tokenizer
+ /// identified it as during parsing. Exactly one of these should be set.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string IdentifierValue {
@@ -5118,11 +5119,11 @@ namespace Google.Protobuf.Reflection {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static partial class Types {
/// <summary>
- /// 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], ["qux", false] } represents
- /// "foo.(bar.baz).qux".
+ /// 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], ["qux", false] } represents
+ /// "foo.(bar.baz).qux".
/// </summary>
internal sealed partial class NamePart : pb::IMessage<NamePart> {
private static readonly pb::MessageParser<NamePart> _parser = new pb::MessageParser<NamePart>(() => new NamePart());
@@ -5275,8 +5276,8 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// Encapsulates information about the original source file from which a
- /// FileDescriptorProto was generated.
+ /// Encapsulates information about the original source file from which a
+ /// FileDescriptorProto was generated.
/// </summary>
internal sealed partial class SourceCodeInfo : pb::IMessage<SourceCodeInfo> {
private static readonly pb::MessageParser<SourceCodeInfo> _parser = new pb::MessageParser<SourceCodeInfo>(() => new SourceCodeInfo());
@@ -5316,49 +5317,49 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location> location_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location>();
/// <summary>
- /// 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.
+ /// 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).
+ /// 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 descendent. 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.
+ /// 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 descendent. 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location> Location {
@@ -5476,29 +5477,29 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForInt32(10);
private readonly pbc::RepeatedField<int> path_ = new pbc::RepeatedField<int>();
/// <summary>
- /// Identifies which part of the FileDescriptorProto was defined at this
- /// 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. 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;
+ /// Each element is a field number or an index. They form a path from
+ /// the root FileDescriptorProto to the place where the definition. 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).
+ /// 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).
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<int> Path {
@@ -5511,11 +5512,11 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForInt32(18);
private readonly pbc::RepeatedField<int> span_ = new pbc::RepeatedField<int>();
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<int> Span {
@@ -5526,53 +5527,53 @@ namespace Google.Protobuf.Reflection {
public const int LeadingCommentsFieldNumber = 3;
private string leadingComments_ = "";
/// <summary>
- /// 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.
+ /// 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.
+ /// 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.
+ /// 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.
+ /// 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:
+ /// Examples:
///
- /// optional int32 foo = 1; // Comment attached to foo.
- /// // Comment attached to bar.
- /// optional int32 bar = 2;
+ /// 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.
+ /// optional string baz = 3;
+ /// // Comment attached to baz.
+ /// // Another line attached to baz.
///
- /// // Comment attached to qux.
- /// //
- /// // Another line attached to qux.
- /// optional double qux = 4;
+ /// // Comment attached to qux.
+ /// //
+ /// // Another line attached to qux.
+ /// optional double qux = 4;
///
- /// // Detached comment for corge. This is not leading or trailing comments
- /// // to qux or corge because there are blank lines separating it from
- /// // both.
+ /// // Detached comment for corge. This is not leading or trailing comments
+ /// // to qux or corge because there are blank lines separating it from
+ /// // both.
///
- /// // Detached comment for corge paragraph 2.
+ /// // 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;
+ /// 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.
+ /// // ignored detached comments.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string LeadingComments {
@@ -5728,9 +5729,9 @@ namespace Google.Protobuf.Reflection {
}
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
internal sealed partial class GeneratedCodeInfo : pb::IMessage<GeneratedCodeInfo> {
private static readonly pb::MessageParser<GeneratedCodeInfo> _parser = new pb::MessageParser<GeneratedCodeInfo>(() => new GeneratedCodeInfo());
@@ -5770,8 +5771,8 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation> annotation_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation>();
/// <summary>
- /// An Annotation connects some span of text in generated code to an element
- /// of its generating .proto file.
+ /// An Annotation connects some span of text in generated code to an element
+ /// of its generating .proto file.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation> Annotation {
@@ -5888,8 +5889,8 @@ namespace Google.Protobuf.Reflection {
= pb::FieldCodec.ForInt32(10);
private readonly pbc::RepeatedField<int> path_ = new pbc::RepeatedField<int>();
/// <summary>
- /// Identifies the element in the original source .proto file. This field
- /// is formatted the same as SourceCodeInfo.Location.path.
+ /// Identifies the element in the original source .proto file. This field
+ /// is formatted the same as SourceCodeInfo.Location.path.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<int> Path {
@@ -5900,7 +5901,7 @@ namespace Google.Protobuf.Reflection {
public const int SourceFileFieldNumber = 2;
private string sourceFile_ = "";
/// <summary>
- /// Identifies the filesystem path to the original source .proto.
+ /// Identifies the filesystem path to the original source .proto.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string SourceFile {
@@ -5914,8 +5915,8 @@ namespace Google.Protobuf.Reflection {
public const int BeginFieldNumber = 3;
private int begin_;
/// <summary>
- /// Identifies the starting offset in bytes in the generated code
- /// that relates to the identified object.
+ /// Identifies the starting offset in bytes in the generated code
+ /// that relates to the identified object.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Begin {
@@ -5929,9 +5930,9 @@ namespace Google.Protobuf.Reflection {
public const int EndFieldNumber = 4;
private int end_;
/// <summary>
- /// 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).
+ /// 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).
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int End {
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs
index e36fd5eb..b90c9a2a 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs
@@ -38,74 +38,74 @@ namespace Google.Protobuf.WellKnownTypes {
}
#region Messages
/// <summary>
- /// `Any` contains an arbitrary serialized protocol buffer message along with a
- /// URL that describes the type of the serialized message.
+ /// `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.
+ /// 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++.
+ /// Example 1: Pack and unpack a message in C++.
///
- /// Foo foo = ...;
- /// Any any;
- /// any.PackFrom(foo);
- /// ...
- /// if (any.UnpackTo(&amp;foo)) {
- /// ...
- /// }
+ /// Foo foo = ...;
+ /// Any any;
+ /// any.PackFrom(foo);
+ /// ...
+ /// if (any.UnpackTo(&amp;foo)) {
+ /// ...
+ /// }
///
- /// Example 2: Pack and unpack a message in Java.
+ /// 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);
- /// }
+ /// 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.
+ /// Example 3: Pack and unpack a message in Python.
///
- /// foo = Foo(...)
- /// any = Any()
- /// any.Pack(foo)
- /// ...
- /// if any.Is(Foo.DESCRIPTOR):
- /// any.Unpack(foo)
- /// ...
+ /// foo = Foo(...)
+ /// any = Any()
+ /// any.Pack(foo)
+ /// ...
+ /// if any.Is(Foo.DESCRIPTOR):
+ /// any.Unpack(foo)
+ /// ...
///
- /// 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".
+ /// 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:
+ /// 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;
- /// }
+ /// package google.profile;
+ /// message Person {
+ /// string first_name = 1;
+ /// string last_name = 2;
+ /// }
///
- /// {
- /// "@type": "type.googleapis.com/google.profile.Person",
- /// "firstName": &lt;string>,
- /// "lastName": &lt;string>
- /// }
+ /// {
+ /// "@type": "type.googleapis.com/google.profile.Person",
+ /// "firstName": &lt;string>,
+ /// "lastName": &lt;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][]):
+ /// 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"
- /// }
+ /// {
+ /// "@type": "type.googleapis.com/google.protobuf.Duration",
+ /// "value": "1.212s"
+ /// }
/// </summary>
public sealed partial class Any : pb::IMessage<Any> {
private static readonly pb::MessageParser<Any> _parser = new pb::MessageParser<Any>(() => new Any());
@@ -144,27 +144,27 @@ namespace Google.Protobuf.WellKnownTypes {
public const int TypeUrlFieldNumber = 1;
private string typeUrl_ = "";
/// <summary>
- /// A URL/resource name whose content describes the type of the
- /// serialized protocol buffer message.
+ /// A URL/resource name whose content describes the type of the
+ /// serialized protocol buffer message.
///
- /// For URLs which use the scheme `http`, `https`, or no scheme, the
- /// following restrictions and interpretations apply:
+ /// For URLs which use the scheme `http`, `https`, or no scheme, the
+ /// following restrictions and interpretations apply:
///
- /// * If no scheme is provided, `https` is assumed.
- /// * 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).
- /// * 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.)
+ /// * If no scheme is provided, `https` is assumed.
+ /// * 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).
+ /// * 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.)
///
- /// Schemes other than `http`, `https` (or the empty scheme) might be
- /// used with implementation specific semantics.
+ /// Schemes other than `http`, `https` (or the empty scheme) might be
+ /// used with implementation specific semantics.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string TypeUrl {
@@ -178,7 +178,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 2;
private pb::ByteString value_ = pb::ByteString.Empty;
/// <summary>
- /// Must be a valid serialized protocol buffer of the above specified type.
+ /// Must be a valid serialized protocol buffer of the above specified type.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pb::ByteString Value {
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
index f72571d7..aeeb8e73 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
@@ -52,7 +52,7 @@ namespace Google.Protobuf.WellKnownTypes {
}
#region Messages
/// <summary>
- /// Api is a light-weight descriptor for a protocol buffer service.
+ /// Api is a light-weight descriptor for a protocol buffer service.
/// </summary>
public sealed partial class Api : pb::IMessage<Api> {
private static readonly pb::MessageParser<Api> _parser = new pb::MessageParser<Api>(() => new Api());
@@ -96,8 +96,8 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
- /// The fully qualified name of this api, including package name
- /// followed by the api's simple name.
+ /// The fully qualified name of this api, including package name
+ /// followed by the api's simple name.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
@@ -113,7 +113,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Method.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method> methods_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method>();
/// <summary>
- /// The methods of this api, in unspecified order.
+ /// The methods of this api, in unspecified order.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method> Methods {
@@ -126,7 +126,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
/// <summary>
- /// Any metadata attached to the API.
+ /// Any metadata attached to the API.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
@@ -137,26 +137,26 @@ namespace Google.Protobuf.WellKnownTypes {
public const int VersionFieldNumber = 4;
private string version_ = "";
/// <summary>
- /// A version string for this api. 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.
+ /// A version string for this api. 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 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
- /// API, which must end in `v&lt;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, none-GA apis.
+ /// The major version is also reflected in the package name of the
+ /// API, which must end in `v&lt;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, none-GA apis.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Version {
@@ -170,8 +170,8 @@ namespace Google.Protobuf.WellKnownTypes {
public const int SourceContextFieldNumber = 5;
private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_;
/// <summary>
- /// Source context for the protocol buffer service represented by this
- /// message.
+ /// Source context for the protocol buffer service represented by this
+ /// message.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext {
@@ -187,7 +187,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Mixin.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin> mixins_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin>();
/// <summary>
- /// Included APIs. See [Mixin][].
+ /// Included APIs. See [Mixin][].
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin> Mixins {
@@ -198,7 +198,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int SyntaxFieldNumber = 7;
private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0;
/// <summary>
- /// The source syntax of the service.
+ /// The source syntax of the service.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Syntax Syntax {
@@ -364,7 +364,7 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Method represents a method of an api.
+ /// Method represents a method of an api.
/// </summary>
public sealed partial class Method : pb::IMessage<Method> {
private static readonly pb::MessageParser<Method> _parser = new pb::MessageParser<Method>(() => new Method());
@@ -408,7 +408,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
- /// The simple name of this method.
+ /// The simple name of this method.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
@@ -422,7 +422,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int RequestTypeUrlFieldNumber = 2;
private string requestTypeUrl_ = "";
/// <summary>
- /// A URL of the input message type.
+ /// A URL of the input message type.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string RequestTypeUrl {
@@ -436,7 +436,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int RequestStreamingFieldNumber = 3;
private bool requestStreaming_;
/// <summary>
- /// If true, the request is streamed.
+ /// If true, the request is streamed.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool RequestStreaming {
@@ -450,7 +450,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ResponseTypeUrlFieldNumber = 4;
private string responseTypeUrl_ = "";
/// <summary>
- /// The URL of the output message type.
+ /// The URL of the output message type.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string ResponseTypeUrl {
@@ -464,7 +464,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ResponseStreamingFieldNumber = 5;
private bool responseStreaming_;
/// <summary>
- /// If true, the response is streamed.
+ /// If true, the response is streamed.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool ResponseStreaming {
@@ -480,7 +480,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Option.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
/// <summary>
- /// Any metadata attached to the method.
+ /// Any metadata attached to the method.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
@@ -491,7 +491,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int SyntaxFieldNumber = 7;
private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0;
/// <summary>
- /// The source syntax of this method.
+ /// The source syntax of this method.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Syntax Syntax {
@@ -665,83 +665,83 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Declares an API to be included in this API. The including API must
- /// redeclare all the methods from the included API, but documentation
- /// and options are inherited as follows:
+ /// Declares an API to be included in this API. The including API must
+ /// redeclare all the methods from the included API, 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.
+ /// - 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.
+ /// - 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 API plus the [root][] path if specified.
+ /// - 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 API plus the [root][] path if specified.
///
- /// Example of a simple mixin:
+ /// 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.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);
+ /// 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=**}";
- /// }
- /// }
+ /// // Get a data record.
+ /// rpc GetData(GetDataRequest) returns (Data) {
+ /// option (google.api.http).get = "/v2/{resource=**}";
+ /// }
+ /// }
///
- /// Example of a mixin configuration:
+ /// Example of a mixin configuration:
///
- /// apis:
- /// - name: google.storage.v2.Storage
- /// mixins:
- /// - name: google.acl.v1.AccessControl
+ /// 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 inherting
- /// documentation and annotations as follows:
+ /// 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 inherting
+ /// 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";
- /// }
- /// ...
- /// }
+ /// 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`.
+ /// 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:
+ /// 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
+ /// apis:
+ /// - name: google.storage.v2.Storage
+ /// mixins:
+ /// - name: google.acl.v1.AccessControl
+ /// root: acls
///
- /// This implies the following inherited HTTP annotation:
+ /// 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";
- /// }
- /// ...
- /// }
+ /// service Storage {
+ /// // Get the underlying ACL object.
+ /// rpc GetAcl(GetAclRequest) returns (Acl) {
+ /// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+ /// }
+ /// ...
+ /// }
/// </summary>
public sealed partial class Mixin : pb::IMessage<Mixin> {
private static readonly pb::MessageParser<Mixin> _parser = new pb::MessageParser<Mixin>(() => new Mixin());
@@ -780,7 +780,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
- /// The fully qualified name of the API which is included.
+ /// The fully qualified name of the API which is included.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
@@ -794,8 +794,8 @@ namespace Google.Protobuf.WellKnownTypes {
public const int RootFieldNumber = 2;
private string root_ = "";
/// <summary>
- /// If non-empty specifies a path under which inherited HTTP paths
- /// are rooted.
+ /// If non-empty specifies a path under which inherited HTTP paths
+ /// are rooted.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Root {
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
index 66ac7152..03b19c77 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
@@ -39,52 +39,52 @@ namespace Google.Protobuf.WellKnownTypes {
}
#region Messages
/// <summary>
- /// 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.
+ /// 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.
///
- /// Example 1: Compute Duration from two Timestamps in pseudo code.
+ /// Example 1: Compute Duration from two Timestamps in pseudo code.
///
- /// Timestamp start = ...;
- /// Timestamp end = ...;
- /// Duration duration = ...;
+ /// Timestamp start = ...;
+ /// Timestamp end = ...;
+ /// Duration duration = ...;
///
- /// duration.seconds = end.seconds - start.seconds;
- /// duration.nanos = end.nanos - start.nanos;
+ /// duration.seconds = end.seconds - start.seconds;
+ /// duration.nanos = end.nanos - start.nanos;
///
- /// if (duration.seconds &lt; 0 &amp;&amp; duration.nanos > 0) {
- /// duration.seconds += 1;
- /// duration.nanos -= 1000000000;
- /// } else if (durations.seconds > 0 &amp;&amp; duration.nanos &lt; 0) {
- /// duration.seconds -= 1;
- /// duration.nanos += 1000000000;
- /// }
+ /// if (duration.seconds &lt; 0 &amp;&amp; duration.nanos > 0) {
+ /// duration.seconds += 1;
+ /// duration.nanos -= 1000000000;
+ /// } else if (durations.seconds > 0 &amp;&amp; duration.nanos &lt; 0) {
+ /// duration.seconds -= 1;
+ /// duration.nanos += 1000000000;
+ /// }
///
- /// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+ /// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
///
- /// Timestamp start = ...;
- /// Duration duration = ...;
- /// Timestamp end = ...;
+ /// Timestamp start = ...;
+ /// Duration duration = ...;
+ /// Timestamp end = ...;
///
- /// end.seconds = start.seconds + duration.seconds;
- /// end.nanos = start.nanos + duration.nanos;
+ /// end.seconds = start.seconds + duration.seconds;
+ /// end.nanos = start.nanos + duration.nanos;
///
- /// if (end.nanos &lt; 0) {
- /// end.seconds -= 1;
- /// end.nanos += 1000000000;
- /// } else if (end.nanos >= 1000000000) {
- /// end.seconds += 1;
- /// end.nanos -= 1000000000;
- /// }
+ /// if (end.nanos &lt; 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.
+ /// Example 3: Compute Duration from datetime.timedelta in Python.
///
- /// td = datetime.timedelta(days=3, minutes=10)
- /// duration = Duration()
- /// duration.FromTimedelta(td)
+ /// td = datetime.timedelta(days=3, minutes=10)
+ /// duration = Duration()
+ /// duration.FromTimedelta(td)
/// </summary>
public sealed partial class Duration : pb::IMessage<Duration> {
private static readonly pb::MessageParser<Duration> _parser = new pb::MessageParser<Duration>(() => new Duration());
@@ -123,8 +123,8 @@ namespace Google.Protobuf.WellKnownTypes {
public const int SecondsFieldNumber = 1;
private long seconds_;
/// <summary>
- /// Signed seconds of the span of time. Must be from -315,576,000,000
- /// to +315,576,000,000 inclusive.
+ /// Signed seconds of the span of time. Must be from -315,576,000,000
+ /// to +315,576,000,000 inclusive.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Seconds {
@@ -138,12 +138,12 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NanosFieldNumber = 2;
private int nanos_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Nanos {
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
index 0e64133e..aa89e08f 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
@@ -38,15 +38,15 @@ namespace Google.Protobuf.WellKnownTypes {
}
#region Messages
/// <summary>
- /// 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:
+ /// 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);
- /// }
+ /// service Foo {
+ /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+ /// }
///
- /// The JSON representation for `Empty` is empty JSON object `{}`.
+ /// The JSON representation for `Empty` is empty JSON object `{}`.
/// </summary>
public sealed partial class Empty : pb::IMessage<Empty> {
private static readonly pb::MessageParser<Empty> _parser = new pb::MessageParser<Empty>(() => new Empty());
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
index 99a8011e..ef3bc10a 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
@@ -39,206 +39,206 @@ namespace Google.Protobuf.WellKnownTypes {
}
#region Messages
/// <summary>
- /// `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, the existing
- /// repeated values in the target resource will be overwritten by the new values.
- /// 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 the existing sub-message in the target resource is
- /// overwritten. Given the target message:
- ///
- /// f {
- /// b {
- /// d : 1
- /// x : 2
- /// }
- /// c : 1
- /// }
- ///
- /// And an update message:
- ///
- /// f {
- /// b {
- /// d : 10
- /// }
- /// }
- ///
- /// then if the field mask is:
- ///
- /// paths: "f.b"
- ///
- /// then the result will be:
- ///
- /// f {
- /// b {
- /// d : 10
- /// }
- /// c : 1
- /// }
- ///
- /// However, if the update mask was:
- ///
- /// paths: "f.b.d"
- ///
- /// then the result would be:
- ///
- /// f {
- /// b {
- /// d : 10
- /// x : 2
- /// }
- /// c : 1
- /// }
- ///
- /// 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:
+ /// `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, the existing
+ /// repeated values in the target resource will be overwritten by the new values.
+ /// 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 the existing sub-message in the target resource is
+ /// overwritten. Given the target message:
+ ///
+ /// f {
+ /// b {
+ /// d : 1
+ /// x : 2
+ /// }
+ /// c : 1
+ /// }
+ ///
+ /// And an update message:
+ ///
+ /// f {
+ /// b {
+ /// d : 10
+ /// }
+ /// }
+ ///
+ /// then if the field mask is:
+ ///
+ /// paths: "f.b"
+ ///
+ /// then the result will be:
+ ///
+ /// f {
+ /// b {
+ /// d : 10
+ /// }
+ /// c : 1
+ /// }
+ ///
+ /// However, if the update mask was:
+ ///
+ /// paths: "f.b.d"
+ ///
+ /// then the result would be:
+ ///
+ /// f {
+ /// b {
+ /// d : 10
+ /// x : 2
+ /// }
+ /// c : 1
+ /// }
+ ///
+ /// 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"
- /// }
+ /// mask {
+ /// paths: "user.display_name"
+ /// paths: "photo"
+ /// }
///
- /// In JSON, the same mask is represented as below:
+ /// In JSON, the same mask is represented as below:
///
- /// {
- /// mask: "user.displayName,photo"
- /// }
+ /// {
+ /// mask: "user.displayName,photo"
+ /// }
///
- /// # Field Masks and Oneof Fields
+ /// # Field Masks and Oneof Fields
///
- /// Field masks treat fields in oneofs just as regular fields. Consider the
- /// following message:
+ /// 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;
- /// }
- /// }
+ /// message SampleMessage {
+ /// oneof test_oneof {
+ /// string name = 4;
+ /// SubMessage sub_message = 9;
+ /// }
+ /// }
///
- /// The field mask can be:
+ /// The field mask can be:
///
- /// mask {
- /// paths: "name"
- /// }
+ /// mask {
+ /// paths: "name"
+ /// }
///
- /// Or:
+ /// Or:
///
- /// mask {
- /// paths: "sub_message"
- /// }
+ /// mask {
+ /// paths: "sub_message"
+ /// }
///
- /// Note that oneof type names ("test_oneof" in this case) cannot be used in
- /// paths.
+ /// Note that oneof type names ("test_oneof" in this case) cannot be used in
+ /// paths.
/// </summary>
public sealed partial class FieldMask : pb::IMessage<FieldMask> {
private static readonly pb::MessageParser<FieldMask> _parser = new pb::MessageParser<FieldMask>(() => new FieldMask());
@@ -278,7 +278,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForString(10);
private readonly pbc::RepeatedField<string> paths_ = new pbc::RepeatedField<string>();
/// <summary>
- /// The set of field mask paths.
+ /// The set of field mask paths.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<string> Paths {
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs b/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs
index c5713466..6ddadf19 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs
@@ -39,8 +39,8 @@ namespace Google.Protobuf.WellKnownTypes {
}
#region Messages
/// <summary>
- /// `SourceContext` represents information about the source of a
- /// protobuf element, like the file in which it is defined.
+ /// `SourceContext` represents information about the source of a
+ /// protobuf element, like the file in which it is defined.
/// </summary>
public sealed partial class SourceContext : pb::IMessage<SourceContext> {
private static readonly pb::MessageParser<SourceContext> _parser = new pb::MessageParser<SourceContext>(() => new SourceContext());
@@ -78,8 +78,8 @@ namespace Google.Protobuf.WellKnownTypes {
public const int FileNameFieldNumber = 1;
private string fileName_ = "";
/// <summary>
- /// The path-qualified name of the .proto file that contained the associated
- /// protobuf element. For example: `"google/protobuf/source_context.proto"`.
+ /// The path-qualified name of the .proto file that contained the associated
+ /// protobuf element. For example: `"google/protobuf/source_context.proto"`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string FileName {
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
index d4556051..1fa35521 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
@@ -50,14 +50,14 @@ namespace Google.Protobuf.WellKnownTypes {
}
#region Enums
/// <summary>
- /// `NullValue` is a singleton enumeration to represent the null value for the
- /// `Value` type union.
+ /// `NullValue` is a singleton enumeration to represent the null value for the
+ /// `Value` type union.
///
- /// The JSON representation for `NullValue` is JSON `null`.
+ /// The JSON representation for `NullValue` is JSON `null`.
/// </summary>
public enum NullValue {
/// <summary>
- /// Null value.
+ /// Null value.
/// </summary>
[pbr::OriginalName("NULL_VALUE")] NullValue = 0,
}
@@ -66,14 +66,14 @@ namespace Google.Protobuf.WellKnownTypes {
#region Messages
/// <summary>
- /// `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.
+ /// `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.
+ /// The JSON representation for `Struct` is JSON object.
/// </summary>
public sealed partial class Struct : pb::IMessage<Struct> {
private static readonly pb::MessageParser<Struct> _parser = new pb::MessageParser<Struct>(() => new Struct());
@@ -113,7 +113,7 @@ namespace Google.Protobuf.WellKnownTypes {
= new pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Value.Parser), 10);
private readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> fields_ = new pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>();
/// <summary>
- /// Unordered map of dynamically typed values.
+ /// Unordered map of dynamically typed values.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> Fields {
@@ -188,12 +188,12 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// `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 that
- /// variants, absence of any variant indicates an error.
+ /// `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 that
+ /// variants, absence of any variant indicates an error.
///
- /// The JSON representation for `Value` is JSON value.
+ /// The JSON representation for `Value` is JSON value.
/// </summary>
public sealed partial class Value : pb::IMessage<Value> {
private static readonly pb::MessageParser<Value> _parser = new pb::MessageParser<Value>(() => new Value());
@@ -250,7 +250,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// <summary>Field number for the "null_value" field.</summary>
public const int NullValueFieldNumber = 1;
/// <summary>
- /// Represents a null value.
+ /// Represents a null value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
@@ -264,7 +264,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// <summary>Field number for the "number_value" field.</summary>
public const int NumberValueFieldNumber = 2;
/// <summary>
- /// Represents a double value.
+ /// Represents a double value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double NumberValue {
@@ -278,7 +278,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// <summary>Field number for the "string_value" field.</summary>
public const int StringValueFieldNumber = 3;
/// <summary>
- /// Represents a string value.
+ /// Represents a string value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string StringValue {
@@ -292,7 +292,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// <summary>Field number for the "bool_value" field.</summary>
public const int BoolValueFieldNumber = 4;
/// <summary>
- /// Represents a boolean value.
+ /// Represents a boolean value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool BoolValue {
@@ -306,7 +306,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// <summary>Field number for the "struct_value" field.</summary>
public const int StructValueFieldNumber = 5;
/// <summary>
- /// Represents a structured value.
+ /// Represents a structured value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Struct StructValue {
@@ -320,7 +320,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// <summary>Field number for the "list_value" field.</summary>
public const int ListValueFieldNumber = 6;
/// <summary>
- /// Represents a repeated `Value`.
+ /// Represents a repeated `Value`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.ListValue ListValue {
@@ -525,9 +525,9 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// `ListValue` is a wrapper around a repeated field of values.
+ /// `ListValue` is a wrapper around a repeated field of values.
///
- /// The JSON representation for `ListValue` is JSON array.
+ /// The JSON representation for `ListValue` is JSON array.
/// </summary>
public sealed partial class ListValue : pb::IMessage<ListValue> {
private static readonly pb::MessageParser<ListValue> _parser = new pb::MessageParser<ListValue>(() => new ListValue());
@@ -567,7 +567,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Value.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> values_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value>();
/// <summary>
- /// Repeated field of dynamically typed values.
+ /// Repeated field of dynamically typed values.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> Values {
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
index 6c9a517f..b789f6da 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
@@ -39,56 +39,56 @@ namespace Google.Protobuf.WellKnownTypes {
}
#region Messages
/// <summary>
- /// A Timestamp represents a point in time independent of any time zone
- /// or calendar, represented as seconds and fractions of seconds at
- /// nanosecond resolution in UTC Epoch time. It is encoded using the
- /// Proleptic Gregorian Calendar which extends the Gregorian calendar
- /// backwards to year one. It is encoded assuming all minutes are 60
- /// seconds long, i.e. leap seconds are "smeared" so that no leap second
- /// table is needed for interpretation. 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 date strings.
- /// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
+ /// A Timestamp represents a point in time independent of any time zone
+ /// or calendar, represented as seconds and fractions of seconds at
+ /// nanosecond resolution in UTC Epoch time. It is encoded using the
+ /// Proleptic Gregorian Calendar which extends the Gregorian calendar
+ /// backwards to year one. It is encoded assuming all minutes are 60
+ /// seconds long, i.e. leap seconds are "smeared" so that no leap second
+ /// table is needed for interpretation. 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 date strings.
+ /// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
///
- /// Example 1: Compute Timestamp from POSIX `time()`.
+ /// Example 1: Compute Timestamp from POSIX `time()`.
///
- /// Timestamp timestamp;
- /// timestamp.set_seconds(time(NULL));
- /// timestamp.set_nanos(0);
+ /// Timestamp timestamp;
+ /// timestamp.set_seconds(time(NULL));
+ /// timestamp.set_nanos(0);
///
- /// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
+ /// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
///
- /// struct timeval tv;
- /// gettimeofday(&amp;tv, NULL);
+ /// struct timeval tv;
+ /// gettimeofday(&amp;tv, NULL);
///
- /// Timestamp timestamp;
- /// timestamp.set_seconds(tv.tv_sec);
- /// timestamp.set_nanos(tv.tv_usec * 1000);
+ /// Timestamp timestamp;
+ /// timestamp.set_seconds(tv.tv_sec);
+ /// timestamp.set_nanos(tv.tv_usec * 1000);
///
- /// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
+ /// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
///
- /// FILETIME ft;
- /// GetSystemTimeAsFileTime(&amp;ft);
- /// UINT64 ticks = (((UINT64)ft.dwHighDateTime) &lt;&lt; 32) | ft.dwLowDateTime;
+ /// FILETIME ft;
+ /// GetSystemTimeAsFileTime(&amp;ft);
+ /// UINT64 ticks = (((UINT64)ft.dwHighDateTime) &lt;&lt; 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));
+ /// // 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()`.
+ /// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
///
- /// long millis = System.currentTimeMillis();
+ /// long millis = System.currentTimeMillis();
///
- /// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
- /// .setNanos((int) ((millis % 1000) * 1000000)).build();
+ /// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
+ /// .setNanos((int) ((millis % 1000) * 1000000)).build();
///
- /// Example 5: Compute Timestamp from current time in Python.
+ /// Example 5: Compute Timestamp from current time in Python.
///
- /// timestamp = Timestamp()
- /// timestamp.GetCurrentTime()
+ /// timestamp = Timestamp()
+ /// timestamp.GetCurrentTime()
/// </summary>
public sealed partial class Timestamp : pb::IMessage<Timestamp> {
private static readonly pb::MessageParser<Timestamp> _parser = new pb::MessageParser<Timestamp>(() => new Timestamp());
@@ -127,9 +127,9 @@ namespace Google.Protobuf.WellKnownTypes {
public const int SecondsFieldNumber = 1;
private long seconds_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Seconds {
@@ -143,10 +143,10 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NanosFieldNumber = 2;
private int nanos_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Nanos {
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
index d80735f1..9212ce81 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
@@ -73,15 +73,15 @@ namespace Google.Protobuf.WellKnownTypes {
}
#region Enums
/// <summary>
- /// The syntax in which a protocol buffer element is defined.
+ /// The syntax in which a protocol buffer element is defined.
/// </summary>
public enum Syntax {
/// <summary>
- /// Syntax `proto2`.
+ /// Syntax `proto2`.
/// </summary>
[pbr::OriginalName("SYNTAX_PROTO2")] Proto2 = 0,
/// <summary>
- /// Syntax `proto3`.
+ /// Syntax `proto3`.
/// </summary>
[pbr::OriginalName("SYNTAX_PROTO3")] Proto3 = 1,
}
@@ -90,7 +90,7 @@ namespace Google.Protobuf.WellKnownTypes {
#region Messages
/// <summary>
- /// A protocol buffer message type.
+ /// A protocol buffer message type.
/// </summary>
public sealed partial class Type : pb::IMessage<Type> {
private static readonly pb::MessageParser<Type> _parser = new pb::MessageParser<Type>(() => new Type());
@@ -133,7 +133,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
- /// The fully qualified message name.
+ /// The fully qualified message name.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
@@ -149,7 +149,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Field.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> fields_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field>();
/// <summary>
- /// The list of fields.
+ /// The list of fields.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> Fields {
@@ -162,7 +162,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForString(26);
private readonly pbc::RepeatedField<string> oneofs_ = new pbc::RepeatedField<string>();
/// <summary>
- /// The list of types appearing in `oneof` definitions in this type.
+ /// The list of types appearing in `oneof` definitions in this type.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<string> Oneofs {
@@ -175,7 +175,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Option.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
/// <summary>
- /// The protocol buffer options.
+ /// The protocol buffer options.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
@@ -186,7 +186,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int SourceContextFieldNumber = 5;
private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_;
/// <summary>
- /// The source context.
+ /// The source context.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext {
@@ -200,7 +200,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int SyntaxFieldNumber = 6;
private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0;
/// <summary>
- /// The source syntax.
+ /// The source syntax.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Syntax Syntax {
@@ -350,7 +350,7 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// A single field of a message type.
+ /// A single field of a message type.
/// </summary>
public sealed partial class Field : pb::IMessage<Field> {
private static readonly pb::MessageParser<Field> _parser = new pb::MessageParser<Field>(() => new Field());
@@ -397,7 +397,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int KindFieldNumber = 1;
private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = 0;
/// <summary>
- /// The field type.
+ /// The field type.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind {
@@ -411,7 +411,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int CardinalityFieldNumber = 2;
private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardinality_ = 0;
/// <summary>
- /// The field cardinality.
+ /// The field cardinality.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardinality {
@@ -425,7 +425,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NumberFieldNumber = 3;
private int number_;
/// <summary>
- /// The field number.
+ /// The field number.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Number {
@@ -439,7 +439,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NameFieldNumber = 4;
private string name_ = "";
/// <summary>
- /// The field name.
+ /// The field name.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
@@ -453,8 +453,8 @@ namespace Google.Protobuf.WellKnownTypes {
public const int TypeUrlFieldNumber = 6;
private string typeUrl_ = "";
/// <summary>
- /// The field type URL, without the scheme, for message or enumeration
- /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ /// The field type URL, without the scheme, for message or enumeration
+ /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string TypeUrl {
@@ -468,8 +468,8 @@ namespace Google.Protobuf.WellKnownTypes {
public const int OneofIndexFieldNumber = 7;
private int oneofIndex_;
/// <summary>
- /// 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.
+ /// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int OneofIndex {
@@ -483,7 +483,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int PackedFieldNumber = 8;
private bool packed_;
/// <summary>
- /// Whether to use alternative packed wire representation.
+ /// Whether to use alternative packed wire representation.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Packed {
@@ -499,7 +499,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Option.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
/// <summary>
- /// The protocol buffer options.
+ /// The protocol buffer options.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
@@ -510,7 +510,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int JsonNameFieldNumber = 10;
private string jsonName_ = "";
/// <summary>
- /// The field JSON name.
+ /// The field JSON name.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string JsonName {
@@ -524,7 +524,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int DefaultValueFieldNumber = 11;
private string defaultValue_ = "";
/// <summary>
- /// The string value of the default value of this field. Proto2 syntax only.
+ /// The string value of the default value of this field. Proto2 syntax only.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string DefaultValue {
@@ -748,105 +748,105 @@ namespace Google.Protobuf.WellKnownTypes {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static partial class Types {
/// <summary>
- /// Basic field types.
+ /// Basic field types.
/// </summary>
public enum Kind {
/// <summary>
- /// Field type unknown.
+ /// Field type unknown.
/// </summary>
[pbr::OriginalName("TYPE_UNKNOWN")] TypeUnknown = 0,
/// <summary>
- /// Field type double.
+ /// Field type double.
/// </summary>
[pbr::OriginalName("TYPE_DOUBLE")] TypeDouble = 1,
/// <summary>
- /// Field type float.
+ /// Field type float.
/// </summary>
[pbr::OriginalName("TYPE_FLOAT")] TypeFloat = 2,
/// <summary>
- /// Field type int64.
+ /// Field type int64.
/// </summary>
[pbr::OriginalName("TYPE_INT64")] TypeInt64 = 3,
/// <summary>
- /// Field type uint64.
+ /// Field type uint64.
/// </summary>
[pbr::OriginalName("TYPE_UINT64")] TypeUint64 = 4,
/// <summary>
- /// Field type int32.
+ /// Field type int32.
/// </summary>
[pbr::OriginalName("TYPE_INT32")] TypeInt32 = 5,
/// <summary>
- /// Field type fixed64.
+ /// Field type fixed64.
/// </summary>
[pbr::OriginalName("TYPE_FIXED64")] TypeFixed64 = 6,
/// <summary>
- /// Field type fixed32.
+ /// Field type fixed32.
/// </summary>
[pbr::OriginalName("TYPE_FIXED32")] TypeFixed32 = 7,
/// <summary>
- /// Field type bool.
+ /// Field type bool.
/// </summary>
[pbr::OriginalName("TYPE_BOOL")] TypeBool = 8,
/// <summary>
- /// Field type string.
+ /// Field type string.
/// </summary>
[pbr::OriginalName("TYPE_STRING")] TypeString = 9,
/// <summary>
- /// Field type group. Proto2 syntax only, and deprecated.
+ /// Field type group. Proto2 syntax only, and deprecated.
/// </summary>
[pbr::OriginalName("TYPE_GROUP")] TypeGroup = 10,
/// <summary>
- /// Field type message.
+ /// Field type message.
/// </summary>
[pbr::OriginalName("TYPE_MESSAGE")] TypeMessage = 11,
/// <summary>
- /// Field type bytes.
+ /// Field type bytes.
/// </summary>
[pbr::OriginalName("TYPE_BYTES")] TypeBytes = 12,
/// <summary>
- /// Field type uint32.
+ /// Field type uint32.
/// </summary>
[pbr::OriginalName("TYPE_UINT32")] TypeUint32 = 13,
/// <summary>
- /// Field type enum.
+ /// Field type enum.
/// </summary>
[pbr::OriginalName("TYPE_ENUM")] TypeEnum = 14,
/// <summary>
- /// Field type sfixed32.
+ /// Field type sfixed32.
/// </summary>
[pbr::OriginalName("TYPE_SFIXED32")] TypeSfixed32 = 15,
/// <summary>
- /// Field type sfixed64.
+ /// Field type sfixed64.
/// </summary>
[pbr::OriginalName("TYPE_SFIXED64")] TypeSfixed64 = 16,
/// <summary>
- /// Field type sint32.
+ /// Field type sint32.
/// </summary>
[pbr::OriginalName("TYPE_SINT32")] TypeSint32 = 17,
/// <summary>
- /// Field type sint64.
+ /// Field type sint64.
/// </summary>
[pbr::OriginalName("TYPE_SINT64")] TypeSint64 = 18,
}
/// <summary>
- /// Whether a field is optional, required, or repeated.
+ /// Whether a field is optional, required, or repeated.
/// </summary>
public enum Cardinality {
/// <summary>
- /// For fields with unknown cardinality.
+ /// For fields with unknown cardinality.
/// </summary>
[pbr::OriginalName("CARDINALITY_UNKNOWN")] Unknown = 0,
/// <summary>
- /// For optional fields.
+ /// For optional fields.
/// </summary>
[pbr::OriginalName("CARDINALITY_OPTIONAL")] Optional = 1,
/// <summary>
- /// For required fields. Proto2 syntax only.
+ /// For required fields. Proto2 syntax only.
/// </summary>
[pbr::OriginalName("CARDINALITY_REQUIRED")] Required = 2,
/// <summary>
- /// For repeated fields.
+ /// For repeated fields.
/// </summary>
[pbr::OriginalName("CARDINALITY_REPEATED")] Repeated = 3,
}
@@ -857,7 +857,7 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Enum type definition.
+ /// Enum type definition.
/// </summary>
public sealed partial class Enum : pb::IMessage<Enum> {
private static readonly pb::MessageParser<Enum> _parser = new pb::MessageParser<Enum>(() => new Enum());
@@ -899,7 +899,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
- /// Enum type name.
+ /// Enum type name.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
@@ -915,7 +915,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.EnumValue.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue> enumvalue_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue>();
/// <summary>
- /// Enum value definitions.
+ /// Enum value definitions.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue> Enumvalue {
@@ -928,7 +928,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
/// <summary>
- /// Protocol buffer options.
+ /// Protocol buffer options.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
@@ -939,7 +939,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int SourceContextFieldNumber = 4;
private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_;
/// <summary>
- /// The source context.
+ /// The source context.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext {
@@ -953,7 +953,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int SyntaxFieldNumber = 5;
private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0;
/// <summary>
- /// The source syntax.
+ /// The source syntax.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Syntax Syntax {
@@ -1094,7 +1094,7 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Enum value definition.
+ /// Enum value definition.
/// </summary>
public sealed partial class EnumValue : pb::IMessage<EnumValue> {
private static readonly pb::MessageParser<EnumValue> _parser = new pb::MessageParser<EnumValue>(() => new EnumValue());
@@ -1134,7 +1134,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
- /// Enum value name.
+ /// Enum value name.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
@@ -1148,7 +1148,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NumberFieldNumber = 2;
private int number_;
/// <summary>
- /// Enum value number.
+ /// Enum value number.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Number {
@@ -1164,7 +1164,7 @@ namespace Google.Protobuf.WellKnownTypes {
= pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
/// <summary>
- /// Protocol buffer options.
+ /// Protocol buffer options.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
@@ -1271,8 +1271,8 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// A protocol buffer option, which can be attached to a message, field,
- /// enumeration, etc.
+ /// A protocol buffer option, which can be attached to a message, field,
+ /// enumeration, etc.
/// </summary>
public sealed partial class Option : pb::IMessage<Option> {
private static readonly pb::MessageParser<Option> _parser = new pb::MessageParser<Option>(() => new Option());
@@ -1311,7 +1311,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
- /// The option's name. For example, `"java_package"`.
+ /// The option's name. For example, `"java_package"`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
@@ -1325,7 +1325,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 2;
private global::Google.Protobuf.WellKnownTypes.Any value_;
/// <summary>
- /// The option's value. For example, `"com.google.protobuf"`.
+ /// The option's value. For example, `"com.google.protobuf"`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Any Value {
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
index e97c3d14..9a5fb81e 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
@@ -51,9 +51,9 @@ namespace Google.Protobuf.WellKnownTypes {
}
#region Messages
/// <summary>
- /// Wrapper message for `double`.
+ /// Wrapper message for `double`.
///
- /// The JSON representation for `DoubleValue` is JSON number.
+ /// The JSON representation for `DoubleValue` is JSON number.
/// </summary>
public sealed partial class DoubleValue : pb::IMessage<DoubleValue> {
private static readonly pb::MessageParser<DoubleValue> _parser = new pb::MessageParser<DoubleValue>(() => new DoubleValue());
@@ -91,7 +91,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 1;
private double value_;
/// <summary>
- /// The double value.
+ /// The double value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double Value {
@@ -176,9 +176,9 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Wrapper message for `float`.
+ /// Wrapper message for `float`.
///
- /// The JSON representation for `FloatValue` is JSON number.
+ /// The JSON representation for `FloatValue` is JSON number.
/// </summary>
public sealed partial class FloatValue : pb::IMessage<FloatValue> {
private static readonly pb::MessageParser<FloatValue> _parser = new pb::MessageParser<FloatValue>(() => new FloatValue());
@@ -216,7 +216,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 1;
private float value_;
/// <summary>
- /// The float value.
+ /// The float value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Value {
@@ -301,9 +301,9 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Wrapper message for `int64`.
+ /// Wrapper message for `int64`.
///
- /// The JSON representation for `Int64Value` is JSON string.
+ /// The JSON representation for `Int64Value` is JSON string.
/// </summary>
public sealed partial class Int64Value : pb::IMessage<Int64Value> {
private static readonly pb::MessageParser<Int64Value> _parser = new pb::MessageParser<Int64Value>(() => new Int64Value());
@@ -341,7 +341,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 1;
private long value_;
/// <summary>
- /// The int64 value.
+ /// The int64 value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Value {
@@ -426,9 +426,9 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Wrapper message for `uint64`.
+ /// Wrapper message for `uint64`.
///
- /// The JSON representation for `UInt64Value` is JSON string.
+ /// The JSON representation for `UInt64Value` is JSON string.
/// </summary>
public sealed partial class UInt64Value : pb::IMessage<UInt64Value> {
private static readonly pb::MessageParser<UInt64Value> _parser = new pb::MessageParser<UInt64Value>(() => new UInt64Value());
@@ -466,7 +466,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 1;
private ulong value_;
/// <summary>
- /// The uint64 value.
+ /// The uint64 value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ulong Value {
@@ -551,9 +551,9 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Wrapper message for `int32`.
+ /// Wrapper message for `int32`.
///
- /// The JSON representation for `Int32Value` is JSON number.
+ /// The JSON representation for `Int32Value` is JSON number.
/// </summary>
public sealed partial class Int32Value : pb::IMessage<Int32Value> {
private static readonly pb::MessageParser<Int32Value> _parser = new pb::MessageParser<Int32Value>(() => new Int32Value());
@@ -591,7 +591,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 1;
private int value_;
/// <summary>
- /// The int32 value.
+ /// The int32 value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Value {
@@ -676,9 +676,9 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Wrapper message for `uint32`.
+ /// Wrapper message for `uint32`.
///
- /// The JSON representation for `UInt32Value` is JSON number.
+ /// The JSON representation for `UInt32Value` is JSON number.
/// </summary>
public sealed partial class UInt32Value : pb::IMessage<UInt32Value> {
private static readonly pb::MessageParser<UInt32Value> _parser = new pb::MessageParser<UInt32Value>(() => new UInt32Value());
@@ -716,7 +716,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 1;
private uint value_;
/// <summary>
- /// The uint32 value.
+ /// The uint32 value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint Value {
@@ -801,9 +801,9 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Wrapper message for `bool`.
+ /// Wrapper message for `bool`.
///
- /// The JSON representation for `BoolValue` is JSON `true` and `false`.
+ /// The JSON representation for `BoolValue` is JSON `true` and `false`.
/// </summary>
public sealed partial class BoolValue : pb::IMessage<BoolValue> {
private static readonly pb::MessageParser<BoolValue> _parser = new pb::MessageParser<BoolValue>(() => new BoolValue());
@@ -841,7 +841,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 1;
private bool value_;
/// <summary>
- /// The bool value.
+ /// The bool value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Value {
@@ -926,9 +926,9 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Wrapper message for `string`.
+ /// Wrapper message for `string`.
///
- /// The JSON representation for `StringValue` is JSON string.
+ /// The JSON representation for `StringValue` is JSON string.
/// </summary>
public sealed partial class StringValue : pb::IMessage<StringValue> {
private static readonly pb::MessageParser<StringValue> _parser = new pb::MessageParser<StringValue>(() => new StringValue());
@@ -966,7 +966,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 1;
private string value_ = "";
/// <summary>
- /// The string value.
+ /// The string value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Value {
@@ -1051,9 +1051,9 @@ namespace Google.Protobuf.WellKnownTypes {
}
/// <summary>
- /// Wrapper message for `bytes`.
+ /// Wrapper message for `bytes`.
///
- /// The JSON representation for `BytesValue` is JSON string.
+ /// The JSON representation for `BytesValue` is JSON string.
/// </summary>
public sealed partial class BytesValue : pb::IMessage<BytesValue> {
private static readonly pb::MessageParser<BytesValue> _parser = new pb::MessageParser<BytesValue>(() => new BytesValue());
@@ -1091,7 +1091,7 @@ namespace Google.Protobuf.WellKnownTypes {
public const int ValueFieldNumber = 1;
private pb::ByteString value_ = pb::ByteString.Empty;
/// <summary>
- /// The bytes value.
+ /// The bytes value.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pb::ByteString Value {
diff --git a/docs/third_party.md b/docs/third_party.md
index 161bc3ca..0bbde914 100644
--- a/docs/third_party.md
+++ b/docs/third_party.md
@@ -130,8 +130,8 @@ There are miscellaneous other things you may find useful as a Protocol Buffers d
* [Oracle PL SQL plugin](http://code.google.com/p/protocol-buffer-plsql/)
* [Eclipse editor for protobuf (from Google)](http://code.google.com/p/protobuf-dt/)
* [C++ Builder compatible protobuf](https://github.com/saadware/protobuf-cppbuilder)
-* Maven Protocol Compiler Plugin
- * https://github.com/sergei-ivanov/maven-protoc-plugin/
+* Maven Protobuf Compiler Plugin
+ * By xolstice.org ([Documentation](https://www.xolstice.org/protobuf-maven-plugin/)) ([Source](https://github.com/xolstice/protobuf-maven-plugin/)) [![Maven Central](https://img.shields.io/maven-central/v/org.xolstice.maven.plugins/protobuf-maven-plugin.svg)](https://repo1.maven.org/maven2/org/xolstice/maven/plugins/protobuf-maven-plugin/)
* http://igor-petruk.github.com/protobuf-maven-plugin/
* http://code.google.com/p/maven-protoc-plugin/
* https://github.com/os72/protoc-jar-maven-plugin
diff --git a/generate_changelog.py b/generate_changelog.py
index d7575d46..d90a9b70 100755
--- a/generate_changelog.py
+++ b/generate_changelog.py
@@ -57,6 +57,7 @@ previous = sys.argv[1]
for language in languages:
print(language.name)
+ sys.stdout.flush()
os.system(("git log --pretty=oneline --abbrev-commit %s...HEAD %s | " +
"sed -e 's/^/ - /'") % (previous, " ".join(language.pathspec)))
print("")
diff --git a/java/core/src/main/java/com/google/protobuf/CodedInputStream.java b/java/core/src/main/java/com/google/protobuf/CodedInputStream.java
index e461fa28..14169dc4 100644
--- a/java/core/src/main/java/com/google/protobuf/CodedInputStream.java
+++ b/java/core/src/main/java/com/google/protobuf/CodedInputStream.java
@@ -60,7 +60,8 @@ import java.util.List;
public abstract class CodedInputStream {
private static final int DEFAULT_BUFFER_SIZE = 4096;
private static final int DEFAULT_RECURSION_LIMIT = 100;
- private static final int DEFAULT_SIZE_LIMIT = 64 << 20; // 64MB
+ // Integer.MAX_VALUE == 0x7FFFFFF == INT_MAX from limits.h
+ private static final int DEFAULT_SIZE_LIMIT = Integer.MAX_VALUE;
/** Visible for subclasses. See setRecursionLimit() */
int recursionDepth;
@@ -2762,9 +2763,9 @@ public abstract class CodedInputStream {
throw InvalidProtocolBufferException.negativeSize();
}
- // Verify that the message size so far has not exceeded sizeLimit.
+ // Integer-overflow-conscious check that the message size so far has not exceeded sizeLimit.
int currentMessageSize = totalBytesRetired + pos + size;
- if (currentMessageSize > sizeLimit) {
+ if (currentMessageSize - sizeLimit > 0) {
throw InvalidProtocolBufferException.sizeLimitExceeded();
}
diff --git a/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java b/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java
index e2ab0df9..e440c7db 100644
--- a/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java
+++ b/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java
@@ -30,8 +30,6 @@
package com.google.protobuf;
-import static org.junit.Assert.assertArrayEquals;
-
import protobuf_unittest.UnittestProto.BoolMessage;
import protobuf_unittest.UnittestProto.Int32Message;
import protobuf_unittest.UnittestProto.Int64Message;
@@ -445,6 +443,82 @@ public class CodedInputStreamTest extends TestCase {
}
}
+ /**
+ * Test we can do messages that are up to CodedInputStream#DEFAULT_SIZE_LIMIT
+ * in size (2G or Integer#MAX_SIZE).
+ * @throws IOException
+ */
+ public void testParseMessagesCloseTo2G() throws IOException {
+ byte[] serializedMessage = getBigSerializedMessage();
+ // How many of these big messages do we need to take us near our 2G limit?
+ int count = Integer.MAX_VALUE / serializedMessage.length;
+ // Now make an inputstream that will fake a near 2G message of messages
+ // returning our big serialized message 'count' times.
+ InputStream is = new RepeatingInputStream(serializedMessage, count);
+ // Parse should succeed!
+ TestAllTypes.parseFrom(is);
+ }
+
+ /**
+ * Test there is an exception if a message exceeds
+ * CodedInputStream#DEFAULT_SIZE_LIMIT in size (2G or Integer#MAX_SIZE).
+ * @throws IOException
+ */
+ public void testParseMessagesOver2G() throws IOException {
+ byte[] serializedMessage = getBigSerializedMessage();
+ // How many of these big messages do we need to take us near our 2G limit?
+ int count = Integer.MAX_VALUE / serializedMessage.length;
+ // Now add one to take us over the limit
+ count++;
+ // Now make an inputstream that will fake a near 2G message of messages
+ // returning our big serialized message 'count' times.
+ InputStream is = new RepeatingInputStream(serializedMessage, count);
+ try {
+ TestAllTypes.parseFrom(is);
+ fail("Should have thrown an exception!");
+ } catch (InvalidProtocolBufferException e) {
+ assertTrue(e.getMessage().contains("too large"));
+ }
+ }
+
+ /*
+ * @return A serialized big message.
+ */
+ private static byte[] getBigSerializedMessage() {
+ byte[] value = new byte[16 * 1024 * 1024];
+ ByteString bsValue = ByteString.wrap(value);
+ return TestAllTypes.newBuilder().setOptionalBytes(bsValue).build().toByteArray();
+ }
+
+ /*
+ * An input stream that repeats a byte arrays' content a number of times.
+ * Simulates really large input without consuming loads of memory. Used above
+ * to test the parsing behavior when the input size exceeds 2G or close to it.
+ */
+ private static class RepeatingInputStream extends InputStream {
+ private final byte[] serializedMessage;
+ private final int count;
+ private int index = 0;
+ private int offset = 0;
+
+ RepeatingInputStream(byte[] serializedMessage, int count) {
+ this.serializedMessage = serializedMessage;
+ this.count = count;
+ }
+
+ @Override
+ public int read() throws IOException {
+ if (this.offset == this.serializedMessage.length) {
+ this.index++;
+ this.offset = 0;
+ }
+ if (this.index == this.count) {
+ return -1;
+ }
+ return this.serializedMessage[offset++];
+ }
+ }
+
private TestRecursiveMessage makeRecursiveMessage(int depth) {
if (depth == 0) {
return TestRecursiveMessage.newBuilder().setI(5).build();
diff --git a/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java b/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java
index 7f6c8aea..ac712c94 100644
--- a/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java
+++ b/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java
@@ -49,6 +49,7 @@ import com.google.protobuf.Descriptors.EnumDescriptor;
import com.google.protobuf.Descriptors.EnumValueDescriptor;
import com.google.protobuf.Descriptors.FieldDescriptor;
import com.google.protobuf.Descriptors.FileDescriptor;
+import com.google.protobuf.Descriptors.OneofDescriptor;
import com.google.protobuf.DoubleValue;
import com.google.protobuf.Duration;
import com.google.protobuf.DynamicMessage;
@@ -782,12 +783,18 @@ public class JsonFormat {
if (includingDefaultValueFields) {
fieldsToPrint = new TreeMap<FieldDescriptor, Object>();
for (FieldDescriptor field : message.getDescriptorForType().getFields()) {
- if (field.isOptional()
- && field.getJavaType() == FieldDescriptor.JavaType.MESSAGE
- && !message.hasField(field)) {
- // Always skip empty optional message fields. If not we will recurse indefinitely if
- // a message has itself as a sub-field.
- continue;
+ if (field.isOptional()) {
+ if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE
+ && !message.hasField(field)){
+ // Always skip empty optional message fields. If not we will recurse indefinitely if
+ // a message has itself as a sub-field.
+ continue;
+ }
+ OneofDescriptor oneof = field.getContainingOneof();
+ if (oneof != null && !message.hasField(field)) {
+ // Skip all oneof fields except the one that is actually set
+ continue;
+ }
}
fieldsToPrint.put(field, message.getField(field));
}
diff --git a/java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java b/java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java
index 164ee54b..dafd9bb5 100644
--- a/java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java
+++ b/java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java
@@ -1267,6 +1267,23 @@ public class JsonFormatTest extends TestCase {
+ " }\n"
+ "}",
JsonFormat.printer().includingDefaultValueFields().print(mapMessage));
+
+ TestOneof oneofMessage = TestOneof.getDefaultInstance();
+ assertEquals("{\n}", JsonFormat.printer().print(oneofMessage));
+ assertEquals("{\n}", JsonFormat.printer().includingDefaultValueFields().print(oneofMessage));
+
+ oneofMessage = TestOneof.newBuilder().setOneofInt32(42).build();
+ assertEquals("{\n \"oneofInt32\": 42\n}",
+ JsonFormat.printer().print(oneofMessage));
+ assertEquals("{\n \"oneofInt32\": 42\n}",
+ JsonFormat.printer().includingDefaultValueFields().print(oneofMessage));
+
+ TestOneof.Builder oneofBuilder = TestOneof.newBuilder();
+ mergeFromJson("{\n" + " \"oneofNullValue\": null \n" + "}", oneofBuilder);
+ oneofMessage = oneofBuilder.build();
+ assertEquals("{\n \"oneofNullValue\": null\n}", JsonFormat.printer().print(oneofMessage));
+ assertEquals("{\n \"oneofNullValue\": null\n}",
+ JsonFormat.printer().includingDefaultValueFields().print(oneofMessage));
}
public void testPreservingProtoFieldNames() throws Exception {
diff --git a/jenkins/docker/Dockerfile b/jenkins/docker/Dockerfile
index 3f4725b2..c5ee1ec0 100644
--- a/jenkins/docker/Dockerfile
+++ b/jenkins/docker/Dockerfile
@@ -148,7 +148,11 @@ RUN php composer-setup.php
RUN mv composer.phar /usr/bin/composer
RUN php -r "unlink('composer-setup.php');"
RUN cd /tmp && \
+ rm -rf protobuf && \
+ git clone https://github.com/google/protobuf.git && \
cd protobuf && \
+ git reset 46ae90dc5e145b12fffa7e053a908a9f3e066286 && \
+ cd php && \
ln -sfn /usr/bin/php5.5 /usr/bin/php && \
ln -sfn /usr/bin/php-config5.5 /usr/bin/php-config && \
ln -sfn /usr/bin/phpize5.5 /usr/bin/phpize && \
diff --git a/jenkins/docker32/Dockerfile b/jenkins/docker32/Dockerfile
index a36338b4..94d9a4c3 100644
--- a/jenkins/docker32/Dockerfile
+++ b/jenkins/docker32/Dockerfile
@@ -63,8 +63,8 @@ RUN mv composer.phar /usr/bin/composer
RUN php -r "unlink('composer-setup.php');"
RUN cd /tmp && \
git clone https://github.com/google/protobuf.git && \
- cd protobuf && \
- git reset 734930f9197b7bc97c3c794c7a949fee2a08c280 && \
+ cd protobuf/php && \
+ git reset 46ae90dc5e145b12fffa7e053a908a9f3e066286 && \
ln -sfn /usr/bin/php5.5 /usr/bin/php && \
ln -sfn /usr/bin/php-config5.5 /usr/bin/php-config && \
ln -sfn /usr/bin/phpize5.5 /usr/bin/phpize && \
diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4
new file mode 100644
index 00000000..b61fcb63
--- /dev/null
+++ b/m4/ax_cxx_compile_stdcxx.m4
@@ -0,0 +1,982 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
+#
+# DESCRIPTION
+#
+# Check for baseline language coverage in the compiler for the specified
+# version of the C++ standard. If necessary, add switches to CXX and
+# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
+# or '14' (for the C++14 standard).
+#
+# The second argument, if specified, indicates whether you insist on an
+# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
+# -std=c++11). If neither is specified, you get whatever works, with
+# preference for an extended mode.
+#
+# The third argument, if specified 'mandatory' or if left unspecified,
+# indicates that baseline support for the specified C++ standard is
+# required and that the macro should error out if no mode with that
+# support is found. If specified 'optional', then configuration proceeds
+# regardless, after defining HAVE_CXX${VERSION} if and only if a
+# supporting mode is found.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
+# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
+# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
+# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
+# Copyright (c) 2015 Paul Norman <penorman@mac.com>
+# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
+# Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 6
+
+dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
+dnl (serial version number 13).
+
+AX_REQUIRE_DEFINED([AC_MSG_WARN])
+AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
+ m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
+ [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
+ [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
+ [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
+ m4_if([$2], [], [],
+ [$2], [ext], [],
+ [$2], [noext], [],
+ [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
+ m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
+ [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
+ [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
+ [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
+ AC_LANG_PUSH([C++])dnl
+ ac_success=no
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
+ ax_cv_cxx_compile_cxx$1,
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [ax_cv_cxx_compile_cxx$1=yes],
+ [ax_cv_cxx_compile_cxx$1=no])])
+ if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
+ ac_success=yes
+ fi
+
+ m4_if([$2], [noext], [], [dnl
+ if test x$ac_success = xno; then
+ for alternative in ${ax_cxx_compile_alternatives}; do
+ switch="-std=gnu++${alternative}"
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+ $cachevar,
+ [ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXX="$ac_save_CXX"])
+ if eval test x\$$cachevar = xyes; then
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
+ done
+ fi])
+
+ m4_if([$2], [ext], [], [dnl
+ if test x$ac_success = xno; then
+ dnl HP's aCC needs +std=c++11 according to:
+ dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
+ dnl Cray's crayCC needs "-h std=c++11"
+ for alternative in ${ax_cxx_compile_alternatives}; do
+ for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+ $cachevar,
+ [ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXX="$ac_save_CXX"])
+ if eval test x\$$cachevar = xyes; then
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
+ done
+ if test x$ac_success = xyes; then
+ break
+ fi
+ done
+ fi])
+ AC_LANG_POP([C++])
+ if test x$ax_cxx_compile_cxx$1_required = xtrue; then
+ if test x$ac_success = xno; then
+ AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
+ fi
+ fi
+ if test x$ac_success = xno; then
+ HAVE_CXX$1=0
+ AC_MSG_NOTICE([No compiler with C++$1 support was found])
+ else
+ HAVE_CXX$1=1
+ AC_DEFINE(HAVE_CXX$1,1,
+ [define if the compiler supports basic C++$1 syntax])
+ fi
+ AC_SUBST(HAVE_CXX$1)
+ m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
+])
+
+
+dnl Test body for checking C++11 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+)
+
+
+dnl Test body for checking C++14 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+)
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
+)
+
+dnl Tests for new features in C++11
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
+
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+namespace cxx11
+{
+
+ namespace test_static_assert
+ {
+
+ template <typename T>
+ struct check
+ {
+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
+ };
+
+ }
+
+ namespace test_final_override
+ {
+
+ struct Base
+ {
+ virtual void f() {}
+ };
+
+ struct Derived : public Base
+ {
+ virtual void f() override {}
+ };
+
+ }
+
+ namespace test_double_right_angle_brackets
+ {
+
+ template < typename T >
+ struct check {};
+
+ typedef check<void> single_type;
+ typedef check<check<void>> double_type;
+ typedef check<check<check<void>>> triple_type;
+ typedef check<check<check<check<void>>>> quadruple_type;
+
+ }
+
+ namespace test_decltype
+ {
+
+ int
+ f()
+ {
+ int a = 1;
+ decltype(a) b = 2;
+ return a + b;
+ }
+
+ }
+
+ namespace test_type_deduction
+ {
+
+ template < typename T1, typename T2 >
+ struct is_same
+ {
+ static const bool value = false;
+ };
+
+ template < typename T >
+ struct is_same<T, T>
+ {
+ static const bool value = true;
+ };
+
+ template < typename T1, typename T2 >
+ auto
+ add(T1 a1, T2 a2) -> decltype(a1 + a2)
+ {
+ return a1 + a2;
+ }
+
+ int
+ test(const int c, volatile int v)
+ {
+ static_assert(is_same<int, decltype(0)>::value == true, "");
+ static_assert(is_same<int, decltype(c)>::value == false, "");
+ static_assert(is_same<int, decltype(v)>::value == false, "");
+ auto ac = c;
+ auto av = v;
+ auto sumi = ac + av + 'x';
+ auto sumf = ac + av + 1.0;
+ static_assert(is_same<int, decltype(ac)>::value == true, "");
+ static_assert(is_same<int, decltype(av)>::value == true, "");
+ static_assert(is_same<int, decltype(sumi)>::value == true, "");
+ static_assert(is_same<int, decltype(sumf)>::value == false, "");
+ static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+ return (sumf > 0.0) ? sumi : add(c, v);
+ }
+
+ }
+
+ namespace test_noexcept
+ {
+
+ int f() { return 0; }
+ int g() noexcept { return 0; }
+
+ static_assert(noexcept(f()) == false, "");
+ static_assert(noexcept(g()) == true, "");
+
+ }
+
+ namespace test_constexpr
+ {
+
+ template < typename CharT >
+ unsigned long constexpr
+ strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+ {
+ return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+ }
+
+ template < typename CharT >
+ unsigned long constexpr
+ strlen_c(const CharT *const s) noexcept
+ {
+ return strlen_c_r(s, 0UL);
+ }
+
+ static_assert(strlen_c("") == 0UL, "");
+ static_assert(strlen_c("1") == 1UL, "");
+ static_assert(strlen_c("example") == 7UL, "");
+ static_assert(strlen_c("another\0example") == 7UL, "");
+
+ }
+
+ namespace test_rvalue_references
+ {
+
+ template < int N >
+ struct answer
+ {
+ static constexpr int value = N;
+ };
+
+ answer<1> f(int&) { return answer<1>(); }
+ answer<2> f(const int&) { return answer<2>(); }
+ answer<3> f(int&&) { return answer<3>(); }
+
+ void
+ test()
+ {
+ int i = 0;
+ const int c = 0;
+ static_assert(decltype(f(i))::value == 1, "");
+ static_assert(decltype(f(c))::value == 2, "");
+ static_assert(decltype(f(0))::value == 3, "");
+ }
+
+ }
+
+ namespace test_uniform_initialization
+ {
+
+ struct test
+ {
+ static const int zero {};
+ static const int one {1};
+ };
+
+ static_assert(test::zero == 0, "");
+ static_assert(test::one == 1, "");
+
+ }
+
+ namespace test_lambdas
+ {
+
+ void
+ test1()
+ {
+ auto lambda1 = [](){};
+ auto lambda2 = lambda1;
+ lambda1();
+ lambda2();
+ }
+
+ int
+ test2()
+ {
+ auto a = [](int i, int j){ return i + j; }(1, 2);
+ auto b = []() -> int { return '0'; }();
+ auto c = [=](){ return a + b; }();
+ auto d = [&](){ return c; }();
+ auto e = [a, &b](int x) mutable {
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
+ }(0);
+ return a + b + c + d + e;
+ }
+
+ int
+ test3()
+ {
+ const auto nullary = [](){ return 0; };
+ const auto unary = [](int x){ return x; };
+ using nullary_t = decltype(nullary);
+ using unary_t = decltype(unary);
+ const auto higher1st = [](nullary_t f){ return f(); };
+ const auto higher2nd = [unary](nullary_t f1){
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ };
+ return higher1st(nullary) + higher2nd(nullary)(unary);
+ }
+
+ }
+
+ namespace test_variadic_templates
+ {
+
+ template <int...>
+ struct sum;
+
+ template <int N0, int... N1toN>
+ struct sum<N0, N1toN...>
+ {
+ static constexpr auto value = N0 + sum<N1toN...>::value;
+ };
+
+ template <>
+ struct sum<>
+ {
+ static constexpr auto value = 0;
+ };
+
+ static_assert(sum<>::value == 0, "");
+ static_assert(sum<1>::value == 1, "");
+ static_assert(sum<23>::value == 23, "");
+ static_assert(sum<1, 2>::value == 3, "");
+ static_assert(sum<5, 5, 11>::value == 21, "");
+ static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+ }
+
+ // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+ // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+ // because of this.
+ namespace test_template_alias_sfinae
+ {
+
+ struct foo {};
+
+ template<typename T>
+ using member = typename T::member_type;
+
+ template<typename T>
+ void func(...) {}
+
+ template<typename T>
+ void func(member<T>*) {}
+
+ void test();
+
+ void test() { func<foo>(0); }
+
+ }
+
+} // namespace cxx11
+
+#endif // __cplusplus >= 201103L
+
+]])
+
+
+dnl Tests for new features in C++14
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
+
+// If the compiler admits that it is not ready for C++14, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201402L
+
+#error "This is not a C++14 compiler"
+
+#else
+
+namespace cxx14
+{
+
+ namespace test_polymorphic_lambdas
+ {
+
+ int
+ test()
+ {
+ const auto lambda = [](auto&&... args){
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
+ };
+ return lambda(1, 1L, 1.0f, '1');
+ }
+
+ }
+
+ namespace test_binary_literals
+ {
+
+ constexpr auto ivii = 0b0000000000101010;
+ static_assert(ivii == 42, "wrong value");
+
+ }
+
+ namespace test_generalized_constexpr
+ {
+
+ template < typename CharT >
+ constexpr unsigned long
+ strlen_c(const CharT *const s) noexcept
+ {
+ auto length = 0UL;
+ for (auto p = s; *p; ++p)
+ ++length;
+ return length;
+ }
+
+ static_assert(strlen_c("") == 0UL, "");
+ static_assert(strlen_c("x") == 1UL, "");
+ static_assert(strlen_c("test") == 4UL, "");
+ static_assert(strlen_c("another\0test") == 7UL, "");
+
+ }
+
+ namespace test_lambda_init_capture
+ {
+
+ int
+ test()
+ {
+ auto x = 0;
+ const auto lambda1 = [a = x](int b){ return a + b; };
+ const auto lambda2 = [a = lambda1(x)](){ return a; };
+ return lambda2();
+ }
+
+ }
+
+ namespace test_digit_separators
+ {
+
+ constexpr auto ten_million = 100'000'000;
+ static_assert(ten_million == 100000000, "");
+
+ }
+
+ namespace test_return_type_deduction
+ {
+
+ auto f(int& x) { return x; }
+ decltype(auto) g(int& x) { return x; }
+
+ template < typename T1, typename T2 >
+ struct is_same
+ {
+ static constexpr auto value = false;
+ };
+
+ template < typename T >
+ struct is_same<T, T>
+ {
+ static constexpr auto value = true;
+ };
+
+ int
+ test()
+ {
+ auto x = 0;
+ static_assert(is_same<int, decltype(f(x))>::value, "");
+ static_assert(is_same<int&, decltype(g(x))>::value, "");
+ return x;
+ }
+
+ }
+
+} // namespace cxx14
+
+#endif // __cplusplus >= 201402L
+
+]])
+
+
+dnl Tests for new features in C++17
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
+
+// If the compiler admits that it is not ready for C++17, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus <= 201402L
+
+#error "This is not a C++17 compiler"
+
+#else
+
+#if defined(__clang__)
+ #define REALLY_CLANG
+#else
+ #if defined(__GNUC__)
+ #define REALLY_GCC
+ #endif
+#endif
+
+#include <initializer_list>
+#include <utility>
+#include <type_traits>
+
+namespace cxx17
+{
+
+#if !defined(REALLY_CLANG)
+ namespace test_constexpr_lambdas
+ {
+
+ // TODO: test it with clang++ from git
+
+ constexpr int foo = [](){return 42;}();
+
+ }
+#endif // !defined(REALLY_CLANG)
+
+ namespace test::nested_namespace::definitions
+ {
+
+ }
+
+ namespace test_fold_expression
+ {
+
+ template<typename... Args>
+ int multiply(Args... args)
+ {
+ return (args * ... * 1);
+ }
+
+ template<typename... Args>
+ bool all(Args... args)
+ {
+ return (args && ...);
+ }
+
+ }
+
+ namespace test_extended_static_assert
+ {
+
+ static_assert (true);
+
+ }
+
+ namespace test_auto_brace_init_list
+ {
+
+ auto foo = {5};
+ auto bar {5};
+
+ static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
+ static_assert(std::is_same<int, decltype(bar)>::value);
+ }
+
+ namespace test_typename_in_template_template_parameter
+ {
+
+ template<template<typename> typename X> struct D;
+
+ }
+
+ namespace test_fallthrough_nodiscard_maybe_unused_attributes
+ {
+
+ int f1()
+ {
+ return 42;
+ }
+
+ [[nodiscard]] int f2()
+ {
+ [[maybe_unused]] auto unused = f1();
+
+ switch (f1())
+ {
+ case 17:
+ f1();
+ [[fallthrough]];
+ case 42:
+ f1();
+ }
+ return f1();
+ }
+
+ }
+
+ namespace test_extended_aggregate_initialization
+ {
+
+ struct base1
+ {
+ int b1, b2 = 42;
+ };
+
+ struct base2
+ {
+ base2() {
+ b3 = 42;
+ }
+ int b3;
+ };
+
+ struct derived : base1, base2
+ {
+ int d;
+ };
+
+ derived d1 {{1, 2}, {}, 4}; // full initialization
+ derived d2 {{}, {}, 4}; // value-initialized bases
+
+ }
+
+ namespace test_general_range_based_for_loop
+ {
+
+ struct iter
+ {
+ int i;
+
+ int& operator* ()
+ {
+ return i;
+ }
+
+ const int& operator* () const
+ {
+ return i;
+ }
+
+ iter& operator++()
+ {
+ ++i;
+ return *this;
+ }
+ };
+
+ struct sentinel
+ {
+ int i;
+ };
+
+ bool operator== (const iter& i, const sentinel& s)
+ {
+ return i.i == s.i;
+ }
+
+ bool operator!= (const iter& i, const sentinel& s)
+ {
+ return !(i == s);
+ }
+
+ struct range
+ {
+ iter begin() const
+ {
+ return {0};
+ }
+
+ sentinel end() const
+ {
+ return {5};
+ }
+ };
+
+ void f()
+ {
+ range r {};
+
+ for (auto i : r)
+ {
+ [[maybe_unused]] auto v = i;
+ }
+ }
+
+ }
+
+ namespace test_lambda_capture_asterisk_this_by_value
+ {
+
+ struct t
+ {
+ int i;
+ int foo()
+ {
+ return [*this]()
+ {
+ return i;
+ }();
+ }
+ };
+
+ }
+
+ namespace test_enum_class_construction
+ {
+
+ enum class byte : unsigned char
+ {};
+
+ byte foo {42};
+
+ }
+
+ namespace test_constexpr_if
+ {
+
+ template <bool cond>
+ int f ()
+ {
+ if constexpr(cond)
+ {
+ return 13;
+ }
+ else
+ {
+ return 42;
+ }
+ }
+
+ }
+
+ namespace test_selection_statement_with_initializer
+ {
+
+ int f()
+ {
+ return 13;
+ }
+
+ int f2()
+ {
+ if (auto i = f(); i > 0)
+ {
+ return 3;
+ }
+
+ switch (auto i = f(); i + 4)
+ {
+ case 17:
+ return 2;
+
+ default:
+ return 1;
+ }
+ }
+
+ }
+
+#if !defined(REALLY_CLANG)
+ namespace test_template_argument_deduction_for_class_templates
+ {
+
+ // TODO: test it with clang++ from git
+
+ template <typename T1, typename T2>
+ struct pair
+ {
+ pair (T1 p1, T2 p2)
+ : m1 {p1},
+ m2 {p2}
+ {}
+
+ T1 m1;
+ T2 m2;
+ };
+
+ void f()
+ {
+ [[maybe_unused]] auto p = pair{13, 42u};
+ }
+
+ }
+#endif // !defined(REALLY_CLANG)
+
+ namespace test_non_type_auto_template_parameters
+ {
+
+ template <auto n>
+ struct B
+ {};
+
+ B<5> b1;
+ B<'a'> b2;
+
+ }
+
+#if !defined(REALLY_CLANG)
+ namespace test_structured_bindings
+ {
+
+ // TODO: test it with clang++ from git
+
+ int arr[2] = { 1, 2 };
+ std::pair<int, int> pr = { 1, 2 };
+
+ auto f1() -> int(&)[2]
+ {
+ return arr;
+ }
+
+ auto f2() -> std::pair<int, int>&
+ {
+ return pr;
+ }
+
+ struct S
+ {
+ int x1 : 2;
+ volatile double y1;
+ };
+
+ S f3()
+ {
+ return {};
+ }
+
+ auto [ x1, y1 ] = f1();
+ auto& [ xr1, yr1 ] = f1();
+ auto [ x2, y2 ] = f2();
+ auto& [ xr2, yr2 ] = f2();
+ const auto [ x3, y3 ] = f3();
+
+ }
+#endif // !defined(REALLY_CLANG)
+
+#if !defined(REALLY_CLANG)
+ namespace test_exception_spec_type_system
+ {
+
+ // TODO: test it with clang++ from git
+
+ struct Good {};
+ struct Bad {};
+
+ void g1() noexcept;
+ void g2();
+
+ template<typename T>
+ Bad
+ f(T*, T*);
+
+ template<typename T1, typename T2>
+ Good
+ f(T1*, T2*);
+
+ static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
+
+ }
+#endif // !defined(REALLY_CLANG)
+
+ namespace test_inline_variables
+ {
+
+ template<class T> void f(T)
+ {}
+
+ template<class T> inline T g(T)
+ {
+ return T{};
+ }
+
+ template<> inline void f<>(int)
+ {}
+
+ template<> int g<>(int)
+ {
+ return 5;
+ }
+
+ }
+
+} // namespace cxx17
+
+#endif // __cplusplus <= 201402L
+
+]])
diff --git a/objectivec/DevTools/compile_testing_protos.sh b/objectivec/DevTools/compile_testing_protos.sh
index 6cc32da9..d7f3f605 100755
--- a/objectivec/DevTools/compile_testing_protos.sh
+++ b/objectivec/DevTools/compile_testing_protos.sh
@@ -134,6 +134,8 @@ done
compile_protos \
--proto_path="objectivec/Tests" \
objectivec/Tests/unittest_cycle.proto \
+ objectivec/Tests/unittest_deprecated.proto \
+ objectivec/Tests/unittest_deprecated_file.proto \
objectivec/Tests/unittest_extension_chain_a.proto \
objectivec/Tests/unittest_extension_chain_b.proto \
objectivec/Tests/unittest_extension_chain_c.proto \
diff --git a/objectivec/DevTools/full_mac_build.sh b/objectivec/DevTools/full_mac_build.sh
index 7b335618..ef8fb740 100755
--- a/objectivec/DevTools/full_mac_build.sh
+++ b/objectivec/DevTools/full_mac_build.sh
@@ -45,6 +45,8 @@ OPTIONS:
Skip the invoke of Xcode to test the runtime on OS X.
--skip-objc-conformance
Skip the Objective C conformance tests (run on OS X).
+ --xcode-quiet
+ Pass -quiet to xcodebuild.
EOF
}
@@ -83,6 +85,7 @@ DO_XCODE_OSX_TESTS=yes
DO_XCODE_DEBUG=yes
DO_XCODE_RELEASE=yes
DO_OBJC_CONFORMANCE_TESTS=yes
+XCODE_QUIET=no
while [[ $# != 0 ]]; do
case "${1}" in
-h | --help )
@@ -124,6 +127,9 @@ while [[ $# != 0 ]]; do
--skip-objc-conformance )
DO_OBJC_CONFORMANCE_TESTS=no
;;
+ --xcode-quiet )
+ XCODE_QUIET=yes
+ ;;
-*)
echo "ERROR: Unknown option: ${1}" 1>&2
printUsage
@@ -217,17 +223,21 @@ if ! objectivec/DevTools/pddm.py --dry-run objectivec/*.[hm] objectivec/Tests/*.
exit 1
fi
+readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )"
+readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix.
+
if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
XCODEBUILD_TEST_BASE_IOS=(
xcodebuild
-project objectivec/ProtocolBuffers_iOS.xcodeproj
-scheme ProtocolBuffers
)
+ if [[ "${XCODE_QUIET}" == "yes" ]] ; then
+ XCODEBUILD_TEST_BASE_IOS+=( -quiet )
+ fi
# Don't need to worry about form factors or retina/non retina;
# just pick a mix of OS Versions and 32/64 bit.
# NOTE: Different Xcode have different simulated hardware/os support.
- readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )"
- readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix.
case "${XCODE_VERSION}" in
6.* )
echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2
@@ -247,6 +257,14 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
-destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.0" # 64bit
)
;;
+ 8.1* )
+ XCODEBUILD_TEST_BASE_IOS+=(
+ -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit
+ -destination "platform=iOS Simulator,name=iPhone 7,OS=10.1" # 64bit
+ -destination "platform=iOS Simulator,name=iPad 2,OS=8.1" # 32bit
+ -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.1" # 64bit
+ )
+ ;;
* )
echo "Time to update the simulator targets for Xcode ${XCODE_VERSION}"
exit 2
@@ -271,8 +289,9 @@ if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then
# Since the ObjC 2.0 Runtime is required, 32bit OS X isn't supported.
-destination "platform=OS X,arch=x86_64" # 64bit
)
- readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )"
- readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix.
+ if [[ "${XCODE_QUIET}" == "yes" ]] ; then
+ XCODEBUILD_TEST_BASE_OSX+=( -quiet )
+ fi
case "${XCODE_VERSION}" in
6.* )
echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2
diff --git a/objectivec/GPBBootstrap.h b/objectivec/GPBBootstrap.h
index f14dd8aa..ed53ae7c 100644
--- a/objectivec/GPBBootstrap.h
+++ b/objectivec/GPBBootstrap.h
@@ -62,7 +62,11 @@
*
* ```
* GPB_ENUM_FWD_DECLARE(Foo_Enum)
- * @property (nonatomic) Foo_Enum value;
+ *
+ * @interface BarClass : NSObject
+ * @property (nonatomic) enum Foo_Enum value;
+ * - (void)bazMethod:(enum Foo_Enum):value;
+ * @end
* ```
**/
#define GPB_ENUM_FWD_DECLARE(X) enum X : int32_t
diff --git a/objectivec/Tests/GPBARCUnittestProtos.m b/objectivec/Tests/GPBARCUnittestProtos.m
index 28d2396c..29f6ccf6 100644
--- a/objectivec/Tests/GPBARCUnittestProtos.m
+++ b/objectivec/Tests/GPBARCUnittestProtos.m
@@ -42,6 +42,8 @@
#import "google/protobuf/Unittest.pbobjc.h"
#import "google/protobuf/UnittestCustomOptions.pbobjc.h"
#import "google/protobuf/UnittestCycle.pbobjc.h"
+#import "google/protobuf/UnittestDeprecated.pbobjc.h"
+#import "google/protobuf/UnittestDeprecatedFile.pbobjc.h"
#import "google/protobuf/UnittestDropUnknownFields.pbobjc.h"
#import "google/protobuf/UnittestEmbedOptimizeFor.pbobjc.h"
#import "google/protobuf/UnittestEmpty.pbobjc.h"
diff --git a/objectivec/Tests/GPBUnittestProtos.m b/objectivec/Tests/GPBUnittestProtos.m
index 8d2948bf..756bd99e 100644
--- a/objectivec/Tests/GPBUnittestProtos.m
+++ b/objectivec/Tests/GPBUnittestProtos.m
@@ -43,6 +43,8 @@
#import "google/protobuf/UnittestArena.pbobjc.m"
#import "google/protobuf/UnittestCustomOptions.pbobjc.m"
#import "google/protobuf/UnittestCycle.pbobjc.m"
+#import "google/protobuf/UnittestDeprecated.pbobjc.m"
+#import "google/protobuf/UnittestDeprecatedFile.pbobjc.m"
#import "google/protobuf/UnittestDropUnknownFields.pbobjc.m"
#import "google/protobuf/UnittestEmbedOptimizeFor.pbobjc.m"
#import "google/protobuf/UnittestEmpty.pbobjc.m"
diff --git a/objectivec/Tests/unittest_deprecated.proto b/objectivec/Tests/unittest_deprecated.proto
new file mode 100644
index 00000000..96a52bbb
--- /dev/null
+++ b/objectivec/Tests/unittest_deprecated.proto
@@ -0,0 +1,95 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2016 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.
+
+syntax = "proto2";
+
+package protobuf_deprecated;
+option objc_class_prefix = "Dep";
+
+//
+// This file is like unittest_deprecated_file.proto, but uses message, enum,
+// enum value, and field level deprecation.
+//
+// The source generated from this file needs to be inspect to confirm it has
+// all of the expected annotations. It also will be compiled into the unittest
+// and that compile should be clean without errors.
+//
+
+// Mix of field types marked as deprecated.
+message Msg1 {
+ extensions 100 to max;
+
+ optional string string_field = 1 [deprecated=true];
+ required int32 int_field = 2 [deprecated=true];
+ repeated fixed32 fixed_field = 3 [deprecated=true];
+ optional Msg1 msg_field = 4 [deprecated=true];
+}
+
+// Mix of extension field types marked as deprecated.
+extend Msg1 {
+ optional string string_ext_field = 101 [deprecated=true];
+ optional int32 int_ext_field = 102 [deprecated=true];
+ repeated fixed32 fixed_ext_field = 103 [deprecated=true];
+ optional Msg1 msg_ext_field = 104 [deprecated=true];
+}
+
+// Mix of extension field types (scoped to a message) marked as deprecated.
+message Msg1A {
+ extend Msg1 {
+ optional string string_ext2_field = 201 [deprecated=true];
+ optional int32 int_ext2_field = 202 [deprecated=true];
+ repeated fixed32 fixed_ext2_field = 203 [deprecated=true];
+ optional Msg1 msg_ext2_field = 204 [deprecated=true];
+ }
+}
+
+// Enum value marked as deprecated.
+enum Enum1 {
+ ENUM1_ONE = 1;
+ ENUM1_TWO = 2;
+ ENUM1_THREE = 3 [deprecated=true];
+}
+
+// Message marked as deprecated.
+message Msg2 {
+ option deprecated = true;
+
+ optional string string_field = 1;
+ required int32 int_field = 2;
+ repeated fixed32 fixed_field = 3;
+}
+
+// Enum marked as deprecated.
+enum Enum2 {
+ option deprecated = true;
+
+ ENUM2_ONE = 1;
+ ENUM2_TWO = 2;
+ ENUM2_THREE = 3;
+}
diff --git a/objectivec/Tests/unittest_deprecated_file.proto b/objectivec/Tests/unittest_deprecated_file.proto
new file mode 100644
index 00000000..ef92e7de
--- /dev/null
+++ b/objectivec/Tests/unittest_deprecated_file.proto
@@ -0,0 +1,76 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2016 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.
+
+syntax = "proto2";
+
+package protobuf_deprecated_file;
+option objc_class_prefix = "FileDep";
+
+//
+// This file is like unittest_deprecated.proto, but does NOT use message, enum,
+// enum value, or field level deprecation; instead it uses the file level option
+// to mark everything.
+//
+// The source generated from this file needs to be inspect to confirm it has
+// all of the expected annotations. It also will be compiled into the unittest
+// and that compile should be clean without errors.
+//
+option deprecated = true;
+
+// Message to catch the deprecation.
+message Msg1 {
+ extensions 100 to max;
+
+ optional string string_field = 1;
+}
+
+// Mix of extension field types to catch the deprecation.
+extend Msg1 {
+ optional string string_ext_field = 101;
+ optional int32 int_ext_field = 102;
+ repeated fixed32 fixed_ext_field = 103;
+ optional Msg1 msg_ext_field = 104;
+}
+
+// Mix of extension field types (scoped to a message) to catch the deprecation.
+message Msg1A {
+ extend Msg1 {
+ optional string string_ext2_field = 201;
+ optional int32 int_ext2_field = 202;
+ repeated fixed32 fixed_ext2_field = 203;
+ optional Msg1 msg_ext2_field = 204;
+ }
+}
+
+// Enum to catch the deprecation.
+enum Enum1 {
+ ENUM1_ONE = 1;
+ ENUM1_TWO = 2;
+ ENUM1_THREE = 3;
+}
diff --git a/php/composer.json b/php/composer.json
new file mode 100644
index 00000000..3dae2865
--- /dev/null
+++ b/php/composer.json
@@ -0,0 +1,27 @@
+{
+ "name": "google/protobuf",
+ "type": "library",
+ "description": "proto library for PHP",
+ "keywords": ["proto"],
+ "homepage": "https://developers.google.com/protocol-buffers/",
+ "license": "BSD-3-Clause",
+ "require": {
+ "php": ">=5.5.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=4.8.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Foo\\": "tests/generated/Foo",
+ "Bar\\": "tests/generated/Bar",
+ "Google\\Protobuf\\": "tests/generated/Google/Protobuf",
+ "Google\\Protobuf\\Internal\\": "src/Google/Protobuf/Internal",
+ "GPBMetadata\\": "tests/generated/GPBMetadata",
+ "GPBMetadata\\Google\\Protobuf\\Internal\\": "src/GPBMetadata/Google/Protobuf/Internal"
+ },
+ "files": [
+ "src/Google/Protobuf/descriptor.php"
+ ]
+ }
+}
diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c
index d8fbbe11..16e397f5 100644
--- a/php/ext/google/protobuf/message.c
+++ b/php/ext/google/protobuf/message.c
@@ -41,6 +41,7 @@ static zend_function_entry message_methods[] = {
PHP_ME(Message, decode, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Message, readOneof, NULL, ZEND_ACC_PROTECTED)
PHP_ME(Message, writeOneof, NULL, ZEND_ACC_PROTECTED)
+ PHP_ME(Message, __construct, NULL, ZEND_ACC_PROTECTED)
{NULL, NULL, NULL}
};
@@ -210,6 +211,17 @@ void build_class_from_descriptor(zval* php_descriptor TSRMLS_DC) {
// PHP Methods
// -----------------------------------------------------------------------------
+// At the first time the message is created, the class entry hasn't been
+// modified. As a result, the first created instance will be a normal zend
+// object. Here, we manually modify it to our message in such a case.
+PHP_METHOD(Message, __construct) {
+ if (Z_OBJVAL_P(getThis()).handlers != message_handlers) {
+ zend_class_entry* ce = Z_OBJCE_P(getThis());
+ zval_dtor(getThis());
+ Z_OBJVAL_P(getThis()) = message_create(ce TSRMLS_CC);
+ }
+}
+
PHP_METHOD(Message, readOneof) {
long index;
diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h
index fb5879dc..8022a9aa 100644
--- a/php/ext/google/protobuf/protobuf.h
+++ b/php/ext/google/protobuf/protobuf.h
@@ -231,8 +231,8 @@ struct MessageHeader {
};
MessageLayout* create_layout(const upb_msgdef* msgdef);
-void layout_init(MessageLayout* layout, void* storage, zval** properties_table
- TSRMLS_DC);
+void layout_init(MessageLayout* layout, void* storage,
+ zval** properties_table TSRMLS_DC);
zval* layout_get(MessageLayout* layout, const void* storage,
const upb_fielddef* field, zval** cache TSRMLS_DC);
void layout_set(MessageLayout* layout, MessageHeader* header,
@@ -241,6 +241,7 @@ void free_layout(MessageLayout* layout);
PHP_METHOD(Message, readOneof);
PHP_METHOD(Message, writeOneof);
+PHP_METHOD(Message, __construct);
// -----------------------------------------------------------------------------
// Encode / Decode.
diff --git a/php/ext/google/protobuf/storage.c b/php/ext/google/protobuf/storage.c
index 1d25a91b..8a2b3a22 100644
--- a/php/ext/google/protobuf/storage.c
+++ b/php/ext/google/protobuf/storage.c
@@ -458,8 +458,8 @@ void free_layout(MessageLayout* layout) {
FREE(layout);
}
-void layout_init(MessageLayout* layout, void* storage, zval** properties_table
- TSRMLS_DC) {
+void layout_init(MessageLayout* layout, void* storage,
+ zval** properties_table TSRMLS_DC) {
int i;
upb_msg_field_iter it;
for (upb_msg_field_begin(&it, layout->msgdef), i = 0; !upb_msg_field_done(&it);
@@ -479,8 +479,8 @@ void layout_init(MessageLayout* layout, void* storage, zval** properties_table
DEREF(memory, zval**) = property_ptr;
} else if (upb_fielddef_label(field) == UPB_LABEL_REPEATED) {
zval_ptr_dtor(property_ptr);
- repeated_field_create_with_type(repeated_field_type, field, property_ptr
- TSRMLS_CC);
+ repeated_field_create_with_type(repeated_field_type, field,
+ property_ptr TSRMLS_CC);
DEREF(memory, zval**) = property_ptr;
} else {
native_slot_init(upb_fielddef_type(field), memory, property_ptr);
diff --git a/php/phpunit.xml b/php/phpunit.xml
new file mode 100644
index 00000000..0191a601
--- /dev/null
+++ b/php/phpunit.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit bootstrap="./vendor/autoload.php"
+ colors="true">
+ <testsuites>
+ <testsuite name="protobuf-tests">
+ <file>tests/php_implementation_test.php</file>
+ <file>tests/array_test.php</file>
+ <file>tests/encode_decode_test.php</file>
+ <file>tests/generated_class_test.php</file>
+ <file>tests/map_field_test.php</file>
+ <file>tests/well_known_test.php</file>
+ </testsuite>
+ </testsuites>
+</phpunit>
diff --git a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
new file mode 100644
index 00000000..7c5c8df4
--- /dev/null
+++ b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
@@ -0,0 +1,260 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace GPBMetadata\Google\Protobuf\Internal;
+
+class Descriptor
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->addMessage('google.protobuf.internal.FileDescriptorSet', \Google\Protobuf\Internal\FileDescriptorSet::class)
+ ->repeated('file', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.FileDescriptorProto')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FileDescriptorProto', \Google\Protobuf\Internal\FileDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('package', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->repeated('dependency', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->repeated('public_dependency', \Google\Protobuf\Internal\GPBType::INT32, 10)
+ ->repeated('weak_dependency', \Google\Protobuf\Internal\GPBType::INT32, 11)
+ ->repeated('message_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.DescriptorProto')
+ ->repeated('enum_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 5, 'google.protobuf.internal.EnumDescriptorProto')
+ ->repeated('service', \Google\Protobuf\Internal\GPBType::MESSAGE, 6, 'google.protobuf.internal.ServiceDescriptorProto')
+ ->repeated('extension', \Google\Protobuf\Internal\GPBType::MESSAGE, 7, 'google.protobuf.internal.FieldDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.FileOptions')
+ ->optional('source_code_info', \Google\Protobuf\Internal\GPBType::MESSAGE, 9, 'google.protobuf.internal.SourceCodeInfo')
+ ->optional('syntax', \Google\Protobuf\Internal\GPBType::STRING, 12)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.DescriptorProto', \Google\Protobuf\Internal\DescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->repeated('field', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.FieldDescriptorProto')
+ ->repeated('extension', \Google\Protobuf\Internal\GPBType::MESSAGE, 6, 'google.protobuf.internal.FieldDescriptorProto')
+ ->repeated('nested_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.DescriptorProto')
+ ->repeated('enum_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.EnumDescriptorProto')
+ ->repeated('extension_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 5, 'google.protobuf.internal.DescriptorProto.ExtensionRange')
+ ->repeated('oneof_decl', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.OneofDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 7, 'google.protobuf.internal.MessageOptions')
+ ->repeated('reserved_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 9, 'google.protobuf.internal.DescriptorProto.ReservedRange')
+ ->repeated('reserved_name', \Google\Protobuf\Internal\GPBType::STRING, 10)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.DescriptorProto.ExtensionRange', \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class)
+ ->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.DescriptorProto.ReservedRange', \Google\Protobuf\Internal\DescriptorProto_ReservedRange::class)
+ ->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FieldDescriptorProto', \Google\Protobuf\Internal\FieldDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 3)
+ ->optional('label', \Google\Protobuf\Internal\GPBType::ENUM, 4, 'google.protobuf.internal.FieldDescriptorProto.Label')
+ ->optional('type', \Google\Protobuf\Internal\GPBType::ENUM, 5, 'google.protobuf.internal.FieldDescriptorProto.Type')
+ ->optional('type_name', \Google\Protobuf\Internal\GPBType::STRING, 6)
+ ->optional('extendee', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->optional('default_value', \Google\Protobuf\Internal\GPBType::STRING, 7)
+ ->optional('oneof_index', \Google\Protobuf\Internal\GPBType::INT32, 9)
+ ->optional('json_name', \Google\Protobuf\Internal\GPBType::STRING, 10)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.FieldOptions')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Type', \Google\Protobuf\Internal\Type::class)
+ ->value("TYPE_DOUBLE", 1)
+ ->value("TYPE_FLOAT", 2)
+ ->value("TYPE_INT64", 3)
+ ->value("TYPE_UINT64", 4)
+ ->value("TYPE_INT32", 5)
+ ->value("TYPE_FIXED64", 6)
+ ->value("TYPE_FIXED32", 7)
+ ->value("TYPE_BOOL", 8)
+ ->value("TYPE_STRING", 9)
+ ->value("TYPE_GROUP", 10)
+ ->value("TYPE_MESSAGE", 11)
+ ->value("TYPE_BYTES", 12)
+ ->value("TYPE_UINT32", 13)
+ ->value("TYPE_ENUM", 14)
+ ->value("TYPE_SFIXED32", 15)
+ ->value("TYPE_SFIXED64", 16)
+ ->value("TYPE_SINT32", 17)
+ ->value("TYPE_SINT64", 18)
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Label', \Google\Protobuf\Internal\Label::class)
+ ->value("LABEL_OPTIONAL", 1)
+ ->value("LABEL_REQUIRED", 2)
+ ->value("LABEL_REPEATED", 3)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.OneofDescriptorProto', \Google\Protobuf\Internal\OneofDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.OneofOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumDescriptorProto', \Google\Protobuf\Internal\EnumDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->repeated('value', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.EnumValueDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumValueDescriptorProto', \Google\Protobuf\Internal\EnumValueDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumValueOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.ServiceDescriptorProto', \Google\Protobuf\Internal\ServiceDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->repeated('method', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.MethodDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.ServiceOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.MethodDescriptorProto', \Google\Protobuf\Internal\MethodDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('input_type', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->optional('output_type', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.MethodOptions')
+ ->optional('client_streaming', \Google\Protobuf\Internal\GPBType::BOOL, 5)
+ ->optional('server_streaming', \Google\Protobuf\Internal\GPBType::BOOL, 6)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FileOptions', \Google\Protobuf\Internal\FileOptions::class)
+ ->optional('java_package', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('java_outer_classname', \Google\Protobuf\Internal\GPBType::STRING, 8)
+ ->optional('java_multiple_files', \Google\Protobuf\Internal\GPBType::BOOL, 10)
+ ->optional('java_generate_equals_and_hash', \Google\Protobuf\Internal\GPBType::BOOL, 20)
+ ->optional('java_string_check_utf8', \Google\Protobuf\Internal\GPBType::BOOL, 27)
+ ->optional('optimize_for', \Google\Protobuf\Internal\GPBType::ENUM, 9, 'google.protobuf.internal.FileOptions.OptimizeMode')
+ ->optional('go_package', \Google\Protobuf\Internal\GPBType::STRING, 11)
+ ->optional('cc_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 16)
+ ->optional('java_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 17)
+ ->optional('py_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 18)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 23)
+ ->optional('cc_enable_arenas', \Google\Protobuf\Internal\GPBType::BOOL, 31)
+ ->optional('objc_class_prefix', \Google\Protobuf\Internal\GPBType::STRING, 36)
+ ->optional('csharp_namespace', \Google\Protobuf\Internal\GPBType::STRING, 37)
+ ->optional('swift_prefix', \Google\Protobuf\Internal\GPBType::STRING, 39)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FileOptions.OptimizeMode', \Google\Protobuf\Internal\OptimizeMode::class)
+ ->value("SPEED", 1)
+ ->value("CODE_SIZE", 2)
+ ->value("LITE_RUNTIME", 3)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.MessageOptions', \Google\Protobuf\Internal\MessageOptions::class)
+ ->optional('message_set_wire_format', \Google\Protobuf\Internal\GPBType::BOOL, 1)
+ ->optional('no_standard_descriptor_accessor', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
+ ->optional('map_entry', \Google\Protobuf\Internal\GPBType::BOOL, 7)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FieldOptions', \Google\Protobuf\Internal\FieldOptions::class)
+ ->optional('ctype', \Google\Protobuf\Internal\GPBType::ENUM, 1, 'google.protobuf.internal.FieldOptions.CType')
+ ->optional('packed', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->optional('jstype', \Google\Protobuf\Internal\GPBType::ENUM, 6, 'google.protobuf.internal.FieldOptions.JSType')
+ ->optional('lazy', \Google\Protobuf\Internal\GPBType::BOOL, 5)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
+ ->optional('weak', \Google\Protobuf\Internal\GPBType::BOOL, 10)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldOptions.CType', \Google\Protobuf\Internal\CType::class)
+ ->value("STRING", 0)
+ ->value("CORD", 1)
+ ->value("STRING_PIECE", 2)
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldOptions.JSType', \Google\Protobuf\Internal\JSType::class)
+ ->value("JS_NORMAL", 0)
+ ->value("JS_STRING", 1)
+ ->value("JS_NUMBER", 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.OneofOptions', \Google\Protobuf\Internal\OneofOptions::class)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumOptions', \Google\Protobuf\Internal\EnumOptions::class)
+ ->optional('allow_alias', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumValueOptions', \Google\Protobuf\Internal\EnumValueOptions::class)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 1)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.ServiceOptions', \Google\Protobuf\Internal\ServiceOptions::class)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 33)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.MethodOptions', \Google\Protobuf\Internal\MethodOptions::class)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 33)
+ ->optional('idempotency_level', \Google\Protobuf\Internal\GPBType::ENUM, 34, 'google.protobuf.internal.MethodOptions.IdempotencyLevel')
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.MethodOptions.IdempotencyLevel', \Google\Protobuf\Internal\IdempotencyLevel::class)
+ ->value("IDEMPOTENCY_UNKNOWN", 0)
+ ->value("NO_SIDE_EFFECTS", 1)
+ ->value("IDEMPOTENT", 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.UninterpretedOption', \Google\Protobuf\Internal\UninterpretedOption::class)
+ ->repeated('name', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.UninterpretedOption.NamePart')
+ ->optional('identifier_value', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->optional('positive_int_value', \Google\Protobuf\Internal\GPBType::UINT64, 4)
+ ->optional('negative_int_value', \Google\Protobuf\Internal\GPBType::INT64, 5)
+ ->optional('double_value', \Google\Protobuf\Internal\GPBType::DOUBLE, 6)
+ ->optional('string_value', \Google\Protobuf\Internal\GPBType::BYTES, 7)
+ ->optional('aggregate_value', \Google\Protobuf\Internal\GPBType::STRING, 8)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.UninterpretedOption.NamePart', \Google\Protobuf\Internal\UninterpretedOption_NamePart::class)
+ ->required('name_part', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->required('is_extension', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.SourceCodeInfo', \Google\Protobuf\Internal\SourceCodeInfo::class)
+ ->repeated('location', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.SourceCodeInfo.Location')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.SourceCodeInfo.Location', \Google\Protobuf\Internal\SourceCodeInfo_Location::class)
+ ->repeated('path', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->repeated('span', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->optional('leading_comments', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->optional('trailing_comments', \Google\Protobuf\Internal\GPBType::STRING, 4)
+ ->repeated('leading_detached_comments', \Google\Protobuf\Internal\GPBType::STRING, 6)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.GeneratedCodeInfo', \Google\Protobuf\Internal\GeneratedCodeInfo::class)
+ ->repeated('annotation', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.GeneratedCodeInfo.Annotation')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.GeneratedCodeInfo.Annotation', \Google\Protobuf\Internal\GeneratedCodeInfo_Annotation::class)
+ ->repeated('path', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('source_file', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->optional('begin', \Google\Protobuf\Internal\GPBType::INT32, 3)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 4)
+ ->finalizeToPool();
+
+ $pool->finish();
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto.php b/php/src/Google/Protobuf/Internal/DescriptorProto.php
new file mode 100644
index 00000000..f076f6be
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/DescriptorProto.php
@@ -0,0 +1,325 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * Describes a message type.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.DescriptorProto</code>
+ */
+class DescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ private $name = '';
+ private $has_name = false;
+ /**
+ * <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
+ */
+ private $field;
+ private $has_field = false;
+ /**
+ * <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
+ */
+ private $extension;
+ private $has_extension = false;
+ /**
+ * <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
+ */
+ private $nested_type;
+ private $has_nested_type = false;
+ /**
+ * <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
+ */
+ private $enum_type;
+ private $has_enum_type = false;
+ /**
+ * <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
+ */
+ private $extension_range;
+ private $has_extension_range = false;
+ /**
+ * <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
+ */
+ private $oneof_decl;
+ private $has_oneof_decl = false;
+ /**
+ * <code>optional .google.protobuf.MessageOptions options = 7;</code>
+ */
+ private $options = null;
+ private $has_options = false;
+ /**
+ * <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
+ */
+ private $reserved_range;
+ private $has_reserved_range = false;
+ /**
+ * <pre>
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ * </pre>
+ *
+ * <code>repeated string reserved_name = 10;</code>
+ */
+ private $reserved_name;
+ private $has_reserved_name = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
+ */
+ public function getField()
+ {
+ return $this->field;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
+ */
+ public function setField(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->field = $var;
+ $this->has_field = true;
+ }
+
+ public function hasField()
+ {
+ return $this->has_field;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
+ */
+ public function setExtension(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->extension = $var;
+ $this->has_extension = true;
+ }
+
+ public function hasExtension()
+ {
+ return $this->has_extension;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
+ */
+ public function getNestedType()
+ {
+ return $this->nested_type;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
+ */
+ public function setNestedType(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
+ $this->nested_type = $var;
+ $this->has_nested_type = true;
+ }
+
+ public function hasNestedType()
+ {
+ return $this->has_nested_type;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
+ */
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
+ */
+ public function setEnumType(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
+ $this->enum_type = $var;
+ $this->has_enum_type = true;
+ }
+
+ public function hasEnumType()
+ {
+ return $this->has_enum_type;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
+ */
+ public function getExtensionRange()
+ {
+ return $this->extension_range;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
+ */
+ public function setExtensionRange(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class);
+ $this->extension_range = $var;
+ $this->has_extension_range = true;
+ }
+
+ public function hasExtensionRange()
+ {
+ return $this->has_extension_range;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
+ */
+ public function getOneofDecl()
+ {
+ return $this->oneof_decl;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
+ */
+ public function setOneofDecl(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\OneofDescriptorProto::class);
+ $this->oneof_decl = $var;
+ $this->has_oneof_decl = true;
+ }
+
+ public function hasOneofDecl()
+ {
+ return $this->has_oneof_decl;
+ }
+
+ /**
+ * <code>optional .google.protobuf.MessageOptions options = 7;</code>
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * <code>optional .google.protobuf.MessageOptions options = 7;</code>
+ */
+ public function setOptions(&$var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MessageOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
+ */
+ public function getReservedRange()
+ {
+ return $this->reserved_range;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
+ */
+ public function setReservedRange(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto_ReservedRange::class);
+ $this->reserved_range = $var;
+ $this->has_reserved_range = true;
+ }
+
+ public function hasReservedRange()
+ {
+ return $this->has_reserved_range;
+ }
+
+ /**
+ * <pre>
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ * </pre>
+ *
+ * <code>repeated string reserved_name = 10;</code>
+ */
+ public function getReservedName()
+ {
+ return $this->reserved_name;
+ }
+
+ /**
+ * <pre>
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ * </pre>
+ *
+ * <code>repeated string reserved_name = 10;</code>
+ */
+ public function setReservedName(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->reserved_name = $var;
+ $this->has_reserved_name = true;
+ }
+
+ public function hasReservedName()
+ {
+ return $this->has_reserved_name;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php b/php/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
new file mode 100644
index 00000000..738a1738
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
@@ -0,0 +1,82 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.DescriptorProto.ExtensionRange</code>
+ */
+class DescriptorProto_ExtensionRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>optional int32 start = 1;</code>
+ */
+ private $start = 0;
+ private $has_start = false;
+ /**
+ * <code>optional int32 end = 2;</code>
+ */
+ private $end = 0;
+ private $has_end = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>optional int32 start = 1;</code>
+ */
+ public function getStart()
+ {
+ return $this->start;
+ }
+
+ /**
+ * <code>optional int32 start = 1;</code>
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+ $this->has_start = true;
+ }
+
+ public function hasStart()
+ {
+ return $this->has_start;
+ }
+
+ /**
+ * <code>optional int32 end = 2;</code>
+ */
+ public function getEnd()
+ {
+ return $this->end;
+ }
+
+ /**
+ * <code>optional int32 end = 2;</code>
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+ $this->has_end = true;
+ }
+
+ public function hasEnd()
+ {
+ return $this->has_end;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php b/php/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php
new file mode 100644
index 00000000..be36b8aa
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php
@@ -0,0 +1,112 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.DescriptorProto.ReservedRange</code>
+ */
+class DescriptorProto_ReservedRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * Inclusive.
+ * </pre>
+ *
+ * <code>optional int32 start = 1;</code>
+ */
+ private $start = 0;
+ private $has_start = false;
+ /**
+ * <pre>
+ * Exclusive.
+ * </pre>
+ *
+ * <code>optional int32 end = 2;</code>
+ */
+ private $end = 0;
+ private $has_end = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * Inclusive.
+ * </pre>
+ *
+ * <code>optional int32 start = 1;</code>
+ */
+ public function getStart()
+ {
+ return $this->start;
+ }
+
+ /**
+ * <pre>
+ * Inclusive.
+ * </pre>
+ *
+ * <code>optional int32 start = 1;</code>
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+ $this->has_start = true;
+ }
+
+ public function hasStart()
+ {
+ return $this->has_start;
+ }
+
+ /**
+ * <pre>
+ * Exclusive.
+ * </pre>
+ *
+ * <code>optional int32 end = 2;</code>
+ */
+ public function getEnd()
+ {
+ return $this->end;
+ }
+
+ /**
+ * <pre>
+ * Exclusive.
+ * </pre>
+ *
+ * <code>optional int32 end = 2;</code>
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+ $this->has_end = true;
+ }
+
+ public function hasEnd()
+ {
+ return $this->has_end;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php b/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php
new file mode 100644
index 00000000..9c5f245b
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php
@@ -0,0 +1,114 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * Describes an enum type.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.EnumDescriptorProto</code>
+ */
+class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ private $name = '';
+ private $has_name = false;
+ /**
+ * <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
+ */
+ private $value;
+ private $has_value = false;
+ /**
+ * <code>optional .google.protobuf.EnumOptions options = 3;</code>
+ */
+ private $options = null;
+ private $has_options = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
+ */
+ public function setValue(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumValueDescriptorProto::class);
+ $this->value = $var;
+ $this->has_value = true;
+ }
+
+ public function hasValue()
+ {
+ return $this->has_value;
+ }
+
+ /**
+ * <code>optional .google.protobuf.EnumOptions options = 3;</code>
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * <code>optional .google.protobuf.EnumOptions options = 3;</code>
+ */
+ public function setOptions(&$var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/EnumOptions.php b/php/src/Google/Protobuf/Internal/EnumOptions.php
new file mode 100644
index 00000000..a9c4e0d7
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/EnumOptions.php
@@ -0,0 +1,158 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.EnumOptions</code>
+ */
+class EnumOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ * </pre>
+ *
+ * <code>optional bool allow_alias = 2;</code>
+ */
+ private $allow_alias = false;
+ private $has_allow_alias = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ private $deprecated = false;
+ private $has_deprecated = false;
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ * </pre>
+ *
+ * <code>optional bool allow_alias = 2;</code>
+ */
+ public function getAllowAlias()
+ {
+ return $this->allow_alias;
+ }
+
+ /**
+ * <pre>
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ * </pre>
+ *
+ * <code>optional bool allow_alias = 2;</code>
+ */
+ public function setAllowAlias($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_alias = $var;
+ $this->has_allow_alias = true;
+ }
+
+ public function hasAllowAlias()
+ {
+ return $this->has_allow_alias;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ public function getDeprecated()
+ {
+ return $this->deprecated;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+ $this->has_deprecated = true;
+ }
+
+ public function hasDeprecated()
+ {
+ return $this->has_deprecated;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function setUninterpretedOption(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $var;
+ $this->has_uninterpreted_option = true;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php b/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
new file mode 100644
index 00000000..94dc36ec
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
@@ -0,0 +1,114 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * Describes a value within an enum.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.EnumValueDescriptorProto</code>
+ */
+class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ private $name = '';
+ private $has_name = false;
+ /**
+ * <code>optional int32 number = 2;</code>
+ */
+ private $number = 0;
+ private $has_number = false;
+ /**
+ * <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
+ */
+ private $options = null;
+ private $has_options = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * <code>optional int32 number = 2;</code>
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * <code>optional int32 number = 2;</code>
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+ $this->has_number = true;
+ }
+
+ public function hasNumber()
+ {
+ return $this->has_number;
+ }
+
+ /**
+ * <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
+ */
+ public function setOptions(&$var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumValueOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/EnumValueOptions.php b/php/src/Google/Protobuf/Internal/EnumValueOptions.php
new file mode 100644
index 00000000..6446ecd4
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/EnumValueOptions.php
@@ -0,0 +1,115 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.EnumValueOptions</code>
+ */
+class EnumValueOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 1 [default = false];</code>
+ */
+ private $deprecated = false;
+ private $has_deprecated = false;
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 1 [default = false];</code>
+ */
+ public function getDeprecated()
+ {
+ return $this->deprecated;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 1 [default = false];</code>
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+ $this->has_deprecated = true;
+ }
+
+ public function hasDeprecated()
+ {
+ return $this->has_deprecated;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function setUninterpretedOption(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $var;
+ $this->has_uninterpreted_option = true;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php b/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php
new file mode 100644
index 00000000..6ae2cd41
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php
@@ -0,0 +1,424 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * Describes a field within a message.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.FieldDescriptorProto</code>
+ */
+class FieldDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ private $name = '';
+ private $has_name = false;
+ /**
+ * <code>optional int32 number = 3;</code>
+ */
+ private $number = 0;
+ private $has_number = false;
+ /**
+ * <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code>
+ */
+ private $label = 0;
+ private $has_label = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
+ */
+ private $type = 0;
+ private $has_type = false;
+ /**
+ * <pre>
+ * 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).
+ * </pre>
+ *
+ * <code>optional string type_name = 6;</code>
+ */
+ private $type_name = '';
+ private $has_type_name = false;
+ /**
+ * <pre>
+ * For extensions, this is the name of the type being extended. It is
+ * resolved in the same manner as type_name.
+ * </pre>
+ *
+ * <code>optional string extendee = 2;</code>
+ */
+ private $extendee = '';
+ private $has_extendee = false;
+ /**
+ * <pre>
+ * 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 &gt;= 128 are escaped.
+ * TODO(kenton): Base-64 encode?
+ * </pre>
+ *
+ * <code>optional string default_value = 7;</code>
+ */
+ private $default_value = '';
+ private $has_default_value = false;
+ /**
+ * <pre>
+ * If set, gives the index of a oneof in the containing type's oneof_decl
+ * list. This field is a member of that oneof.
+ * </pre>
+ *
+ * <code>optional int32 oneof_index = 9;</code>
+ */
+ private $oneof_index = 0;
+ private $has_oneof_index = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string json_name = 10;</code>
+ */
+ private $json_name = '';
+ private $has_json_name = false;
+ /**
+ * <code>optional .google.protobuf.FieldOptions options = 8;</code>
+ */
+ private $options = null;
+ private $has_options = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * <code>optional int32 number = 3;</code>
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * <code>optional int32 number = 3;</code>
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+ $this->has_number = true;
+ }
+
+ public function hasNumber()
+ {
+ return $this->has_number;
+ }
+
+ /**
+ * <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code>
+ */
+ public function getLabel()
+ {
+ return $this->label;
+ }
+
+ /**
+ * <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code>
+ */
+ public function setLabel($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto_Label::class);
+ $this->label = $var;
+ $this->has_label = true;
+ }
+
+ public function hasLabel()
+ {
+ return $this->has_label;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto_Type::class);
+ $this->type = $var;
+ $this->has_type = true;
+ }
+
+ public function hasType()
+ {
+ return $this->has_type;
+ }
+
+ /**
+ * <pre>
+ * 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).
+ * </pre>
+ *
+ * <code>optional string type_name = 6;</code>
+ */
+ public function getTypeName()
+ {
+ return $this->type_name;
+ }
+
+ /**
+ * <pre>
+ * 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).
+ * </pre>
+ *
+ * <code>optional string type_name = 6;</code>
+ */
+ public function setTypeName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type_name = $var;
+ $this->has_type_name = true;
+ }
+
+ public function hasTypeName()
+ {
+ return $this->has_type_name;
+ }
+
+ /**
+ * <pre>
+ * For extensions, this is the name of the type being extended. It is
+ * resolved in the same manner as type_name.
+ * </pre>
+ *
+ * <code>optional string extendee = 2;</code>
+ */
+ public function getExtendee()
+ {
+ return $this->extendee;
+ }
+
+ /**
+ * <pre>
+ * For extensions, this is the name of the type being extended. It is
+ * resolved in the same manner as type_name.
+ * </pre>
+ *
+ * <code>optional string extendee = 2;</code>
+ */
+ public function setExtendee($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->extendee = $var;
+ $this->has_extendee = true;
+ }
+
+ public function hasExtendee()
+ {
+ return $this->has_extendee;
+ }
+
+ /**
+ * <pre>
+ * 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 &gt;= 128 are escaped.
+ * TODO(kenton): Base-64 encode?
+ * </pre>
+ *
+ * <code>optional string default_value = 7;</code>
+ */
+ public function getDefaultValue()
+ {
+ return $this->default_value;
+ }
+
+ /**
+ * <pre>
+ * 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 &gt;= 128 are escaped.
+ * TODO(kenton): Base-64 encode?
+ * </pre>
+ *
+ * <code>optional string default_value = 7;</code>
+ */
+ public function setDefaultValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->default_value = $var;
+ $this->has_default_value = true;
+ }
+
+ public function hasDefaultValue()
+ {
+ return $this->has_default_value;
+ }
+
+ /**
+ * <pre>
+ * If set, gives the index of a oneof in the containing type's oneof_decl
+ * list. This field is a member of that oneof.
+ * </pre>
+ *
+ * <code>optional int32 oneof_index = 9;</code>
+ */
+ public function getOneofIndex()
+ {
+ return $this->oneof_index;
+ }
+
+ /**
+ * <pre>
+ * If set, gives the index of a oneof in the containing type's oneof_decl
+ * list. This field is a member of that oneof.
+ * </pre>
+ *
+ * <code>optional int32 oneof_index = 9;</code>
+ */
+ public function setOneofIndex($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->oneof_index = $var;
+ $this->has_oneof_index = true;
+ }
+
+ public function hasOneofIndex()
+ {
+ return $this->has_oneof_index;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string json_name = 10;</code>
+ */
+ public function getJsonName()
+ {
+ return $this->json_name;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string json_name = 10;</code>
+ */
+ public function setJsonName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->json_name = $var;
+ $this->has_json_name = true;
+ }
+
+ public function hasJsonName()
+ {
+ return $this->has_json_name;
+ }
+
+ /**
+ * <code>optional .google.protobuf.FieldOptions options = 8;</code>
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * <code>optional .google.protobuf.FieldOptions options = 8;</code>
+ */
+ public function setOptions(&$var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FieldOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php b/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php
new file mode 100644
index 00000000..06f26015
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php
@@ -0,0 +1,29 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+/**
+ * Protobuf enum <code>google.protobuf.FieldDescriptorProto.Label</code>
+ */
+namespace Google\Protobuf\Internal;
+
+class FieldDescriptorProto_Label
+{
+ /**
+ * <pre>
+ * 0 is reserved for errors
+ * </pre>
+ *
+ * <code>LABEL_OPTIONAL = 1;</code>
+ */
+ const LABEL_OPTIONAL = 1;
+ /**
+ * <code>LABEL_REQUIRED = 2;</code>
+ */
+ const LABEL_REQUIRED = 2;
+ /**
+ * <code>LABEL_REPEATED = 3;</code>
+ */
+ const LABEL_REPEATED = 3;
+}
+
diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php b/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php
new file mode 100644
index 00000000..9bda76c2
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php
@@ -0,0 +1,120 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+/**
+ * Protobuf enum <code>google.protobuf.FieldDescriptorProto.Type</code>
+ */
+namespace Google\Protobuf\Internal;
+
+class FieldDescriptorProto_Type
+{
+ /**
+ * <pre>
+ * 0 is reserved for errors.
+ * Order is weird for historical reasons.
+ * </pre>
+ *
+ * <code>TYPE_DOUBLE = 1;</code>
+ */
+ const TYPE_DOUBLE = 1;
+ /**
+ * <code>TYPE_FLOAT = 2;</code>
+ */
+ const TYPE_FLOAT = 2;
+ /**
+ * <pre>
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
+ * negative values are likely.
+ * </pre>
+ *
+ * <code>TYPE_INT64 = 3;</code>
+ */
+ const TYPE_INT64 = 3;
+ /**
+ * <code>TYPE_UINT64 = 4;</code>
+ */
+ const TYPE_UINT64 = 4;
+ /**
+ * <pre>
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
+ * negative values are likely.
+ * </pre>
+ *
+ * <code>TYPE_INT32 = 5;</code>
+ */
+ const TYPE_INT32 = 5;
+ /**
+ * <code>TYPE_FIXED64 = 6;</code>
+ */
+ const TYPE_FIXED64 = 6;
+ /**
+ * <code>TYPE_FIXED32 = 7;</code>
+ */
+ const TYPE_FIXED32 = 7;
+ /**
+ * <code>TYPE_BOOL = 8;</code>
+ */
+ const TYPE_BOOL = 8;
+ /**
+ * <code>TYPE_STRING = 9;</code>
+ */
+ const TYPE_STRING = 9;
+ /**
+ * <pre>
+ * Tag-delimited aggregate.
+ * </pre>
+ *
+ * <code>TYPE_GROUP = 10;</code>
+ */
+ const TYPE_GROUP = 10;
+ /**
+ * <pre>
+ * Length-delimited aggregate.
+ * </pre>
+ *
+ * <code>TYPE_MESSAGE = 11;</code>
+ */
+ const TYPE_MESSAGE = 11;
+ /**
+ * <pre>
+ * New in version 2.
+ * </pre>
+ *
+ * <code>TYPE_BYTES = 12;</code>
+ */
+ const TYPE_BYTES = 12;
+ /**
+ * <code>TYPE_UINT32 = 13;</code>
+ */
+ const TYPE_UINT32 = 13;
+ /**
+ * <code>TYPE_ENUM = 14;</code>
+ */
+ const TYPE_ENUM = 14;
+ /**
+ * <code>TYPE_SFIXED32 = 15;</code>
+ */
+ const TYPE_SFIXED32 = 15;
+ /**
+ * <code>TYPE_SFIXED64 = 16;</code>
+ */
+ const TYPE_SFIXED64 = 16;
+ /**
+ * <pre>
+ * Uses ZigZag encoding.
+ * </pre>
+ *
+ * <code>TYPE_SINT32 = 17;</code>
+ */
+ const TYPE_SINT32 = 17;
+ /**
+ * <pre>
+ * Uses ZigZag encoding.
+ * </pre>
+ *
+ * <code>TYPE_SINT64 = 18;</code>
+ */
+ const TYPE_SINT64 = 18;
+}
+
diff --git a/php/src/Google/Protobuf/Internal/FieldOptions.php b/php/src/Google/Protobuf/Internal/FieldOptions.php
new file mode 100644
index 00000000..af1393a5
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/FieldOptions.php
@@ -0,0 +1,429 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.FieldOptions</code>
+ */
+class FieldOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * 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!
+ * </pre>
+ *
+ * <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code>
+ */
+ private $ctype = 0;
+ private $has_ctype = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool packed = 2;</code>
+ */
+ private $packed = false;
+ private $has_packed = false;
+ /**
+ * <pre>
+ * 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). By default these types are
+ * represented as JavaScript strings. This avoids loss of precision that can
+ * happen when a large value is converted to a floating point JavaScript
+ * numbers. Specifying JS_NUMBER for the jstype causes the generated
+ * JavaScript code to use the JavaScript "number" type instead of strings.
+ * This option is an enum to permit additional types to be added,
+ * e.g. goog.math.Integer.
+ * </pre>
+ *
+ * <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
+ */
+ private $jstype = 0;
+ private $has_jstype = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool lazy = 5 [default = false];</code>
+ */
+ private $lazy = false;
+ private $has_lazy = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ private $deprecated = false;
+ private $has_deprecated = false;
+ /**
+ * <pre>
+ * For Google-internal migration only. Do not use.
+ * </pre>
+ *
+ * <code>optional bool weak = 10 [default = false];</code>
+ */
+ private $weak = false;
+ private $has_weak = false;
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * 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!
+ * </pre>
+ *
+ * <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code>
+ */
+ public function getCtype()
+ {
+ return $this->ctype;
+ }
+
+ /**
+ * <pre>
+ * 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!
+ * </pre>
+ *
+ * <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code>
+ */
+ public function setCtype($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions_CType::class);
+ $this->ctype = $var;
+ $this->has_ctype = true;
+ }
+
+ public function hasCtype()
+ {
+ return $this->has_ctype;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool packed = 2;</code>
+ */
+ public function getPacked()
+ {
+ return $this->packed;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool packed = 2;</code>
+ */
+ public function setPacked($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->packed = $var;
+ $this->has_packed = true;
+ }
+
+ public function hasPacked()
+ {
+ return $this->has_packed;
+ }
+
+ /**
+ * <pre>
+ * 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). By default these types are
+ * represented as JavaScript strings. This avoids loss of precision that can
+ * happen when a large value is converted to a floating point JavaScript
+ * numbers. Specifying JS_NUMBER for the jstype causes the generated
+ * JavaScript code to use the JavaScript "number" type instead of strings.
+ * This option is an enum to permit additional types to be added,
+ * e.g. goog.math.Integer.
+ * </pre>
+ *
+ * <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
+ */
+ public function getJstype()
+ {
+ return $this->jstype;
+ }
+
+ /**
+ * <pre>
+ * 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). By default these types are
+ * represented as JavaScript strings. This avoids loss of precision that can
+ * happen when a large value is converted to a floating point JavaScript
+ * numbers. Specifying JS_NUMBER for the jstype causes the generated
+ * JavaScript code to use the JavaScript "number" type instead of strings.
+ * This option is an enum to permit additional types to be added,
+ * e.g. goog.math.Integer.
+ * </pre>
+ *
+ * <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
+ */
+ public function setJstype($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions_JSType::class);
+ $this->jstype = $var;
+ $this->has_jstype = true;
+ }
+
+ public function hasJstype()
+ {
+ return $this->has_jstype;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool lazy = 5 [default = false];</code>
+ */
+ public function getLazy()
+ {
+ return $this->lazy;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool lazy = 5 [default = false];</code>
+ */
+ public function setLazy($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->lazy = $var;
+ $this->has_lazy = true;
+ }
+
+ public function hasLazy()
+ {
+ return $this->has_lazy;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ public function getDeprecated()
+ {
+ return $this->deprecated;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+ $this->has_deprecated = true;
+ }
+
+ public function hasDeprecated()
+ {
+ return $this->has_deprecated;
+ }
+
+ /**
+ * <pre>
+ * For Google-internal migration only. Do not use.
+ * </pre>
+ *
+ * <code>optional bool weak = 10 [default = false];</code>
+ */
+ public function getWeak()
+ {
+ return $this->weak;
+ }
+
+ /**
+ * <pre>
+ * For Google-internal migration only. Do not use.
+ * </pre>
+ *
+ * <code>optional bool weak = 10 [default = false];</code>
+ */
+ public function setWeak($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->weak = $var;
+ $this->has_weak = true;
+ }
+
+ public function hasWeak()
+ {
+ return $this->has_weak;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function setUninterpretedOption(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $var;
+ $this->has_uninterpreted_option = true;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/FieldOptions_CType.php b/php/src/Google/Protobuf/Internal/FieldOptions_CType.php
new file mode 100644
index 00000000..2ff2a478
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/FieldOptions_CType.php
@@ -0,0 +1,29 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+/**
+ * Protobuf enum <code>google.protobuf.FieldOptions.CType</code>
+ */
+namespace Google\Protobuf\Internal;
+
+class FieldOptions_CType
+{
+ /**
+ * <pre>
+ * Default mode.
+ * </pre>
+ *
+ * <code>STRING = 0;</code>
+ */
+ const STRING = 0;
+ /**
+ * <code>CORD = 1;</code>
+ */
+ const CORD = 1;
+ /**
+ * <code>STRING_PIECE = 2;</code>
+ */
+ const STRING_PIECE = 2;
+}
+
diff --git a/php/src/Google/Protobuf/Internal/FieldOptions_JSType.php b/php/src/Google/Protobuf/Internal/FieldOptions_JSType.php
new file mode 100644
index 00000000..541c8ae5
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/FieldOptions_JSType.php
@@ -0,0 +1,37 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+/**
+ * Protobuf enum <code>google.protobuf.FieldOptions.JSType</code>
+ */
+namespace Google\Protobuf\Internal;
+
+class FieldOptions_JSType
+{
+ /**
+ * <pre>
+ * Use the default type.
+ * </pre>
+ *
+ * <code>JS_NORMAL = 0;</code>
+ */
+ const JS_NORMAL = 0;
+ /**
+ * <pre>
+ * Use JavaScript strings.
+ * </pre>
+ *
+ * <code>JS_STRING = 1;</code>
+ */
+ const JS_STRING = 1;
+ /**
+ * <pre>
+ * Use JavaScript numbers.
+ * </pre>
+ *
+ * <code>JS_NUMBER = 2;</code>
+ */
+ const JS_NUMBER = 2;
+}
+
diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorProto.php b/php/src/Google/Protobuf/Internal/FileDescriptorProto.php
new file mode 100644
index 00000000..39f67768
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/FileDescriptorProto.php
@@ -0,0 +1,477 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * Describes a complete .proto file.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.FileDescriptorProto</code>
+ */
+class FileDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * file name, relative to root of source tree
+ * </pre>
+ *
+ * <code>optional string name = 1;</code>
+ */
+ private $name = '';
+ private $has_name = false;
+ /**
+ * <pre>
+ * e.g. "foo", "foo.bar", etc.
+ * </pre>
+ *
+ * <code>optional string package = 2;</code>
+ */
+ private $package = '';
+ private $has_package = false;
+ /**
+ * <pre>
+ * Names of files imported by this file.
+ * </pre>
+ *
+ * <code>repeated string dependency = 3;</code>
+ */
+ private $dependency;
+ private $has_dependency = false;
+ /**
+ * <pre>
+ * Indexes of the public imported files in the dependency list above.
+ * </pre>
+ *
+ * <code>repeated int32 public_dependency = 10;</code>
+ */
+ private $public_dependency;
+ private $has_public_dependency = false;
+ /**
+ * <pre>
+ * Indexes of the weak imported files in the dependency list.
+ * For Google-internal migration only. Do not use.
+ * </pre>
+ *
+ * <code>repeated int32 weak_dependency = 11;</code>
+ */
+ private $weak_dependency;
+ private $has_weak_dependency = false;
+ /**
+ * <pre>
+ * All top-level definitions in this file.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
+ */
+ private $message_type;
+ private $has_message_type = false;
+ /**
+ * <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
+ */
+ private $enum_type;
+ private $has_enum_type = false;
+ /**
+ * <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
+ */
+ private $service;
+ private $has_service = false;
+ /**
+ * <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
+ */
+ private $extension;
+ private $has_extension = false;
+ /**
+ * <code>optional .google.protobuf.FileOptions options = 8;</code>
+ */
+ private $options = null;
+ private $has_options = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
+ */
+ private $source_code_info = null;
+ private $has_source_code_info = false;
+ /**
+ * <pre>
+ * The syntax of the proto file.
+ * The supported values are "proto2" and "proto3".
+ * </pre>
+ *
+ * <code>optional string syntax = 12;</code>
+ */
+ private $syntax = '';
+ private $has_syntax = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * file name, relative to root of source tree
+ * </pre>
+ *
+ * <code>optional string name = 1;</code>
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * <pre>
+ * file name, relative to root of source tree
+ * </pre>
+ *
+ * <code>optional string name = 1;</code>
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * <pre>
+ * e.g. "foo", "foo.bar", etc.
+ * </pre>
+ *
+ * <code>optional string package = 2;</code>
+ */
+ public function getPackage()
+ {
+ return $this->package;
+ }
+
+ /**
+ * <pre>
+ * e.g. "foo", "foo.bar", etc.
+ * </pre>
+ *
+ * <code>optional string package = 2;</code>
+ */
+ public function setPackage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->package = $var;
+ $this->has_package = true;
+ }
+
+ public function hasPackage()
+ {
+ return $this->has_package;
+ }
+
+ /**
+ * <pre>
+ * Names of files imported by this file.
+ * </pre>
+ *
+ * <code>repeated string dependency = 3;</code>
+ */
+ public function getDependency()
+ {
+ return $this->dependency;
+ }
+
+ /**
+ * <pre>
+ * Names of files imported by this file.
+ * </pre>
+ *
+ * <code>repeated string dependency = 3;</code>
+ */
+ public function setDependency(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->dependency = $var;
+ $this->has_dependency = true;
+ }
+
+ public function hasDependency()
+ {
+ return $this->has_dependency;
+ }
+
+ /**
+ * <pre>
+ * Indexes of the public imported files in the dependency list above.
+ * </pre>
+ *
+ * <code>repeated int32 public_dependency = 10;</code>
+ */
+ public function getPublicDependency()
+ {
+ return $this->public_dependency;
+ }
+
+ /**
+ * <pre>
+ * Indexes of the public imported files in the dependency list above.
+ * </pre>
+ *
+ * <code>repeated int32 public_dependency = 10;</code>
+ */
+ public function setPublicDependency(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->public_dependency = $var;
+ $this->has_public_dependency = true;
+ }
+
+ public function hasPublicDependency()
+ {
+ return $this->has_public_dependency;
+ }
+
+ /**
+ * <pre>
+ * Indexes of the weak imported files in the dependency list.
+ * For Google-internal migration only. Do not use.
+ * </pre>
+ *
+ * <code>repeated int32 weak_dependency = 11;</code>
+ */
+ public function getWeakDependency()
+ {
+ return $this->weak_dependency;
+ }
+
+ /**
+ * <pre>
+ * Indexes of the weak imported files in the dependency list.
+ * For Google-internal migration only. Do not use.
+ * </pre>
+ *
+ * <code>repeated int32 weak_dependency = 11;</code>
+ */
+ public function setWeakDependency(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->weak_dependency = $var;
+ $this->has_weak_dependency = true;
+ }
+
+ public function hasWeakDependency()
+ {
+ return $this->has_weak_dependency;
+ }
+
+ /**
+ * <pre>
+ * All top-level definitions in this file.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
+ */
+ public function getMessageType()
+ {
+ return $this->message_type;
+ }
+
+ /**
+ * <pre>
+ * All top-level definitions in this file.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
+ */
+ public function setMessageType(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
+ $this->message_type = $var;
+ $this->has_message_type = true;
+ }
+
+ public function hasMessageType()
+ {
+ return $this->has_message_type;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
+ */
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
+ */
+ public function setEnumType(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
+ $this->enum_type = $var;
+ $this->has_enum_type = true;
+ }
+
+ public function hasEnumType()
+ {
+ return $this->has_enum_type;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
+ */
+ public function getService()
+ {
+ return $this->service;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
+ */
+ public function setService(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\ServiceDescriptorProto::class);
+ $this->service = $var;
+ $this->has_service = true;
+ }
+
+ public function hasService()
+ {
+ return $this->has_service;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
+ */
+ public function setExtension(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->extension = $var;
+ $this->has_extension = true;
+ }
+
+ public function hasExtension()
+ {
+ return $this->has_extension;
+ }
+
+ /**
+ * <code>optional .google.protobuf.FileOptions options = 8;</code>
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * <code>optional .google.protobuf.FileOptions options = 8;</code>
+ */
+ public function setOptions(&$var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FileOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
+ */
+ public function getSourceCodeInfo()
+ {
+ return $this->source_code_info;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
+ */
+ public function setSourceCodeInfo(&$var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\SourceCodeInfo::class);
+ $this->source_code_info = $var;
+ $this->has_source_code_info = true;
+ }
+
+ public function hasSourceCodeInfo()
+ {
+ return $this->has_source_code_info;
+ }
+
+ /**
+ * <pre>
+ * The syntax of the proto file.
+ * The supported values are "proto2" and "proto3".
+ * </pre>
+ *
+ * <code>optional string syntax = 12;</code>
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * <pre>
+ * The syntax of the proto file.
+ * The supported values are "proto2" and "proto3".
+ * </pre>
+ *
+ * <code>optional string syntax = 12;</code>
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->syntax = $var;
+ $this->has_syntax = true;
+ }
+
+ public function hasSyntax()
+ {
+ return $this->has_syntax;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php
new file mode 100644
index 00000000..20a165c4
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php
@@ -0,0 +1,59 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * The protocol compiler can output a FileDescriptorSet containing the .proto
+ * files it parses.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.FileDescriptorSet</code>
+ */
+class FileDescriptorSet extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
+ */
+ private $file;
+ private $has_file = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
+ */
+ public function getFile()
+ {
+ return $this->file;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
+ */
+ public function setFile(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FileDescriptorProto::class);
+ $this->file = $var;
+ $this->has_file = true;
+ }
+
+ public function hasFile()
+ {
+ return $this->has_file;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/FileOptions.php b/php/src/Google/Protobuf/Internal/FileOptions.php
new file mode 100644
index 00000000..2422f3ee
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/FileOptions.php
@@ -0,0 +1,741 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.FileOptions</code>
+ */
+class FileOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string java_package = 1;</code>
+ */
+ private $java_package = '';
+ private $has_java_package = false;
+ /**
+ * <pre>
+ * If set, all the classes from the .proto file are wrapped in a single
+ * outer class with the given name. This applies to both Proto1
+ * (equivalent to the old "--one_java_file" option) and Proto2 (where
+ * a .proto always translates to a single class, but you may want to
+ * explicitly choose the class name).
+ * </pre>
+ *
+ * <code>optional string java_outer_classname = 8;</code>
+ */
+ private $java_outer_classname = '';
+ private $has_java_outer_classname = false;
+ /**
+ * <pre>
+ * If set true, 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 outer class
+ * named by java_outer_classname. However, the outer class will still be
+ * generated to contain the file's getDescriptor() method as well as any
+ * top-level extensions defined in the file.
+ * </pre>
+ *
+ * <code>optional bool java_multiple_files = 10 [default = false];</code>
+ */
+ private $java_multiple_files = false;
+ private $has_java_multiple_files = false;
+ /**
+ * <pre>
+ * This option does nothing.
+ * </pre>
+ *
+ * <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
+ */
+ private $java_generate_equals_and_hash = false;
+ private $has_java_generate_equals_and_hash = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
+ */
+ private $java_string_check_utf8 = false;
+ private $has_java_string_check_utf8 = false;
+ /**
+ * <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
+ */
+ private $optimize_for = 0;
+ private $has_optimize_for = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string go_package = 11;</code>
+ */
+ private $go_package = '';
+ private $has_go_package = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool cc_generic_services = 16 [default = false];</code>
+ */
+ private $cc_generic_services = false;
+ private $has_cc_generic_services = false;
+ /**
+ * <code>optional bool java_generic_services = 17 [default = false];</code>
+ */
+ private $java_generic_services = false;
+ private $has_java_generic_services = false;
+ /**
+ * <code>optional bool py_generic_services = 18 [default = false];</code>
+ */
+ private $py_generic_services = false;
+ private $has_py_generic_services = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 23 [default = false];</code>
+ */
+ private $deprecated = false;
+ private $has_deprecated = false;
+ /**
+ * <pre>
+ * Enables the use of arenas for the proto messages in this file. This applies
+ * only to generated classes for C++.
+ * </pre>
+ *
+ * <code>optional bool cc_enable_arenas = 31 [default = false];</code>
+ */
+ private $cc_enable_arenas = false;
+ private $has_cc_enable_arenas = false;
+ /**
+ * <pre>
+ * Sets the objective c class prefix which is prepended to all objective c
+ * generated classes from this .proto. There is no default.
+ * </pre>
+ *
+ * <code>optional string objc_class_prefix = 36;</code>
+ */
+ private $objc_class_prefix = '';
+ private $has_objc_class_prefix = false;
+ /**
+ * <pre>
+ * Namespace for generated classes; defaults to the package.
+ * </pre>
+ *
+ * <code>optional string csharp_namespace = 37;</code>
+ */
+ private $csharp_namespace = '';
+ private $has_csharp_namespace = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string swift_prefix = 39;</code>
+ */
+ private $swift_prefix = '';
+ private $has_swift_prefix = false;
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string java_package = 1;</code>
+ */
+ public function getJavaPackage()
+ {
+ return $this->java_package;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string java_package = 1;</code>
+ */
+ public function setJavaPackage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->java_package = $var;
+ $this->has_java_package = true;
+ }
+
+ public function hasJavaPackage()
+ {
+ return $this->has_java_package;
+ }
+
+ /**
+ * <pre>
+ * If set, all the classes from the .proto file are wrapped in a single
+ * outer class with the given name. This applies to both Proto1
+ * (equivalent to the old "--one_java_file" option) and Proto2 (where
+ * a .proto always translates to a single class, but you may want to
+ * explicitly choose the class name).
+ * </pre>
+ *
+ * <code>optional string java_outer_classname = 8;</code>
+ */
+ public function getJavaOuterClassname()
+ {
+ return $this->java_outer_classname;
+ }
+
+ /**
+ * <pre>
+ * If set, all the classes from the .proto file are wrapped in a single
+ * outer class with the given name. This applies to both Proto1
+ * (equivalent to the old "--one_java_file" option) and Proto2 (where
+ * a .proto always translates to a single class, but you may want to
+ * explicitly choose the class name).
+ * </pre>
+ *
+ * <code>optional string java_outer_classname = 8;</code>
+ */
+ public function setJavaOuterClassname($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->java_outer_classname = $var;
+ $this->has_java_outer_classname = true;
+ }
+
+ public function hasJavaOuterClassname()
+ {
+ return $this->has_java_outer_classname;
+ }
+
+ /**
+ * <pre>
+ * If set true, 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 outer class
+ * named by java_outer_classname. However, the outer class will still be
+ * generated to contain the file's getDescriptor() method as well as any
+ * top-level extensions defined in the file.
+ * </pre>
+ *
+ * <code>optional bool java_multiple_files = 10 [default = false];</code>
+ */
+ public function getJavaMultipleFiles()
+ {
+ return $this->java_multiple_files;
+ }
+
+ /**
+ * <pre>
+ * If set true, 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 outer class
+ * named by java_outer_classname. However, the outer class will still be
+ * generated to contain the file's getDescriptor() method as well as any
+ * top-level extensions defined in the file.
+ * </pre>
+ *
+ * <code>optional bool java_multiple_files = 10 [default = false];</code>
+ */
+ public function setJavaMultipleFiles($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->java_multiple_files = $var;
+ $this->has_java_multiple_files = true;
+ }
+
+ public function hasJavaMultipleFiles()
+ {
+ return $this->has_java_multiple_files;
+ }
+
+ /**
+ * <pre>
+ * This option does nothing.
+ * </pre>
+ *
+ * <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
+ */
+ public function getJavaGenerateEqualsAndHash()
+ {
+ return $this->java_generate_equals_and_hash;
+ }
+
+ /**
+ * <pre>
+ * This option does nothing.
+ * </pre>
+ *
+ * <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
+ */
+ public function setJavaGenerateEqualsAndHash($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->java_generate_equals_and_hash = $var;
+ $this->has_java_generate_equals_and_hash = true;
+ }
+
+ public function hasJavaGenerateEqualsAndHash()
+ {
+ return $this->has_java_generate_equals_and_hash;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
+ */
+ public function getJavaStringCheckUtf8()
+ {
+ return $this->java_string_check_utf8;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
+ */
+ public function setJavaStringCheckUtf8($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->java_string_check_utf8 = $var;
+ $this->has_java_string_check_utf8 = true;
+ }
+
+ public function hasJavaStringCheckUtf8()
+ {
+ return $this->has_java_string_check_utf8;
+ }
+
+ /**
+ * <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
+ */
+ public function getOptimizeFor()
+ {
+ return $this->optimize_for;
+ }
+
+ /**
+ * <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
+ */
+ public function setOptimizeFor($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FileOptions_OptimizeMode::class);
+ $this->optimize_for = $var;
+ $this->has_optimize_for = true;
+ }
+
+ public function hasOptimizeFor()
+ {
+ return $this->has_optimize_for;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string go_package = 11;</code>
+ */
+ public function getGoPackage()
+ {
+ return $this->go_package;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string go_package = 11;</code>
+ */
+ public function setGoPackage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->go_package = $var;
+ $this->has_go_package = true;
+ }
+
+ public function hasGoPackage()
+ {
+ return $this->has_go_package;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool cc_generic_services = 16 [default = false];</code>
+ */
+ public function getCcGenericServices()
+ {
+ return $this->cc_generic_services;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool cc_generic_services = 16 [default = false];</code>
+ */
+ public function setCcGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->cc_generic_services = $var;
+ $this->has_cc_generic_services = true;
+ }
+
+ public function hasCcGenericServices()
+ {
+ return $this->has_cc_generic_services;
+ }
+
+ /**
+ * <code>optional bool java_generic_services = 17 [default = false];</code>
+ */
+ public function getJavaGenericServices()
+ {
+ return $this->java_generic_services;
+ }
+
+ /**
+ * <code>optional bool java_generic_services = 17 [default = false];</code>
+ */
+ public function setJavaGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->java_generic_services = $var;
+ $this->has_java_generic_services = true;
+ }
+
+ public function hasJavaGenericServices()
+ {
+ return $this->has_java_generic_services;
+ }
+
+ /**
+ * <code>optional bool py_generic_services = 18 [default = false];</code>
+ */
+ public function getPyGenericServices()
+ {
+ return $this->py_generic_services;
+ }
+
+ /**
+ * <code>optional bool py_generic_services = 18 [default = false];</code>
+ */
+ public function setPyGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->py_generic_services = $var;
+ $this->has_py_generic_services = true;
+ }
+
+ public function hasPyGenericServices()
+ {
+ return $this->has_py_generic_services;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 23 [default = false];</code>
+ */
+ public function getDeprecated()
+ {
+ return $this->deprecated;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 23 [default = false];</code>
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+ $this->has_deprecated = true;
+ }
+
+ public function hasDeprecated()
+ {
+ return $this->has_deprecated;
+ }
+
+ /**
+ * <pre>
+ * Enables the use of arenas for the proto messages in this file. This applies
+ * only to generated classes for C++.
+ * </pre>
+ *
+ * <code>optional bool cc_enable_arenas = 31 [default = false];</code>
+ */
+ public function getCcEnableArenas()
+ {
+ return $this->cc_enable_arenas;
+ }
+
+ /**
+ * <pre>
+ * Enables the use of arenas for the proto messages in this file. This applies
+ * only to generated classes for C++.
+ * </pre>
+ *
+ * <code>optional bool cc_enable_arenas = 31 [default = false];</code>
+ */
+ public function setCcEnableArenas($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->cc_enable_arenas = $var;
+ $this->has_cc_enable_arenas = true;
+ }
+
+ public function hasCcEnableArenas()
+ {
+ return $this->has_cc_enable_arenas;
+ }
+
+ /**
+ * <pre>
+ * Sets the objective c class prefix which is prepended to all objective c
+ * generated classes from this .proto. There is no default.
+ * </pre>
+ *
+ * <code>optional string objc_class_prefix = 36;</code>
+ */
+ public function getObjcClassPrefix()
+ {
+ return $this->objc_class_prefix;
+ }
+
+ /**
+ * <pre>
+ * Sets the objective c class prefix which is prepended to all objective c
+ * generated classes from this .proto. There is no default.
+ * </pre>
+ *
+ * <code>optional string objc_class_prefix = 36;</code>
+ */
+ public function setObjcClassPrefix($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->objc_class_prefix = $var;
+ $this->has_objc_class_prefix = true;
+ }
+
+ public function hasObjcClassPrefix()
+ {
+ return $this->has_objc_class_prefix;
+ }
+
+ /**
+ * <pre>
+ * Namespace for generated classes; defaults to the package.
+ * </pre>
+ *
+ * <code>optional string csharp_namespace = 37;</code>
+ */
+ public function getCsharpNamespace()
+ {
+ return $this->csharp_namespace;
+ }
+
+ /**
+ * <pre>
+ * Namespace for generated classes; defaults to the package.
+ * </pre>
+ *
+ * <code>optional string csharp_namespace = 37;</code>
+ */
+ public function setCsharpNamespace($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->csharp_namespace = $var;
+ $this->has_csharp_namespace = true;
+ }
+
+ public function hasCsharpNamespace()
+ {
+ return $this->has_csharp_namespace;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string swift_prefix = 39;</code>
+ */
+ public function getSwiftPrefix()
+ {
+ return $this->swift_prefix;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional string swift_prefix = 39;</code>
+ */
+ public function setSwiftPrefix($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->swift_prefix = $var;
+ $this->has_swift_prefix = true;
+ }
+
+ public function hasSwiftPrefix()
+ {
+ return $this->has_swift_prefix;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function setUninterpretedOption(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $var;
+ $this->has_uninterpreted_option = true;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php b/php/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php
new file mode 100644
index 00000000..7fd488eb
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php
@@ -0,0 +1,41 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+/**
+ * <pre>
+ * Generated classes can be optimized for speed or code size.
+ * </pre>
+ *
+ * Protobuf enum <code>google.protobuf.FileOptions.OptimizeMode</code>
+ */
+namespace Google\Protobuf\Internal;
+
+class FileOptions_OptimizeMode
+{
+ /**
+ * <pre>
+ * Generate complete code for parsing, serialization,
+ * </pre>
+ *
+ * <code>SPEED = 1;</code>
+ */
+ const SPEED = 1;
+ /**
+ * <pre>
+ * etc.
+ * </pre>
+ *
+ * <code>CODE_SIZE = 2;</code>
+ */
+ const CODE_SIZE = 2;
+ /**
+ * <pre>
+ * Generate code using MessageLite and the lite runtime.
+ * </pre>
+ *
+ * <code>LITE_RUNTIME = 3;</code>
+ */
+ const LITE_RUNTIME = 3;
+}
+
diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
new file mode 100644
index 00000000..8e493c2f
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
@@ -0,0 +1,75 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.GeneratedCodeInfo</code>
+ */
+class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * An Annotation connects some span of text in generated code to an element
+ * of its generating .proto file.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
+ */
+ private $annotation;
+ private $has_annotation = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * An Annotation connects some span of text in generated code to an element
+ * of its generating .proto file.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
+ */
+ public function getAnnotation()
+ {
+ return $this->annotation;
+ }
+
+ /**
+ * <pre>
+ * An Annotation connects some span of text in generated code to an element
+ * of its generating .proto file.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
+ */
+ public function setAnnotation(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\GeneratedCodeInfo_Annotation::class);
+ $this->annotation = $var;
+ $this->has_annotation = true;
+ }
+
+ public function hasAnnotation()
+ {
+ return $this->has_annotation;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php
new file mode 100644
index 00000000..dcc7edfe
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php
@@ -0,0 +1,198 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.GeneratedCodeInfo.Annotation</code>
+ */
+class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * Identifies the element in the original source .proto file. This field
+ * is formatted the same as SourceCodeInfo.Location.path.
+ * </pre>
+ *
+ * <code>repeated int32 path = 1 [packed = true];</code>
+ */
+ private $path;
+ private $has_path = false;
+ /**
+ * <pre>
+ * Identifies the filesystem path to the original source .proto.
+ * </pre>
+ *
+ * <code>optional string source_file = 2;</code>
+ */
+ private $source_file = '';
+ private $has_source_file = false;
+ /**
+ * <pre>
+ * Identifies the starting offset in bytes in the generated code
+ * that relates to the identified object.
+ * </pre>
+ *
+ * <code>optional int32 begin = 3;</code>
+ */
+ private $begin = 0;
+ private $has_begin = false;
+ /**
+ * <pre>
+ * 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).
+ * </pre>
+ *
+ * <code>optional int32 end = 4;</code>
+ */
+ private $end = 0;
+ private $has_end = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * Identifies the element in the original source .proto file. This field
+ * is formatted the same as SourceCodeInfo.Location.path.
+ * </pre>
+ *
+ * <code>repeated int32 path = 1 [packed = true];</code>
+ */
+ public function getPath()
+ {
+ return $this->path;
+ }
+
+ /**
+ * <pre>
+ * Identifies the element in the original source .proto file. This field
+ * is formatted the same as SourceCodeInfo.Location.path.
+ * </pre>
+ *
+ * <code>repeated int32 path = 1 [packed = true];</code>
+ */
+ public function setPath(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->path = $var;
+ $this->has_path = true;
+ }
+
+ public function hasPath()
+ {
+ return $this->has_path;
+ }
+
+ /**
+ * <pre>
+ * Identifies the filesystem path to the original source .proto.
+ * </pre>
+ *
+ * <code>optional string source_file = 2;</code>
+ */
+ public function getSourceFile()
+ {
+ return $this->source_file;
+ }
+
+ /**
+ * <pre>
+ * Identifies the filesystem path to the original source .proto.
+ * </pre>
+ *
+ * <code>optional string source_file = 2;</code>
+ */
+ public function setSourceFile($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->source_file = $var;
+ $this->has_source_file = true;
+ }
+
+ public function hasSourceFile()
+ {
+ return $this->has_source_file;
+ }
+
+ /**
+ * <pre>
+ * Identifies the starting offset in bytes in the generated code
+ * that relates to the identified object.
+ * </pre>
+ *
+ * <code>optional int32 begin = 3;</code>
+ */
+ public function getBegin()
+ {
+ return $this->begin;
+ }
+
+ /**
+ * <pre>
+ * Identifies the starting offset in bytes in the generated code
+ * that relates to the identified object.
+ * </pre>
+ *
+ * <code>optional int32 begin = 3;</code>
+ */
+ public function setBegin($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->begin = $var;
+ $this->has_begin = true;
+ }
+
+ public function hasBegin()
+ {
+ return $this->has_begin;
+ }
+
+ /**
+ * <pre>
+ * 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).
+ * </pre>
+ *
+ * <code>optional int32 end = 4;</code>
+ */
+ public function getEnd()
+ {
+ return $this->end;
+ }
+
+ /**
+ * <pre>
+ * 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).
+ * </pre>
+ *
+ * <code>optional int32 end = 4;</code>
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+ $this->has_end = true;
+ }
+
+ public function hasEnd()
+ {
+ return $this->has_end;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/MessageOptions.php b/php/src/Google/Protobuf/Internal/MessageOptions.php
new file mode 100644
index 00000000..e4a214cb
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/MessageOptions.php
@@ -0,0 +1,334 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.MessageOptions</code>
+ */
+class MessageOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool message_set_wire_format = 1 [default = false];</code>
+ */
+ private $message_set_wire_format = false;
+ private $has_message_set_wire_format = false;
+ /**
+ * <pre>
+ * 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".
+ * </pre>
+ *
+ * <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
+ */
+ private $no_standard_descriptor_accessor = false;
+ private $has_no_standard_descriptor_accessor = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ private $deprecated = false;
+ private $has_deprecated = false;
+ /**
+ * <pre>
+ * Whether the message is an automatically generated map entry type for the
+ * maps field.
+ * For maps fields:
+ * map&lt;KeyType, ValueType&gt; 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 implementions 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.
+ * </pre>
+ *
+ * <code>optional bool map_entry = 7;</code>
+ */
+ private $map_entry = false;
+ private $has_map_entry = false;
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool message_set_wire_format = 1 [default = false];</code>
+ */
+ public function getMessageSetWireFormat()
+ {
+ return $this->message_set_wire_format;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool message_set_wire_format = 1 [default = false];</code>
+ */
+ public function setMessageSetWireFormat($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->message_set_wire_format = $var;
+ $this->has_message_set_wire_format = true;
+ }
+
+ public function hasMessageSetWireFormat()
+ {
+ return $this->has_message_set_wire_format;
+ }
+
+ /**
+ * <pre>
+ * 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".
+ * </pre>
+ *
+ * <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
+ */
+ public function getNoStandardDescriptorAccessor()
+ {
+ return $this->no_standard_descriptor_accessor;
+ }
+
+ /**
+ * <pre>
+ * 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".
+ * </pre>
+ *
+ * <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
+ */
+ public function setNoStandardDescriptorAccessor($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->no_standard_descriptor_accessor = $var;
+ $this->has_no_standard_descriptor_accessor = true;
+ }
+
+ public function hasNoStandardDescriptorAccessor()
+ {
+ return $this->has_no_standard_descriptor_accessor;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ public function getDeprecated()
+ {
+ return $this->deprecated;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+ $this->has_deprecated = true;
+ }
+
+ public function hasDeprecated()
+ {
+ return $this->has_deprecated;
+ }
+
+ /**
+ * <pre>
+ * Whether the message is an automatically generated map entry type for the
+ * maps field.
+ * For maps fields:
+ * map&lt;KeyType, ValueType&gt; 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 implementions 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.
+ * </pre>
+ *
+ * <code>optional bool map_entry = 7;</code>
+ */
+ public function getMapEntry()
+ {
+ return $this->map_entry;
+ }
+
+ /**
+ * <pre>
+ * Whether the message is an automatically generated map entry type for the
+ * maps field.
+ * For maps fields:
+ * map&lt;KeyType, ValueType&gt; 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 implementions 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.
+ * </pre>
+ *
+ * <code>optional bool map_entry = 7;</code>
+ */
+ public function setMapEntry($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->map_entry = $var;
+ $this->has_map_entry = true;
+ }
+
+ public function hasMapEntry()
+ {
+ return $this->has_map_entry;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function setUninterpretedOption(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $var;
+ $this->has_uninterpreted_option = true;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php b/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php
new file mode 100644
index 00000000..3d8df7af
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php
@@ -0,0 +1,237 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * Describes a method of a service.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.MethodDescriptorProto</code>
+ */
+class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ private $name = '';
+ private $has_name = false;
+ /**
+ * <pre>
+ * Input and output type names. These are resolved in the same way as
+ * FieldDescriptorProto.type_name, but must refer to a message type.
+ * </pre>
+ *
+ * <code>optional string input_type = 2;</code>
+ */
+ private $input_type = '';
+ private $has_input_type = false;
+ /**
+ * <code>optional string output_type = 3;</code>
+ */
+ private $output_type = '';
+ private $has_output_type = false;
+ /**
+ * <code>optional .google.protobuf.MethodOptions options = 4;</code>
+ */
+ private $options = null;
+ private $has_options = false;
+ /**
+ * <pre>
+ * Identifies if client streams multiple client messages
+ * </pre>
+ *
+ * <code>optional bool client_streaming = 5 [default = false];</code>
+ */
+ private $client_streaming = false;
+ private $has_client_streaming = false;
+ /**
+ * <pre>
+ * Identifies if server streams multiple server messages
+ * </pre>
+ *
+ * <code>optional bool server_streaming = 6 [default = false];</code>
+ */
+ private $server_streaming = false;
+ private $has_server_streaming = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * <pre>
+ * Input and output type names. These are resolved in the same way as
+ * FieldDescriptorProto.type_name, but must refer to a message type.
+ * </pre>
+ *
+ * <code>optional string input_type = 2;</code>
+ */
+ public function getInputType()
+ {
+ return $this->input_type;
+ }
+
+ /**
+ * <pre>
+ * Input and output type names. These are resolved in the same way as
+ * FieldDescriptorProto.type_name, but must refer to a message type.
+ * </pre>
+ *
+ * <code>optional string input_type = 2;</code>
+ */
+ public function setInputType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->input_type = $var;
+ $this->has_input_type = true;
+ }
+
+ public function hasInputType()
+ {
+ return $this->has_input_type;
+ }
+
+ /**
+ * <code>optional string output_type = 3;</code>
+ */
+ public function getOutputType()
+ {
+ return $this->output_type;
+ }
+
+ /**
+ * <code>optional string output_type = 3;</code>
+ */
+ public function setOutputType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->output_type = $var;
+ $this->has_output_type = true;
+ }
+
+ public function hasOutputType()
+ {
+ return $this->has_output_type;
+ }
+
+ /**
+ * <code>optional .google.protobuf.MethodOptions options = 4;</code>
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * <code>optional .google.protobuf.MethodOptions options = 4;</code>
+ */
+ public function setOptions(&$var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MethodOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+ /**
+ * <pre>
+ * Identifies if client streams multiple client messages
+ * </pre>
+ *
+ * <code>optional bool client_streaming = 5 [default = false];</code>
+ */
+ public function getClientStreaming()
+ {
+ return $this->client_streaming;
+ }
+
+ /**
+ * <pre>
+ * Identifies if client streams multiple client messages
+ * </pre>
+ *
+ * <code>optional bool client_streaming = 5 [default = false];</code>
+ */
+ public function setClientStreaming($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->client_streaming = $var;
+ $this->has_client_streaming = true;
+ }
+
+ public function hasClientStreaming()
+ {
+ return $this->has_client_streaming;
+ }
+
+ /**
+ * <pre>
+ * Identifies if server streams multiple server messages
+ * </pre>
+ *
+ * <code>optional bool server_streaming = 6 [default = false];</code>
+ */
+ public function getServerStreaming()
+ {
+ return $this->server_streaming;
+ }
+
+ /**
+ * <pre>
+ * Identifies if server streams multiple server messages
+ * </pre>
+ *
+ * <code>optional bool server_streaming = 6 [default = false];</code>
+ */
+ public function setServerStreaming($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->server_streaming = $var;
+ $this->has_server_streaming = true;
+ }
+
+ public function hasServerStreaming()
+ {
+ return $this->has_server_streaming;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/MethodOptions.php b/php/src/Google/Protobuf/Internal/MethodOptions.php
new file mode 100644
index 00000000..3325e52b
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/MethodOptions.php
@@ -0,0 +1,143 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.MethodOptions</code>
+ */
+class MethodOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 33 [default = false];</code>
+ */
+ private $deprecated = false;
+ private $has_deprecated = false;
+ /**
+ * <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
+ */
+ private $idempotency_level = 0;
+ private $has_idempotency_level = false;
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 33 [default = false];</code>
+ */
+ public function getDeprecated()
+ {
+ return $this->deprecated;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 33 [default = false];</code>
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+ $this->has_deprecated = true;
+ }
+
+ public function hasDeprecated()
+ {
+ return $this->has_deprecated;
+ }
+
+ /**
+ * <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
+ */
+ public function getIdempotencyLevel()
+ {
+ return $this->idempotency_level;
+ }
+
+ /**
+ * <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
+ */
+ public function setIdempotencyLevel($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\MethodOptions_IdempotencyLevel::class);
+ $this->idempotency_level = $var;
+ $this->has_idempotency_level = true;
+ }
+
+ public function hasIdempotencyLevel()
+ {
+ return $this->has_idempotency_level;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function setUninterpretedOption(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $var;
+ $this->has_uninterpreted_option = true;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php b/php/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php
new file mode 100644
index 00000000..62768b5c
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php
@@ -0,0 +1,39 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+/**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * Protobuf enum <code>google.protobuf.MethodOptions.IdempotencyLevel</code>
+ */
+namespace Google\Protobuf\Internal;
+
+class MethodOptions_IdempotencyLevel
+{
+ /**
+ * <code>IDEMPOTENCY_UNKNOWN = 0;</code>
+ */
+ const IDEMPOTENCY_UNKNOWN = 0;
+ /**
+ * <pre>
+ * implies idempotent
+ * </pre>
+ *
+ * <code>NO_SIDE_EFFECTS = 1;</code>
+ */
+ const NO_SIDE_EFFECTS = 1;
+ /**
+ * <pre>
+ * idempotent, but may have side effects
+ * </pre>
+ *
+ * <code>IDEMPOTENT = 2;</code>
+ */
+ const IDEMPOTENT = 2;
+}
+
diff --git a/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php b/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php
new file mode 100644
index 00000000..e5fbe370
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php
@@ -0,0 +1,86 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * Describes a oneof.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.OneofDescriptorProto</code>
+ */
+class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ private $name = '';
+ private $has_name = false;
+ /**
+ * <code>optional .google.protobuf.OneofOptions options = 2;</code>
+ */
+ private $options = null;
+ private $has_options = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * <code>optional .google.protobuf.OneofOptions options = 2;</code>
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * <code>optional .google.protobuf.OneofOptions options = 2;</code>
+ */
+ public function setOptions(&$var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\OneofOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/OneofOptions.php b/php/src/Google/Protobuf/Internal/OneofOptions.php
new file mode 100644
index 00000000..083d9929
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/OneofOptions.php
@@ -0,0 +1,66 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.OneofOptions</code>
+ */
+class OneofOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function setUninterpretedOption(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $var;
+ $this->has_uninterpreted_option = true;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
new file mode 100644
index 00000000..624bde84
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
@@ -0,0 +1,114 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * Describes a service.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.ServiceDescriptorProto</code>
+ */
+class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ private $name = '';
+ private $has_name = false;
+ /**
+ * <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
+ */
+ private $method;
+ private $has_method = false;
+ /**
+ * <code>optional .google.protobuf.ServiceOptions options = 3;</code>
+ */
+ private $options = null;
+ private $has_options = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * <code>optional string name = 1;</code>
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
+ */
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
+ */
+ public function setMethod(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\MethodDescriptorProto::class);
+ $this->method = $var;
+ $this->has_method = true;
+ }
+
+ public function hasMethod()
+ {
+ return $this->has_method;
+ }
+
+ /**
+ * <code>optional .google.protobuf.ServiceOptions options = 3;</code>
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * <code>optional .google.protobuf.ServiceOptions options = 3;</code>
+ */
+ public function setOptions(&$var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ServiceOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/ServiceOptions.php b/php/src/Google/Protobuf/Internal/ServiceOptions.php
new file mode 100644
index 00000000..5f3564e4
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/ServiceOptions.php
@@ -0,0 +1,115 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.ServiceOptions</code>
+ */
+class ServiceOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 33 [default = false];</code>
+ */
+ private $deprecated = false;
+ private $has_deprecated = false;
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 33 [default = false];</code>
+ */
+ public function getDeprecated()
+ {
+ return $this->deprecated;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>optional bool deprecated = 33 [default = false];</code>
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+ $this->has_deprecated = true;
+ }
+
+ public function hasDeprecated()
+ {
+ return $this->has_deprecated;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * <pre>
+ * The parser stores options it doesn't recognize here. See above.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ public function setUninterpretedOption(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $var;
+ $this->has_uninterpreted_option = true;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/SourceCodeInfo.php b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php
new file mode 100644
index 00000000..d2352ddd
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php
@@ -0,0 +1,191 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * Encapsulates information about the original source file from which a
+ * FileDescriptorProto was generated.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.SourceCodeInfo</code>
+ */
+class SourceCodeInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * 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 descendent. 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.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
+ */
+ private $location;
+ private $has_location = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * 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 descendent. 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.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
+ */
+ public function getLocation()
+ {
+ return $this->location;
+ }
+
+ /**
+ * <pre>
+ * 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 descendent. 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.
+ * </pre>
+ *
+ * <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
+ */
+ public function setLocation(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\SourceCodeInfo_Location::class);
+ $this->location = $var;
+ $this->has_location = true;
+ }
+
+ public function hasLocation()
+ {
+ return $this->has_location;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php b/php/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php
new file mode 100644
index 00000000..d1bdb166
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php
@@ -0,0 +1,379 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Protobuf type <code>google.protobuf.SourceCodeInfo.Location</code>
+ */
+class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <pre>
+ * 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. 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).
+ * </pre>
+ *
+ * <code>repeated int32 path = 1 [packed = true];</code>
+ */
+ private $path;
+ private $has_path = false;
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>repeated int32 span = 2 [packed = true];</code>
+ */
+ private $span;
+ private $has_span = false;
+ /**
+ * <pre>
+ * 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 qux.
+ * //
+ * // Another line attached to qux.
+ * optional double qux = 4;
+ * // Detached comment for corge. This is not leading or trailing comments
+ * // to qux or corge because there are blank lines separating it from
+ * // both.
+ * // Detached comment for corge paragraph 2.
+ * optional string corge = 5;
+ * /&#42; Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. *&#47;
+ * /&#42; Block comment attached to
+ * * grault. *&#47;
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ * </pre>
+ *
+ * <code>optional string leading_comments = 3;</code>
+ */
+ private $leading_comments = '';
+ private $has_leading_comments = false;
+ /**
+ * <code>optional string trailing_comments = 4;</code>
+ */
+ private $trailing_comments = '';
+ private $has_trailing_comments = false;
+ /**
+ * <code>repeated string leading_detached_comments = 6;</code>
+ */
+ private $leading_detached_comments;
+ private $has_leading_detached_comments = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <pre>
+ * 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. 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).
+ * </pre>
+ *
+ * <code>repeated int32 path = 1 [packed = true];</code>
+ */
+ public function getPath()
+ {
+ return $this->path;
+ }
+
+ /**
+ * <pre>
+ * 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. 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).
+ * </pre>
+ *
+ * <code>repeated int32 path = 1 [packed = true];</code>
+ */
+ public function setPath(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->path = $var;
+ $this->has_path = true;
+ }
+
+ public function hasPath()
+ {
+ return $this->has_path;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>repeated int32 span = 2 [packed = true];</code>
+ */
+ public function getSpan()
+ {
+ return $this->span;
+ }
+
+ /**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * <code>repeated int32 span = 2 [packed = true];</code>
+ */
+ public function setSpan(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->span = $var;
+ $this->has_span = true;
+ }
+
+ public function hasSpan()
+ {
+ return $this->has_span;
+ }
+
+ /**
+ * <pre>
+ * 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 qux.
+ * //
+ * // Another line attached to qux.
+ * optional double qux = 4;
+ * // Detached comment for corge. This is not leading or trailing comments
+ * // to qux or corge because there are blank lines separating it from
+ * // both.
+ * // Detached comment for corge paragraph 2.
+ * optional string corge = 5;
+ * /&#42; Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. *&#47;
+ * /&#42; Block comment attached to
+ * * grault. *&#47;
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ * </pre>
+ *
+ * <code>optional string leading_comments = 3;</code>
+ */
+ public function getLeadingComments()
+ {
+ return $this->leading_comments;
+ }
+
+ /**
+ * <pre>
+ * 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 qux.
+ * //
+ * // Another line attached to qux.
+ * optional double qux = 4;
+ * // Detached comment for corge. This is not leading or trailing comments
+ * // to qux or corge because there are blank lines separating it from
+ * // both.
+ * // Detached comment for corge paragraph 2.
+ * optional string corge = 5;
+ * /&#42; Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. *&#47;
+ * /&#42; Block comment attached to
+ * * grault. *&#47;
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ * </pre>
+ *
+ * <code>optional string leading_comments = 3;</code>
+ */
+ public function setLeadingComments($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->leading_comments = $var;
+ $this->has_leading_comments = true;
+ }
+
+ public function hasLeadingComments()
+ {
+ return $this->has_leading_comments;
+ }
+
+ /**
+ * <code>optional string trailing_comments = 4;</code>
+ */
+ public function getTrailingComments()
+ {
+ return $this->trailing_comments;
+ }
+
+ /**
+ * <code>optional string trailing_comments = 4;</code>
+ */
+ public function setTrailingComments($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trailing_comments = $var;
+ $this->has_trailing_comments = true;
+ }
+
+ public function hasTrailingComments()
+ {
+ return $this->has_trailing_comments;
+ }
+
+ /**
+ * <code>repeated string leading_detached_comments = 6;</code>
+ */
+ public function getLeadingDetachedComments()
+ {
+ return $this->leading_detached_comments;
+ }
+
+ /**
+ * <code>repeated string leading_detached_comments = 6;</code>
+ */
+ public function setLeadingDetachedComments(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->leading_detached_comments = $var;
+ $this->has_leading_detached_comments = true;
+ }
+
+ public function hasLeadingDetachedComments()
+ {
+ return $this->has_leading_detached_comments;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/UninterpretedOption.php b/php/src/Google/Protobuf/Internal/UninterpretedOption.php
new file mode 100644
index 00000000..c0f48310
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/UninterpretedOption.php
@@ -0,0 +1,246 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * 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.
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.UninterpretedOption</code>
+ */
+class UninterpretedOption extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
+ */
+ private $name;
+ private $has_name = false;
+ /**
+ * <pre>
+ * The value of the uninterpreted option, in whatever type the tokenizer
+ * identified it as during parsing. Exactly one of these should be set.
+ * </pre>
+ *
+ * <code>optional string identifier_value = 3;</code>
+ */
+ private $identifier_value = '';
+ private $has_identifier_value = false;
+ /**
+ * <code>optional uint64 positive_int_value = 4;</code>
+ */
+ private $positive_int_value = 0;
+ private $has_positive_int_value = false;
+ /**
+ * <code>optional int64 negative_int_value = 5;</code>
+ */
+ private $negative_int_value = 0;
+ private $has_negative_int_value = false;
+ /**
+ * <code>optional double double_value = 6;</code>
+ */
+ private $double_value = 0.0;
+ private $has_double_value = false;
+ /**
+ * <code>optional bytes string_value = 7;</code>
+ */
+ private $string_value = '';
+ private $has_string_value = false;
+ /**
+ * <code>optional string aggregate_value = 8;</code>
+ */
+ private $aggregate_value = '';
+ private $has_aggregate_value = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
+ */
+ public function setName(&$var)
+ {
+ GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption_NamePart::class);
+ $this->name = $var;
+ $this->has_name = true;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * <pre>
+ * The value of the uninterpreted option, in whatever type the tokenizer
+ * identified it as during parsing. Exactly one of these should be set.
+ * </pre>
+ *
+ * <code>optional string identifier_value = 3;</code>
+ */
+ public function getIdentifierValue()
+ {
+ return $this->identifier_value;
+ }
+
+ /**
+ * <pre>
+ * The value of the uninterpreted option, in whatever type the tokenizer
+ * identified it as during parsing. Exactly one of these should be set.
+ * </pre>
+ *
+ * <code>optional string identifier_value = 3;</code>
+ */
+ public function setIdentifierValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->identifier_value = $var;
+ $this->has_identifier_value = true;
+ }
+
+ public function hasIdentifierValue()
+ {
+ return $this->has_identifier_value;
+ }
+
+ /**
+ * <code>optional uint64 positive_int_value = 4;</code>
+ */
+ public function getPositiveIntValue()
+ {
+ return $this->positive_int_value;
+ }
+
+ /**
+ * <code>optional uint64 positive_int_value = 4;</code>
+ */
+ public function setPositiveIntValue($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->positive_int_value = $var;
+ $this->has_positive_int_value = true;
+ }
+
+ public function hasPositiveIntValue()
+ {
+ return $this->has_positive_int_value;
+ }
+
+ /**
+ * <code>optional int64 negative_int_value = 5;</code>
+ */
+ public function getNegativeIntValue()
+ {
+ return $this->negative_int_value;
+ }
+
+ /**
+ * <code>optional int64 negative_int_value = 5;</code>
+ */
+ public function setNegativeIntValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->negative_int_value = $var;
+ $this->has_negative_int_value = true;
+ }
+
+ public function hasNegativeIntValue()
+ {
+ return $this->has_negative_int_value;
+ }
+
+ /**
+ * <code>optional double double_value = 6;</code>
+ */
+ public function getDoubleValue()
+ {
+ return $this->double_value;
+ }
+
+ /**
+ * <code>optional double double_value = 6;</code>
+ */
+ public function setDoubleValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->double_value = $var;
+ $this->has_double_value = true;
+ }
+
+ public function hasDoubleValue()
+ {
+ return $this->has_double_value;
+ }
+
+ /**
+ * <code>optional bytes string_value = 7;</code>
+ */
+ public function getStringValue()
+ {
+ return $this->string_value;
+ }
+
+ /**
+ * <code>optional bytes string_value = 7;</code>
+ */
+ public function setStringValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->string_value = $var;
+ $this->has_string_value = true;
+ }
+
+ public function hasStringValue()
+ {
+ return $this->has_string_value;
+ }
+
+ /**
+ * <code>optional string aggregate_value = 8;</code>
+ */
+ public function getAggregateValue()
+ {
+ return $this->aggregate_value;
+ }
+
+ /**
+ * <code>optional string aggregate_value = 8;</code>
+ */
+ public function setAggregateValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->aggregate_value = $var;
+ $this->has_aggregate_value = true;
+ }
+
+ public function hasAggregateValue()
+ {
+ return $this->has_aggregate_value;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php b/php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
new file mode 100644
index 00000000..86484d23
--- /dev/null
+++ b/php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
@@ -0,0 +1,90 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * <pre>
+ * 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], ["qux", false] } represents
+ * "foo.(bar.baz).qux".
+ * </pre>
+ *
+ * Protobuf type <code>google.protobuf.UninterpretedOption.NamePart</code>
+ */
+class UninterpretedOption_NamePart extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * <code>required string name_part = 1;</code>
+ */
+ private $name_part = '';
+ private $has_name_part = false;
+ /**
+ * <code>required bool is_extension = 2;</code>
+ */
+ private $is_extension = false;
+ private $has_is_extension = false;
+
+ public function __construct() {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct();
+ }
+
+ /**
+ * <code>required string name_part = 1;</code>
+ */
+ public function getNamePart()
+ {
+ return $this->name_part;
+ }
+
+ /**
+ * <code>required string name_part = 1;</code>
+ */
+ public function setNamePart($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name_part = $var;
+ $this->has_name_part = true;
+ }
+
+ public function hasNamePart()
+ {
+ return $this->has_name_part;
+ }
+
+ /**
+ * <code>required bool is_extension = 2;</code>
+ */
+ public function getIsExtension()
+ {
+ return $this->is_extension;
+ }
+
+ /**
+ * <code>required bool is_extension = 2;</code>
+ */
+ public function setIsExtension($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->is_extension = $var;
+ $this->has_is_extension = true;
+ }
+
+ public function hasIsExtension()
+ {
+ return $this->has_is_extension;
+ }
+
+}
+
diff --git a/php/src/Google/Protobuf/descriptor_internal.pb.php b/php/src/Google/Protobuf/descriptor_internal.pb.php
deleted file mode 100644
index 161a9f52..00000000
--- a/php/src/Google/Protobuf/descriptor_internal.pb.php
+++ /dev/null
@@ -1,2532 +0,0 @@
-<?php
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: google/protobuf/descriptor.proto
-
-namespace Google\Protobuf\Internal;
-
-use Google\Protobuf\Internal\DescriptorPool;
-use Google\Protobuf\Internal\GPBType;
-use Google\Protobuf\Internal\GPBWire;
-use Google\Protobuf\Internal\RepeatedField;
-use Google\Protobuf\Internal\InputStream;
-
-use Google\Protobuf\Internal\GPBUtil;
-
-class FileDescriptorSet extends \Google\Protobuf\Internal\Message
-{
- private $file;
- private $has_file = false;
-
- public function getFile()
- {
- return $this->file;
- }
-
- public function setFile(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\FileDescriptorProto::class);
- $this->file = $var;
- $this->has_file = true;
- }
-
- public function hasFile()
- {
- return $this->has_file;
- }
-
-}
-
-class FileDescriptorProto extends \Google\Protobuf\Internal\Message
-{
- private $name = '';
- private $has_name = false;
- private $package = '';
- private $has_package = false;
- private $dependency;
- private $has_dependency = false;
- private $public_dependency;
- private $has_public_dependency = false;
- private $weak_dependency;
- private $has_weak_dependency = false;
- private $message_type;
- private $has_message_type = false;
- private $enum_type;
- private $has_enum_type = false;
- private $service;
- private $has_service = false;
- private $extension;
- private $has_extension = false;
- private $options = null;
- private $has_options = false;
- private $source_code_info = null;
- private $has_source_code_info = false;
- private $syntax = '';
- private $has_syntax = false;
-
- public function getName()
- {
- return $this->name;
- }
-
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
- $this->has_name = true;
- }
-
- public function hasName()
- {
- return $this->has_name;
- }
-
- public function getPackage()
- {
- return $this->package;
- }
-
- public function setPackage($var)
- {
- GPBUtil::checkString($var, True);
- $this->package = $var;
- $this->has_package = true;
- }
-
- public function hasPackage()
- {
- return $this->has_package;
- }
-
- public function getDependency()
- {
- return $this->dependency;
- }
-
- public function setDependency(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::STRING);
- $this->dependency = $var;
- $this->has_dependency = true;
- }
-
- public function hasDependency()
- {
- return $this->has_dependency;
- }
-
- public function getPublicDependency()
- {
- return $this->public_dependency;
- }
-
- public function setPublicDependency(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT32);
- $this->public_dependency = $var;
- $this->has_public_dependency = true;
- }
-
- public function hasPublicDependency()
- {
- return $this->has_public_dependency;
- }
-
- public function getWeakDependency()
- {
- return $this->weak_dependency;
- }
-
- public function setWeakDependency(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT32);
- $this->weak_dependency = $var;
- $this->has_weak_dependency = true;
- }
-
- public function hasWeakDependency()
- {
- return $this->has_weak_dependency;
- }
-
- public function getMessageType()
- {
- return $this->message_type;
- }
-
- public function setMessageType(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
- $this->message_type = $var;
- $this->has_message_type = true;
- }
-
- public function hasMessageType()
- {
- return $this->has_message_type;
- }
-
- public function getEnumType()
- {
- return $this->enum_type;
- }
-
- public function setEnumType(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
- $this->enum_type = $var;
- $this->has_enum_type = true;
- }
-
- public function hasEnumType()
- {
- return $this->has_enum_type;
- }
-
- public function getService()
- {
- return $this->service;
- }
-
- public function setService(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\ServiceDescriptorProto::class);
- $this->service = $var;
- $this->has_service = true;
- }
-
- public function hasService()
- {
- return $this->has_service;
- }
-
- public function getExtension()
- {
- return $this->extension;
- }
-
- public function setExtension(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
- $this->extension = $var;
- $this->has_extension = true;
- }
-
- public function hasExtension()
- {
- return $this->has_extension;
- }
-
- public function getOptions()
- {
- return $this->options;
- }
-
- public function setOptions(&$var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FileOptions::class);
- $this->options = $var;
- $this->has_options = true;
- }
-
- public function hasOptions()
- {
- return $this->has_options;
- }
-
- public function getSourceCodeInfo()
- {
- return $this->source_code_info;
- }
-
- public function setSourceCodeInfo(&$var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Internal\SourceCodeInfo::class);
- $this->source_code_info = $var;
- $this->has_source_code_info = true;
- }
-
- public function hasSourceCodeInfo()
- {
- return $this->has_source_code_info;
- }
-
- public function getSyntax()
- {
- return $this->syntax;
- }
-
- public function setSyntax($var)
- {
- GPBUtil::checkString($var, True);
- $this->syntax = $var;
- $this->has_syntax = true;
- }
-
- public function hasSyntax()
- {
- return $this->has_syntax;
- }
-
-}
-
-class DescriptorProto extends \Google\Protobuf\Internal\Message
-{
- private $name = '';
- private $has_name = false;
- private $field;
- private $has_field = false;
- private $extension;
- private $has_extension = false;
- private $nested_type;
- private $has_nested_type = false;
- private $enum_type;
- private $has_enum_type = false;
- private $extension_range;
- private $has_extension_range = false;
- private $oneof_decl;
- private $has_oneof_decl = false;
- private $options = null;
- private $has_options = false;
- private $reserved_range;
- private $has_reserved_range = false;
- private $reserved_name;
- private $has_reserved_name = false;
-
- public function getName()
- {
- return $this->name;
- }
-
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
- $this->has_name = true;
- }
-
- public function hasName()
- {
- return $this->has_name;
- }
-
- public function getField()
- {
- return $this->field;
- }
-
- public function setField(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
- $this->field = $var;
- $this->has_field = true;
- }
-
- public function hasField()
- {
- return $this->has_field;
- }
-
- public function getExtension()
- {
- return $this->extension;
- }
-
- public function setExtension(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
- $this->extension = $var;
- $this->has_extension = true;
- }
-
- public function hasExtension()
- {
- return $this->has_extension;
- }
-
- public function getNestedType()
- {
- return $this->nested_type;
- }
-
- public function setNestedType(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
- $this->nested_type = $var;
- $this->has_nested_type = true;
- }
-
- public function hasNestedType()
- {
- return $this->has_nested_type;
- }
-
- public function getEnumType()
- {
- return $this->enum_type;
- }
-
- public function setEnumType(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
- $this->enum_type = $var;
- $this->has_enum_type = true;
- }
-
- public function hasEnumType()
- {
- return $this->has_enum_type;
- }
-
- public function getExtensionRange()
- {
- return $this->extension_range;
- }
-
- public function setExtensionRange(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class);
- $this->extension_range = $var;
- $this->has_extension_range = true;
- }
-
- public function hasExtensionRange()
- {
- return $this->has_extension_range;
- }
-
- public function getOneofDecl()
- {
- return $this->oneof_decl;
- }
-
- public function setOneofDecl(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\OneofDescriptorProto::class);
- $this->oneof_decl = $var;
- $this->has_oneof_decl = true;
- }
-
- public function hasOneofDecl()
- {
- return $this->has_oneof_decl;
- }
-
- public function getOptions()
- {
- return $this->options;
- }
-
- public function setOptions(&$var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MessageOptions::class);
- $this->options = $var;
- $this->has_options = true;
- }
-
- public function hasOptions()
- {
- return $this->has_options;
- }
-
- public function getReservedRange()
- {
- return $this->reserved_range;
- }
-
- public function setReservedRange(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto_ReservedRange::class);
- $this->reserved_range = $var;
- $this->has_reserved_range = true;
- }
-
- public function hasReservedRange()
- {
- return $this->has_reserved_range;
- }
-
- public function getReservedName()
- {
- return $this->reserved_name;
- }
-
- public function setReservedName(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::STRING);
- $this->reserved_name = $var;
- $this->has_reserved_name = true;
- }
-
- public function hasReservedName()
- {
- return $this->has_reserved_name;
- }
-
-}
-
-class DescriptorProto_ExtensionRange extends \Google\Protobuf\Internal\Message
-{
- private $start = 0;
- private $has_start = false;
- private $end = 0;
- private $has_end = false;
-
- public function getStart()
- {
- return $this->start;
- }
-
- public function setStart($var)
- {
- GPBUtil::checkInt32($var);
- $this->start = $var;
- $this->has_start = true;
- }
-
- public function hasStart()
- {
- return $this->has_start;
- }
-
- public function getEnd()
- {
- return $this->end;
- }
-
- public function setEnd($var)
- {
- GPBUtil::checkInt32($var);
- $this->end = $var;
- $this->has_end = true;
- }
-
- public function hasEnd()
- {
- return $this->has_end;
- }
-
-}
-
-class DescriptorProto_ReservedRange extends \Google\Protobuf\Internal\Message
-{
- private $start = 0;
- private $has_start = false;
- private $end = 0;
- private $has_end = false;
-
- public function getStart()
- {
- return $this->start;
- }
-
- public function setStart($var)
- {
- GPBUtil::checkInt32($var);
- $this->start = $var;
- $this->has_start = true;
- }
-
- public function hasStart()
- {
- return $this->has_start;
- }
-
- public function getEnd()
- {
- return $this->end;
- }
-
- public function setEnd($var)
- {
- GPBUtil::checkInt32($var);
- $this->end = $var;
- $this->has_end = true;
- }
-
- public function hasEnd()
- {
- return $this->has_end;
- }
-
-}
-
-class FieldDescriptorProto extends \Google\Protobuf\Internal\Message
-{
- private $name = '';
- private $has_name = false;
- private $number = 0;
- private $has_number = false;
- private $label = 0;
- private $has_label = false;
- private $type = 0;
- private $has_type = false;
- private $type_name = '';
- private $has_type_name = false;
- private $extendee = '';
- private $has_extendee = false;
- private $default_value = '';
- private $has_default_value = false;
- private $oneof_index = 0;
- private $has_oneof_index = false;
- private $json_name = '';
- private $has_json_name = false;
- private $options = null;
- private $has_options = false;
-
- public function getName()
- {
- return $this->name;
- }
-
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
- $this->has_name = true;
- }
-
- public function hasName()
- {
- return $this->has_name;
- }
-
- public function getNumber()
- {
- return $this->number;
- }
-
- public function setNumber($var)
- {
- GPBUtil::checkInt32($var);
- $this->number = $var;
- $this->has_number = true;
- }
-
- public function hasNumber()
- {
- return $this->has_number;
- }
-
- public function getLabel()
- {
- return $this->label;
- }
-
- public function setLabel($var)
- {
- GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto_Label::class);
- $this->label = $var;
- $this->has_label = true;
- }
-
- public function hasLabel()
- {
- return $this->has_label;
- }
-
- public function getType()
- {
- return $this->type;
- }
-
- public function setType($var)
- {
- GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto_Type::class);
- $this->type = $var;
- $this->has_type = true;
- }
-
- public function hasType()
- {
- return $this->has_type;
- }
-
- public function getTypeName()
- {
- return $this->type_name;
- }
-
- public function setTypeName($var)
- {
- GPBUtil::checkString($var, True);
- $this->type_name = $var;
- $this->has_type_name = true;
- }
-
- public function hasTypeName()
- {
- return $this->has_type_name;
- }
-
- public function getExtendee()
- {
- return $this->extendee;
- }
-
- public function setExtendee($var)
- {
- GPBUtil::checkString($var, True);
- $this->extendee = $var;
- $this->has_extendee = true;
- }
-
- public function hasExtendee()
- {
- return $this->has_extendee;
- }
-
- public function getDefaultValue()
- {
- return $this->default_value;
- }
-
- public function setDefaultValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->default_value = $var;
- $this->has_default_value = true;
- }
-
- public function hasDefaultValue()
- {
- return $this->has_default_value;
- }
-
- public function getOneofIndex()
- {
- return $this->oneof_index;
- }
-
- public function setOneofIndex($var)
- {
- GPBUtil::checkInt32($var);
- $this->oneof_index = $var;
- $this->has_oneof_index = true;
- }
-
- public function hasOneofIndex()
- {
- return $this->has_oneof_index;
- }
-
- public function getJsonName()
- {
- return $this->json_name;
- }
-
- public function setJsonName($var)
- {
- GPBUtil::checkString($var, True);
- $this->json_name = $var;
- $this->has_json_name = true;
- }
-
- public function hasJsonName()
- {
- return $this->has_json_name;
- }
-
- public function getOptions()
- {
- return $this->options;
- }
-
- public function setOptions(&$var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FieldOptions::class);
- $this->options = $var;
- $this->has_options = true;
- }
-
- public function hasOptions()
- {
- return $this->has_options;
- }
-
-}
-
-class FieldDescriptorProto_Type
-{
- const TYPE_DOUBLE = 1;
- const TYPE_FLOAT = 2;
- const TYPE_INT64 = 3;
- const TYPE_UINT64 = 4;
- const TYPE_INT32 = 5;
- const TYPE_FIXED64 = 6;
- const TYPE_FIXED32 = 7;
- const TYPE_BOOL = 8;
- const TYPE_STRING = 9;
- const TYPE_GROUP = 10;
- const TYPE_MESSAGE = 11;
- const TYPE_BYTES = 12;
- const TYPE_UINT32 = 13;
- const TYPE_ENUM = 14;
- const TYPE_SFIXED32 = 15;
- const TYPE_SFIXED64 = 16;
- const TYPE_SINT32 = 17;
- const TYPE_SINT64 = 18;
-}
-
-class FieldDescriptorProto_Label
-{
- const LABEL_OPTIONAL = 1;
- const LABEL_REQUIRED = 2;
- const LABEL_REPEATED = 3;
-}
-
-class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
-{
- private $name = '';
- private $has_name = false;
- private $options = null;
- private $has_options = false;
-
- public function getName()
- {
- return $this->name;
- }
-
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
- $this->has_name = true;
- }
-
- public function hasName()
- {
- return $this->has_name;
- }
-
- public function getOptions()
- {
- return $this->options;
- }
-
- public function setOptions(&$var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Internal\OneofOptions::class);
- $this->options = $var;
- $this->has_options = true;
- }
-
- public function hasOptions()
- {
- return $this->has_options;
- }
-
-}
-
-class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
-{
- private $name = '';
- private $has_name = false;
- private $value;
- private $has_value = false;
- private $options = null;
- private $has_options = false;
-
- public function getName()
- {
- return $this->name;
- }
-
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
- $this->has_name = true;
- }
-
- public function hasName()
- {
- return $this->has_name;
- }
-
- public function getValue()
- {
- return $this->value;
- }
-
- public function setValue(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\EnumValueDescriptorProto::class);
- $this->value = $var;
- $this->has_value = true;
- }
-
- public function hasValue()
- {
- return $this->has_value;
- }
-
- public function getOptions()
- {
- return $this->options;
- }
-
- public function setOptions(&$var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumOptions::class);
- $this->options = $var;
- $this->has_options = true;
- }
-
- public function hasOptions()
- {
- return $this->has_options;
- }
-
-}
-
-class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
-{
- private $name = '';
- private $has_name = false;
- private $number = 0;
- private $has_number = false;
- private $options = null;
- private $has_options = false;
-
- public function getName()
- {
- return $this->name;
- }
-
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
- $this->has_name = true;
- }
-
- public function hasName()
- {
- return $this->has_name;
- }
-
- public function getNumber()
- {
- return $this->number;
- }
-
- public function setNumber($var)
- {
- GPBUtil::checkInt32($var);
- $this->number = $var;
- $this->has_number = true;
- }
-
- public function hasNumber()
- {
- return $this->has_number;
- }
-
- public function getOptions()
- {
- return $this->options;
- }
-
- public function setOptions(&$var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumValueOptions::class);
- $this->options = $var;
- $this->has_options = true;
- }
-
- public function hasOptions()
- {
- return $this->has_options;
- }
-
-}
-
-class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
-{
- private $name = '';
- private $has_name = false;
- private $method;
- private $has_method = false;
- private $options = null;
- private $has_options = false;
-
- public function getName()
- {
- return $this->name;
- }
-
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
- $this->has_name = true;
- }
-
- public function hasName()
- {
- return $this->has_name;
- }
-
- public function getMethod()
- {
- return $this->method;
- }
-
- public function setMethod(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\MethodDescriptorProto::class);
- $this->method = $var;
- $this->has_method = true;
- }
-
- public function hasMethod()
- {
- return $this->has_method;
- }
-
- public function getOptions()
- {
- return $this->options;
- }
-
- public function setOptions(&$var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ServiceOptions::class);
- $this->options = $var;
- $this->has_options = true;
- }
-
- public function hasOptions()
- {
- return $this->has_options;
- }
-
-}
-
-class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
-{
- private $name = '';
- private $has_name = false;
- private $input_type = '';
- private $has_input_type = false;
- private $output_type = '';
- private $has_output_type = false;
- private $options = null;
- private $has_options = false;
- private $client_streaming = false;
- private $has_client_streaming = false;
- private $server_streaming = false;
- private $has_server_streaming = false;
-
- public function getName()
- {
- return $this->name;
- }
-
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
- $this->has_name = true;
- }
-
- public function hasName()
- {
- return $this->has_name;
- }
-
- public function getInputType()
- {
- return $this->input_type;
- }
-
- public function setInputType($var)
- {
- GPBUtil::checkString($var, True);
- $this->input_type = $var;
- $this->has_input_type = true;
- }
-
- public function hasInputType()
- {
- return $this->has_input_type;
- }
-
- public function getOutputType()
- {
- return $this->output_type;
- }
-
- public function setOutputType($var)
- {
- GPBUtil::checkString($var, True);
- $this->output_type = $var;
- $this->has_output_type = true;
- }
-
- public function hasOutputType()
- {
- return $this->has_output_type;
- }
-
- public function getOptions()
- {
- return $this->options;
- }
-
- public function setOptions(&$var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MethodOptions::class);
- $this->options = $var;
- $this->has_options = true;
- }
-
- public function hasOptions()
- {
- return $this->has_options;
- }
-
- public function getClientStreaming()
- {
- return $this->client_streaming;
- }
-
- public function setClientStreaming($var)
- {
- GPBUtil::checkBool($var);
- $this->client_streaming = $var;
- $this->has_client_streaming = true;
- }
-
- public function hasClientStreaming()
- {
- return $this->has_client_streaming;
- }
-
- public function getServerStreaming()
- {
- return $this->server_streaming;
- }
-
- public function setServerStreaming($var)
- {
- GPBUtil::checkBool($var);
- $this->server_streaming = $var;
- $this->has_server_streaming = true;
- }
-
- public function hasServerStreaming()
- {
- return $this->has_server_streaming;
- }
-
-}
-
-class FileOptions extends \Google\Protobuf\Internal\Message
-{
- private $java_package = '';
- private $has_java_package = false;
- private $java_outer_classname = '';
- private $has_java_outer_classname = false;
- private $java_multiple_files = false;
- private $has_java_multiple_files = false;
- private $java_generate_equals_and_hash = false;
- private $has_java_generate_equals_and_hash = false;
- private $java_string_check_utf8 = false;
- private $has_java_string_check_utf8 = false;
- private $optimize_for = 0;
- private $has_optimize_for = false;
- private $go_package = '';
- private $has_go_package = false;
- private $cc_generic_services = false;
- private $has_cc_generic_services = false;
- private $java_generic_services = false;
- private $has_java_generic_services = false;
- private $py_generic_services = false;
- private $has_py_generic_services = false;
- private $deprecated = false;
- private $has_deprecated = false;
- private $cc_enable_arenas = false;
- private $has_cc_enable_arenas = false;
- private $objc_class_prefix = '';
- private $has_objc_class_prefix = false;
- private $csharp_namespace = '';
- private $has_csharp_namespace = false;
- private $uninterpreted_option;
- private $has_uninterpreted_option = false;
-
- public function getJavaPackage()
- {
- return $this->java_package;
- }
-
- public function setJavaPackage($var)
- {
- GPBUtil::checkString($var, True);
- $this->java_package = $var;
- $this->has_java_package = true;
- }
-
- public function hasJavaPackage()
- {
- return $this->has_java_package;
- }
-
- public function getJavaOuterClassname()
- {
- return $this->java_outer_classname;
- }
-
- public function setJavaOuterClassname($var)
- {
- GPBUtil::checkString($var, True);
- $this->java_outer_classname = $var;
- $this->has_java_outer_classname = true;
- }
-
- public function hasJavaOuterClassname()
- {
- return $this->has_java_outer_classname;
- }
-
- public function getJavaMultipleFiles()
- {
- return $this->java_multiple_files;
- }
-
- public function setJavaMultipleFiles($var)
- {
- GPBUtil::checkBool($var);
- $this->java_multiple_files = $var;
- $this->has_java_multiple_files = true;
- }
-
- public function hasJavaMultipleFiles()
- {
- return $this->has_java_multiple_files;
- }
-
- public function getJavaGenerateEqualsAndHash()
- {
- return $this->java_generate_equals_and_hash;
- }
-
- public function setJavaGenerateEqualsAndHash($var)
- {
- GPBUtil::checkBool($var);
- $this->java_generate_equals_and_hash = $var;
- $this->has_java_generate_equals_and_hash = true;
- }
-
- public function hasJavaGenerateEqualsAndHash()
- {
- return $this->has_java_generate_equals_and_hash;
- }
-
- public function getJavaStringCheckUtf8()
- {
- return $this->java_string_check_utf8;
- }
-
- public function setJavaStringCheckUtf8($var)
- {
- GPBUtil::checkBool($var);
- $this->java_string_check_utf8 = $var;
- $this->has_java_string_check_utf8 = true;
- }
-
- public function hasJavaStringCheckUtf8()
- {
- return $this->has_java_string_check_utf8;
- }
-
- public function getOptimizeFor()
- {
- return $this->optimize_for;
- }
-
- public function setOptimizeFor($var)
- {
- GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FileOptions_OptimizeMode::class);
- $this->optimize_for = $var;
- $this->has_optimize_for = true;
- }
-
- public function hasOptimizeFor()
- {
- return $this->has_optimize_for;
- }
-
- public function getGoPackage()
- {
- return $this->go_package;
- }
-
- public function setGoPackage($var)
- {
- GPBUtil::checkString($var, True);
- $this->go_package = $var;
- $this->has_go_package = true;
- }
-
- public function hasGoPackage()
- {
- return $this->has_go_package;
- }
-
- public function getCcGenericServices()
- {
- return $this->cc_generic_services;
- }
-
- public function setCcGenericServices($var)
- {
- GPBUtil::checkBool($var);
- $this->cc_generic_services = $var;
- $this->has_cc_generic_services = true;
- }
-
- public function hasCcGenericServices()
- {
- return $this->has_cc_generic_services;
- }
-
- public function getJavaGenericServices()
- {
- return $this->java_generic_services;
- }
-
- public function setJavaGenericServices($var)
- {
- GPBUtil::checkBool($var);
- $this->java_generic_services = $var;
- $this->has_java_generic_services = true;
- }
-
- public function hasJavaGenericServices()
- {
- return $this->has_java_generic_services;
- }
-
- public function getPyGenericServices()
- {
- return $this->py_generic_services;
- }
-
- public function setPyGenericServices($var)
- {
- GPBUtil::checkBool($var);
- $this->py_generic_services = $var;
- $this->has_py_generic_services = true;
- }
-
- public function hasPyGenericServices()
- {
- return $this->has_py_generic_services;
- }
-
- public function getDeprecated()
- {
- return $this->deprecated;
- }
-
- public function setDeprecated($var)
- {
- GPBUtil::checkBool($var);
- $this->deprecated = $var;
- $this->has_deprecated = true;
- }
-
- public function hasDeprecated()
- {
- return $this->has_deprecated;
- }
-
- public function getCcEnableArenas()
- {
- return $this->cc_enable_arenas;
- }
-
- public function setCcEnableArenas($var)
- {
- GPBUtil::checkBool($var);
- $this->cc_enable_arenas = $var;
- $this->has_cc_enable_arenas = true;
- }
-
- public function hasCcEnableArenas()
- {
- return $this->has_cc_enable_arenas;
- }
-
- public function getObjcClassPrefix()
- {
- return $this->objc_class_prefix;
- }
-
- public function setObjcClassPrefix($var)
- {
- GPBUtil::checkString($var, True);
- $this->objc_class_prefix = $var;
- $this->has_objc_class_prefix = true;
- }
-
- public function hasObjcClassPrefix()
- {
- return $this->has_objc_class_prefix;
- }
-
- public function getCsharpNamespace()
- {
- return $this->csharp_namespace;
- }
-
- public function setCsharpNamespace($var)
- {
- GPBUtil::checkString($var, True);
- $this->csharp_namespace = $var;
- $this->has_csharp_namespace = true;
- }
-
- public function hasCsharpNamespace()
- {
- return $this->has_csharp_namespace;
- }
-
- public function getUninterpretedOption()
- {
- return $this->uninterpreted_option;
- }
-
- public function setUninterpretedOption(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
- $this->has_uninterpreted_option = true;
- }
-
- public function hasUninterpretedOption()
- {
- return $this->has_uninterpreted_option;
- }
-
-}
-
-class FileOptions_OptimizeMode
-{
- const SPEED = 1;
- const CODE_SIZE = 2;
- const LITE_RUNTIME = 3;
-}
-
-class MessageOptions extends \Google\Protobuf\Internal\Message
-{
- private $message_set_wire_format = false;
- private $has_message_set_wire_format = false;
- private $no_standard_descriptor_accessor = false;
- private $has_no_standard_descriptor_accessor = false;
- private $deprecated = false;
- private $has_deprecated = false;
- private $map_entry = false;
- private $has_map_entry = false;
- private $uninterpreted_option;
- private $has_uninterpreted_option = false;
-
- public function getMessageSetWireFormat()
- {
- return $this->message_set_wire_format;
- }
-
- public function setMessageSetWireFormat($var)
- {
- GPBUtil::checkBool($var);
- $this->message_set_wire_format = $var;
- $this->has_message_set_wire_format = true;
- }
-
- public function hasMessageSetWireFormat()
- {
- return $this->has_message_set_wire_format;
- }
-
- public function getNoStandardDescriptorAccessor()
- {
- return $this->no_standard_descriptor_accessor;
- }
-
- public function setNoStandardDescriptorAccessor($var)
- {
- GPBUtil::checkBool($var);
- $this->no_standard_descriptor_accessor = $var;
- $this->has_no_standard_descriptor_accessor = true;
- }
-
- public function hasNoStandardDescriptorAccessor()
- {
- return $this->has_no_standard_descriptor_accessor;
- }
-
- public function getDeprecated()
- {
- return $this->deprecated;
- }
-
- public function setDeprecated($var)
- {
- GPBUtil::checkBool($var);
- $this->deprecated = $var;
- $this->has_deprecated = true;
- }
-
- public function hasDeprecated()
- {
- return $this->has_deprecated;
- }
-
- public function getMapEntry()
- {
- return $this->map_entry;
- }
-
- public function setMapEntry($var)
- {
- GPBUtil::checkBool($var);
- $this->map_entry = $var;
- $this->has_map_entry = true;
- }
-
- public function hasMapEntry()
- {
- return $this->has_map_entry;
- }
-
- public function getUninterpretedOption()
- {
- return $this->uninterpreted_option;
- }
-
- public function setUninterpretedOption(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
- $this->has_uninterpreted_option = true;
- }
-
- public function hasUninterpretedOption()
- {
- return $this->has_uninterpreted_option;
- }
-
-}
-
-class FieldOptions extends \Google\Protobuf\Internal\Message
-{
- private $ctype = 0;
- private $has_ctype = false;
- private $packed = false;
- private $has_packed = false;
- private $jstype = 0;
- private $has_jstype = false;
- private $lazy = false;
- private $has_lazy = false;
- private $deprecated = false;
- private $has_deprecated = false;
- private $weak = false;
- private $has_weak = false;
- private $uninterpreted_option;
- private $has_uninterpreted_option = false;
-
- public function getCtype()
- {
- return $this->ctype;
- }
-
- public function setCtype($var)
- {
- GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions_CType::class);
- $this->ctype = $var;
- $this->has_ctype = true;
- }
-
- public function hasCtype()
- {
- return $this->has_ctype;
- }
-
- public function getPacked()
- {
- return $this->packed;
- }
-
- public function setPacked($var)
- {
- GPBUtil::checkBool($var);
- $this->packed = $var;
- $this->has_packed = true;
- }
-
- public function hasPacked()
- {
- return $this->has_packed;
- }
-
- public function getJstype()
- {
- return $this->jstype;
- }
-
- public function setJstype($var)
- {
- GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions_JSType::class);
- $this->jstype = $var;
- $this->has_jstype = true;
- }
-
- public function hasJstype()
- {
- return $this->has_jstype;
- }
-
- public function getLazy()
- {
- return $this->lazy;
- }
-
- public function setLazy($var)
- {
- GPBUtil::checkBool($var);
- $this->lazy = $var;
- $this->has_lazy = true;
- }
-
- public function hasLazy()
- {
- return $this->has_lazy;
- }
-
- public function getDeprecated()
- {
- return $this->deprecated;
- }
-
- public function setDeprecated($var)
- {
- GPBUtil::checkBool($var);
- $this->deprecated = $var;
- $this->has_deprecated = true;
- }
-
- public function hasDeprecated()
- {
- return $this->has_deprecated;
- }
-
- public function getWeak()
- {
- return $this->weak;
- }
-
- public function setWeak($var)
- {
- GPBUtil::checkBool($var);
- $this->weak = $var;
- $this->has_weak = true;
- }
-
- public function hasWeak()
- {
- return $this->has_weak;
- }
-
- public function getUninterpretedOption()
- {
- return $this->uninterpreted_option;
- }
-
- public function setUninterpretedOption(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
- $this->has_uninterpreted_option = true;
- }
-
- public function hasUninterpretedOption()
- {
- return $this->has_uninterpreted_option;
- }
-
-}
-
-class FieldOptions_CType
-{
- const STRING = 0;
- const CORD = 1;
- const STRING_PIECE = 2;
-}
-
-class FieldOptions_JSType
-{
- const JS_NORMAL = 0;
- const JS_STRING = 1;
- const JS_NUMBER = 2;
-}
-
-class OneofOptions extends \Google\Protobuf\Internal\Message
-{
- private $uninterpreted_option;
- private $has_uninterpreted_option = false;
-
- public function getUninterpretedOption()
- {
- return $this->uninterpreted_option;
- }
-
- public function setUninterpretedOption(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
- $this->has_uninterpreted_option = true;
- }
-
- public function hasUninterpretedOption()
- {
- return $this->has_uninterpreted_option;
- }
-
-}
-
-class EnumOptions extends \Google\Protobuf\Internal\Message
-{
- private $allow_alias = false;
- private $has_allow_alias = false;
- private $deprecated = false;
- private $has_deprecated = false;
- private $uninterpreted_option;
- private $has_uninterpreted_option = false;
-
- public function getAllowAlias()
- {
- return $this->allow_alias;
- }
-
- public function setAllowAlias($var)
- {
- GPBUtil::checkBool($var);
- $this->allow_alias = $var;
- $this->has_allow_alias = true;
- }
-
- public function hasAllowAlias()
- {
- return $this->has_allow_alias;
- }
-
- public function getDeprecated()
- {
- return $this->deprecated;
- }
-
- public function setDeprecated($var)
- {
- GPBUtil::checkBool($var);
- $this->deprecated = $var;
- $this->has_deprecated = true;
- }
-
- public function hasDeprecated()
- {
- return $this->has_deprecated;
- }
-
- public function getUninterpretedOption()
- {
- return $this->uninterpreted_option;
- }
-
- public function setUninterpretedOption(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
- $this->has_uninterpreted_option = true;
- }
-
- public function hasUninterpretedOption()
- {
- return $this->has_uninterpreted_option;
- }
-
-}
-
-class EnumValueOptions extends \Google\Protobuf\Internal\Message
-{
- private $deprecated = false;
- private $has_deprecated = false;
- private $uninterpreted_option;
- private $has_uninterpreted_option = false;
-
- public function getDeprecated()
- {
- return $this->deprecated;
- }
-
- public function setDeprecated($var)
- {
- GPBUtil::checkBool($var);
- $this->deprecated = $var;
- $this->has_deprecated = true;
- }
-
- public function hasDeprecated()
- {
- return $this->has_deprecated;
- }
-
- public function getUninterpretedOption()
- {
- return $this->uninterpreted_option;
- }
-
- public function setUninterpretedOption(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
- $this->has_uninterpreted_option = true;
- }
-
- public function hasUninterpretedOption()
- {
- return $this->has_uninterpreted_option;
- }
-
-}
-
-class ServiceOptions extends \Google\Protobuf\Internal\Message
-{
- private $deprecated = false;
- private $has_deprecated = false;
- private $uninterpreted_option;
- private $has_uninterpreted_option = false;
-
- public function getDeprecated()
- {
- return $this->deprecated;
- }
-
- public function setDeprecated($var)
- {
- GPBUtil::checkBool($var);
- $this->deprecated = $var;
- $this->has_deprecated = true;
- }
-
- public function hasDeprecated()
- {
- return $this->has_deprecated;
- }
-
- public function getUninterpretedOption()
- {
- return $this->uninterpreted_option;
- }
-
- public function setUninterpretedOption(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
- $this->has_uninterpreted_option = true;
- }
-
- public function hasUninterpretedOption()
- {
- return $this->has_uninterpreted_option;
- }
-
-}
-
-class MethodOptions extends \Google\Protobuf\Internal\Message
-{
- private $deprecated = false;
- private $has_deprecated = false;
- private $uninterpreted_option;
- private $has_uninterpreted_option = false;
-
- public function getDeprecated()
- {
- return $this->deprecated;
- }
-
- public function setDeprecated($var)
- {
- GPBUtil::checkBool($var);
- $this->deprecated = $var;
- $this->has_deprecated = true;
- }
-
- public function hasDeprecated()
- {
- return $this->has_deprecated;
- }
-
- public function getUninterpretedOption()
- {
- return $this->uninterpreted_option;
- }
-
- public function setUninterpretedOption(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
- $this->has_uninterpreted_option = true;
- }
-
- public function hasUninterpretedOption()
- {
- return $this->has_uninterpreted_option;
- }
-
-}
-
-class UninterpretedOption extends \Google\Protobuf\Internal\Message
-{
- private $name;
- private $has_name = false;
- private $identifier_value = '';
- private $has_identifier_value = false;
- private $positive_int_value = 0;
- private $has_positive_int_value = false;
- private $negative_int_value = 0;
- private $has_negative_int_value = false;
- private $double_value = 0.0;
- private $has_double_value = false;
- private $string_value = '';
- private $has_string_value = false;
- private $aggregate_value = '';
- private $has_aggregate_value = false;
-
- public function getName()
- {
- return $this->name;
- }
-
- public function setName(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption_NamePart::class);
- $this->name = $var;
- $this->has_name = true;
- }
-
- public function hasName()
- {
- return $this->has_name;
- }
-
- public function getIdentifierValue()
- {
- return $this->identifier_value;
- }
-
- public function setIdentifierValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->identifier_value = $var;
- $this->has_identifier_value = true;
- }
-
- public function hasIdentifierValue()
- {
- return $this->has_identifier_value;
- }
-
- public function getPositiveIntValue()
- {
- return $this->positive_int_value;
- }
-
- public function setPositiveIntValue($var)
- {
- GPBUtil::checkUint64($var);
- $this->positive_int_value = $var;
- $this->has_positive_int_value = true;
- }
-
- public function hasPositiveIntValue()
- {
- return $this->has_positive_int_value;
- }
-
- public function getNegativeIntValue()
- {
- return $this->negative_int_value;
- }
-
- public function setNegativeIntValue($var)
- {
- GPBUtil::checkInt64($var);
- $this->negative_int_value = $var;
- $this->has_negative_int_value = true;
- }
-
- public function hasNegativeIntValue()
- {
- return $this->has_negative_int_value;
- }
-
- public function getDoubleValue()
- {
- return $this->double_value;
- }
-
- public function setDoubleValue($var)
- {
- GPBUtil::checkDouble($var);
- $this->double_value = $var;
- $this->has_double_value = true;
- }
-
- public function hasDoubleValue()
- {
- return $this->has_double_value;
- }
-
- public function getStringValue()
- {
- return $this->string_value;
- }
-
- public function setStringValue($var)
- {
- GPBUtil::checkString($var, False);
- $this->string_value = $var;
- $this->has_string_value = true;
- }
-
- public function hasStringValue()
- {
- return $this->has_string_value;
- }
-
- public function getAggregateValue()
- {
- return $this->aggregate_value;
- }
-
- public function setAggregateValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->aggregate_value = $var;
- $this->has_aggregate_value = true;
- }
-
- public function hasAggregateValue()
- {
- return $this->has_aggregate_value;
- }
-
-}
-
-class UninterpretedOption_NamePart extends \Google\Protobuf\Internal\Message
-{
- private $name_part = '';
- private $has_name_part = false;
- private $is_extension = false;
- private $has_is_extension = false;
-
- public function getNamePart()
- {
- return $this->name_part;
- }
-
- public function setNamePart($var)
- {
- GPBUtil::checkString($var, True);
- $this->name_part = $var;
- $this->has_name_part = true;
- }
-
- public function hasNamePart()
- {
- return $this->has_name_part;
- }
-
- public function getIsExtension()
- {
- return $this->is_extension;
- }
-
- public function setIsExtension($var)
- {
- GPBUtil::checkBool($var);
- $this->is_extension = $var;
- $this->has_is_extension = true;
- }
-
- public function hasIsExtension()
- {
- return $this->has_is_extension;
- }
-
-}
-
-class SourceCodeInfo extends \Google\Protobuf\Internal\Message
-{
- private $location;
- private $has_location = false;
-
- public function getLocation()
- {
- return $this->location;
- }
-
- public function setLocation(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\SourceCodeInfo_Location::class);
- $this->location = $var;
- $this->has_location = true;
- }
-
- public function hasLocation()
- {
- return $this->has_location;
- }
-
-}
-
-class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
-{
- private $path;
- private $has_path = false;
- private $span;
- private $has_span = false;
- private $leading_comments = '';
- private $has_leading_comments = false;
- private $trailing_comments = '';
- private $has_trailing_comments = false;
- private $leading_detached_comments;
- private $has_leading_detached_comments = false;
-
- public function getPath()
- {
- return $this->path;
- }
-
- public function setPath(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT32);
- $this->path = $var;
- $this->has_path = true;
- }
-
- public function hasPath()
- {
- return $this->has_path;
- }
-
- public function getSpan()
- {
- return $this->span;
- }
-
- public function setSpan(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT32);
- $this->span = $var;
- $this->has_span = true;
- }
-
- public function hasSpan()
- {
- return $this->has_span;
- }
-
- public function getLeadingComments()
- {
- return $this->leading_comments;
- }
-
- public function setLeadingComments($var)
- {
- GPBUtil::checkString($var, True);
- $this->leading_comments = $var;
- $this->has_leading_comments = true;
- }
-
- public function hasLeadingComments()
- {
- return $this->has_leading_comments;
- }
-
- public function getTrailingComments()
- {
- return $this->trailing_comments;
- }
-
- public function setTrailingComments($var)
- {
- GPBUtil::checkString($var, True);
- $this->trailing_comments = $var;
- $this->has_trailing_comments = true;
- }
-
- public function hasTrailingComments()
- {
- return $this->has_trailing_comments;
- }
-
- public function getLeadingDetachedComments()
- {
- return $this->leading_detached_comments;
- }
-
- public function setLeadingDetachedComments(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::STRING);
- $this->leading_detached_comments = $var;
- $this->has_leading_detached_comments = true;
- }
-
- public function hasLeadingDetachedComments()
- {
- return $this->has_leading_detached_comments;
- }
-
-}
-
-class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
-{
- private $annotation;
- private $has_annotation = false;
-
- public function getAnnotation()
- {
- return $this->annotation;
- }
-
- public function setAnnotation(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Google\Protobuf\Internal\GeneratedCodeInfo_Annotation::class);
- $this->annotation = $var;
- $this->has_annotation = true;
- }
-
- public function hasAnnotation()
- {
- return $this->has_annotation;
- }
-
-}
-
-class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
-{
- private $path;
- private $has_path = false;
- private $source_file = '';
- private $has_source_file = false;
- private $begin = 0;
- private $has_begin = false;
- private $end = 0;
- private $has_end = false;
-
- public function getPath()
- {
- return $this->path;
- }
-
- public function setPath(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT32);
- $this->path = $var;
- $this->has_path = true;
- }
-
- public function hasPath()
- {
- return $this->has_path;
- }
-
- public function getSourceFile()
- {
- return $this->source_file;
- }
-
- public function setSourceFile($var)
- {
- GPBUtil::checkString($var, True);
- $this->source_file = $var;
- $this->has_source_file = true;
- }
-
- public function hasSourceFile()
- {
- return $this->has_source_file;
- }
-
- public function getBegin()
- {
- return $this->begin;
- }
-
- public function setBegin($var)
- {
- GPBUtil::checkInt32($var);
- $this->begin = $var;
- $this->has_begin = true;
- }
-
- public function hasBegin()
- {
- return $this->has_begin;
- }
-
- public function getEnd()
- {
- return $this->end;
- }
-
- public function setEnd($var)
- {
- GPBUtil::checkInt32($var);
- $this->end = $var;
- $this->has_end = true;
- }
-
- public function hasEnd()
- {
- return $this->has_end;
- }
-
-}
-
-$pool = DescriptorPool::getGeneratedPool();
-
-$pool->addMessage('google.protobuf.internal.FileDescriptorSet', FileDescriptorSet::class)
- ->repeated('file', GPBType::MESSAGE, 1, 'google.protobuf.internal.FileDescriptorProto')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.FileDescriptorProto', FileDescriptorProto::class)
- ->optional('name', GPBType::STRING, 1)
- ->optional('package', GPBType::STRING, 2)
- ->repeated('dependency', GPBType::STRING, 3)
- ->repeated('public_dependency', GPBType::INT32, 10)
- ->repeated('weak_dependency', GPBType::INT32, 11)
- ->repeated('message_type', GPBType::MESSAGE, 4, 'google.protobuf.internal.DescriptorProto')
- ->repeated('enum_type', GPBType::MESSAGE, 5, 'google.protobuf.internal.EnumDescriptorProto')
- ->repeated('service', GPBType::MESSAGE, 6, 'google.protobuf.internal.ServiceDescriptorProto')
- ->repeated('extension', GPBType::MESSAGE, 7, 'google.protobuf.internal.FieldDescriptorProto')
- ->optional('options', GPBType::MESSAGE, 8, 'google.protobuf.internal.FileOptions')
- ->optional('source_code_info', GPBType::MESSAGE, 9, 'google.protobuf.internal.SourceCodeInfo')
- ->optional('syntax', GPBType::STRING, 12)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.DescriptorProto', DescriptorProto::class)
- ->optional('name', GPBType::STRING, 1)
- ->repeated('field', GPBType::MESSAGE, 2, 'google.protobuf.internal.FieldDescriptorProto')
- ->repeated('extension', GPBType::MESSAGE, 6, 'google.protobuf.internal.FieldDescriptorProto')
- ->repeated('nested_type', GPBType::MESSAGE, 3, 'google.protobuf.internal.DescriptorProto')
- ->repeated('enum_type', GPBType::MESSAGE, 4, 'google.protobuf.internal.EnumDescriptorProto')
- ->repeated('extension_range', GPBType::MESSAGE, 5, 'google.protobuf.internal.DescriptorProto.ExtensionRange')
- ->repeated('oneof_decl', GPBType::MESSAGE, 8, 'google.protobuf.internal.OneofDescriptorProto')
- ->optional('options', GPBType::MESSAGE, 7, 'google.protobuf.internal.MessageOptions')
- ->repeated('reserved_range', GPBType::MESSAGE, 9, 'google.protobuf.internal.DescriptorProto.ReservedRange')
- ->repeated('reserved_name', GPBType::STRING, 10)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.DescriptorProto.ExtensionRange', DescriptorProto_ExtensionRange::class)
- ->optional('start', GPBType::INT32, 1)
- ->optional('end', GPBType::INT32, 2)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.DescriptorProto.ReservedRange', DescriptorProto_ReservedRange::class)
- ->optional('start', GPBType::INT32, 1)
- ->optional('end', GPBType::INT32, 2)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.FieldDescriptorProto', FieldDescriptorProto::class)
- ->optional('name', GPBType::STRING, 1)
- ->optional('number', GPBType::INT32, 3)
- ->optional('label', GPBType::ENUM, 4, 'google.protobuf.internal.FieldDescriptorProto.Label')
- ->optional('type', GPBType::ENUM, 5, 'google.protobuf.internal.FieldDescriptorProto.Type')
- ->optional('type_name', GPBType::STRING, 6)
- ->optional('extendee', GPBType::STRING, 2)
- ->optional('default_value', GPBType::STRING, 7)
- ->optional('oneof_index', GPBType::INT32, 9)
- ->optional('json_name', GPBType::STRING, 10)
- ->optional('options', GPBType::MESSAGE, 8, 'google.protobuf.internal.FieldOptions')
- ->finalizeToPool();
-
-$pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Type', Type::class)
- ->value("TYPE_DOUBLE", 1)
- ->value("TYPE_FLOAT", 2)
- ->value("TYPE_INT64", 3)
- ->value("TYPE_UINT64", 4)
- ->value("TYPE_INT32", 5)
- ->value("TYPE_FIXED64", 6)
- ->value("TYPE_FIXED32", 7)
- ->value("TYPE_BOOL", 8)
- ->value("TYPE_STRING", 9)
- ->value("TYPE_GROUP", 10)
- ->value("TYPE_MESSAGE", 11)
- ->value("TYPE_BYTES", 12)
- ->value("TYPE_UINT32", 13)
- ->value("TYPE_ENUM", 14)
- ->value("TYPE_SFIXED32", 15)
- ->value("TYPE_SFIXED64", 16)
- ->value("TYPE_SINT32", 17)
- ->value("TYPE_SINT64", 18)
- ->finalizeToPool();
-
-$pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Label', Label::class)
- ->value("LABEL_OPTIONAL", 1)
- ->value("LABEL_REQUIRED", 2)
- ->value("LABEL_REPEATED", 3)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.OneofDescriptorProto', OneofDescriptorProto::class)
- ->optional('name', GPBType::STRING, 1)
- ->optional('options', GPBType::MESSAGE, 2, 'google.protobuf.internal.OneofOptions')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.EnumDescriptorProto', EnumDescriptorProto::class)
- ->optional('name', GPBType::STRING, 1)
- ->repeated('value', GPBType::MESSAGE, 2, 'google.protobuf.internal.EnumValueDescriptorProto')
- ->optional('options', GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumOptions')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.EnumValueDescriptorProto', EnumValueDescriptorProto::class)
- ->optional('name', GPBType::STRING, 1)
- ->optional('number', GPBType::INT32, 2)
- ->optional('options', GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumValueOptions')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.ServiceDescriptorProto', ServiceDescriptorProto::class)
- ->optional('name', GPBType::STRING, 1)
- ->repeated('method', GPBType::MESSAGE, 2, 'google.protobuf.internal.MethodDescriptorProto')
- ->optional('options', GPBType::MESSAGE, 3, 'google.protobuf.internal.ServiceOptions')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.MethodDescriptorProto', MethodDescriptorProto::class)
- ->optional('name', GPBType::STRING, 1)
- ->optional('input_type', GPBType::STRING, 2)
- ->optional('output_type', GPBType::STRING, 3)
- ->optional('options', GPBType::MESSAGE, 4, 'google.protobuf.internal.MethodOptions')
- ->optional('client_streaming', GPBType::BOOL, 5)
- ->optional('server_streaming', GPBType::BOOL, 6)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.FileOptions', FileOptions::class)
- ->optional('java_package', GPBType::STRING, 1)
- ->optional('java_outer_classname', GPBType::STRING, 8)
- ->optional('java_multiple_files', GPBType::BOOL, 10)
- ->optional('java_generate_equals_and_hash', GPBType::BOOL, 20)
- ->optional('java_string_check_utf8', GPBType::BOOL, 27)
- ->optional('optimize_for', GPBType::ENUM, 9, 'google.protobuf.internal.FileOptions.OptimizeMode')
- ->optional('go_package', GPBType::STRING, 11)
- ->optional('cc_generic_services', GPBType::BOOL, 16)
- ->optional('java_generic_services', GPBType::BOOL, 17)
- ->optional('py_generic_services', GPBType::BOOL, 18)
- ->optional('deprecated', GPBType::BOOL, 23)
- ->optional('cc_enable_arenas', GPBType::BOOL, 31)
- ->optional('objc_class_prefix', GPBType::STRING, 36)
- ->optional('csharp_namespace', GPBType::STRING, 37)
- ->repeated('uninterpreted_option', GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
- ->finalizeToPool();
-
-$pool->addEnum('google.protobuf.internal.FileOptions.OptimizeMode', OptimizeMode::class)
- ->value("SPEED", 1)
- ->value("CODE_SIZE", 2)
- ->value("LITE_RUNTIME", 3)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.MessageOptions', MessageOptions::class)
- ->optional('message_set_wire_format', GPBType::BOOL, 1)
- ->optional('no_standard_descriptor_accessor', GPBType::BOOL, 2)
- ->optional('deprecated', GPBType::BOOL, 3)
- ->optional('map_entry', GPBType::BOOL, 7)
- ->repeated('uninterpreted_option', GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.FieldOptions', FieldOptions::class)
- ->optional('ctype', GPBType::ENUM, 1, 'google.protobuf.internal.FieldOptions.CType')
- ->optional('packed', GPBType::BOOL, 2)
- ->optional('jstype', GPBType::ENUM, 6, 'google.protobuf.internal.FieldOptions.JSType')
- ->optional('lazy', GPBType::BOOL, 5)
- ->optional('deprecated', GPBType::BOOL, 3)
- ->optional('weak', GPBType::BOOL, 10)
- ->repeated('uninterpreted_option', GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
- ->finalizeToPool();
-
-$pool->addEnum('google.protobuf.internal.FieldOptions.CType', CType::class)
- ->value("STRING", 0)
- ->value("CORD", 1)
- ->value("STRING_PIECE", 2)
- ->finalizeToPool();
-
-$pool->addEnum('google.protobuf.internal.FieldOptions.JSType', JSType::class)
- ->value("JS_NORMAL", 0)
- ->value("JS_STRING", 1)
- ->value("JS_NUMBER", 2)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.OneofOptions', OneofOptions::class)
- ->repeated('uninterpreted_option', GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.EnumOptions', EnumOptions::class)
- ->optional('allow_alias', GPBType::BOOL, 2)
- ->optional('deprecated', GPBType::BOOL, 3)
- ->repeated('uninterpreted_option', GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.EnumValueOptions', EnumValueOptions::class)
- ->optional('deprecated', GPBType::BOOL, 1)
- ->repeated('uninterpreted_option', GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.ServiceOptions', ServiceOptions::class)
- ->optional('deprecated', GPBType::BOOL, 33)
- ->repeated('uninterpreted_option', GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.MethodOptions', MethodOptions::class)
- ->optional('deprecated', GPBType::BOOL, 33)
- ->repeated('uninterpreted_option', GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.UninterpretedOption', UninterpretedOption::class)
- ->repeated('name', GPBType::MESSAGE, 2, 'google.protobuf.internal.UninterpretedOption.NamePart')
- ->optional('identifier_value', GPBType::STRING, 3)
- ->optional('positive_int_value', GPBType::UINT64, 4)
- ->optional('negative_int_value', GPBType::INT64, 5)
- ->optional('double_value', GPBType::DOUBLE, 6)
- ->optional('string_value', GPBType::BYTES, 7)
- ->optional('aggregate_value', GPBType::STRING, 8)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.UninterpretedOption.NamePart', UninterpretedOption_NamePart::class)
- ->required('name_part', GPBType::STRING, 1)
- ->required('is_extension', GPBType::BOOL, 2)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.SourceCodeInfo', SourceCodeInfo::class)
- ->repeated('location', GPBType::MESSAGE, 1, 'google.protobuf.internal.SourceCodeInfo.Location')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.SourceCodeInfo.Location', SourceCodeInfo_Location::class)
- ->repeated('path', GPBType::INT32, 1)
- ->repeated('span', GPBType::INT32, 2)
- ->optional('leading_comments', GPBType::STRING, 3)
- ->optional('trailing_comments', GPBType::STRING, 4)
- ->repeated('leading_detached_comments', GPBType::STRING, 6)
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.GeneratedCodeInfo', GeneratedCodeInfo::class)
- ->repeated('annotation', GPBType::MESSAGE, 1, 'google.protobuf.internal.GeneratedCodeInfo.Annotation')
- ->finalizeToPool();
-
-$pool->addMessage('google.protobuf.internal.GeneratedCodeInfo.Annotation', GeneratedCodeInfo_Annotation::class)
- ->repeated('path', GPBType::INT32, 1)
- ->optional('source_file', GPBType::STRING, 2)
- ->optional('begin', GPBType::INT32, 3)
- ->optional('end', GPBType::INT32, 4)
- ->finalizeToPool();
-
-$pool->finish();
diff --git a/php/tests/array_test.php b/php/tests/array_test.php
index a79a08bc..a4cad719 100644
--- a/php/tests/array_test.php
+++ b/php/tests/array_test.php
@@ -1,6 +1,5 @@
<?php
-require_once('test.pb.php');
require_once('test_util.php');
use Google\Protobuf\Internal\RepeatedField;
diff --git a/php/tests/autoload.php b/php/tests/autoload.php
new file mode 100755
index 00000000..0a917fc5
--- /dev/null
+++ b/php/tests/autoload.php
@@ -0,0 +1,25 @@
+<?php
+
+function getGeneratedFiles($dir, &$results = array())
+{
+ $files = scandir($dir);
+
+ foreach ($files as $key => $value) {
+ $path = realpath($dir.DIRECTORY_SEPARATOR.$value);
+ if (!is_dir($path)) {
+ $results[] = $path;
+ } else if ($value != "." && $value != "..") {
+ getGeneratedFiles($path, $results);
+ }
+ }
+ return $results;
+}
+
+foreach (getGeneratedFiles("generated") as $filename)
+{
+ if (!is_dir($filename)) {
+ include_once $filename;
+ }
+
+}
+
diff --git a/php/tests/encode_decode_test.php b/php/tests/encode_decode_test.php
index d07907c0..af9c0415 100644
--- a/php/tests/encode_decode_test.php
+++ b/php/tests/encode_decode_test.php
@@ -1,6 +1,5 @@
<?php
-require_once('test.pb.php');
require_once('test_base.php');
require_once('test_util.php');
diff --git a/php/tests/gdb_test.sh b/php/tests/gdb_test.sh
new file mode 100755
index 00000000..3c0d97a2
--- /dev/null
+++ b/php/tests/gdb_test.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# gdb --args php -dextension=../ext/google/protobuf/modules/protobuf.so `which
+# phpunit` --bootstrap autoload.php tmp_test.php
+#
+gdb --args php -dextension=../ext/google/protobuf/modules/protobuf.so `which phpunit` --bootstrap autoload.php encode_decode_test.php
+#
+# # gdb --args php -dextension=../ext/google/protobuf/modules/protobuf.so
+# memory_leak_test.php
+#
+# # USE_ZEND_ALLOC=0 valgrind --leak-check=yes php
+# -dextension=../ext/google/protobuf/modules/protobuf.so memory_leak_test.php
diff --git a/php/tests/generated_class_test.php b/php/tests/generated_class_test.php
index b3ecd3a1..27912ecd 100644
--- a/php/tests/generated_class_test.php
+++ b/php/tests/generated_class_test.php
@@ -1,7 +1,6 @@
<?php
-require_once('test.pb.php');
-require_once('test_no_namespace.pb.php');
+require_once('generated/NoNameSpace.php');
require_once('test_util.php');
use Google\Protobuf\Internal\RepeatedField;
diff --git a/php/tests/google/protobuf/empty.pb.php b/php/tests/google/protobuf/empty.pb.php
deleted file mode 100644
index fdd0fe4f..00000000
--- a/php/tests/google/protobuf/empty.pb.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: google/protobuf/empty.proto
-
-namespace Google\Protobuf;
-
-use Google\Protobuf\Internal\DescriptorPool;
-use Google\Protobuf\Internal\GPBType;
-use Google\Protobuf\Internal\RepeatedField;
-use Google\Protobuf\Internal\GPBUtil;
-
-class GPBEmpty extends \Google\Protobuf\Internal\Message
-{
-
-}
-
-$pool = DescriptorPool::getGeneratedPool();
-
-$pool->internalAddGeneratedFile(hex2bin(
- "0ab7010a1b676f6f676c652f70726f746f6275662f656d7074792e70726f" .
- "746f120f676f6f676c652e70726f746f62756622070a05456d7074794276" .
- "0a13636f6d2e676f6f676c652e70726f746f627566420a456d7074795072" .
- "6f746f50015a276769746875622e636f6d2f676f6c616e672f70726f746f" .
- "6275662f7074797065732f656d707479f80101a20203475042aa021e476f" .
- "6f676c652e50726f746f6275662e57656c6c4b6e6f776e54797065736206" .
- "70726f746f33"
-));
-
diff --git a/php/tests/map_field_test.php b/php/tests/map_field_test.php
index 4e42361d..d4ec44fc 100644
--- a/php/tests/map_field_test.php
+++ b/php/tests/map_field_test.php
@@ -1,6 +1,5 @@
<?php
-require_once('test.pb.php');
require_once('test_util.php');
use Google\Protobuf\Internal\GPBType;
diff --git a/php/tests/memory_leak_test.php b/php/tests/memory_leak_test.php
index ec54597b..af327273 100644
--- a/php/tests/memory_leak_test.php
+++ b/php/tests/memory_leak_test.php
@@ -2,7 +2,15 @@
# phpunit has memory leak by itself. Thus, it cannot be used to test memory leak.
-require_once('test.pb.php');
+require_once('generated/Bar/TestInclude.php');
+require_once('generated/Foo/TestEnum.php');
+require_once('generated/Foo/TestMessage.php');
+require_once('generated/Foo/TestMessage_Sub.php');
+require_once('generated/Foo/TestPackedMessage.php');
+require_once('generated/Foo/TestPhpDoc.php');
+require_once('generated/Foo/TestUnpackedMessage.php');
+require_once('generated/GPBMetadata/Proto/Test.php');
+require_once('generated/GPBMetadata/Proto/TestInclude.php');
require_once('test_util.php');
use Google\Protobuf\Internal\RepeatedField;
diff --git a/php/tests/php_implementation_test.php b/php/tests/php_implementation_test.php
index 485956cc..4f626f1c 100644
--- a/php/tests/php_implementation_test.php
+++ b/php/tests/php_implementation_test.php
@@ -1,6 +1,5 @@
<?php
-require_once('test.pb.php');
require_once('test_base.php');
require_once('test_util.php');
diff --git a/php/tests/test.proto b/php/tests/proto/test.proto
index 15709c83..fc283a05 100644
--- a/php/tests/test.proto
+++ b/php/tests/proto/test.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
-import 'test_include.proto';
+import 'proto/test_include.proto';
package foo;
@@ -134,3 +134,8 @@ message TestUnpackedMessage {
repeated bool repeated_bool = 102 [packed = false];
repeated TestEnum repeated_enum = 103 [packed = false];
}
+
+// /**/@<>&\{
+message TestPhpDoc {
+ int32 a = 1;
+}
diff --git a/php/tests/test_include.proto b/php/tests/proto/test_include.proto
index 9844617f..9844617f 100644
--- a/php/tests/test_include.proto
+++ b/php/tests/proto/test_include.proto
diff --git a/php/tests/test_no_namespace.proto b/php/tests/proto/test_no_namespace.proto
index 4331aeab..4331aeab 100644
--- a/php/tests/test_no_namespace.proto
+++ b/php/tests/proto/test_no_namespace.proto
diff --git a/php/tests/test.pb.php b/php/tests/test.pb.php
deleted file mode 100644
index ed316b6e..00000000
--- a/php/tests/test.pb.php
+++ /dev/null
@@ -1,1385 +0,0 @@
-<?php
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: test.proto
-
-namespace Foo;
-
-require_once('test_include.pb.php');
-use Google\Protobuf\Internal\DescriptorPool;
-use Google\Protobuf\Internal\GPBType;
-use Google\Protobuf\Internal\RepeatedField;
-use Google\Protobuf\Internal\GPBUtil;
-
-class TestMessage extends \Google\Protobuf\Internal\Message
-{
- private $optional_int32 = 0;
- private $optional_int64 = 0;
- private $optional_uint32 = 0;
- private $optional_uint64 = 0;
- private $optional_sint32 = 0;
- private $optional_sint64 = 0;
- private $optional_fixed32 = 0;
- private $optional_fixed64 = 0;
- private $optional_sfixed32 = 0;
- private $optional_sfixed64 = 0;
- private $optional_float = 0.0;
- private $optional_double = 0.0;
- private $optional_bool = false;
- private $optional_string = '';
- private $optional_bytes = '';
- private $optional_enum = 0;
- private $optional_message = null;
- private $optional_included_message = null;
- private $recursive = null;
- private $repeated_int32;
- private $repeated_int64;
- private $repeated_uint32;
- private $repeated_uint64;
- private $repeated_sint32;
- private $repeated_sint64;
- private $repeated_fixed32;
- private $repeated_fixed64;
- private $repeated_sfixed32;
- private $repeated_sfixed64;
- private $repeated_float;
- private $repeated_double;
- private $repeated_bool;
- private $repeated_string;
- private $repeated_bytes;
- private $repeated_enum;
- private $repeated_message;
- private $repeated_recursive;
- private $map_int32_int32;
- private $map_int64_int64;
- private $map_uint32_uint32;
- private $map_uint64_uint64;
- private $map_sint32_sint32;
- private $map_sint64_sint64;
- private $map_fixed32_fixed32;
- private $map_fixed64_fixed64;
- private $map_sfixed32_sfixed32;
- private $map_sfixed64_sfixed64;
- private $map_int32_float;
- private $map_int32_double;
- private $map_bool_bool;
- private $map_string_string;
- private $map_int32_bytes;
- private $map_int32_enum;
- private $map_int32_message;
- private $map_recursive;
- protected $my_oneof;
-
- public function getOptionalInt32()
- {
- return $this->optional_int32;
- }
-
- public function setOptionalInt32($var)
- {
- GPBUtil::checkInt32($var);
- $this->optional_int32 = $var;
- }
-
- public function getOptionalInt64()
- {
- return $this->optional_int64;
- }
-
- public function setOptionalInt64($var)
- {
- GPBUtil::checkInt64($var);
- $this->optional_int64 = $var;
- }
-
- public function getOptionalUint32()
- {
- return $this->optional_uint32;
- }
-
- public function setOptionalUint32($var)
- {
- GPBUtil::checkUint32($var);
- $this->optional_uint32 = $var;
- }
-
- public function getOptionalUint64()
- {
- return $this->optional_uint64;
- }
-
- public function setOptionalUint64($var)
- {
- GPBUtil::checkUint64($var);
- $this->optional_uint64 = $var;
- }
-
- public function getOptionalSint32()
- {
- return $this->optional_sint32;
- }
-
- public function setOptionalSint32($var)
- {
- GPBUtil::checkInt32($var);
- $this->optional_sint32 = $var;
- }
-
- public function getOptionalSint64()
- {
- return $this->optional_sint64;
- }
-
- public function setOptionalSint64($var)
- {
- GPBUtil::checkInt64($var);
- $this->optional_sint64 = $var;
- }
-
- public function getOptionalFixed32()
- {
- return $this->optional_fixed32;
- }
-
- public function setOptionalFixed32($var)
- {
- GPBUtil::checkUint32($var);
- $this->optional_fixed32 = $var;
- }
-
- public function getOptionalFixed64()
- {
- return $this->optional_fixed64;
- }
-
- public function setOptionalFixed64($var)
- {
- GPBUtil::checkUint64($var);
- $this->optional_fixed64 = $var;
- }
-
- public function getOptionalSfixed32()
- {
- return $this->optional_sfixed32;
- }
-
- public function setOptionalSfixed32($var)
- {
- GPBUtil::checkInt32($var);
- $this->optional_sfixed32 = $var;
- }
-
- public function getOptionalSfixed64()
- {
- return $this->optional_sfixed64;
- }
-
- public function setOptionalSfixed64($var)
- {
- GPBUtil::checkInt64($var);
- $this->optional_sfixed64 = $var;
- }
-
- public function getOptionalFloat()
- {
- return $this->optional_float;
- }
-
- public function setOptionalFloat($var)
- {
- GPBUtil::checkFloat($var);
- $this->optional_float = $var;
- }
-
- public function getOptionalDouble()
- {
- return $this->optional_double;
- }
-
- public function setOptionalDouble($var)
- {
- GPBUtil::checkDouble($var);
- $this->optional_double = $var;
- }
-
- public function getOptionalBool()
- {
- return $this->optional_bool;
- }
-
- public function setOptionalBool($var)
- {
- GPBUtil::checkBool($var);
- $this->optional_bool = $var;
- }
-
- public function getOptionalString()
- {
- return $this->optional_string;
- }
-
- public function setOptionalString($var)
- {
- GPBUtil::checkString($var, True);
- $this->optional_string = $var;
- }
-
- public function getOptionalBytes()
- {
- return $this->optional_bytes;
- }
-
- public function setOptionalBytes($var)
- {
- GPBUtil::checkString($var, False);
- $this->optional_bytes = $var;
- }
-
- public function getOptionalEnum()
- {
- return $this->optional_enum;
- }
-
- public function setOptionalEnum($var)
- {
- GPBUtil::checkEnum($var, \Foo\TestEnum::class);
- $this->optional_enum = $var;
- }
-
- public function getOptionalMessage()
- {
- return $this->optional_message;
- }
-
- public function setOptionalMessage(&$var)
- {
- GPBUtil::checkMessage($var, \Foo\TestMessage_Sub::class);
- $this->optional_message = $var;
- }
-
- public function getOptionalIncludedMessage()
- {
- return $this->optional_included_message;
- }
-
- public function setOptionalIncludedMessage(&$var)
- {
- GPBUtil::checkMessage($var, \Bar\TestInclude::class);
- $this->optional_included_message = $var;
- }
-
- public function getRecursive()
- {
- return $this->recursive;
- }
-
- public function setRecursive(&$var)
- {
- GPBUtil::checkMessage($var, \Foo\TestMessage::class);
- $this->recursive = $var;
- }
-
- public function getRepeatedInt32()
- {
- return $this->repeated_int32;
- }
-
- public function setRepeatedInt32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT32);
- $this->repeated_int32 = $var;
- }
-
- public function getRepeatedInt64()
- {
- return $this->repeated_int64;
- }
-
- public function setRepeatedInt64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT64);
- $this->repeated_int64 = $var;
- }
-
- public function getRepeatedUint32()
- {
- return $this->repeated_uint32;
- }
-
- public function setRepeatedUint32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::UINT32);
- $this->repeated_uint32 = $var;
- }
-
- public function getRepeatedUint64()
- {
- return $this->repeated_uint64;
- }
-
- public function setRepeatedUint64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::UINT64);
- $this->repeated_uint64 = $var;
- }
-
- public function getRepeatedSint32()
- {
- return $this->repeated_sint32;
- }
-
- public function setRepeatedSint32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SINT32);
- $this->repeated_sint32 = $var;
- }
-
- public function getRepeatedSint64()
- {
- return $this->repeated_sint64;
- }
-
- public function setRepeatedSint64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SINT64);
- $this->repeated_sint64 = $var;
- }
-
- public function getRepeatedFixed32()
- {
- return $this->repeated_fixed32;
- }
-
- public function setRepeatedFixed32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::FIXED32);
- $this->repeated_fixed32 = $var;
- }
-
- public function getRepeatedFixed64()
- {
- return $this->repeated_fixed64;
- }
-
- public function setRepeatedFixed64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::FIXED64);
- $this->repeated_fixed64 = $var;
- }
-
- public function getRepeatedSfixed32()
- {
- return $this->repeated_sfixed32;
- }
-
- public function setRepeatedSfixed32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SFIXED32);
- $this->repeated_sfixed32 = $var;
- }
-
- public function getRepeatedSfixed64()
- {
- return $this->repeated_sfixed64;
- }
-
- public function setRepeatedSfixed64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SFIXED64);
- $this->repeated_sfixed64 = $var;
- }
-
- public function getRepeatedFloat()
- {
- return $this->repeated_float;
- }
-
- public function setRepeatedFloat(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::FLOAT);
- $this->repeated_float = $var;
- }
-
- public function getRepeatedDouble()
- {
- return $this->repeated_double;
- }
-
- public function setRepeatedDouble(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::DOUBLE);
- $this->repeated_double = $var;
- }
-
- public function getRepeatedBool()
- {
- return $this->repeated_bool;
- }
-
- public function setRepeatedBool(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::BOOL);
- $this->repeated_bool = $var;
- }
-
- public function getRepeatedString()
- {
- return $this->repeated_string;
- }
-
- public function setRepeatedString(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::STRING);
- $this->repeated_string = $var;
- }
-
- public function getRepeatedBytes()
- {
- return $this->repeated_bytes;
- }
-
- public function setRepeatedBytes(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::BYTES);
- $this->repeated_bytes = $var;
- }
-
- public function getRepeatedEnum()
- {
- return $this->repeated_enum;
- }
-
- public function setRepeatedEnum(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::ENUM, Foo\TestEnum::class);
- $this->repeated_enum = $var;
- }
-
- public function getRepeatedMessage()
- {
- return $this->repeated_message;
- }
-
- public function setRepeatedMessage(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Foo\TestMessage_Sub::class);
- $this->repeated_message = $var;
- }
-
- public function getRepeatedRecursive()
- {
- return $this->repeated_recursive;
- }
-
- public function setRepeatedRecursive(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::MESSAGE, \Foo\TestMessage::class);
- $this->repeated_recursive = $var;
- }
-
- public function getOneofInt32()
- {
- return $this->readOneof(51);
- }
-
- public function setOneofInt32($var)
- {
- GPBUtil::checkInt32($var);
- $this->writeOneof(51, $var);
- }
-
- public function getOneofInt64()
- {
- return $this->readOneof(52);
- }
-
- public function setOneofInt64($var)
- {
- GPBUtil::checkInt64($var);
- $this->writeOneof(52, $var);
- }
-
- public function getOneofUint32()
- {
- return $this->readOneof(53);
- }
-
- public function setOneofUint32($var)
- {
- GPBUtil::checkUint32($var);
- $this->writeOneof(53, $var);
- }
-
- public function getOneofUint64()
- {
- return $this->readOneof(54);
- }
-
- public function setOneofUint64($var)
- {
- GPBUtil::checkUint64($var);
- $this->writeOneof(54, $var);
- }
-
- public function getOneofSint32()
- {
- return $this->readOneof(55);
- }
-
- public function setOneofSint32($var)
- {
- GPBUtil::checkUint32($var);
- $this->writeOneof(55, $var);
- }
-
- public function getOneofSint64()
- {
- return $this->readOneof(56);
- }
-
- public function setOneofSint64($var)
- {
- GPBUtil::checkUint64($var);
- $this->writeOneof(56, $var);
- }
-
- public function getOneofFixed32()
- {
- return $this->readOneof(57);
- }
-
- public function setOneofFixed32($var)
- {
- GPBUtil::checkUint32($var);
- $this->writeOneof(57, $var);
- }
-
- public function getOneofFixed64()
- {
- return $this->readOneof(58);
- }
-
- public function setOneofFixed64($var)
- {
- GPBUtil::checkUint64($var);
- $this->writeOneof(58, $var);
- }
-
- public function getOneofSfixed32()
- {
- return $this->readOneof(59);
- }
-
- public function setOneofSfixed32($var)
- {
- GPBUtil::checkUint32($var);
- $this->writeOneof(59, $var);
- }
-
- public function getOneofSfixed64()
- {
- return $this->readOneof(60);
- }
-
- public function setOneofSfixed64($var)
- {
- GPBUtil::checkUint64($var);
- $this->writeOneof(60, $var);
- }
-
- public function getOneofDouble()
- {
- return $this->readOneof(61);
- }
-
- public function setOneofDouble($var)
- {
- GPBUtil::checkDouble($var);
- $this->writeOneof(61, $var);
- }
-
- public function getOneofFloat()
- {
- return $this->readOneof(62);
- }
-
- public function setOneofFloat($var)
- {
- GPBUtil::checkFloat($var);
- $this->writeOneof(62, $var);
- }
-
- public function getOneofBool()
- {
- return $this->readOneof(63);
- }
-
- public function setOneofBool($var)
- {
- GPBUtil::checkBool($var);
- $this->writeOneof(63, $var);
- }
-
- public function getOneofString()
- {
- return $this->readOneof(64);
- }
-
- public function setOneofString($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(64, $var);
- }
-
- public function getOneofBytes()
- {
- return $this->readOneof(65);
- }
-
- public function setOneofBytes($var)
- {
- GPBUtil::checkString($var, False);
- $this->writeOneof(65, $var);
- }
-
- public function getOneofEnum()
- {
- return $this->readOneof(66);
- }
-
- public function setOneofEnum($var)
- {
- GPBUtil::checkEnum($var, \Foo\TestEnum::class);
- $this->writeOneof(66, $var);
- }
-
- public function getOneofMessage()
- {
- return $this->readOneof(67);
- }
-
- public function setOneofMessage(&$var)
- {
- GPBUtil::checkMessage($var, \Foo\TestMessage_Sub::class);
- $this->writeOneof(67, $var);
- }
-
- public function getMapInt32Int32()
- {
- return $this->map_int32_int32;
- }
-
- public function setMapInt32Int32(&$var)
- {
- $this->map_int32_int32 = $var;
- }
-
- public function getMapInt64Int64()
- {
- return $this->map_int64_int64;
- }
-
- public function setMapInt64Int64(&$var)
- {
- $this->map_int64_int64 = $var;
- }
-
- public function getMapUint32Uint32()
- {
- return $this->map_uint32_uint32;
- }
-
- public function setMapUint32Uint32(&$var)
- {
- $this->map_uint32_uint32 = $var;
- }
-
- public function getMapUint64Uint64()
- {
- return $this->map_uint64_uint64;
- }
-
- public function setMapUint64Uint64(&$var)
- {
- $this->map_uint64_uint64 = $var;
- }
-
- public function getMapSint32Sint32()
- {
- return $this->map_sint32_sint32;
- }
-
- public function setMapSint32Sint32(&$var)
- {
- $this->map_sint32_sint32 = $var;
- }
-
- public function getMapSint64Sint64()
- {
- return $this->map_sint64_sint64;
- }
-
- public function setMapSint64Sint64(&$var)
- {
- $this->map_sint64_sint64 = $var;
- }
-
- public function getMapFixed32Fixed32()
- {
- return $this->map_fixed32_fixed32;
- }
-
- public function setMapFixed32Fixed32(&$var)
- {
- $this->map_fixed32_fixed32 = $var;
- }
-
- public function getMapFixed64Fixed64()
- {
- return $this->map_fixed64_fixed64;
- }
-
- public function setMapFixed64Fixed64(&$var)
- {
- $this->map_fixed64_fixed64 = $var;
- }
-
- public function getMapSfixed32Sfixed32()
- {
- return $this->map_sfixed32_sfixed32;
- }
-
- public function setMapSfixed32Sfixed32(&$var)
- {
- $this->map_sfixed32_sfixed32 = $var;
- }
-
- public function getMapSfixed64Sfixed64()
- {
- return $this->map_sfixed64_sfixed64;
- }
-
- public function setMapSfixed64Sfixed64(&$var)
- {
- $this->map_sfixed64_sfixed64 = $var;
- }
-
- public function getMapInt32Float()
- {
- return $this->map_int32_float;
- }
-
- public function setMapInt32Float(&$var)
- {
- $this->map_int32_float = $var;
- }
-
- public function getMapInt32Double()
- {
- return $this->map_int32_double;
- }
-
- public function setMapInt32Double(&$var)
- {
- $this->map_int32_double = $var;
- }
-
- public function getMapBoolBool()
- {
- return $this->map_bool_bool;
- }
-
- public function setMapBoolBool(&$var)
- {
- $this->map_bool_bool = $var;
- }
-
- public function getMapStringString()
- {
- return $this->map_string_string;
- }
-
- public function setMapStringString(&$var)
- {
- $this->map_string_string = $var;
- }
-
- public function getMapInt32Bytes()
- {
- return $this->map_int32_bytes;
- }
-
- public function setMapInt32Bytes(&$var)
- {
- $this->map_int32_bytes = $var;
- }
-
- public function getMapInt32Enum()
- {
- return $this->map_int32_enum;
- }
-
- public function setMapInt32Enum(&$var)
- {
- $this->map_int32_enum = $var;
- }
-
- public function getMapInt32Message()
- {
- return $this->map_int32_message;
- }
-
- public function setMapInt32Message(&$var)
- {
- $this->map_int32_message = $var;
- }
-
- public function getMapRecursive()
- {
- return $this->map_recursive;
- }
-
- public function setMapRecursive(&$var)
- {
- $this->map_recursive = $var;
- }
-
- public function getMyOneof()
- {
- return $this->my_oneof;
- }
-
-}
-
-class TestMessage_Sub extends \Google\Protobuf\Internal\Message
-{
- private $a = 0;
-
- public function getA()
- {
- return $this->a;
- }
-
- public function setA($var)
- {
- GPBUtil::checkInt32($var);
- $this->a = $var;
- }
-
-}
-
-class TestPackedMessage extends \Google\Protobuf\Internal\Message
-{
- private $repeated_int32;
- private $repeated_int64;
- private $repeated_uint32;
- private $repeated_uint64;
- private $repeated_sint32;
- private $repeated_sint64;
- private $repeated_fixed32;
- private $repeated_fixed64;
- private $repeated_sfixed32;
- private $repeated_sfixed64;
- private $repeated_float;
- private $repeated_double;
- private $repeated_bool;
- private $repeated_enum;
-
- public function getRepeatedInt32()
- {
- return $this->repeated_int32;
- }
-
- public function setRepeatedInt32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT32);
- $this->repeated_int32 = $var;
- }
-
- public function getRepeatedInt64()
- {
- return $this->repeated_int64;
- }
-
- public function setRepeatedInt64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT64);
- $this->repeated_int64 = $var;
- }
-
- public function getRepeatedUint32()
- {
- return $this->repeated_uint32;
- }
-
- public function setRepeatedUint32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::UINT32);
- $this->repeated_uint32 = $var;
- }
-
- public function getRepeatedUint64()
- {
- return $this->repeated_uint64;
- }
-
- public function setRepeatedUint64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::UINT64);
- $this->repeated_uint64 = $var;
- }
-
- public function getRepeatedSint32()
- {
- return $this->repeated_sint32;
- }
-
- public function setRepeatedSint32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SINT32);
- $this->repeated_sint32 = $var;
- }
-
- public function getRepeatedSint64()
- {
- return $this->repeated_sint64;
- }
-
- public function setRepeatedSint64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SINT64);
- $this->repeated_sint64 = $var;
- }
-
- public function getRepeatedFixed32()
- {
- return $this->repeated_fixed32;
- }
-
- public function setRepeatedFixed32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::FIXED32);
- $this->repeated_fixed32 = $var;
- }
-
- public function getRepeatedFixed64()
- {
- return $this->repeated_fixed64;
- }
-
- public function setRepeatedFixed64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::FIXED64);
- $this->repeated_fixed64 = $var;
- }
-
- public function getRepeatedSfixed32()
- {
- return $this->repeated_sfixed32;
- }
-
- public function setRepeatedSfixed32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SFIXED32);
- $this->repeated_sfixed32 = $var;
- }
-
- public function getRepeatedSfixed64()
- {
- return $this->repeated_sfixed64;
- }
-
- public function setRepeatedSfixed64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SFIXED64);
- $this->repeated_sfixed64 = $var;
- }
-
- public function getRepeatedFloat()
- {
- return $this->repeated_float;
- }
-
- public function setRepeatedFloat(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::FLOAT);
- $this->repeated_float = $var;
- }
-
- public function getRepeatedDouble()
- {
- return $this->repeated_double;
- }
-
- public function setRepeatedDouble(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::DOUBLE);
- $this->repeated_double = $var;
- }
-
- public function getRepeatedBool()
- {
- return $this->repeated_bool;
- }
-
- public function setRepeatedBool(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::BOOL);
- $this->repeated_bool = $var;
- }
-
- public function getRepeatedEnum()
- {
- return $this->repeated_enum;
- }
-
- public function setRepeatedEnum(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::ENUM, Foo\TestEnum::class);
- $this->repeated_enum = $var;
- }
-
-}
-
-class TestUnpackedMessage extends \Google\Protobuf\Internal\Message
-{
- private $repeated_int32;
- private $repeated_int64;
- private $repeated_uint32;
- private $repeated_uint64;
- private $repeated_sint32;
- private $repeated_sint64;
- private $repeated_fixed32;
- private $repeated_fixed64;
- private $repeated_sfixed32;
- private $repeated_sfixed64;
- private $repeated_float;
- private $repeated_double;
- private $repeated_bool;
- private $repeated_enum;
-
- public function getRepeatedInt32()
- {
- return $this->repeated_int32;
- }
-
- public function setRepeatedInt32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT32);
- $this->repeated_int32 = $var;
- }
-
- public function getRepeatedInt64()
- {
- return $this->repeated_int64;
- }
-
- public function setRepeatedInt64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::INT64);
- $this->repeated_int64 = $var;
- }
-
- public function getRepeatedUint32()
- {
- return $this->repeated_uint32;
- }
-
- public function setRepeatedUint32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::UINT32);
- $this->repeated_uint32 = $var;
- }
-
- public function getRepeatedUint64()
- {
- return $this->repeated_uint64;
- }
-
- public function setRepeatedUint64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::UINT64);
- $this->repeated_uint64 = $var;
- }
-
- public function getRepeatedSint32()
- {
- return $this->repeated_sint32;
- }
-
- public function setRepeatedSint32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SINT32);
- $this->repeated_sint32 = $var;
- }
-
- public function getRepeatedSint64()
- {
- return $this->repeated_sint64;
- }
-
- public function setRepeatedSint64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SINT64);
- $this->repeated_sint64 = $var;
- }
-
- public function getRepeatedFixed32()
- {
- return $this->repeated_fixed32;
- }
-
- public function setRepeatedFixed32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::FIXED32);
- $this->repeated_fixed32 = $var;
- }
-
- public function getRepeatedFixed64()
- {
- return $this->repeated_fixed64;
- }
-
- public function setRepeatedFixed64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::FIXED64);
- $this->repeated_fixed64 = $var;
- }
-
- public function getRepeatedSfixed32()
- {
- return $this->repeated_sfixed32;
- }
-
- public function setRepeatedSfixed32(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SFIXED32);
- $this->repeated_sfixed32 = $var;
- }
-
- public function getRepeatedSfixed64()
- {
- return $this->repeated_sfixed64;
- }
-
- public function setRepeatedSfixed64(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::SFIXED64);
- $this->repeated_sfixed64 = $var;
- }
-
- public function getRepeatedFloat()
- {
- return $this->repeated_float;
- }
-
- public function setRepeatedFloat(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::FLOAT);
- $this->repeated_float = $var;
- }
-
- public function getRepeatedDouble()
- {
- return $this->repeated_double;
- }
-
- public function setRepeatedDouble(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::DOUBLE);
- $this->repeated_double = $var;
- }
-
- public function getRepeatedBool()
- {
- return $this->repeated_bool;
- }
-
- public function setRepeatedBool(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::BOOL);
- $this->repeated_bool = $var;
- }
-
- public function getRepeatedEnum()
- {
- return $this->repeated_enum;
- }
-
- public function setRepeatedEnum(&$var)
- {
- GPBUtil::checkRepeatedField($var, GPBType::ENUM, Foo\TestEnum::class);
- $this->repeated_enum = $var;
- }
-
-}
-
-class TestEnum
-{
- const ZERO = 0;
- const ONE = 1;
-}
-
-$pool = DescriptorPool::getGeneratedPool();
-
-$pool->internalAddGeneratedFile(hex2bin(
- "0a83250a0a746573742e70726f746f1203666f6f1a12746573745f696e63" .
- "6c7564652e70726f746f22be1d0a0b546573744d65737361676512160a0e" .
- "6f7074696f6e616c5f696e74333218012001280512160a0e6f7074696f6e" .
- "616c5f696e74363418022001280312170a0f6f7074696f6e616c5f75696e" .
- "74333218032001280d12170a0f6f7074696f6e616c5f75696e7436341804" .
- "2001280412170a0f6f7074696f6e616c5f73696e74333218052001281112" .
- "170a0f6f7074696f6e616c5f73696e74363418062001281212180a106f70" .
- "74696f6e616c5f6669786564333218072001280712180a106f7074696f6e" .
- "616c5f6669786564363418082001280612190a116f7074696f6e616c5f73" .
- "6669786564333218092001280f12190a116f7074696f6e616c5f73666978" .
- "65643634180a2001281012160a0e6f7074696f6e616c5f666c6f6174180b" .
- "2001280212170a0f6f7074696f6e616c5f646f75626c65180c2001280112" .
- "150a0d6f7074696f6e616c5f626f6f6c180d2001280812170a0f6f707469" .
- "6f6e616c5f737472696e67180e2001280912160a0e6f7074696f6e616c5f" .
- "6279746573180f2001280c12240a0d6f7074696f6e616c5f656e756d1810" .
- "2001280e320d2e666f6f2e54657374456e756d122e0a106f7074696f6e61" .
- "6c5f6d65737361676518112001280b32142e666f6f2e546573744d657373" .
- "6167652e53756212330a196f7074696f6e616c5f696e636c756465645f6d" .
- "65737361676518122001280b32102e6261722e54657374496e636c756465" .
- "12230a0972656375727369766518132001280b32102e666f6f2e54657374" .
- "4d65737361676512160a0e72657065617465645f696e743332181f200328" .
- "0512160a0e72657065617465645f696e74363418202003280312170a0f72" .
- "657065617465645f75696e74333218212003280d12170a0f726570656174" .
- "65645f75696e74363418222003280412170a0f72657065617465645f7369" .
- "6e74333218232003281112170a0f72657065617465645f73696e74363418" .
- "242003281212180a1072657065617465645f666978656433321825200328" .
- "0712180a1072657065617465645f6669786564363418262003280612190a" .
- "1172657065617465645f736669786564333218272003280f12190a117265" .
- "7065617465645f736669786564363418282003281012160a0e7265706561" .
- "7465645f666c6f617418292003280212170a0f72657065617465645f646f" .
- "75626c65182a2003280112150a0d72657065617465645f626f6f6c182b20" .
- "03280812170a0f72657065617465645f737472696e67182c200328091216" .
- "0a0e72657065617465645f6279746573182d2003280c12240a0d72657065" .
- "617465645f656e756d182e2003280e320d2e666f6f2e54657374456e756d" .
- "122e0a1072657065617465645f6d657373616765182f2003280b32142e66" .
- "6f6f2e546573744d6573736167652e537562122c0a127265706561746564" .
- "5f72656375727369766518302003280b32102e666f6f2e546573744d6573" .
- "7361676512150a0b6f6e656f665f696e743332183320012805480012150a" .
- "0b6f6e656f665f696e743634183420012803480012160a0c6f6e656f665f" .
- "75696e74333218352001280d480012160a0c6f6e656f665f75696e743634" .
- "183620012804480012160a0c6f6e656f665f73696e74333218372001280d" .
- "480012160a0c6f6e656f665f73696e743634183820012804480012170a0d" .
- "6f6e656f665f6669786564333218392001280d480012170a0d6f6e656f66" .
- "5f66697865643634183a20012804480012180a0e6f6e656f665f73666978" .
- "65643332183b2001280d480012180a0e6f6e656f665f7366697865643634" .
- "183c20012804480012160a0c6f6e656f665f646f75626c65183d20012801" .
- "480012150a0b6f6e656f665f666c6f6174183e20012802480012140a0a6f" .
- "6e656f665f626f6f6c183f20012808480012160a0c6f6e656f665f737472" .
- "696e67184020012809480012150a0b6f6e656f665f627974657318412001" .
- "280c480012230a0a6f6e656f665f656e756d18422001280e320d2e666f6f" .
- "2e54657374456e756d4800122d0a0d6f6e656f665f6d6573736167651843" .
- "2001280b32142e666f6f2e546573744d6573736167652e5375624800123c" .
- "0a0f6d61705f696e7433325f696e74333218472003280b32232e666f6f2e" .
- "546573744d6573736167652e4d6170496e743332496e743332456e747279" .
- "123c0a0f6d61705f696e7436345f696e74363418482003280b32232e666f" .
- "6f2e546573744d6573736167652e4d6170496e743634496e743634456e74" .
- "727912400a116d61705f75696e7433325f75696e74333218492003280b32" .
- "252e666f6f2e546573744d6573736167652e4d617055696e74333255696e" .
- "743332456e74727912400a116d61705f75696e7436345f75696e74363418" .
- "4a2003280b32252e666f6f2e546573744d6573736167652e4d617055696e" .
- "74363455696e743634456e74727912400a116d61705f73696e7433325f73" .
- "696e743332184b2003280b32252e666f6f2e546573744d6573736167652e" .
- "4d617053696e74333253696e743332456e74727912400a116d61705f7369" .
- "6e7436345f73696e743634184c2003280b32252e666f6f2e546573744d65" .
- "73736167652e4d617053696e74363453696e743634456e74727912440a13" .
- "6d61705f666978656433325f66697865643332184d2003280b32272e666f" .
- "6f2e546573744d6573736167652e4d617046697865643332466978656433" .
- "32456e74727912440a136d61705f666978656436345f6669786564363418" .
- "4e2003280b32272e666f6f2e546573744d6573736167652e4d6170466978" .
- "6564363446697865643634456e74727912480a156d61705f736669786564" .
- "33325f7366697865643332184f2003280b32292e666f6f2e546573744d65" .
- "73736167652e4d617053666978656433325366697865643332456e747279" .
- "12480a156d61705f73666978656436345f73666978656436341850200328" .
- "0b32292e666f6f2e546573744d6573736167652e4d617053666978656436" .
- "345366697865643634456e747279123c0a0f6d61705f696e7433325f666c" .
- "6f617418512003280b32232e666f6f2e546573744d6573736167652e4d61" .
- "70496e743332466c6f6174456e747279123e0a106d61705f696e7433325f" .
- "646f75626c6518522003280b32242e666f6f2e546573744d657373616765" .
- "2e4d6170496e743332446f75626c65456e74727912380a0d6d61705f626f" .
- "6f6c5f626f6f6c18532003280b32212e666f6f2e546573744d6573736167" .
- "652e4d6170426f6f6c426f6f6c456e74727912400a116d61705f73747269" .
- "6e675f737472696e6718542003280b32252e666f6f2e546573744d657373" .
- "6167652e4d6170537472696e67537472696e67456e747279123c0a0f6d61" .
- "705f696e7433325f627974657318552003280b32232e666f6f2e54657374" .
- "4d6573736167652e4d6170496e7433324279746573456e747279123a0a0e" .
- "6d61705f696e7433325f656e756d18562003280b32222e666f6f2e546573" .
- "744d6573736167652e4d6170496e743332456e756d456e74727912400a11" .
- "6d61705f696e7433325f6d65737361676518572003280b32252e666f6f2e" .
- "546573744d6573736167652e4d6170496e7433324d657373616765456e74" .
- "727912390a0d6d61705f72656375727369766518582003280b32222e666f" .
- "6f2e546573744d6573736167652e4d6170526563757273697665456e7472" .
- "791a340a124d6170496e743332496e743332456e747279120b0a036b6579" .
- "180120012805120d0a0576616c75651802200128053a0238011a340a124d" .
- "6170496e743634496e743634456e747279120b0a036b6579180120012803" .
- "120d0a0576616c75651802200128033a0238011a360a144d617055696e74" .
- "333255696e743332456e747279120b0a036b657918012001280d120d0a05" .
- "76616c756518022001280d3a0238011a360a144d617055696e7436345569" .
- "6e743634456e747279120b0a036b6579180120012804120d0a0576616c75" .
- "651802200128043a0238011a360a144d617053696e74333253696e743332" .
- "456e747279120b0a036b6579180120012811120d0a0576616c7565180220" .
- "0128113a0238011a360a144d617053696e74363453696e743634456e7472" .
- "79120b0a036b6579180120012812120d0a0576616c75651802200128123a" .
- "0238011a380a164d61704669786564333246697865643332456e74727912" .
- "0b0a036b6579180120012807120d0a0576616c75651802200128073a0238" .
- "011a380a164d61704669786564363446697865643634456e747279120b0a" .
- "036b6579180120012806120d0a0576616c75651802200128063a0238011a" .
- "3a0a184d617053666978656433325366697865643332456e747279120b0a" .
- "036b657918012001280f120d0a0576616c756518022001280f3a0238011a" .
- "3a0a184d617053666978656436345366697865643634456e747279120b0a" .
- "036b6579180120012810120d0a0576616c75651802200128103a0238011a" .
- "340a124d6170496e743332466c6f6174456e747279120b0a036b65791801" .
- "20012805120d0a0576616c75651802200128023a0238011a350a134d6170" .
- "496e743332446f75626c65456e747279120b0a036b657918012001280512" .
- "0d0a0576616c75651802200128013a0238011a320a104d6170426f6f6c42" .
- "6f6f6c456e747279120b0a036b6579180120012808120d0a0576616c7565" .
- "1802200128083a0238011a360a144d6170537472696e67537472696e6745" .
- "6e747279120b0a036b6579180120012809120d0a0576616c756518022001" .
- "28093a0238011a340a124d6170496e7433324279746573456e747279120b" .
- "0a036b6579180120012805120d0a0576616c756518022001280c3a023801" .
- "1a420a114d6170496e743332456e756d456e747279120b0a036b65791801" .
- "20012805121c0a0576616c756518022001280e320d2e666f6f2e54657374" .
- "456e756d3a0238011a4c0a144d6170496e7433324d657373616765456e74" .
- "7279120b0a036b657918012001280512230a0576616c756518022001280b" .
- "32142e666f6f2e546573744d6573736167652e5375623a0238011a450a11" .
- "4d6170526563757273697665456e747279120b0a036b6579180120012805" .
- "121f0a0576616c756518022001280b32102e666f6f2e546573744d657373" .
- "6167653a0238011a100a0353756212090a0161180120012805420a0a086d" .
- "795f6f6e656f6622b7030a11546573745061636b65644d65737361676512" .
- "1a0a0e72657065617465645f696e743332185a2003280542021001121a0a" .
- "0e72657065617465645f696e743634185b2003280342021001121b0a0f72" .
- "657065617465645f75696e743332185c2003280d42021001121b0a0f7265" .
- "7065617465645f75696e743634185d2003280442021001121b0a0f726570" .
- "65617465645f73696e743332185e2003281142021001121b0a0f72657065" .
- "617465645f73696e743634185f2003281242021001121c0a107265706561" .
- "7465645f6669786564333218602003280742021001121c0a107265706561" .
- "7465645f6669786564363418612003280642021001121d0a117265706561" .
- "7465645f736669786564333218622003280f42021001121d0a1172657065" .
- "617465645f736669786564363418632003281042021001121a0a0e726570" .
- "65617465645f666c6f617418642003280242021001121b0a0f7265706561" .
- "7465645f646f75626c651865200328014202100112190a0d726570656174" .
- "65645f626f6f6c1866200328084202100112280a0d72657065617465645f" .
- "656e756d18672003280e320d2e666f6f2e54657374456e756d4202100122" .
- "b9030a1354657374556e7061636b65644d657373616765121a0a0e726570" .
- "65617465645f696e743332185a2003280542021000121a0a0e7265706561" .
- "7465645f696e743634185b2003280342021000121b0a0f72657065617465" .
- "645f75696e743332185c2003280d42021000121b0a0f7265706561746564" .
- "5f75696e743634185d2003280442021000121b0a0f72657065617465645f" .
- "73696e743332185e2003281142021000121b0a0f72657065617465645f73" .
- "696e743634185f2003281242021000121c0a1072657065617465645f6669" .
- "786564333218602003280742021000121c0a1072657065617465645f6669" .
- "786564363418612003280642021000121d0a1172657065617465645f7366" .
- "69786564333218622003280f42021000121d0a1172657065617465645f73" .
- "6669786564363418632003281042021000121a0a0e72657065617465645f" .
- "666c6f617418642003280242021000121b0a0f72657065617465645f646f" .
- "75626c651865200328014202100012190a0d72657065617465645f626f6f" .
- "6c1866200328084202100012280a0d72657065617465645f656e756d1867" .
- "2003280e320d2e666f6f2e54657374456e756d420210002a1d0a08546573" .
- "74456e756d12080a045a45524f100012070a034f4e451001620670726f74" .
- "6f33"
-));
-
diff --git a/php/tests/test.sh b/php/tests/test.sh
index a6ca89b9..3635d86c 100755
--- a/php/tests/test.sh
+++ b/php/tests/test.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-# Generate test file
-../../src/protoc --php_out=. test.proto test_include.proto
-
# Compile c extension
pushd ../ext/google/protobuf/
make clean
set -e
# Add following in configure for debug: --enable-debug CFLAGS='-g -O0'
-phpize && ./configure && make
+phpize && ./configure --enable-debug CFLAGS='-g -O0' && make
popd
tests=( array_test.php encode_decode_test.php generated_class_test.php map_field_test.php well_known_test.php )
@@ -18,7 +15,7 @@ do
echo "****************************"
echo "* $t"
echo "****************************"
- php -dextension=../ext/google/protobuf/modules/protobuf.so `which phpunit` $t
+ php -dextension=../ext/google/protobuf/modules/protobuf.so `which phpunit` --bootstrap autoload.php $t
echo ""
done
diff --git a/php/tests/test_include.pb.php b/php/tests/test_include.pb.php
deleted file mode 100644
index 2c43cc41..00000000
--- a/php/tests/test_include.pb.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: test_include.proto
-
-namespace Bar;
-
-use Google\Protobuf\Internal\DescriptorPool;
-use Google\Protobuf\Internal\GPBType;
-use Google\Protobuf\Internal\RepeatedField;
-use Google\Protobuf\Internal\GPBUtil;
-
-class TestInclude extends \Google\Protobuf\Internal\Message
-{
- private $a = 0;
-
- public function getA()
- {
- return $this->a;
- }
-
- public function setA($var)
- {
- GPBUtil::checkInt32($var);
- $this->a = $var;
- }
-
-}
-
-$pool = DescriptorPool::getGeneratedPool();
-
-$pool->internalAddGeneratedFile(hex2bin(
- "0a3b0a12746573745f696e636c7564652e70726f746f120362617222180a" .
- "0b54657374496e636c75646512090a0161180120012805620670726f746f" .
- "33"
-));
-
diff --git a/php/tests/test_no_namespace.pb.php b/php/tests/test_no_namespace.pb.php
deleted file mode 100644
index 2f92c955..00000000
--- a/php/tests/test_no_namespace.pb.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: test_no_namespace.proto
-
-use Google\Protobuf\Internal\DescriptorPool;
-use Google\Protobuf\Internal\GPBType;
-use Google\Protobuf\Internal\RepeatedField;
-use Google\Protobuf\Internal\GPBUtil;
-
-class NoNameSpace extends \Google\Protobuf\Internal\Message
-{
- private $a = 0;
-
- public function getA()
- {
- return $this->a;
- }
-
- public function setA($var)
- {
- GPBUtil::checkInt32($var);
- $this->a = $var;
- }
-
-}
-
-$pool = DescriptorPool::getGeneratedPool();
-
-$pool->internalAddGeneratedFile(hex2bin(
- "0a3b0a17746573745f6e6f5f6e616d6573706163652e70726f746f22180a" .
- "0b4e6f4e616d65537061636512090a0161180120012805620670726f746f" .
- "33"
-));
-
diff --git a/php/tests/well_known_test.php b/php/tests/well_known_test.php
index 30715ba9..40ff1c8f 100644
--- a/php/tests/well_known_test.php
+++ b/php/tests/well_known_test.php
@@ -1,7 +1,5 @@
<?php
-require_once("google/protobuf/empty.pb.php");
-
use Google\Protobuf\GPBEmpty;
class WellKnownTest extends PHPUnit_Framework_TestCase {
diff --git a/phpunit.xml b/phpunit.xml
deleted file mode 100644
index f9118d8e..00000000
--- a/phpunit.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<phpunit bootstrap="./vendor/autoload.php"
- colors="true">
- <testsuites>
- <testsuite name="protobuf-tests">
- <file>php/tests/php_implementation_test.php</file>
- <file>php/tests/array_test.php</file>
- <file>php/tests/encode_decode_test.php</file>
- <file>php/tests/generated_class_test.php</file>
- <file>php/tests/map_field_test.php</file>
- <file>php/tests/well_known_test.php</file>
- </testsuite>
- </testsuites>
-</phpunit>
diff --git a/python/setup.py b/python/setup.py
index 524a312f..ef1a31b4 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -78,6 +78,7 @@ def generate_proto(source, require = True):
def GenerateUnittestProtos():
generate_proto("../src/google/protobuf/any_test.proto", False)
generate_proto("../src/google/protobuf/map_unittest.proto", False)
+ generate_proto("../src/google/protobuf/test_messages_proto3.proto", False)
generate_proto("../src/google/protobuf/unittest_arena.proto", False)
generate_proto("../src/google/protobuf/unittest_no_arena.proto", False)
generate_proto("../src/google/protobuf/unittest_no_arena_import.proto", False)
diff --git a/ruby/Rakefile b/ruby/Rakefile
index ba1cf4cf..40d0a314 100644
--- a/ruby/Rakefile
+++ b/ruby/Rakefile
@@ -44,11 +44,11 @@ if RUBY_PLATFORM == "java"
raise ArgumentError, "maven needs to be installed"
end
task :clean do
- system("mvn clean")
+ system("mvn --batch-mode clean")
end
task :compile do
- system("mvn package")
+ system("mvn --batch-mode package")
end
else
Rake::ExtensionTask.new("protobuf_c", spec) do |ext|
diff --git a/ruby/lib/google/protobuf/repeated_field.rb b/ruby/lib/google/protobuf/repeated_field.rb
index 831e0320..11d6c2eb 100644
--- a/ruby/lib/google/protobuf/repeated_field.rb
+++ b/ruby/lib/google/protobuf/repeated_field.rb
@@ -74,7 +74,7 @@ module Google
:include?, :index, :inspect, :join,
:pack, :permutation, :product, :pretty_print, :pretty_print_cycle,
:rassoc, :repeated_combination, :repeated_permutation, :reverse,
- :rindex, :rotate, :sample, :shuffle, :shelljoin, :slice,
+ :rindex, :rotate, :sample, :shuffle, :shelljoin,
:to_s, :transpose, :uniq, :|
diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h
index 482db72f..0d8deab6 100644
--- a/src/google/protobuf/any.pb.h
+++ b/src/google/protobuf/any.pb.h
@@ -33,7 +33,7 @@ namespace google {
namespace protobuf {
class Any;
class AnyDefaultTypeInternal;
-extern AnyDefaultTypeInternal _Any_default_instance_;
+LIBPROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h
index 255eb4e3..f4699a5c 100644
--- a/src/google/protobuf/api.pb.h
+++ b/src/google/protobuf/api.pb.h
@@ -34,31 +34,31 @@ namespace google {
namespace protobuf {
class Api;
class ApiDefaultTypeInternal;
-extern ApiDefaultTypeInternal _Api_default_instance_;
+LIBPROTOBUF_EXPORT extern ApiDefaultTypeInternal _Api_default_instance_;
class Enum;
class EnumDefaultTypeInternal;
-extern EnumDefaultTypeInternal _Enum_default_instance_;
+LIBPROTOBUF_EXPORT extern EnumDefaultTypeInternal _Enum_default_instance_;
class EnumValue;
class EnumValueDefaultTypeInternal;
-extern EnumValueDefaultTypeInternal _EnumValue_default_instance_;
+LIBPROTOBUF_EXPORT extern EnumValueDefaultTypeInternal _EnumValue_default_instance_;
class Field;
class FieldDefaultTypeInternal;
-extern FieldDefaultTypeInternal _Field_default_instance_;
+LIBPROTOBUF_EXPORT extern FieldDefaultTypeInternal _Field_default_instance_;
class Method;
class MethodDefaultTypeInternal;
-extern MethodDefaultTypeInternal _Method_default_instance_;
+LIBPROTOBUF_EXPORT extern MethodDefaultTypeInternal _Method_default_instance_;
class Mixin;
class MixinDefaultTypeInternal;
-extern MixinDefaultTypeInternal _Mixin_default_instance_;
+LIBPROTOBUF_EXPORT extern MixinDefaultTypeInternal _Mixin_default_instance_;
class Option;
class OptionDefaultTypeInternal;
-extern OptionDefaultTypeInternal _Option_default_instance_;
+LIBPROTOBUF_EXPORT extern OptionDefaultTypeInternal _Option_default_instance_;
class SourceContext;
class SourceContextDefaultTypeInternal;
-extern SourceContextDefaultTypeInternal _SourceContext_default_instance_;
+LIBPROTOBUF_EXPORT extern SourceContextDefaultTypeInternal _SourceContext_default_instance_;
class Type;
class TypeDefaultTypeInternal;
-extern TypeDefaultTypeInternal _Type_default_instance_;
+LIBPROTOBUF_EXPORT extern TypeDefaultTypeInternal _Type_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/src/google/protobuf/compiler/code_generator.cc b/src/google/protobuf/compiler/code_generator.cc
index 6bf101c3..11d0f334 100644
--- a/src/google/protobuf/compiler/code_generator.cc
+++ b/src/google/protobuf/compiler/code_generator.cc
@@ -34,6 +34,7 @@
#include <google/protobuf/compiler/code_generator.h>
+#include <google/protobuf/compiler/plugin.pb.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/descriptor.h>
@@ -89,6 +90,13 @@ void GeneratorContext::ListParsedFiles(
GOOGLE_LOG(FATAL) << "This GeneratorContext does not support ListParsedFiles";
}
+void GeneratorContext::GetCompilerVersion(Version* version) const {
+ version->set_major(GOOGLE_PROTOBUF_VERSION / 1000000);
+ version->set_minor(GOOGLE_PROTOBUF_VERSION / 1000 % 1000);
+ version->set_patch(GOOGLE_PROTOBUF_VERSION % 1000);
+ version->set_suffix(GOOGLE_PROTOBUF_VERSION_SUFFIX);
+}
+
// Parses a set of comma-delimited name/value pairs.
void ParseGeneratorParameter(const string& text,
std::vector<std::pair<string, string> >* output) {
diff --git a/src/google/protobuf/compiler/code_generator.h b/src/google/protobuf/compiler/code_generator.h
index a8b7e762..e2b2a661 100644
--- a/src/google/protobuf/compiler/code_generator.h
+++ b/src/google/protobuf/compiler/code_generator.h
@@ -50,6 +50,7 @@ namespace io { class ZeroCopyOutputStream; }
class FileDescriptor;
namespace compiler {
+class Version;
// Defined in this file.
class CodeGenerator;
@@ -143,6 +144,10 @@ class LIBPROTOC_EXPORT GeneratorContext {
// differently when compiled as a set rather than individually.
virtual void ListParsedFiles(std::vector<const FileDescriptor*>* output);
+ // Retrieves the version number of the protocol compiler associated with
+ // this GeneratorContext.
+ virtual void GetCompilerVersion(Version* version) const;
+
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GeneratorContext);
};
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index 78ceb68c..bef0fe5a 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -1619,6 +1619,13 @@ bool CommandLineInterface::GeneratePluginOutput(
&already_seen, request.mutable_proto_file());
}
+ google::protobuf::compiler::Version* version =
+ request.mutable_compiler_version();
+ version->set_major(GOOGLE_PROTOBUF_VERSION / 1000000);
+ version->set_minor(GOOGLE_PROTOBUF_VERSION / 1000 % 1000);
+ version->set_patch(GOOGLE_PROTOBUF_VERSION % 1000);
+ version->set_suffix(GOOGLE_PROTOBUF_VERSION_SUFFIX);
+
// Invoke the plugin.
Subprocess subprocess;
diff --git a/src/google/protobuf/compiler/command_line_interface_unittest.cc b/src/google/protobuf/compiler/command_line_interface_unittest.cc
index d5b5b185..b2ec8426 100644
--- a/src/google/protobuf/compiler/command_line_interface_unittest.cc
+++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc
@@ -57,6 +57,7 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/unittest.pb.h>
#include <google/protobuf/testing/file.h>
+#include <google/protobuf/stubs/stringprintf.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/substitute.h>
@@ -1582,6 +1583,21 @@ TEST_F(CommandLineInterfaceTest, PluginReceivesJsonName) {
ExpectErrorSubstring("Saw json_name: 1");
}
+TEST_F(CommandLineInterfaceTest, PluginReceivesCompilerVersion) {
+ CreateTempFile("foo.proto",
+ "syntax = \"proto2\";\n"
+ "message MockCodeGenerator_ShowVersionNumber {\n"
+ " optional int32 value = 1;\n"
+ "}\n");
+
+ Run("protocol_compiler --plug_out=$tmpdir --proto_path=$tmpdir foo.proto");
+
+ ExpectErrorSubstring(
+ StringPrintf("Saw compiler_version: %d %s",
+ GOOGLE_PROTOBUF_VERSION,
+ GOOGLE_PROTOBUF_VERSION_SUFFIX));
+}
+
TEST_F(CommandLineInterfaceTest, GeneratorPluginNotFound) {
// Test what happens if the plugin isn't found.
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc
index bc664c70..d8fda59c 100644
--- a/src/google/protobuf/compiler/cpp/cpp_file.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_file.cc
@@ -403,7 +403,7 @@ class FileGenerator::ForwardDeclarations {
std::map<string, const Descriptor*>& classes() { return classes_; }
std::map<string, const EnumDescriptor*>& enums() { return enums_; }
- void Print(io::Printer* printer) const {
+ void Print(io::Printer* printer, const Options& options) const {
for (std::map<string, const EnumDescriptor *>::const_iterator
it = enums_.begin(),
end = enums_.end();
@@ -422,8 +422,11 @@ class FileGenerator::ForwardDeclarations {
printer->Print(
"class $classname$DefaultTypeInternal;\n"
+ "$dllexport_decl$"
"extern $classname$DefaultTypeInternal "
"_$classname$_default_instance_;\n", // NOLINT
+ "dllexport_decl",
+ options.dllexport_decl.empty() ? "" : options.dllexport_decl + " ",
"classname",
it->first);
}
@@ -433,7 +436,7 @@ class FileGenerator::ForwardDeclarations {
it != end; ++it) {
printer->Print("namespace $nsname$ {\n",
"nsname", it->first);
- it->second->Print(printer);
+ it->second->Print(printer, options);
printer->Print("} // namespace $nsname$\n",
"nsname", it->first);
}
@@ -808,7 +811,7 @@ void FileGenerator::GenerateForwardDeclarations(io::Printer* printer) {
dependency.FillForwardDeclarations(&decls);
}
FillForwardDeclarations(&decls);
- decls.Print(printer);
+ decls.Print(printer, options_);
}
void FileGenerator::FillForwardDeclarations(ForwardDeclarations* decls) {
diff --git a/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc b/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
index 587e0222..636a76a0 100644
--- a/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
@@ -74,7 +74,7 @@ void WriteDocCommentBodyImpl(io::Printer* printer, SourceLocation location) {
printer->Print("///\n");
}
last_was_empty = false;
- printer->Print("/// $line$\n", "line", *it);
+ printer->Print("///$line$\n", "line", *it);
}
}
printer->Print("/// </summary>\n");
diff --git a/src/google/protobuf/compiler/js/embed.cc b/src/google/protobuf/compiler/js/embed.cc
index 072cccad..be2ffdd4 100644
--- a/src/google/protobuf/compiler/js/embed.cc
+++ b/src/google/protobuf/compiler/js/embed.cc
@@ -28,9 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#include <cassert>
#include <cstdlib>
#include <fstream>
#include <iostream>
+#include <string>
const char output_file[] = "well_known_types_embed.cc";
diff --git a/src/google/protobuf/compiler/js/well_known_types_embed.cc b/src/google/protobuf/compiler/js/well_known_types_embed.cc
index b589ccb5..71fd557f 100755
--- a/src/google/protobuf/compiler/js/well_known_types_embed.cc
+++ b/src/google/protobuf/compiler/js/well_known_types_embed.cc
@@ -1,4 +1,4 @@
-#include "google/protobuf/compiler/js/well_known_types_embed.h"
+#include <google/protobuf/compiler/js/well_known_types_embed.h>
struct FileToc well_known_types_js[] = {
{"any.js",
"// Protocol Buffers - Google's data interchange format\n"
diff --git a/src/google/protobuf/compiler/mock_code_generator.cc b/src/google/protobuf/compiler/mock_code_generator.cc
index 979814ec..e82e6ae1 100644
--- a/src/google/protobuf/compiler/mock_code_generator.cc
+++ b/src/google/protobuf/compiler/mock_code_generator.cc
@@ -40,6 +40,7 @@
#endif
#include <vector>
+#include <google/protobuf/compiler/plugin.pb.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/testing/file.h>
@@ -160,6 +161,15 @@ bool MockCodeGenerator::Generate(
std::cerr << "Saw json_name: "
<< field_descriptor_proto.has_json_name() << std::endl;
abort();
+ } else if (command == "ShowVersionNumber") {
+ Version compiler_version;
+ context->GetCompilerVersion(&compiler_version);
+ std::cerr << "Saw compiler_version: "
+ << compiler_version.major() * 1000000 +
+ compiler_version.minor() * 1000 +
+ compiler_version.patch()
+ << " " << compiler_version.suffix() << std::endl;
+ abort();
} else {
GOOGLE_LOG(FATAL) << "Unknown MockCodeGenerator command: " << command;
}
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_enum.cc b/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
index 34e17823..02d60b3e 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
@@ -74,7 +74,7 @@ void EnumGenerator::GenerateHeader(io::Printer* printer) {
printer->Print("$comments$typedef$deprecated_attribute$ GPB_ENUM($name$) {\n",
"comments", enum_comments,
- "deprecated_attribute", GetOptionalDeprecatedAttribute(descriptor_),
+ "deprecated_attribute", GetOptionalDeprecatedAttribute(descriptor_, descriptor_->file()),
"name", name_);
printer->Indent();
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_extension.cc b/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
index d0de1eca..7073173c 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
@@ -67,9 +67,12 @@ void ExtensionGenerator::GenerateMembersHeader(io::Printer* printer) {
} else {
vars["comments"] = "";
}
+ // Unlike normal message fields, check if the file for the extension was
+ // deprecated.
+ vars["deprecated_attribute"] = GetOptionalDeprecatedAttribute(descriptor_, descriptor_->file());
printer->Print(vars,
"$comments$"
- "+ (GPBExtensionDescriptor *)$method_name$;\n");
+ "+ (GPBExtensionDescriptor *)$method_name$$deprecated_attribute$;\n");
}
void ExtensionGenerator::GenerateStaticVariablesInitialization(
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
index bbc6d8e9..c99262a1 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
@@ -150,8 +150,18 @@ enum FlagType {
};
template<class TDescriptor>
-string GetOptionalDeprecatedAttribute(const TDescriptor* descriptor, bool preSpace = true, bool postNewline = false) {
- if (descriptor->options().deprecated()) {
+string GetOptionalDeprecatedAttribute(
+ const TDescriptor* descriptor,
+ const FileDescriptor* file = NULL,
+ bool preSpace = true, bool postNewline = false) {
+ bool isDeprecated = descriptor->options().deprecated();
+ // The file is only passed when checking Messages & Enums, so those types
+ // get tagged. At the moment, it doesn't seem to make sense to tag every
+ // field or enum value with when the file is deprecated.
+ if (!isDeprecated && file) {
+ isDeprecated = file->options().deprecated();
+ }
+ if (isDeprecated) {
string result = "DEPRECATED_ATTRIBUTE";
if (preSpace) {
result.insert(0, " ");
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_message.cc b/src/google/protobuf/compiler/objectivec/objectivec_message.cc
index 4c6e1b55..e0bd3dac 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_message.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_message.cc
@@ -180,7 +180,10 @@ MessageGenerator::MessageGenerator(const string& root_classname,
: root_classname_(root_classname),
descriptor_(descriptor),
field_generators_(descriptor, options),
- class_name_(ClassName(descriptor_)) {
+ class_name_(ClassName(descriptor_)),
+ deprecated_attribute_(
+ GetOptionalDeprecatedAttribute(descriptor, descriptor->file(), false, true)) {
+
for (int i = 0; i < descriptor_->extension_count(); i++) {
extension_generators_.push_back(
new ExtensionGenerator(class_name_, descriptor_->extension(i)));
@@ -339,7 +342,7 @@ void MessageGenerator::GenerateMessageHeader(io::Printer* printer) {
printer->Print(
"$comments$$deprecated_attribute$@interface $classname$ : GPBMessage\n\n",
"classname", class_name_,
- "deprecated_attribute", GetOptionalDeprecatedAttribute(descriptor_, false, true),
+ "deprecated_attribute", deprecated_attribute_,
"comments", message_comments);
vector<char> seen_oneofs(descriptor_->oneof_decl_count(), 0);
@@ -396,6 +399,14 @@ void MessageGenerator::GenerateSource(io::Printer* printer) {
"\n",
"classname", class_name_);
+ if (!deprecated_attribute_.empty()) {
+ // No warnings when compiling the impl of this deprecated class.
+ printer->Print(
+ "#pragma clang diagnostic push\n"
+ "#pragma clang diagnostic ignored \"-Wdeprecated-implementations\"\n"
+ "\n");
+ }
+
printer->Print("@implementation $classname$\n\n",
"classname", class_name_);
@@ -601,6 +612,12 @@ void MessageGenerator::GenerateSource(io::Printer* printer) {
"}\n\n"
"@end\n\n");
+ if (!deprecated_attribute_.empty()) {
+ printer->Print(
+ "#pragma clang diagnostic pop\n"
+ "\n");
+ }
+
for (int i = 0; i < descriptor_->field_count(); i++) {
field_generators_.get(descriptor_->field(i))
.GenerateCFunctionImplementations(printer);
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_message.h b/src/google/protobuf/compiler/objectivec/objectivec_message.h
index 910535ac..0fb78bc0 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_message.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_message.h
@@ -85,6 +85,7 @@ class MessageGenerator {
const Descriptor* descriptor_;
FieldGeneratorMap field_generators_;
const string class_name_;
+ const string deprecated_attribute_;
vector<ExtensionGenerator*> extension_generators_;
vector<EnumGenerator*> enum_generators_;
vector<MessageGenerator*> nested_message_generators_;
diff --git a/src/google/protobuf/compiler/php/php_generator.cc b/src/google/protobuf/compiler/php/php_generator.cc
index 83e629b9..be2739ff 100644
--- a/src/google/protobuf/compiler/php/php_generator.cc
+++ b/src/google/protobuf/compiler/php/php_generator.cc
@@ -43,6 +43,11 @@
using google::protobuf::internal::scoped_ptr;
const std::string kDescriptorFile = "google/protobuf/descriptor.proto";
+const std::string kEmptyFile = "google/protobuf/empty.proto";
+const std::string kEmptyMetadataFile = "GPBMetadata/Google/Protobuf/GPBEmpty.php";
+const std::string kDescriptorMetadataFile =
+ "GPBMetadata/Google/Protobuf/Internal/Descriptor.php";
+const std::string kDescriptorDirName = "Google/Protobuf/Internal";
const std::string kDescriptorPackageName = "Google\\Protobuf\\Internal";
namespace google {
@@ -52,25 +57,34 @@ namespace php {
// Forward decls.
std::string PhpName(const std::string& full_name, bool is_descriptor);
-std::string DefaultForField(google::protobuf::FieldDescriptor* field);
+std::string DefaultForField(FieldDescriptor* field);
std::string IntToString(int32 value);
-std::string GeneratedFileName(const std::string& proto_file,
- bool is_descriptor);
-std::string LabelForField(google::protobuf::FieldDescriptor* field);
-std::string TypeName(google::protobuf::FieldDescriptor* field);
+std::string FilenameToClassname(const string& filename);
+std::string GeneratedMetadataFileName(const std::string& proto_file,
+ bool is_descriptor);
+std::string LabelForField(FieldDescriptor* field);
+std::string TypeName(FieldDescriptor* field);
std::string UnderscoresToCamelCase(const string& name, bool cap_first_letter);
std::string EscapeDollor(const string& to_escape);
std::string BinaryToHex(const string& binary);
-void GenerateMessage(const string& name_prefix,
- const google::protobuf::Descriptor* message,
- bool is_descriptor,
- google::protobuf::io::Printer* printer);
-void GenerateEnum(const google::protobuf::EnumDescriptor* en,
- google::protobuf::io::Printer* printer);
-void Indent(google::protobuf::io::Printer* printer);
-void Outdent(google::protobuf::io::Printer* printer);
-
-std::string MessagePrefix(const google::protobuf::Descriptor* message) {
+void Indent(io::Printer* printer);
+void Outdent(io::Printer* printer);
+void GenerateMessageDocComment(io::Printer* printer, const Descriptor* message);
+void GenerateFieldDocComment(io::Printer* printer,
+ const FieldDescriptor* field);
+void GenerateEnumDocComment(io::Printer* printer, const EnumDescriptor* enum_);
+void GenerateEnumValueDocComment(io::Printer* printer,
+ const EnumValueDescriptor* value);
+
+std::string RenameEmpty(const std::string& name) {
+ if (name == "Empty") {
+ return "GPBEmpty";
+ } else {
+ return name;
+ }
+}
+
+std::string MessagePrefix(const Descriptor* message) {
// Empty cannot be php class name.
if (message->name() == "Empty" &&
message->file()->package() == "google.protobuf") {
@@ -80,10 +94,9 @@ std::string MessagePrefix(const google::protobuf::Descriptor* message) {
}
}
-std::string MessageName(const google::protobuf::Descriptor* message,
- bool is_descriptor) {
+std::string MessageName(const Descriptor* message, bool is_descriptor) {
string message_name = message->name();
- const google::protobuf::Descriptor* descriptor = message->containing_type();
+ const Descriptor* descriptor = message->containing_type();
while (descriptor != NULL) {
message_name = descriptor->name() + '_' + message_name;
descriptor = descriptor->containing_type();
@@ -94,8 +107,7 @@ std::string MessageName(const google::protobuf::Descriptor* message,
message_name;
}
-std::string MessageFullName(const google::protobuf::Descriptor* message,
- bool is_descriptor) {
+std::string MessageFullName(const Descriptor* message, bool is_descriptor) {
if (is_descriptor) {
return StringReplace(message->full_name(),
"google.protobuf",
@@ -105,8 +117,7 @@ std::string MessageFullName(const google::protobuf::Descriptor* message,
}
}
-std::string EnumFullName(const google::protobuf::EnumDescriptor* envm,
- bool is_descriptor) {
+std::string EnumFullName(const EnumDescriptor* envm, bool is_descriptor) {
if (is_descriptor) {
return StringReplace(envm->full_name(),
"google.protobuf",
@@ -116,9 +127,9 @@ std::string EnumFullName(const google::protobuf::EnumDescriptor* envm,
}
}
-std::string EnumClassName(const google::protobuf::EnumDescriptor* envm) {
+std::string EnumClassName(const EnumDescriptor* envm) {
string enum_class_name = envm->name();
- const google::protobuf::Descriptor* descriptor = envm->containing_type();
+ const Descriptor* descriptor = envm->containing_type();
while (descriptor != NULL) {
enum_class_name = descriptor->name() + '_' + enum_class_name;
descriptor = descriptor->containing_type();
@@ -126,8 +137,7 @@ std::string EnumClassName(const google::protobuf::EnumDescriptor* envm) {
return enum_class_name;
}
-std::string EnumName(const google::protobuf::EnumDescriptor* envm,
- bool is_descriptor) {
+std::string EnumName(const EnumDescriptor* envm, bool is_descriptor) {
string enum_name = EnumClassName(envm);
return PhpName(envm->file()->package(), is_descriptor) + '\\' + enum_name;
}
@@ -154,7 +164,7 @@ std::string PhpName(const std::string& full_name, bool is_descriptor) {
return result;
}
-std::string DefaultForField(const google::protobuf::FieldDescriptor* field) {
+std::string DefaultForField(const FieldDescriptor* field) {
switch (field->type()) {
case FieldDescriptor::TYPE_INT32:
case FieldDescriptor::TYPE_INT64:
@@ -178,14 +188,63 @@ std::string DefaultForField(const google::protobuf::FieldDescriptor* field) {
}
}
-std::string GeneratedFileName(const std::string& proto_file,
- bool is_descriptor) {
+std::string GeneratedMetadataFileName(const std::string& proto_file,
+ bool is_descriptor) {
+ int start_index = 0;
+ int first_index = proto_file.find_first_of("/", start_index);
+ std::string result = "GPBMetadata/";
+
+ if (proto_file == kEmptyFile) {
+ return kEmptyMetadataFile;
+ }
if (is_descriptor) {
- return "descriptor_internal.pb.php";
+ return kDescriptorMetadataFile;
+ }
+
+ // Append directory name.
+ std::string file_no_suffix;
+ int lastindex = proto_file.find_last_of(".");
+ if (proto_file == kEmptyFile) {
+ return kEmptyMetadataFile;
} else {
- int lastindex = proto_file.find_last_of(".");
- return proto_file.substr(0, lastindex) + ".pb.php";
+ file_no_suffix = proto_file.substr(0, lastindex);
+ }
+
+ while (first_index != string::npos) {
+ result += UnderscoresToCamelCase(
+ file_no_suffix.substr(start_index, first_index - start_index), true);
+ result += "/";
+ start_index = first_index + 1;
+ first_index = file_no_suffix.find_first_of("/", start_index);
}
+
+ // Append file name.
+ result += RenameEmpty(UnderscoresToCamelCase(
+ file_no_suffix.substr(start_index, first_index - start_index), true));
+
+ return result += ".php";
+}
+
+std::string GeneratedMessageFileName(const Descriptor* message,
+ bool is_descriptor) {
+ std::string result = MessageName(message, is_descriptor);
+ for (int i = 0; i < result.size(); i++) {
+ if (result[i] == '\\') {
+ result[i] = '/';
+ }
+ }
+ return result + ".php";
+}
+
+std::string GeneratedEnumFileName(const EnumDescriptor* en,
+ bool is_descriptor) {
+ std::string result = EnumName(en, is_descriptor);
+ for (int i = 0; i < result.size(); i++) {
+ if (result[i] == '\\') {
+ result[i] = '/';
+ }
+ }
+ return result + ".php";
}
std::string IntToString(int32 value) {
@@ -194,7 +253,7 @@ std::string IntToString(int32 value) {
return os.str();
}
-std::string LabelForField(const google::protobuf::FieldDescriptor* field) {
+std::string LabelForField(const FieldDescriptor* field) {
switch (field->label()) {
case FieldDescriptor::LABEL_OPTIONAL: return "optional";
case FieldDescriptor::LABEL_REQUIRED: return "required";
@@ -203,7 +262,7 @@ std::string LabelForField(const google::protobuf::FieldDescriptor* field) {
}
}
-std::string TypeName(const google::protobuf::FieldDescriptor* field) {
+std::string TypeName(const FieldDescriptor* field) {
switch (field->type()) {
case FieldDescriptor::TYPE_INT32: return "int32";
case FieldDescriptor::TYPE_INT64: return "int64";
@@ -228,7 +287,7 @@ std::string TypeName(const google::protobuf::FieldDescriptor* field) {
}
std::string EnumOrMessageSuffix(
- const google::protobuf::FieldDescriptor* field, bool is_descriptor) {
+ const FieldDescriptor* field, bool is_descriptor) {
if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
return ", '" + MessageFullName(field->message_type(), is_descriptor) + "'";
}
@@ -299,74 +358,77 @@ std::string BinaryToHex(const string& src) {
return dest;
}
-void Indent(google::protobuf::io::Printer* printer) {
+void Indent(io::Printer* printer) {
printer->Indent();
printer->Indent();
}
-void Outdent(google::protobuf::io::Printer* printer) {
+void Outdent(io::Printer* printer) {
printer->Outdent();
printer->Outdent();
}
-void GenerateField(const google::protobuf::FieldDescriptor* field,
- google::protobuf::io::Printer* printer, bool is_descriptor) {
+void GenerateField(const FieldDescriptor* field, io::Printer* printer,
+ bool is_descriptor) {
if (field->is_repeated()) {
+ GenerateFieldDocComment(printer, field);
printer->Print(
- "private $@name@;\n",
+ "private $^name^;\n",
"name", field->name());
} else if (field->containing_oneof()) {
// Oneof fields are handled by GenerateOneofField.
return;
} else {
+ GenerateFieldDocComment(printer, field);
printer->Print(
- "private $@name@ = @default@;\n",
+ "private $^name^ = ^default^;\n",
"name", field->name(),
"default", DefaultForField(field));
}
if (is_descriptor) {
printer->Print(
- "private $has_@name@ = false;\n",
+ "private $has_^name^ = false;\n",
"name", field->name());
}
}
-void GenerateOneofField(const google::protobuf::OneofDescriptor* oneof,
- google::protobuf::io::Printer* printer) {
+void GenerateOneofField(const OneofDescriptor* oneof, io::Printer* printer) {
// Oneof property needs to be protected in order to be accessed by parent
// class in implementation.
printer->Print(
- "protected $@name@;\n",
+ "protected $^name^;\n",
"name", oneof->name());
}
-void GenerateFieldAccessor(const google::protobuf::FieldDescriptor* field,
- bool is_descriptor,
- google::protobuf::io::Printer* printer) {
+void GenerateFieldAccessor(const FieldDescriptor* field, bool is_descriptor,
+ io::Printer* printer) {
const OneofDescriptor* oneof = field->containing_oneof();
// Generate getter.
if (oneof != NULL) {
+ GenerateFieldDocComment(printer, field);
printer->Print(
- "public function get@camel_name@()\n"
+ "public function get^camel_name^()\n"
"{\n"
- " return $this->readOneof(@number@);\n"
+ " return $this->readOneof(^number^);\n"
"}\n\n",
"camel_name", UnderscoresToCamelCase(field->name(), true),
"number", IntToString(field->number()));
} else {
+ GenerateFieldDocComment(printer, field);
printer->Print(
- "public function get@camel_name@()\n"
+ "public function get^camel_name^()\n"
"{\n"
- " return $this->@name@;\n"
+ " return $this->^name^;\n"
"}\n\n",
"camel_name", UnderscoresToCamelCase(field->name(), true), "name",
field->name());
}
// Generate setter.
+ GenerateFieldDocComment(printer, field);
printer->Print(
- "public function set@camel_name@(@var@)\n"
+ "public function set^camel_name^(^var^)\n"
"{\n",
"camel_name", UnderscoresToCamelCase(field->name(), true),
"var", (field->is_repeated() ||
@@ -379,16 +441,17 @@ void GenerateFieldAccessor(const google::protobuf::FieldDescriptor* field,
if (field->is_map()) {
} else if (field->is_repeated()) {
printer->Print(
- "GPBUtil::checkRepeatedField($var, GPBType::@type@",
+ "GPBUtil::checkRepeatedField($var, "
+ "\\Google\\Protobuf\\Internal\\GPBType::^type^",
"type", ToUpper(field->type_name()));
if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
printer->Print(
- ", \\@class_name@);\n",
+ ", \\^class_name^);\n",
"class_name",
MessageName(field->message_type(), is_descriptor) + "::class");
} else if (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) {
printer->Print(
- ", @class_name@);\n",
+ ", ^class_name^);\n",
"class_name",
EnumName(field->enum_type(), is_descriptor) + "::class");
} else {
@@ -396,37 +459,37 @@ void GenerateFieldAccessor(const google::protobuf::FieldDescriptor* field,
}
} else if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
printer->Print(
- "GPBUtil::checkMessage($var, \\@class_name@::class);\n",
+ "GPBUtil::checkMessage($var, \\^class_name^::class);\n",
"class_name", MessageName(field->message_type(), is_descriptor));
} else if (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) {
printer->Print(
- "GPBUtil::checkEnum($var, \\@class_name@::class);\n",
+ "GPBUtil::checkEnum($var, \\^class_name^::class);\n",
"class_name", EnumName(field->enum_type(), is_descriptor));
} else if (field->cpp_type() == FieldDescriptor::CPPTYPE_STRING) {
printer->Print(
- "GPBUtil::checkString($var, @utf8@);\n",
+ "GPBUtil::checkString($var, ^utf8^);\n",
"utf8",
field->type() == FieldDescriptor::TYPE_STRING ? "True": "False");
} else {
printer->Print(
- "GPBUtil::check@type@($var);\n",
+ "GPBUtil::check^type^($var);\n",
"type", UnderscoresToCamelCase(field->cpp_type_name(), true));
}
if (oneof != NULL) {
printer->Print(
- "$this->writeOneof(@number@, $var);\n",
+ "$this->writeOneof(^number^, $var);\n",
"number", IntToString(field->number()));
} else {
printer->Print(
- "$this->@name@ = $var;\n",
+ "$this->^name^ = $var;\n",
"name", field->name());
}
// Set has bit for proto2 only.
if (is_descriptor) {
printer->Print(
- "$this->has_@field_name@ = true;\n",
+ "$this->has_^field_name^ = true;\n",
"field_name", field->name());
}
@@ -438,127 +501,27 @@ void GenerateFieldAccessor(const google::protobuf::FieldDescriptor* field,
// Generate has method for proto2 only.
if (is_descriptor) {
printer->Print(
- "public function has@camel_name@()\n"
+ "public function has^camel_name^()\n"
"{\n"
- " return $this->has_@field_name@;\n"
+ " return $this->has_^field_name^;\n"
"}\n\n",
"camel_name", UnderscoresToCamelCase(field->name(), true),
"field_name", field->name());
}
}
-void GenerateRepeatedFieldDecode(
- const google::protobuf::FieldDescriptor* field,
- google::protobuf::io::Printer* printer) {
- printer->Print(
- "if ($input->read@cap_wire_type@($var)) return False;\n"
- "$this->get@cap_field_name@() []= $var;\n",
- "cap_field_name", UnderscoresToCamelCase(field->name(), true),
- "cap_wire_type", UnderscoresToCamelCase(field->type_name(), true));
-}
-
-void GeneratePrimitiveFieldDecode(
- const google::protobuf::FieldDescriptor* field,
- google::protobuf::io::Printer* printer) {
- printer->Print(
- "if ($input->read@cap_wire_type@($var)) return False;\n"
- "$this->set@cap_field_name@($var);\n",
- "cap_field_name", UnderscoresToCamelCase(field->name(), true),
- "cap_wire_type", UnderscoresToCamelCase(field->type_name(), true));
-}
-
-void GenerateFieldDecode(const google::protobuf::FieldDescriptor* field,
- google::protobuf::io::Printer* printer) {
- printer->Print(
- "case @number@:\n",
- "number", IntToString(field->number()));
- Indent(printer);
-
- if (field->is_repeated()) {
- GenerateRepeatedFieldDecode(field, printer);
- } else {
- GeneratePrimitiveFieldDecode(field, printer);
- }
-
- printer->Print(
- "break;\n");
- Outdent(printer);
-}
-
-void GenerateMessage(const string& name_prefix,
- const google::protobuf::Descriptor* message,
- bool is_descriptor,
- google::protobuf::io::Printer* printer) {
- // Don't generate MapEntry messages -- we use the PHP extension's native
- // support for map fields instead.
- if (message->options().map_entry()) {
- return;
- }
-
- string message_name =
- name_prefix.empty()
- ? message->name()
- : name_prefix + "_" + MessagePrefix(message) + message->name();
-
- printer->Print(
- "class @name@ extends \\Google\\Protobuf\\Internal\\Message\n"
- "{\n",
- "name", message_name);
- Indent(printer);
-
- // Field and oneof definitions.
- for (int i = 0; i < message->field_count(); i++) {
- const FieldDescriptor* field = message->field(i);
- GenerateField(field, printer, is_descriptor);
- }
- for (int i = 0; i < message->oneof_decl_count(); i++) {
- const OneofDescriptor* oneof = message->oneof_decl(i);
- GenerateOneofField(oneof, printer);
- }
- printer->Print("\n");
-
- // Field and oneof accessors.
- for (int i = 0; i < message->field_count(); i++) {
- const FieldDescriptor* field = message->field(i);
- GenerateFieldAccessor(field, is_descriptor, printer);
- }
- for (int i = 0; i < message->oneof_decl_count(); i++) {
- const google::protobuf::OneofDescriptor* oneof = message->oneof_decl(i);
- printer->Print(
- "public function get@camel_name@()\n"
- "{\n"
- " return $this->@name@;\n"
- "}\n\n",
- "camel_name", UnderscoresToCamelCase(oneof->name(), true), "name",
- oneof->name());
- }
-
- Outdent(printer);
- printer->Print("}\n\n");
-
- // Nested messages and enums.
- for (int i = 0; i < message->nested_type_count(); i++) {
- GenerateMessage(message_name, message->nested_type(i), is_descriptor,
- printer);
- }
- for (int i = 0; i < message->enum_type_count(); i++) {
- GenerateEnum(message->enum_type(i), printer);
- }
-}
-
-void GenerateEnumToPool(const google::protobuf::EnumDescriptor* en,
- bool is_descriptor,
- google::protobuf::io::Printer* printer) {
+void GenerateEnumToPool(const EnumDescriptor* en, io::Printer* printer) {
printer->Print(
- "$pool->addEnum('@name@', @class_name@::class)\n",
- "name", EnumFullName(en, is_descriptor),
+ "$pool->addEnum('^name^', "
+ "\\Google\\Protobuf\\Internal\\^class_name^::class)\n",
+ "name", EnumFullName(en, true),
"class_name", en->name());
Indent(printer);
for (int i = 0; i < en->value_count(); i++) {
const EnumValueDescriptor* value = en->value(i);
printer->Print(
- "->value(\"@name@\", @number@)\n",
+ "->value(\"^name^\", ^number^)\n",
"name", value->name(),
"number", IntToString(value->number()));
}
@@ -566,10 +529,8 @@ void GenerateEnumToPool(const google::protobuf::EnumDescriptor* en,
Outdent(printer);
}
-void GenerateMessageToPool(const string& name_prefix,
- const google::protobuf::Descriptor* message,
- bool is_descriptor,
- google::protobuf::io::Printer* printer) {
+void GenerateMessageToPool(const string& name_prefix, const Descriptor* message,
+ io::Printer* printer) {
// Don't generate MapEntry messages -- we use the PHP extension's native
// support for map fields instead.
if (message->options().map_entry()) {
@@ -579,8 +540,9 @@ void GenerateMessageToPool(const string& name_prefix,
message->name() : name_prefix + "_" + message->name();
printer->Print(
- "$pool->addMessage('@message@', @class_name@::class)\n",
- "message", MessageFullName(message, is_descriptor),
+ "$pool->addMessage('^message^', "
+ "\\Google\\Protobuf\\Internal\\^class_name^::class)\n",
+ "message", MessageFullName(message, true),
"class_name", class_name);
Indent(printer);
@@ -593,38 +555,40 @@ void GenerateMessageToPool(const string& name_prefix,
const FieldDescriptor* val =
field->message_type()->FindFieldByName("value");
printer->Print(
- "->map('@field@', GPBType::@key@, "
- "GPBType::@value@, @number@@other@)\n",
+ "->map('^field^', \\Google\\Protobuf\\Internal\\GPBType::^key^, "
+ "\\Google\\Protobuf\\Internal\\GPBType::^value^, ^number^^other^)\n",
"field", field->name(),
"key", ToUpper(key->type_name()),
"value", ToUpper(val->type_name()),
"number", SimpleItoa(field->number()),
- "other", EnumOrMessageSuffix(val, is_descriptor));
+ "other", EnumOrMessageSuffix(val, true));
} else if (!field->containing_oneof()) {
printer->Print(
- "->@label@('@field@', GPBType::@type@, @number@@other@)\n",
+ "->^label^('^field^', "
+ "\\Google\\Protobuf\\Internal\\GPBType::^type^, ^number^^other^)\n",
"field", field->name(),
"label", LabelForField(field),
"type", ToUpper(field->type_name()),
"number", SimpleItoa(field->number()),
- "other", EnumOrMessageSuffix(field, is_descriptor));
+ "other", EnumOrMessageSuffix(field, true));
}
}
// oneofs.
for (int i = 0; i < message->oneof_decl_count(); i++) {
const OneofDescriptor* oneof = message->oneof_decl(i);
- printer->Print("->oneof(@name@)\n",
+ printer->Print("->oneof(^name^)\n",
"name", oneof->name());
Indent(printer);
for (int index = 0; index < oneof->field_count(); index++) {
const FieldDescriptor* field = oneof->field(index);
printer->Print(
- "->value('@field@', GPBType::@type@, @number@@other@)\n",
+ "->value('^field^', "
+ "\\Google\\Protobuf\\Internal\\GPBType::^type^, ^number^^other^)\n",
"field", field->name(),
"type", ToUpper(field->type_name()),
"number", SimpleItoa(field->number()),
- "other", EnumOrMessageSuffix(field, is_descriptor));
+ "other", EnumOrMessageSuffix(field, true));
}
printer->Print("->finish()\n");
Outdent(printer);
@@ -639,33 +603,48 @@ void GenerateMessageToPool(const string& name_prefix,
"\n");
for (int i = 0; i < message->nested_type_count(); i++) {
- GenerateMessageToPool(class_name, message->nested_type(i), is_descriptor,
- printer);
+ GenerateMessageToPool(class_name, message->nested_type(i), printer);
}
for (int i = 0; i < message->enum_type_count(); i++) {
- GenerateEnumToPool(message->enum_type(i), is_descriptor, printer);
+ GenerateEnumToPool(message->enum_type(i), printer);
}
}
-void GenerateAddFileToPool(const google::protobuf::FileDescriptor* file,
- bool is_descriptor,
- google::protobuf::io::Printer* printer) {
- if (is_descriptor) {
- printer->Print("$pool = DescriptorPool::getGeneratedPool();\n\n");
+void GenerateAddFileToPool(const FileDescriptor* file, bool is_descriptor,
+ io::Printer* printer) {
+ printer->Print(
+ "public static $is_initialized = false;\n\n"
+ "public static function initOnce() {\n");
+ Indent(printer);
+ printer->Print(
+ "$pool = \\Google\\Protobuf\\Internal\\"
+ "DescriptorPool::getGeneratedPool();\n\n"
+ "if (static::$is_initialized == true) {\n"
+ " return;\n"
+ "}\n");
+
+ if (is_descriptor) {
for (int i = 0; i < file->message_type_count(); i++) {
- GenerateMessageToPool("", file->message_type(i), is_descriptor, printer);
+ GenerateMessageToPool("", file->message_type(i), printer);
}
for (int i = 0; i < file->enum_type_count(); i++) {
- GenerateEnumToPool(file->enum_type(i), is_descriptor, printer);
+ GenerateEnumToPool(file->enum_type(i), printer);
}
printer->Print(
"$pool->finish();\n");
} else {
- // Add messages and enums to descriptor pool.
- printer->Print("$pool = DescriptorPool::getGeneratedPool();\n\n");
+ for (int i = 0; i < file->dependency_count(); i++) {
+ const std::string& name = file->dependency(i)->name();
+ std::string dependency_filename =
+ GeneratedMetadataFileName(name, is_descriptor);
+ printer->Print(
+ "\\^name^::initOnce();\n",
+ "name", FilenameToClassname(dependency_filename));
+ }
+ // Add messages and enums to descriptor pool.
FileDescriptorSet files;
FileDescriptorProto* file_proto = files.add_file();
file->CopyTo(file_proto);
@@ -679,7 +658,7 @@ void GenerateAddFileToPool(const google::protobuf::FileDescriptor* file,
static const int kBytesPerLine = 30;
for (int i = 0; i < files_data.size(); i += kBytesPerLine) {
printer->Print(
- "\"@data@\"@dot@\n",
+ "\"^data^\"^dot^\n",
"data", BinaryToHex(files_data.substr(i, kBytesPerLine)),
"dot", i + kBytesPerLine < files_data.size() ? " ." : "");
}
@@ -688,38 +667,20 @@ void GenerateAddFileToPool(const google::protobuf::FileDescriptor* file,
printer->Print(
"));\n\n");
}
-
-}
-
-void GenerateEnum(const google::protobuf::EnumDescriptor* en,
- google::protobuf::io::Printer* printer) {
printer->Print(
- "class @name@\n"
- "{\n",
- "name", EnumClassName(en));
- Indent(printer);
-
- for (int i = 0; i < en->value_count(); i++) {
- const EnumValueDescriptor* value = en->value(i);
- printer->Print("const @name@ = @number@;\n",
- "name", value->name(),
- "number", IntToString(value->number()));
- }
+ "static::$is_initialized = true;\n");
Outdent(printer);
- printer->Print("}\n\n");
+ printer->Print("}\n");
}
-void GenerateUseDeclaration(bool is_descriptor,
- google::protobuf::io::Printer* printer) {
+void GenerateUseDeclaration(bool is_descriptor, io::Printer* printer) {
if (!is_descriptor) {
printer->Print(
- "use Google\\Protobuf\\Internal\\DescriptorPool;\n"
"use Google\\Protobuf\\Internal\\GPBType;\n"
"use Google\\Protobuf\\Internal\\RepeatedField;\n"
"use Google\\Protobuf\\Internal\\GPBUtil;\n\n");
} else {
printer->Print(
- "use Google\\Protobuf\\Internal\\DescriptorPool;\n"
"use Google\\Protobuf\\Internal\\GPBType;\n"
"use Google\\Protobuf\\Internal\\GPBWire;\n"
"use Google\\Protobuf\\Internal\\RepeatedField;\n"
@@ -728,42 +689,377 @@ void GenerateUseDeclaration(bool is_descriptor,
}
}
-void GenerateFile(const google::protobuf::FileDescriptor* file,
- bool is_descriptor, google::protobuf::io::Printer* printer) {
+void GenerateHead(const FileDescriptor* file, io::Printer* printer) {
printer->Print(
"<?php\n"
"# Generated by the protocol buffer compiler. DO NOT EDIT!\n"
- "# source: @filename@\n"
+ "# source: ^filename^\n"
"\n",
"filename", file->name());
+}
+
+std::string FilenameToClassname(const string& filename) {
+ int lastindex = filename.find_last_of(".");
+ std::string result = filename.substr(0, lastindex);
+ for (int i = 0; i < result.size(); i++) {
+ if (result[i] == '/') {
+ result[i] = '\\';
+ }
+ }
+ return result;
+}
+
+void GenerateMetadataFile(const FileDescriptor* file,
+ bool is_descriptor,
+ GeneratorContext* generator_context) {
+ std::string filename = GeneratedMetadataFileName(file->name(), is_descriptor);
+ scoped_ptr<io::ZeroCopyOutputStream> output(
+ generator_context->Open(filename));
+ io::Printer printer(output.get(), '^');
+
+ GenerateHead(file, &printer);
+
+ std::string fullname = FilenameToClassname(filename);
+ int lastindex = fullname.find_last_of("\\");
+
+ printer.Print(
+ "namespace ^name^;\n\n",
+ "name", fullname.substr(0, lastindex));
+
+ if (lastindex != string::npos) {
+ printer.Print(
+ "class ^name^\n"
+ "{\n",
+ "name", fullname.substr(lastindex + 1));
+ } else {
+ printer.Print(
+ "class ^name^\n"
+ "{\n",
+ "name", fullname);
+ }
+ Indent(&printer);
+
+ GenerateAddFileToPool(file, is_descriptor, &printer);
+
+ Outdent(&printer);
+ printer.Print("}\n\n");
+}
+
+void GenerateEnumFile(const FileDescriptor* file, const EnumDescriptor* en,
+ bool is_descriptor, GeneratorContext* generator_context) {
+ std::string filename = GeneratedEnumFileName(en, is_descriptor);
+ scoped_ptr<io::ZeroCopyOutputStream> output(
+ generator_context->Open(filename));
+ io::Printer printer(output.get(), '^');
+
+ GenerateHead(file, &printer);
+
+ std::string fullname = FilenameToClassname(filename);
+ int lastindex = fullname.find_last_of("\\");
+
+ GenerateEnumDocComment(&printer, en);
+ if (lastindex != string::npos) {
+ printer.Print(
+ "namespace ^name^;\n\n",
+ "name", fullname.substr(0, lastindex));
+
+ printer.Print(
+ "class ^name^\n"
+ "{\n",
+ "name", fullname.substr(lastindex + 1));
+ } else {
+ printer.Print(
+ "class ^name^\n"
+ "{\n",
+ "name", fullname);
+ }
+ Indent(&printer);
+
+ for (int i = 0; i < en->value_count(); i++) {
+ const EnumValueDescriptor* value = en->value(i);
+ GenerateEnumValueDocComment(&printer, value);
+ printer.Print("const ^name^ = ^number^;\n",
+ "name", value->name(),
+ "number", IntToString(value->number()));
+ }
+
+ Outdent(&printer);
+ printer.Print("}\n\n");
+}
+
+void GenerateMessageFile(const FileDescriptor* file, const Descriptor* message,
+ bool is_descriptor,
+ GeneratorContext* generator_context) {
+ // Don't generate MapEntry messages -- we use the PHP extension's native
+ // support for map fields instead.
+ if (message->options().map_entry()) {
+ return;
+ }
+
+ std::string filename = GeneratedMessageFileName(message, is_descriptor);
+ scoped_ptr<io::ZeroCopyOutputStream> output(
+ generator_context->Open(filename));
+ io::Printer printer(output.get(), '^');
+
+ GenerateHead(file, &printer);
+
+ std::string fullname = FilenameToClassname(filename);
+ int lastindex = fullname.find_last_of("\\");
+
if (!file->package().empty()) {
- printer->Print("namespace @name@;\n\n",
- "name", PhpName(file->package(), is_descriptor));
+ printer.Print(
+ "namespace ^name^;\n\n",
+ "name", fullname.substr(0, lastindex));
+ }
+
+ GenerateUseDeclaration(is_descriptor, &printer);
+
+ GenerateMessageDocComment(&printer, message);
+ if (lastindex != string::npos) {
+ printer.Print(
+ "class ^name^ extends \\Google\\Protobuf\\Internal\\Message\n"
+ "{\n",
+ "name", fullname.substr(lastindex + 1));
+ } else {
+ printer.Print(
+ "class ^name^ extends \\Google\\Protobuf\\Internal\\Message\n"
+ "{\n",
+ "name", fullname);
+ }
+ Indent(&printer);
+
+ // Field and oneof definitions.
+ for (int i = 0; i < message->field_count(); i++) {
+ const FieldDescriptor* field = message->field(i);
+ GenerateField(field, &printer, is_descriptor);
+ }
+ for (int i = 0; i < message->oneof_decl_count(); i++) {
+ const OneofDescriptor* oneof = message->oneof_decl(i);
+ GenerateOneofField(oneof, &printer);
}
+ printer.Print("\n");
- for (int i = 0; i < file->dependency_count(); i++) {
- const std::string& name = file->dependency(i)->name();
- printer->Print("require_once('@name@');\n", "name",
- GeneratedFileName(name, is_descriptor));
+ printer.Print(
+ "public function __construct() {\n");
+ Indent(&printer);
+
+ std::string metadata_filename =
+ GeneratedMetadataFileName(file->name(), is_descriptor);
+ std::string metadata_fullname = FilenameToClassname(metadata_filename);
+ printer.Print(
+ "\\^fullname^::initOnce();\n"
+ "parent::__construct();\n",
+ "fullname", metadata_fullname);
+
+ Outdent(&printer);
+ printer.Print("}\n\n");
+
+ // Field and oneof accessors.
+ for (int i = 0; i < message->field_count(); i++) {
+ const FieldDescriptor* field = message->field(i);
+ GenerateFieldAccessor(field, is_descriptor, &printer);
+ }
+ for (int i = 0; i < message->oneof_decl_count(); i++) {
+ const OneofDescriptor* oneof = message->oneof_decl(i);
+ printer.Print(
+ "public function get^camel_name^()\n"
+ "{\n"
+ " return $this->^name^;\n"
+ "}\n\n",
+ "camel_name", UnderscoresToCamelCase(oneof->name(), true), "name",
+ oneof->name());
}
- GenerateUseDeclaration(is_descriptor, printer);
+ Outdent(&printer);
+ printer.Print("}\n\n");
+
+ // Nested messages and enums.
+ for (int i = 0; i < message->nested_type_count(); i++) {
+ GenerateMessageFile(file, message->nested_type(i), is_descriptor,
+ generator_context);
+ }
+ for (int i = 0; i < message->enum_type_count(); i++) {
+ GenerateEnumFile(file, message->enum_type(i), is_descriptor,
+ generator_context);
+ }
+}
+void GenerateFile(const FileDescriptor* file, bool is_descriptor,
+ GeneratorContext* generator_context) {
+ GenerateMetadataFile(file, is_descriptor, generator_context);
for (int i = 0; i < file->message_type_count(); i++) {
- GenerateMessage("", file->message_type(i), is_descriptor, printer);
+ GenerateMessageFile(file, file->message_type(i), is_descriptor,
+ generator_context);
}
for (int i = 0; i < file->enum_type_count(); i++) {
- GenerateEnum(file->enum_type(i), printer);
+ GenerateEnumFile(file, file->enum_type(i), is_descriptor,
+ generator_context);
}
+}
+
+static string EscapePhpdoc(const string& input) {
+ string result;
+ result.reserve(input.size() * 2);
+
+ char prev = '*';
+
+ for (string::size_type i = 0; i < input.size(); i++) {
+ char c = input[i];
+ switch (c) {
+ case '*':
+ // Avoid "/*".
+ if (prev == '/') {
+ result.append("&#42;");
+ } else {
+ result.push_back(c);
+ }
+ break;
+ case '/':
+ // Avoid "*/".
+ if (prev == '*') {
+ result.append("&#47;");
+ } else {
+ result.push_back(c);
+ }
+ break;
+ case '@':
+ // '@' starts phpdoc tags including the @deprecated tag, which will
+ // cause a compile-time error if inserted before a declaration that
+ // does not have a corresponding @Deprecated annotation.
+ result.append("&#64;");
+ break;
+ case '<':
+ // Avoid interpretation as HTML.
+ result.append("&lt;");
+ break;
+ case '>':
+ // Avoid interpretation as HTML.
+ result.append("&gt;");
+ break;
+ case '&':
+ // Avoid interpretation as HTML.
+ result.append("&amp;");
+ break;
+ case '\\':
+ // Java interprets Unicode escape sequences anywhere!
+ result.append("&#92;");
+ break;
+ default:
+ result.push_back(c);
+ break;
+ }
- GenerateAddFileToPool(file, is_descriptor, printer);
+ prev = c;
+ }
+
+ return result;
}
-bool Generator::Generate(
- const FileDescriptor* file,
- const string& parameter,
- GeneratorContext* generator_context,
- string* error) const {
+static void GenerateDocCommentBodyForLocation(
+ io::Printer* printer, const SourceLocation& location) {
+ string comments = location.leading_comments.empty() ?
+ location.trailing_comments : location.leading_comments;
+ if (!comments.empty()) {
+ // TODO(teboring): Ideally we should parse the comment text as Markdown and
+ // write it back as HTML, but this requires a Markdown parser. For now
+ // we just use <pre> to get fixed-width text formatting.
+
+ // If the comment itself contains block comment start or end markers,
+ // HTML-escape them so that they don't accidentally close the doc comment.
+ comments = EscapePhpdoc(comments);
+
+ vector<string> lines = Split(comments, "\n");
+ while (!lines.empty() && lines.back().empty()) {
+ lines.pop_back();
+ }
+
+ printer->Print(" * <pre>\n");
+ for (int i = 0; i < lines.size(); i++) {
+ // Most lines should start with a space. Watch out for lines that start
+ // with a /, since putting that right after the leading asterisk will
+ // close the comment.
+ if (!lines[i].empty() && lines[i][0] == '/') {
+ printer->Print(" * ^line^\n", "line", lines[i]);
+ } else {
+ printer->Print(" *^line^\n", "line", lines[i]);
+ }
+ }
+ printer->Print(
+ " * </pre>\n"
+ " *\n");
+ }
+}
+
+template <typename DescriptorType>
+static void GenerateDocCommentBody(
+ io::Printer* printer, const DescriptorType* descriptor) {
+ SourceLocation location;
+ if (descriptor->GetSourceLocation(&location)) {
+ GenerateDocCommentBodyForLocation(printer, location);
+ }
+}
+
+static string FirstLineOf(const string& value) {
+ string result = value;
+
+ string::size_type pos = result.find_first_of('\n');
+ if (pos != string::npos) {
+ result.erase(pos);
+ }
+
+ return result;
+}
+
+void GenerateMessageDocComment(io::Printer* printer,
+ const Descriptor* message) {
+ printer->Print("/**\n");
+ GenerateDocCommentBody(printer, message);
+ printer->Print(
+ " * Protobuf type <code>^fullname^</code>\n"
+ " */\n",
+ "fullname", EscapePhpdoc(message->full_name()));
+}
+
+void GenerateFieldDocComment(io::Printer* printer,
+ const FieldDescriptor* field) {
+ // In theory we should have slightly different comments for setters, getters,
+ // etc., but in practice everyone already knows the difference between these
+ // so it's redundant information.
+
+ // We start the comment with the main body based on the comments from the
+ // .proto file (if present). We then end with the field declaration, e.g.:
+ // optional string foo = 5;
+ // If the field is a group, the debug string might end with {.
+ printer->Print("/**\n");
+ GenerateDocCommentBody(printer, field);
+ printer->Print(
+ " * <code>^def^</code>\n",
+ "def", EscapePhpdoc(FirstLineOf(field->DebugString())));
+ printer->Print(" */\n");
+}
+
+void GenerateEnumDocComment(io::Printer* printer, const EnumDescriptor* enum_) {
+ printer->Print("/**\n");
+ GenerateDocCommentBody(printer, enum_);
+ printer->Print(
+ " * Protobuf enum <code>^fullname^</code>\n"
+ " */\n",
+ "fullname", EscapePhpdoc(enum_->full_name()));
+}
+
+void GenerateEnumValueDocComment(io::Printer* printer,
+ const EnumValueDescriptor* value) {
+ printer->Print("/**\n");
+ GenerateDocCommentBody(printer, value);
+ printer->Print(
+ " * <code>^def^</code>\n"
+ " */\n",
+ "def", EscapePhpdoc(FirstLineOf(value->DebugString())));
+}
+
+bool Generator::Generate(const FileDescriptor* file, const string& parameter,
+ GeneratorContext* generator_context,
+ string* error) const {
bool is_descriptor = parameter == "internal";
if (is_descriptor && file->name() != kDescriptorFile) {
@@ -779,12 +1075,7 @@ bool Generator::Generate(
return false;
}
- std::string filename = GeneratedFileName(file->name(), is_descriptor);
- scoped_ptr<io::ZeroCopyOutputStream> output(
- generator_context->Open(filename));
- io::Printer printer(output.get(), '@');
-
- GenerateFile(file, is_descriptor, &printer);
+ GenerateFile(file, is_descriptor, generator_context);
return true;
}
diff --git a/src/google/protobuf/compiler/plugin.cc b/src/google/protobuf/compiler/plugin.cc
index dcccb3d4..3848101d 100644
--- a/src/google/protobuf/compiler/plugin.cc
+++ b/src/google/protobuf/compiler/plugin.cc
@@ -63,9 +63,12 @@ namespace compiler {
class GeneratorResponseContext : public GeneratorContext {
public:
GeneratorResponseContext(
+ const Version& compiler_version,
CodeGeneratorResponse* response,
const std::vector<const FileDescriptor*>& parsed_files)
- : response_(response), parsed_files_(parsed_files) {}
+ : compiler_version_(compiler_version),
+ response_(response),
+ parsed_files_(parsed_files) {}
virtual ~GeneratorResponseContext() {}
// implements GeneratorContext --------------------------------------
@@ -88,7 +91,12 @@ class GeneratorResponseContext : public GeneratorContext {
*output = parsed_files_;
}
+ void GetCompilerVersion(Version* version) const {
+ *version = compiler_version_;
+ }
+
private:
+ Version compiler_version_;
CodeGeneratorResponse* response_;
const std::vector<const FileDescriptor*>& parsed_files_;
};
@@ -116,7 +124,8 @@ bool GenerateCode(const CodeGeneratorRequest& request,
}
}
- GeneratorResponseContext context(response, parsed_files);
+ GeneratorResponseContext context(
+ request.compiler_version(), response, parsed_files);
string error;
bool succeeded = generator.GenerateAll(
diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc
index 0239e05f..bb78eff6 100644
--- a/src/google/protobuf/compiler/plugin.pb.cc
+++ b/src/google/protobuf/compiler/plugin.pb.cc
@@ -20,6 +20,8 @@
namespace google {
namespace protobuf {
namespace compiler {
+class VersionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Version> {};
+VersionDefaultTypeInternal _Version_default_instance_;
class CodeGeneratorRequestDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorRequest> {};
CodeGeneratorRequestDefaultTypeInternal _CodeGeneratorRequest_default_instance_;
class CodeGeneratorResponse_FileDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse_File> {};
@@ -29,7 +31,7 @@ CodeGeneratorResponseDefaultTypeInternal _CodeGeneratorResponse_default_instance
namespace {
-::google::protobuf::Metadata file_level_metadata[3];
+::google::protobuf::Metadata file_level_metadata[4];
} // namespace
@@ -37,6 +39,18 @@ namespace {
const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fcompiler_2fplugin_2eproto() GOOGLE_ATTRIBUTE_COLD;
const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
static const ::google::protobuf::uint32 offsets[] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, _has_bits_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, _internal_metadata_),
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, major_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, minor_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, patch_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, suffix_),
+ 1,
+ 2,
+ 3,
+ 0,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _internal_metadata_),
~0u, // no _extensions_
@@ -44,9 +58,11 @@ const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fcompiler_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, file_to_generate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, parameter_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, proto_file_),
- 1,
- 0,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, compiler_version_),
2,
+ 0,
+ 3,
+ 1,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _internal_metadata_),
~0u, // no _extensions_
@@ -70,12 +86,14 @@ const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fcompiler_
}
static const ::google::protobuf::internal::MigrationSchema schemas[] = {
- { 0, 7, sizeof(CodeGeneratorRequest)},
- { 10, 17, sizeof(CodeGeneratorResponse_File)},
- { 20, 26, sizeof(CodeGeneratorResponse)},
+ { 0, 8, sizeof(Version)},
+ { 12, 20, sizeof(CodeGeneratorRequest)},
+ { 24, 31, sizeof(CodeGeneratorResponse_File)},
+ { 34, 40, sizeof(CodeGeneratorResponse)},
};
static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = {
+ {reinterpret_cast<const ::google::protobuf::Message*>(&_Version_default_instance_), NULL},
{reinterpret_cast<const ::google::protobuf::Message*>(&_CodeGeneratorRequest_default_instance_), NULL},
{reinterpret_cast<const ::google::protobuf::Message*>(&_CodeGeneratorResponse_File_default_instance_), NULL},
{reinterpret_cast<const ::google::protobuf::Message*>(&_CodeGeneratorResponse_default_instance_), NULL},
@@ -99,18 +117,20 @@ void protobuf_AssignDescriptorsOnce() {
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
+ ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
}
} // namespace
void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
- _CodeGeneratorRequest_default_instance_.Shutdown();
+ _Version_default_instance_.Shutdown();
delete file_level_metadata[0].reflection;
- _CodeGeneratorResponse_File_default_instance_.Shutdown();
+ _CodeGeneratorRequest_default_instance_.Shutdown();
delete file_level_metadata[1].reflection;
- _CodeGeneratorResponse_default_instance_.Shutdown();
+ _CodeGeneratorResponse_File_default_instance_.Shutdown();
delete file_level_metadata[2].reflection;
+ _CodeGeneratorResponse_default_instance_.Shutdown();
+ delete file_level_metadata[3].reflection;
}
void protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl() {
@@ -118,9 +138,12 @@ void protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl()
::google::protobuf::protobuf_InitDefaults_google_2fprotobuf_2fdescriptor_2eproto();
::google::protobuf::internal::InitProtobufDefaults();
+ _Version_default_instance_.DefaultConstruct();
_CodeGeneratorRequest_default_instance_.DefaultConstruct();
_CodeGeneratorResponse_File_default_instance_.DefaultConstruct();
_CodeGeneratorResponse_default_instance_.DefaultConstruct();
+ _CodeGeneratorRequest_default_instance_.get_mutable()->compiler_version_ = const_cast< ::google::protobuf::compiler::Version*>(
+ ::google::protobuf::compiler::Version::internal_default_instance());
}
void protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
@@ -132,19 +155,22 @@ void protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl() {
static const char descriptor[] = {
"\n%google/protobuf/compiler/plugin.proto\022"
"\030google.protobuf.compiler\032 google/protob"
- "uf/descriptor.proto\"}\n\024CodeGeneratorRequ"
- "est\022\030\n\020file_to_generate\030\001 \003(\t\022\021\n\tparamet"
- "er\030\002 \001(\t\0228\n\nproto_file\030\017 \003(\0132$.google.pr"
- "otobuf.FileDescriptorProto\"\252\001\n\025CodeGener"
- "atorResponse\022\r\n\005error\030\001 \001(\t\022B\n\004file\030\017 \003("
- "\01324.google.protobuf.compiler.CodeGenerat"
- "orResponse.File\032>\n\004File\022\014\n\004name\030\001 \001(\t\022\027\n"
- "\017insertion_point\030\002 \001(\t\022\017\n\007content\030\017 \001(\tB"
- "7\n\034com.google.protobuf.compilerB\014PluginP"
- "rotosZ\tplugin_go"
+ "uf/descriptor.proto\"F\n\007Version\022\r\n\005major\030"
+ "\001 \001(\005\022\r\n\005minor\030\002 \001(\005\022\r\n\005patch\030\003 \001(\005\022\016\n\006s"
+ "uffix\030\004 \001(\t\"\272\001\n\024CodeGeneratorRequest\022\030\n\020"
+ "file_to_generate\030\001 \003(\t\022\021\n\tparameter\030\002 \001("
+ "\t\0228\n\nproto_file\030\017 \003(\0132$.google.protobuf."
+ "FileDescriptorProto\022;\n\020compiler_version\030"
+ "\003 \001(\0132!.google.protobuf.compiler.Version"
+ "\"\252\001\n\025CodeGeneratorResponse\022\r\n\005error\030\001 \001("
+ "\t\022B\n\004file\030\017 \003(\01324.google.protobuf.compil"
+ "er.CodeGeneratorResponse.File\032>\n\004File\022\014\n"
+ "\004name\030\001 \001(\t\022\027\n\017insertion_point\030\002 \001(\t\022\017\n\007"
+ "content\030\017 \001(\tB7\n\034com.google.protobuf.com"
+ "pilerB\014PluginProtosZ\tplugin_go"
};
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 456);
+ descriptor, 590);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/compiler/plugin.proto", &protobuf_RegisterTypes);
::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
@@ -166,9 +192,505 @@ struct StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int Version::kMajorFieldNumber;
+const int Version::kMinorFieldNumber;
+const int Version::kPatchFieldNumber;
+const int Version::kSuffixFieldNumber;
+#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+Version::Version()
+ : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+ if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+ protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
+ }
+ SharedCtor();
+ // @@protoc_insertion_point(constructor:google.protobuf.compiler.Version)
+}
+Version::Version(const Version& from)
+ : ::google::protobuf::Message(),
+ _internal_metadata_(NULL),
+ _has_bits_(from._has_bits_),
+ _cached_size_(0) {
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (from.has_suffix()) {
+ suffix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.suffix_);
+ }
+ ::memcpy(&major_, &from.major_,
+ reinterpret_cast<char*>(&patch_) -
+ reinterpret_cast<char*>(&major_) + sizeof(patch_));
+ // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.Version)
+}
+
+void Version::SharedCtor() {
+ _cached_size_ = 0;
+ suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ ::memset(&major_, 0, reinterpret_cast<char*>(&patch_) -
+ reinterpret_cast<char*>(&major_) + sizeof(patch_));
+}
+
+Version::~Version() {
+ // @@protoc_insertion_point(destructor:google.protobuf.compiler.Version)
+ SharedDtor();
+}
+
+void Version::SharedDtor() {
+ suffix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+
+void Version::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* Version::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return file_level_metadata[0].descriptor;
+}
+
+const Version& Version::default_instance() {
+ protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
+ return *internal_default_instance();
+}
+
+Version* Version::New(::google::protobuf::Arena* arena) const {
+ Version* n = new Version;
+ if (arena != NULL) {
+ arena->Own(n);
+ }
+ return n;
+}
+
+void Version::Clear() {
+// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.Version)
+ if (has_suffix()) {
+ GOOGLE_DCHECK(!suffix_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+ (*suffix_.UnsafeRawStringPointer())->clear();
+ }
+ if (_has_bits_[0 / 32] & 14u) {
+ ::memset(&major_, 0, reinterpret_cast<char*>(&patch_) -
+ reinterpret_cast<char*>(&major_) + sizeof(patch_));
+ }
+ _has_bits_.Clear();
+ _internal_metadata_.Clear();
+}
+
+bool Version::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+ ::google::protobuf::uint32 tag;
+ // @@protoc_insertion_point(parse_start:google.protobuf.compiler.Version)
+ for (;;) {
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ tag = p.first;
+ if (!p.second) goto handle_unusual;
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // optional int32 major = 1;
+ case 1: {
+ if (tag == 8u) {
+ set_has_major();
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &major_)));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // optional int32 minor = 2;
+ case 2: {
+ if (tag == 16u) {
+ set_has_minor();
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &minor_)));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // optional int32 patch = 3;
+ case 3: {
+ if (tag == 24u) {
+ set_has_patch();
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &patch_)));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // optional string suffix = 4;
+ case 4: {
+ if (tag == 34u) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_suffix()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+ this->suffix().data(), this->suffix().length(),
+ ::google::protobuf::internal::WireFormat::PARSE,
+ "google.protobuf.compiler.Version.suffix");
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ default: {
+ handle_unusual:
+ if (tag == 0 ||
+ ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ goto success;
+ }
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, mutable_unknown_fields()));
+ break;
+ }
+ }
+ }
+success:
+ // @@protoc_insertion_point(parse_success:google.protobuf.compiler.Version)
+ return true;
+failure:
+ // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.Version)
+ return false;
+#undef DO_
+}
+
+void Version::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.Version)
+ // optional int32 major = 1;
+ if (has_major()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->major(), output);
+ }
+
+ // optional int32 minor = 2;
+ if (has_minor()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->minor(), output);
+ }
+
+ // optional int32 patch = 3;
+ if (has_patch()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->patch(), output);
+ }
+
+ // optional string suffix = 4;
+ if (has_suffix()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+ this->suffix().data(), this->suffix().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE,
+ "google.protobuf.compiler.Version.suffix");
+ ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+ 4, this->suffix(), output);
+ }
+
+ if (_internal_metadata_.have_unknown_fields()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+ // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.Version)
+}
+
+::google::protobuf::uint8* Version::InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const {
+ (void)deterministic; // Unused
+ // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version)
+ // optional int32 major = 1;
+ if (has_major()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->major(), target);
+ }
+
+ // optional int32 minor = 2;
+ if (has_minor()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->minor(), target);
+ }
+
+ // optional int32 patch = 3;
+ if (has_patch()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->patch(), target);
+ }
+
+ // optional string suffix = 4;
+ if (has_suffix()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+ this->suffix().data(), this->suffix().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE,
+ "google.protobuf.compiler.Version.suffix");
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 4, this->suffix(), target);
+ }
+
+ if (_internal_metadata_.have_unknown_fields()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.Version)
+ return target;
+}
+
+size_t Version::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.Version)
+ size_t total_size = 0;
+
+ if (_internal_metadata_.have_unknown_fields()) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ unknown_fields());
+ }
+ if (_has_bits_[0 / 32] & 15u) {
+ // optional string suffix = 4;
+ if (has_suffix()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->suffix());
+ }
+
+ // optional int32 major = 1;
+ if (has_major()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->major());
+ }
+
+ // optional int32 minor = 2;
+ if (has_minor()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->minor());
+ }
+
+ // optional int32 patch = 3;
+ if (has_patch()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->patch());
+ }
+
+ }
+ int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = cached_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void Version::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.Version)
+ GOOGLE_DCHECK_NE(&from, this);
+ const Version* source =
+ ::google::protobuf::internal::DynamicCastToGenerated<const Version>(
+ &from);
+ if (source == NULL) {
+ // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.Version)
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.Version)
+ MergeFrom(*source);
+ }
+}
+
+void Version::MergeFrom(const Version& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version)
+ GOOGLE_DCHECK_NE(&from, this);
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ if (from._has_bits_[0 / 32] & 15u) {
+ if (from.has_suffix()) {
+ set_has_suffix();
+ suffix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.suffix_);
+ }
+ if (from.has_major()) {
+ set_major(from.major());
+ }
+ if (from.has_minor()) {
+ set_minor(from.minor());
+ }
+ if (from.has_patch()) {
+ set_patch(from.patch());
+ }
+ }
+}
+
+void Version::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.Version)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void Version::CopyFrom(const Version& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.Version)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool Version::IsInitialized() const {
+ return true;
+}
+
+void Version::Swap(Version* other) {
+ if (other == this) return;
+ InternalSwap(other);
+}
+void Version::InternalSwap(Version* other) {
+ suffix_.Swap(&other->suffix_);
+ std::swap(major_, other->major_);
+ std::swap(minor_, other->minor_);
+ std::swap(patch_, other->patch_);
+ std::swap(_has_bits_[0], other->_has_bits_[0]);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
+ std::swap(_cached_size_, other->_cached_size_);
+}
+
+::google::protobuf::Metadata Version::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ return file_level_metadata[0];
+}
+
+#if PROTOBUF_INLINE_NOT_IN_HEADERS
+// Version
+
+// optional int32 major = 1;
+bool Version::has_major() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+void Version::set_has_major() {
+ _has_bits_[0] |= 0x00000002u;
+}
+void Version::clear_has_major() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+void Version::clear_major() {
+ major_ = 0;
+ clear_has_major();
+}
+::google::protobuf::int32 Version::major() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.major)
+ return major_;
+}
+void Version::set_major(::google::protobuf::int32 value) {
+ set_has_major();
+ major_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.major)
+}
+
+// optional int32 minor = 2;
+bool Version::has_minor() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+void Version::set_has_minor() {
+ _has_bits_[0] |= 0x00000004u;
+}
+void Version::clear_has_minor() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+void Version::clear_minor() {
+ minor_ = 0;
+ clear_has_minor();
+}
+::google::protobuf::int32 Version::minor() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.minor)
+ return minor_;
+}
+void Version::set_minor(::google::protobuf::int32 value) {
+ set_has_minor();
+ minor_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.minor)
+}
+
+// optional int32 patch = 3;
+bool Version::has_patch() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+void Version::set_has_patch() {
+ _has_bits_[0] |= 0x00000008u;
+}
+void Version::clear_has_patch() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+void Version::clear_patch() {
+ patch_ = 0;
+ clear_has_patch();
+}
+::google::protobuf::int32 Version::patch() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.patch)
+ return patch_;
+}
+void Version::set_patch(::google::protobuf::int32 value) {
+ set_has_patch();
+ patch_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.patch)
+}
+
+// optional string suffix = 4;
+bool Version::has_suffix() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+void Version::set_has_suffix() {
+ _has_bits_[0] |= 0x00000001u;
+}
+void Version::clear_has_suffix() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+void Version::clear_suffix() {
+ suffix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_suffix();
+}
+const ::std::string& Version::suffix() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.suffix)
+ return suffix_.GetNoArena();
+}
+void Version::set_suffix(const ::std::string& value) {
+ set_has_suffix();
+ suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix)
+}
+void Version::set_suffix(const char* value) {
+ set_has_suffix();
+ suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.Version.suffix)
+}
+void Version::set_suffix(const char* value, size_t size) {
+ set_has_suffix();
+ suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.Version.suffix)
+}
+::std::string* Version::mutable_suffix() {
+ set_has_suffix();
+ // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.Version.suffix)
+ return suffix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+::std::string* Version::release_suffix() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.Version.suffix)
+ clear_has_suffix();
+ return suffix_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+void Version::set_allocated_suffix(::std::string* suffix) {
+ if (suffix != NULL) {
+ set_has_suffix();
+ } else {
+ clear_has_suffix();
+ }
+ suffix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), suffix);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.Version.suffix)
+}
+
+#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
+
+// ===================================================================
+
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int CodeGeneratorRequest::kFileToGenerateFieldNumber;
const int CodeGeneratorRequest::kParameterFieldNumber;
const int CodeGeneratorRequest::kProtoFileFieldNumber;
+const int CodeGeneratorRequest::kCompilerVersionFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
CodeGeneratorRequest::CodeGeneratorRequest()
@@ -191,12 +713,18 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
if (from.has_parameter()) {
parameter_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parameter_);
}
+ if (from.has_compiler_version()) {
+ compiler_version_ = new ::google::protobuf::compiler::Version(*from.compiler_version_);
+ } else {
+ compiler_version_ = NULL;
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest)
}
void CodeGeneratorRequest::SharedCtor() {
_cached_size_ = 0;
parameter_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ compiler_version_ = NULL;
}
CodeGeneratorRequest::~CodeGeneratorRequest() {
@@ -206,6 +734,9 @@ CodeGeneratorRequest::~CodeGeneratorRequest() {
void CodeGeneratorRequest::SharedDtor() {
parameter_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (this != internal_default_instance()) {
+ delete compiler_version_;
+ }
}
void CodeGeneratorRequest::SetCachedSize(int size) const {
@@ -215,7 +746,7 @@ void CodeGeneratorRequest::SetCachedSize(int size) const {
}
const ::google::protobuf::Descriptor* CodeGeneratorRequest::descriptor() {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[0].descriptor;
+ return file_level_metadata[1].descriptor;
}
const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() {
@@ -235,9 +766,15 @@ void CodeGeneratorRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorRequest)
file_to_generate_.Clear();
proto_file_.Clear();
- if (has_parameter()) {
- GOOGLE_DCHECK(!parameter_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*parameter_.UnsafeRawStringPointer())->clear();
+ if (_has_bits_[0 / 32] & 3u) {
+ if (has_parameter()) {
+ GOOGLE_DCHECK(!parameter_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+ (*parameter_.UnsafeRawStringPointer())->clear();
+ }
+ if (has_compiler_version()) {
+ GOOGLE_DCHECK(compiler_version_ != NULL);
+ compiler_version_->::google::protobuf::compiler::Version::Clear();
+ }
}
_has_bits_.Clear();
_internal_metadata_.Clear();
@@ -284,6 +821,17 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream(
break;
}
+ // optional .google.protobuf.compiler.Version compiler_version = 3;
+ case 3: {
+ if (tag == 26u) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_compiler_version()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
case 15: {
if (tag == 122u) {
@@ -342,6 +890,12 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
2, this->parameter(), output);
}
+ // optional .google.protobuf.compiler.Version compiler_version = 3;
+ if (has_compiler_version()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 3, *this->compiler_version_, output);
+ }
+
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
for (unsigned int i = 0, n = this->proto_file_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
@@ -380,6 +934,13 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
2, this->parameter(), target);
}
+ // optional .google.protobuf.compiler.Version compiler_version = 3;
+ if (has_compiler_version()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ InternalWriteMessageNoVirtualToArray(
+ 3, *this->compiler_version_, false, target);
+ }
+
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
for (unsigned int i = 0, n = this->proto_file_size(); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
@@ -423,13 +984,22 @@ size_t CodeGeneratorRequest::ByteSizeLong() const {
}
}
- // optional string parameter = 2;
- if (has_parameter()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->parameter());
- }
+ if (_has_bits_[0 / 32] & 3u) {
+ // optional string parameter = 2;
+ if (has_parameter()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->parameter());
+ }
+ // optional .google.protobuf.compiler.Version compiler_version = 3;
+ if (has_compiler_version()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ *this->compiler_version_);
+ }
+
+ }
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
@@ -458,9 +1028,14 @@ void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
file_to_generate_.MergeFrom(from.file_to_generate_);
proto_file_.MergeFrom(from.proto_file_);
- if (from.has_parameter()) {
- set_has_parameter();
- parameter_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parameter_);
+ if (from._has_bits_[0 / 32] & 3u) {
+ if (from.has_parameter()) {
+ set_has_parameter();
+ parameter_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parameter_);
+ }
+ if (from.has_compiler_version()) {
+ mutable_compiler_version()->::google::protobuf::compiler::Version::MergeFrom(from.compiler_version());
+ }
}
}
@@ -491,6 +1066,7 @@ void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) {
file_to_generate_.UnsafeArenaSwap(&other->file_to_generate_);
proto_file_.UnsafeArenaSwap(&other->proto_file_);
parameter_.Swap(&other->parameter_);
+ std::swap(compiler_version_, other->compiler_version_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
@@ -498,7 +1074,7 @@ void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) {
::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[0];
+ return file_level_metadata[1];
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
@@ -643,6 +1219,51 @@ CodeGeneratorRequest::proto_file() const {
return proto_file_;
}
+// optional .google.protobuf.compiler.Version compiler_version = 3;
+bool CodeGeneratorRequest::has_compiler_version() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+void CodeGeneratorRequest::set_has_compiler_version() {
+ _has_bits_[0] |= 0x00000002u;
+}
+void CodeGeneratorRequest::clear_has_compiler_version() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+void CodeGeneratorRequest::clear_compiler_version() {
+ if (compiler_version_ != NULL) compiler_version_->::google::protobuf::compiler::Version::Clear();
+ clear_has_compiler_version();
+}
+const ::google::protobuf::compiler::Version& CodeGeneratorRequest::compiler_version() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
+ return compiler_version_ != NULL ? *compiler_version_
+ : *::google::protobuf::compiler::Version::internal_default_instance();
+}
+::google::protobuf::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() {
+ set_has_compiler_version();
+ if (compiler_version_ == NULL) {
+ compiler_version_ = new ::google::protobuf::compiler::Version;
+ }
+ // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
+ return compiler_version_;
+}
+::google::protobuf::compiler::Version* CodeGeneratorRequest::release_compiler_version() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
+ clear_has_compiler_version();
+ ::google::protobuf::compiler::Version* temp = compiler_version_;
+ compiler_version_ = NULL;
+ return temp;
+}
+void CodeGeneratorRequest::set_allocated_compiler_version(::google::protobuf::compiler::Version* compiler_version) {
+ delete compiler_version_;
+ compiler_version_ = compiler_version;
+ if (compiler_version) {
+ set_has_compiler_version();
+ } else {
+ clear_has_compiler_version();
+ }
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
+}
+
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
@@ -707,7 +1328,7 @@ void CodeGeneratorResponse_File::SetCachedSize(int size) const {
}
const ::google::protobuf::Descriptor* CodeGeneratorResponse_File::descriptor() {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[1].descriptor;
+ return file_level_metadata[2].descriptor;
}
const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance() {
@@ -1012,7 +1633,7 @@ void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other)
::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[1];
+ return file_level_metadata[2];
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
@@ -1232,7 +1853,7 @@ void CodeGeneratorResponse::SetCachedSize(int size) const {
}
const ::google::protobuf::Descriptor* CodeGeneratorResponse::descriptor() {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[2].descriptor;
+ return file_level_metadata[3].descriptor;
}
const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() {
@@ -1467,7 +2088,7 @@ void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) {
::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[2];
+ return file_level_metadata[3];
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h
index 11c837a3..0948ab2d 100644
--- a/src/google/protobuf/compiler/plugin.pb.h
+++ b/src/google/protobuf/compiler/plugin.pb.h
@@ -33,89 +33,92 @@ namespace google {
namespace protobuf {
class DescriptorProto;
class DescriptorProtoDefaultTypeInternal;
-extern DescriptorProtoDefaultTypeInternal _DescriptorProto_default_instance_;
+LIBPROTOC_EXPORT extern DescriptorProtoDefaultTypeInternal _DescriptorProto_default_instance_;
class DescriptorProto_ExtensionRange;
class DescriptorProto_ExtensionRangeDefaultTypeInternal;
-extern DescriptorProto_ExtensionRangeDefaultTypeInternal _DescriptorProto_ExtensionRange_default_instance_;
+LIBPROTOC_EXPORT extern DescriptorProto_ExtensionRangeDefaultTypeInternal _DescriptorProto_ExtensionRange_default_instance_;
class DescriptorProto_ReservedRange;
class DescriptorProto_ReservedRangeDefaultTypeInternal;
-extern DescriptorProto_ReservedRangeDefaultTypeInternal _DescriptorProto_ReservedRange_default_instance_;
+LIBPROTOC_EXPORT extern DescriptorProto_ReservedRangeDefaultTypeInternal _DescriptorProto_ReservedRange_default_instance_;
class EnumDescriptorProto;
class EnumDescriptorProtoDefaultTypeInternal;
-extern EnumDescriptorProtoDefaultTypeInternal _EnumDescriptorProto_default_instance_;
+LIBPROTOC_EXPORT extern EnumDescriptorProtoDefaultTypeInternal _EnumDescriptorProto_default_instance_;
class EnumOptions;
class EnumOptionsDefaultTypeInternal;
-extern EnumOptionsDefaultTypeInternal _EnumOptions_default_instance_;
+LIBPROTOC_EXPORT extern EnumOptionsDefaultTypeInternal _EnumOptions_default_instance_;
class EnumValueDescriptorProto;
class EnumValueDescriptorProtoDefaultTypeInternal;
-extern EnumValueDescriptorProtoDefaultTypeInternal _EnumValueDescriptorProto_default_instance_;
+LIBPROTOC_EXPORT extern EnumValueDescriptorProtoDefaultTypeInternal _EnumValueDescriptorProto_default_instance_;
class EnumValueOptions;
class EnumValueOptionsDefaultTypeInternal;
-extern EnumValueOptionsDefaultTypeInternal _EnumValueOptions_default_instance_;
+LIBPROTOC_EXPORT extern EnumValueOptionsDefaultTypeInternal _EnumValueOptions_default_instance_;
class FieldDescriptorProto;
class FieldDescriptorProtoDefaultTypeInternal;
-extern FieldDescriptorProtoDefaultTypeInternal _FieldDescriptorProto_default_instance_;
+LIBPROTOC_EXPORT extern FieldDescriptorProtoDefaultTypeInternal _FieldDescriptorProto_default_instance_;
class FieldOptions;
class FieldOptionsDefaultTypeInternal;
-extern FieldOptionsDefaultTypeInternal _FieldOptions_default_instance_;
+LIBPROTOC_EXPORT extern FieldOptionsDefaultTypeInternal _FieldOptions_default_instance_;
class FileDescriptorProto;
class FileDescriptorProtoDefaultTypeInternal;
-extern FileDescriptorProtoDefaultTypeInternal _FileDescriptorProto_default_instance_;
+LIBPROTOC_EXPORT extern FileDescriptorProtoDefaultTypeInternal _FileDescriptorProto_default_instance_;
class FileDescriptorSet;
class FileDescriptorSetDefaultTypeInternal;
-extern FileDescriptorSetDefaultTypeInternal _FileDescriptorSet_default_instance_;
+LIBPROTOC_EXPORT extern FileDescriptorSetDefaultTypeInternal _FileDescriptorSet_default_instance_;
class FileOptions;
class FileOptionsDefaultTypeInternal;
-extern FileOptionsDefaultTypeInternal _FileOptions_default_instance_;
+LIBPROTOC_EXPORT extern FileOptionsDefaultTypeInternal _FileOptions_default_instance_;
class GeneratedCodeInfo;
class GeneratedCodeInfoDefaultTypeInternal;
-extern GeneratedCodeInfoDefaultTypeInternal _GeneratedCodeInfo_default_instance_;
+LIBPROTOC_EXPORT extern GeneratedCodeInfoDefaultTypeInternal _GeneratedCodeInfo_default_instance_;
class GeneratedCodeInfo_Annotation;
class GeneratedCodeInfo_AnnotationDefaultTypeInternal;
-extern GeneratedCodeInfo_AnnotationDefaultTypeInternal _GeneratedCodeInfo_Annotation_default_instance_;
+LIBPROTOC_EXPORT extern GeneratedCodeInfo_AnnotationDefaultTypeInternal _GeneratedCodeInfo_Annotation_default_instance_;
class MessageOptions;
class MessageOptionsDefaultTypeInternal;
-extern MessageOptionsDefaultTypeInternal _MessageOptions_default_instance_;
+LIBPROTOC_EXPORT extern MessageOptionsDefaultTypeInternal _MessageOptions_default_instance_;
class MethodDescriptorProto;
class MethodDescriptorProtoDefaultTypeInternal;
-extern MethodDescriptorProtoDefaultTypeInternal _MethodDescriptorProto_default_instance_;
+LIBPROTOC_EXPORT extern MethodDescriptorProtoDefaultTypeInternal _MethodDescriptorProto_default_instance_;
class MethodOptions;
class MethodOptionsDefaultTypeInternal;
-extern MethodOptionsDefaultTypeInternal _MethodOptions_default_instance_;
+LIBPROTOC_EXPORT extern MethodOptionsDefaultTypeInternal _MethodOptions_default_instance_;
class OneofDescriptorProto;
class OneofDescriptorProtoDefaultTypeInternal;
-extern OneofDescriptorProtoDefaultTypeInternal _OneofDescriptorProto_default_instance_;
+LIBPROTOC_EXPORT extern OneofDescriptorProtoDefaultTypeInternal _OneofDescriptorProto_default_instance_;
class OneofOptions;
class OneofOptionsDefaultTypeInternal;
-extern OneofOptionsDefaultTypeInternal _OneofOptions_default_instance_;
+LIBPROTOC_EXPORT extern OneofOptionsDefaultTypeInternal _OneofOptions_default_instance_;
class ServiceDescriptorProto;
class ServiceDescriptorProtoDefaultTypeInternal;
-extern ServiceDescriptorProtoDefaultTypeInternal _ServiceDescriptorProto_default_instance_;
+LIBPROTOC_EXPORT extern ServiceDescriptorProtoDefaultTypeInternal _ServiceDescriptorProto_default_instance_;
class ServiceOptions;
class ServiceOptionsDefaultTypeInternal;
-extern ServiceOptionsDefaultTypeInternal _ServiceOptions_default_instance_;
+LIBPROTOC_EXPORT extern ServiceOptionsDefaultTypeInternal _ServiceOptions_default_instance_;
class SourceCodeInfo;
class SourceCodeInfoDefaultTypeInternal;
-extern SourceCodeInfoDefaultTypeInternal _SourceCodeInfo_default_instance_;
+LIBPROTOC_EXPORT extern SourceCodeInfoDefaultTypeInternal _SourceCodeInfo_default_instance_;
class SourceCodeInfo_Location;
class SourceCodeInfo_LocationDefaultTypeInternal;
-extern SourceCodeInfo_LocationDefaultTypeInternal _SourceCodeInfo_Location_default_instance_;
+LIBPROTOC_EXPORT extern SourceCodeInfo_LocationDefaultTypeInternal _SourceCodeInfo_Location_default_instance_;
class UninterpretedOption;
class UninterpretedOptionDefaultTypeInternal;
-extern UninterpretedOptionDefaultTypeInternal _UninterpretedOption_default_instance_;
+LIBPROTOC_EXPORT extern UninterpretedOptionDefaultTypeInternal _UninterpretedOption_default_instance_;
class UninterpretedOption_NamePart;
class UninterpretedOption_NamePartDefaultTypeInternal;
-extern UninterpretedOption_NamePartDefaultTypeInternal _UninterpretedOption_NamePart_default_instance_;
+LIBPROTOC_EXPORT extern UninterpretedOption_NamePartDefaultTypeInternal _UninterpretedOption_NamePart_default_instance_;
namespace compiler {
class CodeGeneratorRequest;
class CodeGeneratorRequestDefaultTypeInternal;
-extern CodeGeneratorRequestDefaultTypeInternal _CodeGeneratorRequest_default_instance_;
+LIBPROTOC_EXPORT extern CodeGeneratorRequestDefaultTypeInternal _CodeGeneratorRequest_default_instance_;
class CodeGeneratorResponse;
class CodeGeneratorResponseDefaultTypeInternal;
-extern CodeGeneratorResponseDefaultTypeInternal _CodeGeneratorResponse_default_instance_;
+LIBPROTOC_EXPORT extern CodeGeneratorResponseDefaultTypeInternal _CodeGeneratorResponse_default_instance_;
class CodeGeneratorResponse_File;
class CodeGeneratorResponse_FileDefaultTypeInternal;
-extern CodeGeneratorResponse_FileDefaultTypeInternal _CodeGeneratorResponse_File_default_instance_;
+LIBPROTOC_EXPORT extern CodeGeneratorResponse_FileDefaultTypeInternal _CodeGeneratorResponse_File_default_instance_;
+class Version;
+class VersionDefaultTypeInternal;
+LIBPROTOC_EXPORT extern VersionDefaultTypeInternal _Version_default_instance_;
} // namespace compiler
} // namespace protobuf
} // namespace google
@@ -130,6 +133,139 @@ void LIBPROTOC_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugi
// ===================================================================
+class LIBPROTOC_EXPORT Version : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.Version) */ {
+ public:
+ Version();
+ virtual ~Version();
+
+ Version(const Version& from);
+
+ inline Version& operator=(const Version& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+ return _internal_metadata_.unknown_fields();
+ }
+
+ inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+ return _internal_metadata_.mutable_unknown_fields();
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Version& default_instance();
+
+ static inline const Version* internal_default_instance() {
+ return reinterpret_cast<const Version*>(
+ &_Version_default_instance_);
+ }
+
+ void Swap(Version* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Version* New() const PROTOBUF_FINAL { return New(NULL); }
+
+ Version* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+ void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void CopyFrom(const Version& from);
+ void MergeFrom(const Version& from);
+ void Clear() PROTOBUF_FINAL;
+ bool IsInitialized() const PROTOBUF_FINAL;
+
+ size_t ByteSizeLong() const PROTOBUF_FINAL;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+ ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output)
+ const PROTOBUF_FINAL {
+ return InternalSerializeWithCachedSizesToArray(false, output);
+ }
+ int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const PROTOBUF_FINAL;
+ void InternalSwap(Version* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return NULL;
+ }
+ inline void* MaybeArenaPtr() const {
+ return NULL;
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional int32 major = 1;
+ bool has_major() const;
+ void clear_major();
+ static const int kMajorFieldNumber = 1;
+ ::google::protobuf::int32 major() const;
+ void set_major(::google::protobuf::int32 value);
+
+ // optional int32 minor = 2;
+ bool has_minor() const;
+ void clear_minor();
+ static const int kMinorFieldNumber = 2;
+ ::google::protobuf::int32 minor() const;
+ void set_minor(::google::protobuf::int32 value);
+
+ // optional int32 patch = 3;
+ bool has_patch() const;
+ void clear_patch();
+ static const int kPatchFieldNumber = 3;
+ ::google::protobuf::int32 patch() const;
+ void set_patch(::google::protobuf::int32 value);
+
+ // optional string suffix = 4;
+ bool has_suffix() const;
+ void clear_suffix();
+ static const int kSuffixFieldNumber = 4;
+ const ::std::string& suffix() const;
+ void set_suffix(const ::std::string& value);
+ void set_suffix(const char* value);
+ void set_suffix(const char* value, size_t size);
+ ::std::string* mutable_suffix();
+ ::std::string* release_suffix();
+ void set_allocated_suffix(::std::string* suffix);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.compiler.Version)
+ private:
+ void set_has_major();
+ void clear_has_major();
+ void set_has_minor();
+ void clear_has_minor();
+ void set_has_patch();
+ void clear_has_patch();
+ void set_has_suffix();
+ void clear_has_suffix();
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ ::google::protobuf::internal::HasBits<1> _has_bits_;
+ mutable int _cached_size_;
+ ::google::protobuf::internal::ArenaStringPtr suffix_;
+ ::google::protobuf::int32 major_;
+ ::google::protobuf::int32 minor_;
+ ::google::protobuf::int32 patch_;
+ friend void LIBPROTOC_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl();
+ friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl();
+ friend const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
+
+};
+// -------------------------------------------------------------------
+
class LIBPROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorRequest) */ {
public:
CodeGeneratorRequest();
@@ -244,10 +380,21 @@ class LIBPROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
proto_file() const;
+ // optional .google.protobuf.compiler.Version compiler_version = 3;
+ bool has_compiler_version() const;
+ void clear_compiler_version();
+ static const int kCompilerVersionFieldNumber = 3;
+ const ::google::protobuf::compiler::Version& compiler_version() const;
+ ::google::protobuf::compiler::Version* mutable_compiler_version();
+ ::google::protobuf::compiler::Version* release_compiler_version();
+ void set_allocated_compiler_version(::google::protobuf::compiler::Version* compiler_version);
+
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest)
private:
void set_has_parameter();
void clear_has_parameter();
+ void set_has_compiler_version();
+ void clear_has_compiler_version();
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::internal::HasBits<1> _has_bits_;
@@ -255,6 +402,7 @@ class LIBPROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message
::google::protobuf::RepeatedPtrField< ::std::string> file_to_generate_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > proto_file_;
::google::protobuf::internal::ArenaStringPtr parameter_;
+ ::google::protobuf::compiler::Version* compiler_version_;
friend void LIBPROTOC_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl();
friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl();
friend const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
@@ -518,6 +666,136 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse : public ::google::protobuf::Messag
// ===================================================================
#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// Version
+
+// optional int32 major = 1;
+inline bool Version::has_major() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void Version::set_has_major() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void Version::clear_has_major() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void Version::clear_major() {
+ major_ = 0;
+ clear_has_major();
+}
+inline ::google::protobuf::int32 Version::major() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.major)
+ return major_;
+}
+inline void Version::set_major(::google::protobuf::int32 value) {
+ set_has_major();
+ major_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.major)
+}
+
+// optional int32 minor = 2;
+inline bool Version::has_minor() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void Version::set_has_minor() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void Version::clear_has_minor() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void Version::clear_minor() {
+ minor_ = 0;
+ clear_has_minor();
+}
+inline ::google::protobuf::int32 Version::minor() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.minor)
+ return minor_;
+}
+inline void Version::set_minor(::google::protobuf::int32 value) {
+ set_has_minor();
+ minor_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.minor)
+}
+
+// optional int32 patch = 3;
+inline bool Version::has_patch() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void Version::set_has_patch() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void Version::clear_has_patch() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void Version::clear_patch() {
+ patch_ = 0;
+ clear_has_patch();
+}
+inline ::google::protobuf::int32 Version::patch() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.patch)
+ return patch_;
+}
+inline void Version::set_patch(::google::protobuf::int32 value) {
+ set_has_patch();
+ patch_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.patch)
+}
+
+// optional string suffix = 4;
+inline bool Version::has_suffix() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void Version::set_has_suffix() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void Version::clear_has_suffix() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void Version::clear_suffix() {
+ suffix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_suffix();
+}
+inline const ::std::string& Version::suffix() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.suffix)
+ return suffix_.GetNoArena();
+}
+inline void Version::set_suffix(const ::std::string& value) {
+ set_has_suffix();
+ suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix)
+}
+inline void Version::set_suffix(const char* value) {
+ set_has_suffix();
+ suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.Version.suffix)
+}
+inline void Version::set_suffix(const char* value, size_t size) {
+ set_has_suffix();
+ suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.Version.suffix)
+}
+inline ::std::string* Version::mutable_suffix() {
+ set_has_suffix();
+ // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.Version.suffix)
+ return suffix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Version::release_suffix() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.Version.suffix)
+ clear_has_suffix();
+ return suffix_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Version::set_allocated_suffix(::std::string* suffix) {
+ if (suffix != NULL) {
+ set_has_suffix();
+ } else {
+ clear_has_suffix();
+ }
+ suffix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), suffix);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.Version.suffix)
+}
+
+// -------------------------------------------------------------------
+
// CodeGeneratorRequest
// repeated string file_to_generate = 1;
@@ -659,6 +937,51 @@ CodeGeneratorRequest::proto_file() const {
return proto_file_;
}
+// optional .google.protobuf.compiler.Version compiler_version = 3;
+inline bool CodeGeneratorRequest::has_compiler_version() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void CodeGeneratorRequest::set_has_compiler_version() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void CodeGeneratorRequest::clear_has_compiler_version() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void CodeGeneratorRequest::clear_compiler_version() {
+ if (compiler_version_ != NULL) compiler_version_->::google::protobuf::compiler::Version::Clear();
+ clear_has_compiler_version();
+}
+inline const ::google::protobuf::compiler::Version& CodeGeneratorRequest::compiler_version() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
+ return compiler_version_ != NULL ? *compiler_version_
+ : *::google::protobuf::compiler::Version::internal_default_instance();
+}
+inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() {
+ set_has_compiler_version();
+ if (compiler_version_ == NULL) {
+ compiler_version_ = new ::google::protobuf::compiler::Version;
+ }
+ // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
+ return compiler_version_;
+}
+inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::release_compiler_version() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
+ clear_has_compiler_version();
+ ::google::protobuf::compiler::Version* temp = compiler_version_;
+ compiler_version_ = NULL;
+ return temp;
+}
+inline void CodeGeneratorRequest::set_allocated_compiler_version(::google::protobuf::compiler::Version* compiler_version) {
+ delete compiler_version_;
+ compiler_version_ = compiler_version;
+ if (compiler_version) {
+ set_has_compiler_version();
+ } else {
+ clear_has_compiler_version();
+ }
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
+}
+
// -------------------------------------------------------------------
// CodeGeneratorResponse_File
@@ -918,6 +1241,8 @@ CodeGeneratorResponse::file() const {
// -------------------------------------------------------------------
+// -------------------------------------------------------------------
+
// @@protoc_insertion_point(namespace_scope)
diff --git a/src/google/protobuf/compiler/plugin.proto b/src/google/protobuf/compiler/plugin.proto
index acaee1f4..6e4da2c1 100644
--- a/src/google/protobuf/compiler/plugin.proto
+++ b/src/google/protobuf/compiler/plugin.proto
@@ -53,6 +53,16 @@ option go_package = "plugin_go";
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
@@ -75,6 +85,9 @@ message CodeGeneratorRequest {
// is not similarly optimized on protoc's end -- it will store all fields in
// memory at once before sending them to the plugin.
repeated FileDescriptorProto proto_file = 15;
+
+ // The version number of protocol compiler.
+ optional Version compiler_version = 3;
}
// The plugin writes an encoded CodeGeneratorResponse to stdout.
diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc
index 56e75fa4..7c72a5a1 100644
--- a/src/google/protobuf/descriptor.pb.cc
+++ b/src/google/protobuf/descriptor.pb.cc
@@ -734,12 +734,13 @@ void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto_impl() {
"(\0132-.google.protobuf.GeneratedCodeInfo.A"
"nnotation\032O\n\nAnnotation\022\020\n\004path\030\001 \003(\005B\002\020"
"\001\022\023\n\013source_file\030\002 \001(\t\022\r\n\005begin\030\003 \001(\005\022\013\n"
- "\003end\030\004 \001(\005BX\n\023com.google.protobufB\020Descr"
- "iptorProtosH\001Z\ndescriptor\242\002\003GPB\252\002\032Google"
- ".Protobuf.Reflection"
+ "\003end\030\004 \001(\005B\214\001\n\023com.google.protobufB\020Desc"
+ "riptorProtosH\001Z>github.com/golang/protob"
+ "uf/protoc-gen-go/descriptor;descriptor\242\002"
+ "\003GPB\252\002\032Google.Protobuf.Reflection"
};
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 5500);
+ descriptor, 5553);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/descriptor.proto", &protobuf_RegisterTypes);
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto);
diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h
index 00956cbf..8459b138 100644
--- a/src/google/protobuf/descriptor.pb.h
+++ b/src/google/protobuf/descriptor.pb.h
@@ -33,79 +33,79 @@ namespace google {
namespace protobuf {
class DescriptorProto;
class DescriptorProtoDefaultTypeInternal;
-extern DescriptorProtoDefaultTypeInternal _DescriptorProto_default_instance_;
+LIBPROTOBUF_EXPORT extern DescriptorProtoDefaultTypeInternal _DescriptorProto_default_instance_;
class DescriptorProto_ExtensionRange;
class DescriptorProto_ExtensionRangeDefaultTypeInternal;
-extern DescriptorProto_ExtensionRangeDefaultTypeInternal _DescriptorProto_ExtensionRange_default_instance_;
+LIBPROTOBUF_EXPORT extern DescriptorProto_ExtensionRangeDefaultTypeInternal _DescriptorProto_ExtensionRange_default_instance_;
class DescriptorProto_ReservedRange;
class DescriptorProto_ReservedRangeDefaultTypeInternal;
-extern DescriptorProto_ReservedRangeDefaultTypeInternal _DescriptorProto_ReservedRange_default_instance_;
+LIBPROTOBUF_EXPORT extern DescriptorProto_ReservedRangeDefaultTypeInternal _DescriptorProto_ReservedRange_default_instance_;
class EnumDescriptorProto;
class EnumDescriptorProtoDefaultTypeInternal;
-extern EnumDescriptorProtoDefaultTypeInternal _EnumDescriptorProto_default_instance_;
+LIBPROTOBUF_EXPORT extern EnumDescriptorProtoDefaultTypeInternal _EnumDescriptorProto_default_instance_;
class EnumOptions;
class EnumOptionsDefaultTypeInternal;
-extern EnumOptionsDefaultTypeInternal _EnumOptions_default_instance_;
+LIBPROTOBUF_EXPORT extern EnumOptionsDefaultTypeInternal _EnumOptions_default_instance_;
class EnumValueDescriptorProto;
class EnumValueDescriptorProtoDefaultTypeInternal;
-extern EnumValueDescriptorProtoDefaultTypeInternal _EnumValueDescriptorProto_default_instance_;
+LIBPROTOBUF_EXPORT extern EnumValueDescriptorProtoDefaultTypeInternal _EnumValueDescriptorProto_default_instance_;
class EnumValueOptions;
class EnumValueOptionsDefaultTypeInternal;
-extern EnumValueOptionsDefaultTypeInternal _EnumValueOptions_default_instance_;
+LIBPROTOBUF_EXPORT extern EnumValueOptionsDefaultTypeInternal _EnumValueOptions_default_instance_;
class FieldDescriptorProto;
class FieldDescriptorProtoDefaultTypeInternal;
-extern FieldDescriptorProtoDefaultTypeInternal _FieldDescriptorProto_default_instance_;
+LIBPROTOBUF_EXPORT extern FieldDescriptorProtoDefaultTypeInternal _FieldDescriptorProto_default_instance_;
class FieldOptions;
class FieldOptionsDefaultTypeInternal;
-extern FieldOptionsDefaultTypeInternal _FieldOptions_default_instance_;
+LIBPROTOBUF_EXPORT extern FieldOptionsDefaultTypeInternal _FieldOptions_default_instance_;
class FileDescriptorProto;
class FileDescriptorProtoDefaultTypeInternal;
-extern FileDescriptorProtoDefaultTypeInternal _FileDescriptorProto_default_instance_;
+LIBPROTOBUF_EXPORT extern FileDescriptorProtoDefaultTypeInternal _FileDescriptorProto_default_instance_;
class FileDescriptorSet;
class FileDescriptorSetDefaultTypeInternal;
-extern FileDescriptorSetDefaultTypeInternal _FileDescriptorSet_default_instance_;
+LIBPROTOBUF_EXPORT extern FileDescriptorSetDefaultTypeInternal _FileDescriptorSet_default_instance_;
class FileOptions;
class FileOptionsDefaultTypeInternal;
-extern FileOptionsDefaultTypeInternal _FileOptions_default_instance_;
+LIBPROTOBUF_EXPORT extern FileOptionsDefaultTypeInternal _FileOptions_default_instance_;
class GeneratedCodeInfo;
class GeneratedCodeInfoDefaultTypeInternal;
-extern GeneratedCodeInfoDefaultTypeInternal _GeneratedCodeInfo_default_instance_;
+LIBPROTOBUF_EXPORT extern GeneratedCodeInfoDefaultTypeInternal _GeneratedCodeInfo_default_instance_;
class GeneratedCodeInfo_Annotation;
class GeneratedCodeInfo_AnnotationDefaultTypeInternal;
-extern GeneratedCodeInfo_AnnotationDefaultTypeInternal _GeneratedCodeInfo_Annotation_default_instance_;
+LIBPROTOBUF_EXPORT extern GeneratedCodeInfo_AnnotationDefaultTypeInternal _GeneratedCodeInfo_Annotation_default_instance_;
class MessageOptions;
class MessageOptionsDefaultTypeInternal;
-extern MessageOptionsDefaultTypeInternal _MessageOptions_default_instance_;
+LIBPROTOBUF_EXPORT extern MessageOptionsDefaultTypeInternal _MessageOptions_default_instance_;
class MethodDescriptorProto;
class MethodDescriptorProtoDefaultTypeInternal;
-extern MethodDescriptorProtoDefaultTypeInternal _MethodDescriptorProto_default_instance_;
+LIBPROTOBUF_EXPORT extern MethodDescriptorProtoDefaultTypeInternal _MethodDescriptorProto_default_instance_;
class MethodOptions;
class MethodOptionsDefaultTypeInternal;
-extern MethodOptionsDefaultTypeInternal _MethodOptions_default_instance_;
+LIBPROTOBUF_EXPORT extern MethodOptionsDefaultTypeInternal _MethodOptions_default_instance_;
class OneofDescriptorProto;
class OneofDescriptorProtoDefaultTypeInternal;
-extern OneofDescriptorProtoDefaultTypeInternal _OneofDescriptorProto_default_instance_;
+LIBPROTOBUF_EXPORT extern OneofDescriptorProtoDefaultTypeInternal _OneofDescriptorProto_default_instance_;
class OneofOptions;
class OneofOptionsDefaultTypeInternal;
-extern OneofOptionsDefaultTypeInternal _OneofOptions_default_instance_;
+LIBPROTOBUF_EXPORT extern OneofOptionsDefaultTypeInternal _OneofOptions_default_instance_;
class ServiceDescriptorProto;
class ServiceDescriptorProtoDefaultTypeInternal;
-extern ServiceDescriptorProtoDefaultTypeInternal _ServiceDescriptorProto_default_instance_;
+LIBPROTOBUF_EXPORT extern ServiceDescriptorProtoDefaultTypeInternal _ServiceDescriptorProto_default_instance_;
class ServiceOptions;
class ServiceOptionsDefaultTypeInternal;
-extern ServiceOptionsDefaultTypeInternal _ServiceOptions_default_instance_;
+LIBPROTOBUF_EXPORT extern ServiceOptionsDefaultTypeInternal _ServiceOptions_default_instance_;
class SourceCodeInfo;
class SourceCodeInfoDefaultTypeInternal;
-extern SourceCodeInfoDefaultTypeInternal _SourceCodeInfo_default_instance_;
+LIBPROTOBUF_EXPORT extern SourceCodeInfoDefaultTypeInternal _SourceCodeInfo_default_instance_;
class SourceCodeInfo_Location;
class SourceCodeInfo_LocationDefaultTypeInternal;
-extern SourceCodeInfo_LocationDefaultTypeInternal _SourceCodeInfo_Location_default_instance_;
+LIBPROTOBUF_EXPORT extern SourceCodeInfo_LocationDefaultTypeInternal _SourceCodeInfo_Location_default_instance_;
class UninterpretedOption;
class UninterpretedOptionDefaultTypeInternal;
-extern UninterpretedOptionDefaultTypeInternal _UninterpretedOption_default_instance_;
+LIBPROTOBUF_EXPORT extern UninterpretedOptionDefaultTypeInternal _UninterpretedOption_default_instance_;
class UninterpretedOption_NamePart;
class UninterpretedOption_NamePartDefaultTypeInternal;
-extern UninterpretedOption_NamePartDefaultTypeInternal _UninterpretedOption_NamePart_default_instance_;
+LIBPROTOBUF_EXPORT extern UninterpretedOption_NamePartDefaultTypeInternal _UninterpretedOption_NamePart_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/src/google/protobuf/descriptor.proto b/src/google/protobuf/descriptor.proto
index eae31601..03aba076 100644
--- a/src/google/protobuf/descriptor.proto
+++ b/src/google/protobuf/descriptor.proto
@@ -40,7 +40,7 @@
syntax = "proto2";
package google.protobuf;
-option go_package = "descriptor";
+option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";
option java_package = "com.google.protobuf";
option java_outer_classname = "DescriptorProtos";
option csharp_namespace = "Google.Protobuf.Reflection";
diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h
index 24414d28..f8e67cc5 100644
--- a/src/google/protobuf/duration.pb.h
+++ b/src/google/protobuf/duration.pb.h
@@ -32,7 +32,7 @@ namespace google {
namespace protobuf {
class Duration;
class DurationDefaultTypeInternal;
-extern DurationDefaultTypeInternal _Duration_default_instance_;
+LIBPROTOBUF_EXPORT extern DurationDefaultTypeInternal _Duration_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h
index e2aca67d..4a84bb4f 100644
--- a/src/google/protobuf/empty.pb.h
+++ b/src/google/protobuf/empty.pb.h
@@ -32,7 +32,7 @@ namespace google {
namespace protobuf {
class Empty;
class EmptyDefaultTypeInternal;
-extern EmptyDefaultTypeInternal _Empty_default_instance_;
+LIBPROTOBUF_EXPORT extern EmptyDefaultTypeInternal _Empty_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h
index 6b4c5f99..d7600c1b 100644
--- a/src/google/protobuf/field_mask.pb.h
+++ b/src/google/protobuf/field_mask.pb.h
@@ -32,7 +32,7 @@ namespace google {
namespace protobuf {
class FieldMask;
class FieldMaskDefaultTypeInternal;
-extern FieldMaskDefaultTypeInternal _FieldMask_default_instance_;
+LIBPROTOBUF_EXPORT extern FieldMaskDefaultTypeInternal _FieldMask_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h
index ea97a7c8..2633ab62 100644
--- a/src/google/protobuf/generated_message_reflection.h
+++ b/src/google/protobuf/generated_message_reflection.h
@@ -660,14 +660,14 @@ class LIBPROTOBUF_EXPORT GeneratedMessageReflection PROTOBUF_FINAL : public Refl
// choose 16 rather than some other number just in case the compiler would
// be confused by an unaligned pointer.
#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TYPE, FIELD) \
- static_cast<int>( \
- reinterpret_cast<const char*>( \
- &reinterpret_cast<const TYPE*>(16)->FIELD) - \
+ static_cast< ::google::protobuf::uint32>( \
+ reinterpret_cast<const char*>( \
+ &reinterpret_cast<const TYPE*>(16)->FIELD) - \
reinterpret_cast<const char*>(16))
#endif
#define PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ONEOF, FIELD) \
- static_cast< ::google::protobuf::uint32>( \
+ static_cast< ::google::protobuf::uint32>( \
reinterpret_cast<const char*>(&(ONEOF->FIELD)) \
- reinterpret_cast<const char*>(ONEOF))
diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h
index b1c49e37..14101832 100644
--- a/src/google/protobuf/generated_message_util.h
+++ b/src/google/protobuf/generated_message_util.h
@@ -46,7 +46,7 @@
#include <google/protobuf/has_bits.h>
#ifndef PROTOBUF_FINAL
-#if __cplusplus >= 201103L
+#if LANG_CXX11
#define PROTOBUF_FINAL final
#else
#define PROTOBUF_FINAL
@@ -99,7 +99,7 @@ class ExplicitlyConstructed {
}
}
-#if __cplusplus >= 201103L
+#if LANG_CXX11
constexpr
#endif
const T&
@@ -125,7 +125,7 @@ class ExplicitlyConstructed {
// Default empty string object. Don't use this directly. Instead, call
// GetEmptyString() to get the reference.
-extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
+LIBPROTOBUF_EXPORT extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
LIBPROTOBUF_EXPORT extern ProtobufOnceType empty_string_once_init_;
LIBPROTOBUF_EXPORT void InitEmptyString();
diff --git a/src/google/protobuf/io/coded_stream.h b/src/google/protobuf/io/coded_stream.h
index d2a3e279..dc42e2fe 100644
--- a/src/google/protobuf/io/coded_stream.h
+++ b/src/google/protobuf/io/coded_stream.h
@@ -110,6 +110,7 @@
#define GOOGLE_PROTOBUF_IO_CODED_STREAM_H__
#include <assert.h>
+#include <climits>
#include <string>
#include <utility>
#ifdef _MSC_VER
diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h
index efd421e6..47ced29f 100644
--- a/src/google/protobuf/map.h
+++ b/src/google/protobuf/map.h
@@ -615,7 +615,6 @@ class Map {
#if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE) && \
!defined(GOOGLE_PROTOBUF_OS_NACL) && \
- !defined(GOOGLE_PROTOBUF_OS_ANDROID) && \
!defined(GOOGLE_PROTOBUF_OS_EMSCRIPTEN)
template<class NodeType, class... Args>
void construct(NodeType* p, Args&&... args) {
diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h
index d5de8cdb..5e5ed306 100644
--- a/src/google/protobuf/message_lite.h
+++ b/src/google/protobuf/message_lite.h
@@ -39,6 +39,7 @@
#ifndef GOOGLE_PROTOBUF_MESSAGE_LITE_H__
#define GOOGLE_PROTOBUF_MESSAGE_LITE_H__
+#include <climits>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/logging.h>
diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h
index 281249d9..22150b5e 100644
--- a/src/google/protobuf/source_context.pb.h
+++ b/src/google/protobuf/source_context.pb.h
@@ -32,7 +32,7 @@ namespace google {
namespace protobuf {
class SourceContext;
class SourceContextDefaultTypeInternal;
-extern SourceContextDefaultTypeInternal _SourceContext_default_instance_;
+LIBPROTOBUF_EXPORT extern SourceContextDefaultTypeInternal _SourceContext_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h
index 4d89c11c..1037d84c 100644
--- a/src/google/protobuf/struct.pb.h
+++ b/src/google/protobuf/struct.pb.h
@@ -35,13 +35,13 @@ namespace google {
namespace protobuf {
class ListValue;
class ListValueDefaultTypeInternal;
-extern ListValueDefaultTypeInternal _ListValue_default_instance_;
+LIBPROTOBUF_EXPORT extern ListValueDefaultTypeInternal _ListValue_default_instance_;
class Struct;
class StructDefaultTypeInternal;
-extern StructDefaultTypeInternal _Struct_default_instance_;
+LIBPROTOBUF_EXPORT extern StructDefaultTypeInternal _Struct_default_instance_;
class Value;
class ValueDefaultTypeInternal;
-extern ValueDefaultTypeInternal _Value_default_instance_;
+LIBPROTOBUF_EXPORT extern ValueDefaultTypeInternal _Value_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/src/google/protobuf/stubs/atomicops.h b/src/google/protobuf/stubs/atomicops.h
index 10a71ed4..c25492f3 100644
--- a/src/google/protobuf/stubs/atomicops.h
+++ b/src/google/protobuf/stubs/atomicops.h
@@ -123,8 +123,8 @@ Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
// ensure that no later memory access can be reordered ahead of the operation.
// "Release" operations ensure that no previous memory access can be reordered
// after the operation. "Barrier" operations have both "Acquire" and "Release"
-// semantics. A MemoryBarrier() has "Barrier" semantics, but does no memory
-// access.
+// semantics. A MemoryBarrierInternal() has "Barrier" semantics, but does no
+// memory access.
Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value);
@@ -132,10 +132,10 @@ Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value);
-#if defined(__MINGW32__) && defined(MemoryBarrier)
-#undef MemoryBarrier
-#endif
-void MemoryBarrier();
+// This function was renamed from MemoryBarrier to MemoryBarrierInternal
+// because MemoryBarrier is a define in Windows ARM builds and we do not
+// undefine it because we call it from this function.
+void MemoryBarrierInternal();
void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value);
void Acquire_Store(volatile Atomic32* ptr, Atomic32 value);
void Release_Store(volatile Atomic32* ptr, Atomic32 value);
@@ -180,7 +180,7 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
#include <google/protobuf/stubs/atomicops_internals_tsan.h>
// MSVC.
#elif defined(_MSC_VER)
-#if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64)
+#if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64) || defined(GOOGLE_PROTOBUF_ARCH_ARM)
#include <google/protobuf/stubs/atomicops_internals_x86_msvc.h>
#else
#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR
diff --git a/src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h b/src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h
index 0a2d2b89..9a69d21a 100644
--- a/src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h
+++ b/src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h
@@ -37,7 +37,7 @@ namespace google {
namespace protobuf {
namespace internal {
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
__asm__ __volatile__ ("dmb ish" ::: "memory"); // NOLINT
}
@@ -117,9 +117,9 @@ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
Atomic32 increment) {
- MemoryBarrier();
+ MemoryBarrierInternal();
Atomic32 result = NoBarrier_AtomicIncrement(ptr, increment);
- MemoryBarrier();
+ MemoryBarrierInternal();
return result;
}
@@ -128,7 +128,7 @@ inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
Atomic32 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
+ MemoryBarrierInternal();
return prev;
}
@@ -136,7 +136,7 @@ inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
Atomic32 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
return prev;
@@ -148,7 +148,7 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
@@ -178,7 +178,7 @@ inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
@@ -253,9 +253,9 @@ inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
Atomic64 increment) {
- MemoryBarrier();
+ MemoryBarrierInternal();
Atomic64 result = NoBarrier_AtomicIncrement(ptr, increment);
- MemoryBarrier();
+ MemoryBarrierInternal();
return result;
}
@@ -264,7 +264,7 @@ inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
Atomic64 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
+ MemoryBarrierInternal();
return prev;
}
@@ -272,7 +272,7 @@ inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
Atomic64 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
return prev;
@@ -284,7 +284,7 @@ inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
@@ -314,7 +314,7 @@ inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
}
inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
diff --git a/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h b/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h
index 90e727b0..6e2de67f 100644
--- a/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h
+++ b/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h
@@ -115,17 +115,17 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
}
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
pLinuxKernelMemoryBarrier();
}
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
*ptr = value;
}
@@ -135,12 +135,12 @@ inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
Atomic32 value = *ptr;
- MemoryBarrier();
+ MemoryBarrierInternal();
return value;
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
diff --git a/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h b/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h
index 17dfaa51..cd97e0c9 100644
--- a/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h
+++ b/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h
@@ -110,17 +110,17 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
}
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
__sync_synchronize();
}
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
*ptr = value;
}
@@ -130,12 +130,12 @@ inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
Atomic32 value = *ptr;
- MemoryBarrier();
+ MemoryBarrierInternal();
return value;
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
diff --git a/src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h b/src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h
index 7bc584eb..44ef9c9e 100644
--- a/src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h
+++ b/src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h
@@ -52,7 +52,7 @@ typedef volatile std::atomic<Atomic32>* AtomicLocation32;
static_assert(sizeof(*(AtomicLocation32) nullptr) == sizeof(Atomic32),
"incompatible 32-bit atomic layout");
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
#if defined(__GLIBCXX__)
// Work around libstdc++ bug 51038 where atomic_thread_fence was declared but
// not defined, leading to the linker complaining about undefined references.
@@ -119,7 +119,7 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
((AtomicLocation32)ptr)->store(value, std::memory_order_relaxed);
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
@@ -135,7 +135,7 @@ inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return ((AtomicLocation32)ptr)->load(std::memory_order_relaxed);
}
@@ -202,7 +202,7 @@ inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
((AtomicLocation64)ptr)->store(value, std::memory_order_relaxed);
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
@@ -218,7 +218,7 @@ inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
}
inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return ((AtomicLocation64)ptr)->load(std::memory_order_relaxed);
}
diff --git a/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h b/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
index 7f17b30d..0b0b06ce 100644
--- a/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
+++ b/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
@@ -78,7 +78,7 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
__atomic_store_n(ptr, value, __ATOMIC_RELAXED);
}
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
__sync_synchronize();
}
diff --git a/src/google/protobuf/stubs/atomicops_internals_macosx.h b/src/google/protobuf/stubs/atomicops_internals_macosx.h
index 79633241..c242ef73 100644
--- a/src/google/protobuf/stubs/atomicops_internals_macosx.h
+++ b/src/google/protobuf/stubs/atomicops_internals_macosx.h
@@ -73,7 +73,7 @@ inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
return OSAtomicAdd32Barrier(increment, const_cast<Atomic32*>(ptr));
}
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
OSMemoryBarrier();
}
@@ -103,11 +103,11 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
*ptr = value;
}
@@ -117,12 +117,12 @@ inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
Atomic32 value = *ptr;
- MemoryBarrier();
+ MemoryBarrierInternal();
return value;
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
@@ -193,11 +193,11 @@ inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
*ptr = value;
}
@@ -207,12 +207,12 @@ inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
Atomic64 value = *ptr;
- MemoryBarrier();
+ MemoryBarrierInternal();
return value;
}
inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
diff --git a/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h b/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h
index f5837c9e..6ce6820e 100644
--- a/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h
+++ b/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h
@@ -125,8 +125,8 @@ inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
// ensure that no later memory access can be reordered ahead of the operation.
// "Release" operations ensure that no previous memory access can be reordered
// after the operation. "Barrier" operations have both "Acquire" and "Release"
-// semantics. A MemoryBarrier() has "Barrier" semantics, but does no memory
-// access.
+// semantics. A MemoryBarrierInternal() has "Barrier" semantics, but does no
+// memory access.
inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
@@ -149,17 +149,17 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
}
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
__asm__ __volatile__("sync" : : : "memory");
}
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
*ptr = value;
}
@@ -169,12 +169,12 @@ inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
Atomic32 value = *ptr;
- MemoryBarrier();
+ MemoryBarrierInternal();
return value;
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
@@ -247,9 +247,9 @@ inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
Atomic64 increment) {
- MemoryBarrier();
+ MemoryBarrierInternal();
Atomic64 res = NoBarrier_AtomicIncrement(ptr, increment);
- MemoryBarrier();
+ MemoryBarrierInternal();
return res;
}
@@ -257,20 +257,20 @@ inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
// ensure that no later memory access can be reordered ahead of the operation.
// "Release" operations ensure that no previous memory access can be reordered
// after the operation. "Barrier" operations have both "Acquire" and "Release"
-// semantics. A MemoryBarrier() has "Barrier" semantics, but does no memory
-// access.
+// semantics. A MemoryBarrierInternal() has "Barrier" semantics, but does no
+// memory access.
inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
Atomic64 res = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
+ MemoryBarrierInternal();
return res;
}
inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
}
@@ -280,11 +280,11 @@ inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
*ptr = value;
}
@@ -294,12 +294,12 @@ inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
Atomic64 value = *ptr;
- MemoryBarrier();
+ MemoryBarrierInternal();
return value;
}
inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
#endif
diff --git a/src/google/protobuf/stubs/atomicops_internals_power.h b/src/google/protobuf/stubs/atomicops_internals_power.h
index b8a42f21..cad9f1e3 100644
--- a/src/google/protobuf/stubs/atomicops_internals_power.h
+++ b/src/google/protobuf/stubs/atomicops_internals_power.h
@@ -93,7 +93,7 @@ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
return result;
}
-inline void MemoryBarrier(void) {
+inline void MemoryBarrierInternal(void) {
asm volatile (
" lwsync \n\t"
" isync \n\t"
diff --git a/src/google/protobuf/stubs/atomicops_internals_ppc_gcc.h b/src/google/protobuf/stubs/atomicops_internals_ppc_gcc.h
index 8231a578..d477dc6d 100644
--- a/src/google/protobuf/stubs/atomicops_internals_ppc_gcc.h
+++ b/src/google/protobuf/stubs/atomicops_internals_ppc_gcc.h
@@ -97,22 +97,22 @@ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32 *ptr,
inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32 *ptr,
Atomic32 increment) {
- MemoryBarrier();
+ MemoryBarrierInternal();
Atomic32 res = NoBarrier_AtomicIncrement(ptr, increment);
- MemoryBarrier();
+ MemoryBarrierInternal();
return res;
}
inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32 *ptr,
Atomic32 old_value, Atomic32 new_value) {
Atomic32 res = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
+ MemoryBarrierInternal();
return res;
}
inline Atomic32 Release_CompareAndSwap(volatile Atomic32 *ptr,
Atomic32 old_value, Atomic32 new_value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
Atomic32 res = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
return res;
}
@@ -121,15 +121,15 @@ inline void NoBarrier_Store(volatile Atomic32 *ptr, Atomic32 value) {
*ptr = value;
}
-inline void MemoryBarrier() { __asm__ __volatile__("sync" : : : "memory"); }
+inline void MemoryBarrierInternal() { __asm__ __volatile__("sync" : : : "memory"); }
inline void Acquire_Store(volatile Atomic32 *ptr, Atomic32 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic32 *ptr, Atomic32 value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
*ptr = value;
}
@@ -137,12 +137,12 @@ inline Atomic32 NoBarrier_Load(volatile const Atomic32 *ptr) { return *ptr; }
inline Atomic32 Acquire_Load(volatile const Atomic32 *ptr) {
Atomic32 value = *ptr;
- MemoryBarrier();
+ MemoryBarrierInternal();
return value;
}
inline Atomic32 Release_Load(volatile const Atomic32 *ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
diff --git a/src/google/protobuf/stubs/atomicops_internals_solaris.h b/src/google/protobuf/stubs/atomicops_internals_solaris.h
index d8057ecd..baecb993 100644
--- a/src/google/protobuf/stubs/atomicops_internals_solaris.h
+++ b/src/google/protobuf/stubs/atomicops_internals_solaris.h
@@ -54,16 +54,16 @@ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
return (Atomic32)atomic_add_32_nv((volatile uint32_t*)ptr, (uint32_t)increment);
}
-inline void MemoryBarrier(void) {
+inline void MemoryBarrierInternal(void) {
membar_producer();
membar_consumer();
}
inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
Atomic32 increment) {
- MemoryBarrier();
+ MemoryBarrierInternal();
Atomic32 ret = NoBarrier_AtomicIncrement(ptr, increment);
- MemoryBarrier();
+ MemoryBarrierInternal();
return ret;
}
@@ -72,7 +72,7 @@ inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
Atomic32 ret = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
+ MemoryBarrierInternal();
return ret;
}
@@ -80,7 +80,7 @@ inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
}
@@ -129,9 +129,9 @@ inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 incre
}
inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment) {
- MemoryBarrier();
+ MemoryBarrierInternal();
Atomic64 ret = atomic_add_64_nv((volatile uint64_t*)ptr, increment);
- MemoryBarrier();
+ MemoryBarrierInternal();
return ret;
}
@@ -139,14 +139,14 @@ inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
Atomic64 ret = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
+ MemoryBarrierInternal();
return ret;
}
inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
}
diff --git a/src/google/protobuf/stubs/atomicops_internals_tsan.h b/src/google/protobuf/stubs/atomicops_internals_tsan.h
index 0c903545..676380b1 100644
--- a/src/google/protobuf/stubs/atomicops_internals_tsan.h
+++ b/src/google/protobuf/stubs/atomicops_internals_tsan.h
@@ -206,7 +206,7 @@ inline Atomic64 Release_CompareAndSwap(volatile Atomic64 *ptr,
return cmp;
}
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
__tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
}
diff --git a/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h b/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h
index edccc59d..e80121fd 100644
--- a/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h
+++ b/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h
@@ -119,18 +119,18 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
// 64-bit implementations of memory barrier can be simpler, because it
// "mfence" is guaranteed to exist.
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
__asm__ __volatile__("mfence" : : : "memory");
}
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
#else
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
if (AtomicOps_Internalx86CPUFeatures.has_sse2) {
__asm__ __volatile__("mfence" : : : "memory");
} else { // mfence is faster but not present on PIII
@@ -168,7 +168,7 @@ inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
@@ -225,7 +225,7 @@ inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
*ptr = value;
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
@@ -262,7 +262,7 @@ inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
}
inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
diff --git a/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc b/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
index 741b164f..74a1bd4e 100644
--- a/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
+++ b/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
@@ -44,9 +44,10 @@ namespace google {
namespace protobuf {
namespace internal {
-inline void MemoryBarrier() {
- // We use MemoryBarrier from WinNT.h
- ::MemoryBarrier();
+inline void MemoryBarrierInternal() {
+ // On ARM this is a define while on x86/x64 this is
+ // a function declared in WinNT.h
+ MemoryBarrier();
}
Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
diff --git a/src/google/protobuf/stubs/atomicops_internals_x86_msvc.h b/src/google/protobuf/stubs/atomicops_internals_x86_msvc.h
index e53a641f..34d60d98 100644
--- a/src/google/protobuf/stubs/atomicops_internals_x86_msvc.h
+++ b/src/google/protobuf/stubs/atomicops_internals_x86_msvc.h
@@ -82,7 +82,7 @@ inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
@@ -125,7 +125,7 @@ inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
}
inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return *ptr;
}
diff --git a/src/google/protobuf/stubs/common.cc b/src/google/protobuf/stubs/common.cc
index 54dbafab..14655916 100644
--- a/src/google/protobuf/stubs/common.cc
+++ b/src/google/protobuf/stubs/common.cc
@@ -108,11 +108,17 @@ string VersionString(int version) {
// ===================================================================
// emulates google3/base/logging.cc
+// If the minimum logging level is not set, we default to logging messages for
+// all levels.
+#ifndef GOOGLE_PROTOBUF_MIN_LOG_LEVEL
+#define GOOGLE_PROTOBUF_MIN_LOG_LEVEL LOGLEVEL_INFO
+#endif
+
namespace internal {
+
#if defined(__ANDROID__)
inline void DefaultLogHandler(LogLevel level, const char* filename, int line,
const string& message) {
-#ifdef GOOGLE_PROTOBUF_MIN_LOG_LEVEL
if (level < GOOGLE_PROTOBUF_MIN_LOG_LEVEL) {
return;
}
@@ -143,11 +149,14 @@ inline void DefaultLogHandler(LogLevel level, const char* filename, int line,
__android_log_write(ANDROID_LOG_FATAL, "libprotobuf-native",
"terminating.\n");
}
-#endif
}
+
#else
void DefaultLogHandler(LogLevel level, const char* filename, int line,
const string& message) {
+ if (level < GOOGLE_PROTOBUF_MIN_LOG_LEVEL) {
+ return;
+ }
static const char* level_names[] = { "INFO", "WARNING", "ERROR", "FATAL" };
// We use fprintf() instead of cerr because we want this to work at static
diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h
index 43e88ff2..c595e205 100644
--- a/src/google/protobuf/stubs/common.h
+++ b/src/google/protobuf/stubs/common.h
@@ -98,6 +98,9 @@ namespace internal {
// easier: major * 10^6 + minor * 10^3 + micro
#define GOOGLE_PROTOBUF_VERSION 3001000
+// A suffix string for alpha, beta or rc releases. Empty for stable releases.
+#define GOOGLE_PROTOBUF_VERSION_SUFFIX ""
+
// The minimum library version which works with the current version of the
// headers.
#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3001000
diff --git a/src/google/protobuf/stubs/hash.h b/src/google/protobuf/stubs/hash.h
index 4eac7d5d..bf0b88b4 100644
--- a/src/google/protobuf/stubs/hash.h
+++ b/src/google/protobuf/stubs/hash.h
@@ -41,15 +41,10 @@
#define GOOGLE_PROTOBUF_HAVE_HASH_MAP 1
#define GOOGLE_PROTOBUF_HAVE_HASH_SET 1
-// Android
-#if defined(__ANDROID__)
-# undef GOOGLE_PROTOBUF_HAVE_HASH_MAP
-# undef GOOGLE_PROTOBUF_HAVE_HASH_MAP
-
// Use C++11 unordered_{map|set} if available.
-#elif ((_LIBCPP_STD_VER >= 11) || \
- (((__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X)) && \
- (__GLIBCXX__ > 20090421)))
+#if ((_LIBCPP_STD_VER >= 11) || \
+ (((__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X)) && \
+ (__GLIBCXX__ > 20090421)))
# define GOOGLE_PROTOBUF_HAS_CXX11_HASH
// For XCode >= 4.6: the compiler is clang with libc++.
diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h
index 8b7f224f..7a54060d 100644
--- a/src/google/protobuf/stubs/platform_macros.h
+++ b/src/google/protobuf/stubs/platform_macros.h
@@ -47,7 +47,7 @@
#elif defined(__QNX__)
#define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-#elif defined(__ARMEL__)
+#elif defined(_M_ARM) || defined(__ARMEL__)
#define GOOGLE_PROTOBUF_ARCH_ARM 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__aarch64__)
diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h
index 376be5f7..72adba6d 100644
--- a/src/google/protobuf/stubs/port.h
+++ b/src/google/protobuf/stubs/port.h
@@ -60,8 +60,12 @@
#endif
#else
#include <sys/param.h> // __BYTE_ORDER
+ #if defined(__OpenBSD__)
+ #include <endian.h>
+ #endif
#if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
- (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN)) && \
+ (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || \
+ (defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN)) && \
!defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
#define PROTOBUF_LITTLE_ENDIAN 1
#endif
@@ -93,6 +97,15 @@
// ===================================================================
// from google3/base/port.h
+
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L || \
+ (defined(_MSC_VER) && _MSC_VER >= 1900))
+// Define this to 1 if the code is compiled in C++11 mode; leave it
+// undefined otherwise. Do NOT define it to 0 -- that causes
+// '#ifdef LANG_CXX11' to behave differently from '#if LANG_CXX11'.
+#define LANG_CXX11 1
+#endif
+
namespace google {
namespace protobuf {
diff --git a/src/google/protobuf/stubs/strutil.cc b/src/google/protobuf/stubs/strutil.cc
index 4fa8e99f..15b6e53f 100644
--- a/src/google/protobuf/stubs/strutil.cc
+++ b/src/google/protobuf/stubs/strutil.cc
@@ -981,7 +981,7 @@ static const char two_ASCII_digits[100][2] = {
};
char* FastUInt32ToBufferLeft(uint32 u, char* buffer) {
- int digits;
+ uint32 digits;
const char *ASCII_digits = NULL;
// The idea of this implementation is to trim the number of divides to as few
// as possible by using multiplication and subtraction rather than mod (%),
diff --git a/src/google/protobuf/test_messages_proto3.proto b/src/google/protobuf/test_messages_proto3.proto
new file mode 100644
index 00000000..79230334
--- /dev/null
+++ b/src/google/protobuf/test_messages_proto3.proto
@@ -0,0 +1,227 @@
+// 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.
+//
+// Test schema for proto3 messages. This test schema is used by:
+//
+// - benchmarks
+// - fuzz tests
+// - conformance tests
+//
+
+syntax = "proto3";
+
+package protobuf_test_messages.proto3;
+option java_package = "com.google.protobuf_test_messages.proto3";
+
+// This is the default, but we specify it here explicitly.
+option optimize_for = SPEED;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+
+option cc_enable_arenas = true;
+
+// This proto includes every type of field in both singular and repeated
+// forms.
+//
+// Also, crucially, all messages and enums in this file are eventually
+// submessages of this message. So for example, a fuzz test of TestAllTypes
+// could trigger bugs that occur in any message type in this file. We verify
+// this stays true in a unit test.
+message TestAllTypes {
+ message NestedMessage {
+ int32 a = 1;
+ TestAllTypes corecursive = 2;
+ }
+
+ enum NestedEnum {
+ FOO = 0;
+ BAR = 1;
+ BAZ = 2;
+ NEG = -1; // Intentionally negative.
+ }
+
+ // Singular
+ int32 optional_int32 = 1;
+ int64 optional_int64 = 2;
+ uint32 optional_uint32 = 3;
+ uint64 optional_uint64 = 4;
+ sint32 optional_sint32 = 5;
+ sint64 optional_sint64 = 6;
+ fixed32 optional_fixed32 = 7;
+ fixed64 optional_fixed64 = 8;
+ sfixed32 optional_sfixed32 = 9;
+ sfixed64 optional_sfixed64 = 10;
+ float optional_float = 11;
+ double optional_double = 12;
+ bool optional_bool = 13;
+ string optional_string = 14;
+ bytes optional_bytes = 15;
+
+ NestedMessage optional_nested_message = 18;
+ ForeignMessage optional_foreign_message = 19;
+
+ NestedEnum optional_nested_enum = 21;
+ ForeignEnum optional_foreign_enum = 22;
+
+ string optional_string_piece = 24 [ctype=STRING_PIECE];
+ string optional_cord = 25 [ctype=CORD];
+
+ TestAllTypes recursive_message = 27;
+
+ // Repeated
+ repeated int32 repeated_int32 = 31;
+ repeated int64 repeated_int64 = 32;
+ repeated uint32 repeated_uint32 = 33;
+ repeated uint64 repeated_uint64 = 34;
+ repeated sint32 repeated_sint32 = 35;
+ repeated sint64 repeated_sint64 = 36;
+ repeated fixed32 repeated_fixed32 = 37;
+ repeated fixed64 repeated_fixed64 = 38;
+ repeated sfixed32 repeated_sfixed32 = 39;
+ repeated sfixed64 repeated_sfixed64 = 40;
+ repeated float repeated_float = 41;
+ repeated double repeated_double = 42;
+ repeated bool repeated_bool = 43;
+ repeated string repeated_string = 44;
+ repeated bytes repeated_bytes = 45;
+
+ repeated NestedMessage repeated_nested_message = 48;
+ repeated ForeignMessage repeated_foreign_message = 49;
+
+ repeated NestedEnum repeated_nested_enum = 51;
+ repeated ForeignEnum repeated_foreign_enum = 52;
+
+ repeated string repeated_string_piece = 54 [ctype=STRING_PIECE];
+ repeated string repeated_cord = 55 [ctype=CORD];
+
+ // Map
+ map < int32, int32> map_int32_int32 = 56;
+ map < int64, int64> map_int64_int64 = 57;
+ map < uint32, uint32> map_uint32_uint32 = 58;
+ map < uint64, uint64> map_uint64_uint64 = 59;
+ map < sint32, sint32> map_sint32_sint32 = 60;
+ map < sint64, sint64> map_sint64_sint64 = 61;
+ map < fixed32, fixed32> map_fixed32_fixed32 = 62;
+ map < fixed64, fixed64> map_fixed64_fixed64 = 63;
+ map <sfixed32, sfixed32> map_sfixed32_sfixed32 = 64;
+ map <sfixed64, sfixed64> map_sfixed64_sfixed64 = 65;
+ map < int32, float> map_int32_float = 66;
+ map < int32, double> map_int32_double = 67;
+ map < bool, bool> map_bool_bool = 68;
+ map < string, string> map_string_string = 69;
+ map < string, bytes> map_string_bytes = 70;
+ map < string, NestedMessage> map_string_nested_message = 71;
+ map < string, ForeignMessage> map_string_foreign_message = 72;
+ map < string, NestedEnum> map_string_nested_enum = 73;
+ map < string, ForeignEnum> map_string_foreign_enum = 74;
+
+ oneof oneof_field {
+ uint32 oneof_uint32 = 111;
+ NestedMessage oneof_nested_message = 112;
+ string oneof_string = 113;
+ bytes oneof_bytes = 114;
+ bool oneof_bool = 115;
+ uint64 oneof_uint64 = 116;
+ float oneof_float = 117;
+ double oneof_double = 118;
+ NestedEnum oneof_enum = 119;
+ }
+
+ // Well-known types
+ google.protobuf.BoolValue optional_bool_wrapper = 201;
+ google.protobuf.Int32Value optional_int32_wrapper = 202;
+ google.protobuf.Int64Value optional_int64_wrapper = 203;
+ google.protobuf.UInt32Value optional_uint32_wrapper = 204;
+ google.protobuf.UInt64Value optional_uint64_wrapper = 205;
+ google.protobuf.FloatValue optional_float_wrapper = 206;
+ google.protobuf.DoubleValue optional_double_wrapper = 207;
+ google.protobuf.StringValue optional_string_wrapper = 208;
+ google.protobuf.BytesValue optional_bytes_wrapper = 209;
+
+ repeated google.protobuf.BoolValue repeated_bool_wrapper = 211;
+ repeated google.protobuf.Int32Value repeated_int32_wrapper = 212;
+ repeated google.protobuf.Int64Value repeated_int64_wrapper = 213;
+ repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 214;
+ repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 215;
+ repeated google.protobuf.FloatValue repeated_float_wrapper = 216;
+ repeated google.protobuf.DoubleValue repeated_double_wrapper = 217;
+ repeated google.protobuf.StringValue repeated_string_wrapper = 218;
+ repeated google.protobuf.BytesValue repeated_bytes_wrapper = 219;
+
+ google.protobuf.Duration optional_duration = 301;
+ google.protobuf.Timestamp optional_timestamp = 302;
+ google.protobuf.FieldMask optional_field_mask = 303;
+ google.protobuf.Struct optional_struct = 304;
+ google.protobuf.Any optional_any = 305;
+ google.protobuf.Value optional_value = 306;
+
+ repeated google.protobuf.Duration repeated_duration = 311;
+ repeated google.protobuf.Timestamp repeated_timestamp = 312;
+ repeated google.protobuf.FieldMask repeated_fieldmask = 313;
+ repeated google.protobuf.Struct repeated_struct = 324;
+ repeated google.protobuf.Any repeated_any = 315;
+ repeated google.protobuf.Value repeated_value = 316;
+
+ // Test field-name-to-JSON-name convention.
+ // (protobuf says names can be any valid C/C++ identifier.)
+ int32 fieldname1 = 401;
+ int32 field_name2 = 402;
+ int32 _field_name3 = 403;
+ int32 field__name4_ = 404;
+ int32 field0name5 = 405;
+ int32 field_0_name6 = 406;
+ int32 fieldName7 = 407;
+ int32 FieldName8 = 408;
+ int32 field_Name9 = 409;
+ int32 Field_Name10 = 410;
+ int32 FIELD_NAME11 = 411;
+ int32 FIELD_name12 = 412;
+ int32 __field_name13 = 413;
+ int32 __Field_name14 = 414;
+ int32 field__name15 = 415;
+ int32 field__Name16 = 416;
+ int32 field_name17__ = 417;
+ int32 Field_name18__ = 418;
+}
+
+message ForeignMessage {
+ int32 c = 1;
+}
+
+enum ForeignEnum {
+ FOREIGN_FOO = 0;
+ FOREIGN_BAR = 1;
+ FOREIGN_BAZ = 2;
+}
diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h
index 38ddb635..63875c68 100644
--- a/src/google/protobuf/timestamp.pb.h
+++ b/src/google/protobuf/timestamp.pb.h
@@ -32,7 +32,7 @@ namespace google {
namespace protobuf {
class Timestamp;
class TimestampDefaultTypeInternal;
-extern TimestampDefaultTypeInternal _Timestamp_default_instance_;
+LIBPROTOBUF_EXPORT extern TimestampDefaultTypeInternal _Timestamp_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h
index 6f29ab61..73fa35a3 100644
--- a/src/google/protobuf/type.pb.h
+++ b/src/google/protobuf/type.pb.h
@@ -35,25 +35,25 @@ namespace google {
namespace protobuf {
class Any;
class AnyDefaultTypeInternal;
-extern AnyDefaultTypeInternal _Any_default_instance_;
+LIBPROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
class Enum;
class EnumDefaultTypeInternal;
-extern EnumDefaultTypeInternal _Enum_default_instance_;
+LIBPROTOBUF_EXPORT extern EnumDefaultTypeInternal _Enum_default_instance_;
class EnumValue;
class EnumValueDefaultTypeInternal;
-extern EnumValueDefaultTypeInternal _EnumValue_default_instance_;
+LIBPROTOBUF_EXPORT extern EnumValueDefaultTypeInternal _EnumValue_default_instance_;
class Field;
class FieldDefaultTypeInternal;
-extern FieldDefaultTypeInternal _Field_default_instance_;
+LIBPROTOBUF_EXPORT extern FieldDefaultTypeInternal _Field_default_instance_;
class Option;
class OptionDefaultTypeInternal;
-extern OptionDefaultTypeInternal _Option_default_instance_;
+LIBPROTOBUF_EXPORT extern OptionDefaultTypeInternal _Option_default_instance_;
class SourceContext;
class SourceContextDefaultTypeInternal;
-extern SourceContextDefaultTypeInternal _SourceContext_default_instance_;
+LIBPROTOBUF_EXPORT extern SourceContextDefaultTypeInternal _SourceContext_default_instance_;
class Type;
class TypeDefaultTypeInternal;
-extern TypeDefaultTypeInternal _Type_default_instance_;
+LIBPROTOBUF_EXPORT extern TypeDefaultTypeInternal _Type_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h
index 0197b6c5..cf8e1693 100644
--- a/src/google/protobuf/wrappers.pb.h
+++ b/src/google/protobuf/wrappers.pb.h
@@ -32,31 +32,31 @@ namespace google {
namespace protobuf {
class BoolValue;
class BoolValueDefaultTypeInternal;
-extern BoolValueDefaultTypeInternal _BoolValue_default_instance_;
+LIBPROTOBUF_EXPORT extern BoolValueDefaultTypeInternal _BoolValue_default_instance_;
class BytesValue;
class BytesValueDefaultTypeInternal;
-extern BytesValueDefaultTypeInternal _BytesValue_default_instance_;
+LIBPROTOBUF_EXPORT extern BytesValueDefaultTypeInternal _BytesValue_default_instance_;
class DoubleValue;
class DoubleValueDefaultTypeInternal;
-extern DoubleValueDefaultTypeInternal _DoubleValue_default_instance_;
+LIBPROTOBUF_EXPORT extern DoubleValueDefaultTypeInternal _DoubleValue_default_instance_;
class FloatValue;
class FloatValueDefaultTypeInternal;
-extern FloatValueDefaultTypeInternal _FloatValue_default_instance_;
+LIBPROTOBUF_EXPORT extern FloatValueDefaultTypeInternal _FloatValue_default_instance_;
class Int32Value;
class Int32ValueDefaultTypeInternal;
-extern Int32ValueDefaultTypeInternal _Int32Value_default_instance_;
+LIBPROTOBUF_EXPORT extern Int32ValueDefaultTypeInternal _Int32Value_default_instance_;
class Int64Value;
class Int64ValueDefaultTypeInternal;
-extern Int64ValueDefaultTypeInternal _Int64Value_default_instance_;
+LIBPROTOBUF_EXPORT extern Int64ValueDefaultTypeInternal _Int64Value_default_instance_;
class StringValue;
class StringValueDefaultTypeInternal;
-extern StringValueDefaultTypeInternal _StringValue_default_instance_;
+LIBPROTOBUF_EXPORT extern StringValueDefaultTypeInternal _StringValue_default_instance_;
class UInt32Value;
class UInt32ValueDefaultTypeInternal;
-extern UInt32ValueDefaultTypeInternal _UInt32Value_default_instance_;
+LIBPROTOBUF_EXPORT extern UInt32ValueDefaultTypeInternal _UInt32Value_default_instance_;
class UInt64Value;
class UInt64ValueDefaultTypeInternal;
-extern UInt64ValueDefaultTypeInternal _UInt64Value_default_instance_;
+LIBPROTOBUF_EXPORT extern UInt64ValueDefaultTypeInternal _UInt64Value_default_instance_;
} // namespace protobuf
} // namespace google
diff --git a/tests.sh b/tests.sh
index eb8255e1..ce149bc9 100755
--- a/tests.sh
+++ b/tests.sh
@@ -38,11 +38,21 @@ build_cpp() {
make check -j2
cd conformance && make test_cpp && cd ..
- # Verify benchmarking code can build successfully.
- git submodule init
- git submodule update
- cd third_party/benchmark && cmake -DCMAKE_BUILD_TYPE=Release && make && cd ../..
- cd benchmarks && make && ./generate-datasets && cd ..
+ # The benchmark code depends on cmake, so test if it is installed before
+ # trying to do the build.
+ # NOTE: The travis macOS images say they have cmake, but the xcode8.1 image
+ # appears to be missing it: https://github.com/travis-ci/travis-ci/issues/6996
+ if [[ $(type cmake 2>/dev/null) ]]; then
+ # Verify benchmarking code can build successfully.
+ git submodule init
+ git submodule update
+ cd third_party/benchmark && cmake -DCMAKE_BUILD_TYPE=Release && make && cd ../..
+ cd benchmarks && make && ./generate-datasets && cd ..
+ else
+ echo ""
+ echo "WARNING: Skipping validation of the bench marking code, cmake isn't installed."
+ echo ""
+ fi
}
build_cpp_distcheck() {
@@ -89,7 +99,7 @@ build_csharp() {
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update -qq
sudo apt-get install -qq mono-devel referenceassemblies-pcl nunit
-
+
# Then install the dotnet SDK as per Ubuntu 14.04 instructions on dot.net.
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
@@ -265,15 +275,6 @@ build_objectivec_osx() {
}
build_objectivec_cocoapods_integration() {
- # First, load the RVM environment in bash, needed to update ruby.
- source ~/.rvm/scripts/rvm
- # Update rvm to the latest version. This is needed to solve
- # https://github.com/google/protobuf/issues/1786 and may not be needed in the
- # future when Travis updates the default version of rvm.
- rvm get head
- # Update ruby to 2.2.3 as the default one crashes with segmentation faults
- # when using pod.
- rvm use 2.2.3 --install --binary --fuzzy
# Update pod to the latest version.
gem install cocoapods --no-ri --no-rdoc
objectivec/Tests/CocoaPods/run_tests.sh
@@ -327,7 +328,9 @@ build_jruby() {
build_ruby_all() {
build_ruby21
build_ruby22
- build_jruby
+ # TODO(teboring): Disable jruby test temperarily for it randomly fails.
+ # https://grpc-testing.appspot.com/job/protobuf_pull_request/735/consoleFull.
+ # build_jruby
}
build_javascript() {
@@ -335,6 +338,19 @@ build_javascript() {
cd js && npm install && npm test && cd ..
}
+generate_php_test_proto() {
+ internal_build_cpp
+ pushd php/tests
+ # Generate test file
+ rm -rf generated
+ mkdir generated
+ ../../src/protoc --php_out=generated proto/test.proto proto/test_include.proto proto/test_no_namespace.proto
+ pushd ../../src
+ ./protoc --php_out=../php/tests/generated google/protobuf/empty.proto
+ popd
+ popd
+}
+
use_php() {
VERSION=$1
PHP=`which php`
@@ -346,6 +362,7 @@ use_php() {
cp "/usr/bin/php$VERSION" $PHP
cp "/usr/bin/php-config$VERSION" $PHP_CONFIG
cp "/usr/bin/phpize$VERSION" $PHPIZE
+ generate_php_test_proto
}
use_php_zts() {
@@ -356,6 +373,7 @@ use_php_zts() {
ln -sfn "/usr/local/php-${VERSION}-zts/bin/php" $PHP
ln -sfn "/usr/local/php-${VERSION}-zts/bin/php-config" $PHP_CONFIG
ln -sfn "/usr/local/php-${VERSION}-zts/bin/phpize" $PHPIZE
+ generate_php_test_proto
}
use_php_bc() {
@@ -366,13 +384,16 @@ use_php_bc() {
ln -sfn "/usr/local/php-${VERSION}-bc/bin/php" $PHP
ln -sfn "/usr/local/php-${VERSION}-bc/bin/php-config" $PHP_CONFIG
ln -sfn "/usr/local/php-${VERSION}-bc/bin/phpize" $PHPIZE
+ generate_php_test_proto
}
build_php5.5() {
use_php 5.5
+ pushd php
rm -rf vendor
cp -r /usr/local/vendor-5.5 vendor
./vendor/bin/phpunit
+ popd
}
build_php5.5_c() {
@@ -388,9 +409,11 @@ build_php5.5_zts_c() {
build_php5.5_32() {
use_php_bc 5.5
+ pushd php
rm -rf vendor
cp -r /usr/local/vendor-5.5 vendor
./vendor/bin/phpunit
+ popd
}
build_php5.5_c_32() {
@@ -401,9 +424,11 @@ build_php5.5_c_32() {
build_php5.6() {
use_php 5.6
+ pushd php
rm -rf vendor
cp -r /usr/local/vendor-5.6 vendor
./vendor/bin/phpunit
+ popd
}
build_php5.6_c() {
@@ -412,6 +437,7 @@ build_php5.6_c() {
}
build_php5.6_mac() {
+ generate_php_test_proto
# Install PHP
curl -s https://php-osx.liip.ch/install.sh | bash -s 5.6
PHP_FOLDER=`find /usr/local -type d -name "php5-5.6*"` # The folder name may change upon time
@@ -433,9 +459,11 @@ build_php5.6_mac() {
build_php7.0() {
use_php 7.0
+ pushd php
rm -rf vendor
cp -r /usr/local/vendor-7.0 vendor
./vendor/bin/phpunit
+ popd
}
build_php7.0_c() {